1. 参考资料
中文版: http://blog.csdn.net/han_xiaoyang/article/details/49949535
英文版: http://cs231n.github.io/classification/
2. 一些理解
- 这里本质上采用的是利用图像的曼哈顿距离 作为衡量图片相似度的依据, 但是, 很明显, 这种方式进行图像分类得到的误差是非常大的。
- 为了均衡误差, 采用 KNN 算法, ie, 选取与图像距离最接近的 K 幅图像数据进行投票, 取投票数最多的作为分类结果, 但是感觉效果还是并不理想
- 这是从参考文章里面抓的一张图片, 可以看到成功率真的很低。。。
3. 遇到的一些问题
3.1 python 读取数据集编码问题
- 采用的数据集 为 CIFAR10 http://www.cs.toronto.edu/~kriz/cifar.html
- 但是在windows 上面 使用python 3.4 读取这个数据集总是出错, 试了很多方法没有用, 实在没办法, 换到了centos 7 中 使用 python 2.7.5, 成功读取
3.2 读入图片数据进行显示
- 可以参考: http://www.cnblogs.com/denny402/p/5096001.html
- 使用 matplotlib.pyplot 进行绘制图形
3.3 matplotlib error - no module named tkinter
- 参考: http://stackoverflow.com/questions/36327134/matplotlib-error-no-module-named-tkinter
- 在centos 7 中安装 tkinter 即可
sudo yum install tkinter