caffe深度学习:mnist手写体的识别

第一步:数据转换,将图片文件转换为leverdb文件

F:\Caffe\caffe-master\Build\x64\Release\convert_imageset.exe --resize_height=28 --resize_width=28 --shuffle --backend="leveldb" F:\Caffe\caffe-master\data\mnist F:\Caffe\caffe-master\data\mnist\train\train.txt F:\Caffe\caffe-master\data\mnist\mnist_train_leveldb   


F:\Caffe\caffe-master\Build\x64\Release\convert_imageset.exe --resize_height=28 --resize_width=28 --shuffle --backend="leveldb" F:\Caffe\caffe-master\data\mnist F:\Caffe\caffe-master\data\mnist\test\test.txt F:\Caffe\caffe-master\data\mnist\mnist_test_leveldb 


第二步:批量训练

F:\Caffe\caffe-master\Build\x64\Release\caffe.exe train --solver=F:/Caffe/caffe-master/data/mnist/lenet_solver.prototxt  
pause  


第三步:求图像均值,如果是leverdb文件,记得加上参数 -backend=leverdb

F:\Caffe\caffe-master\Build\x64\Release\compute_image_mean.exe F:\Caffe\caffe-master\data\mnist\mnist_train_leveldb F:\Caffe\caffe-master\data\mnist\mean.binaryproto -backend=leveldb
pause 


第四步:识别

F:\Caffe\caffe-master\Build\x64\Release\classification.exe F:/Caffe/caffe-master/data/mnist/lenet.prototxt F:/Caffe/caffe-master/data/mnist/model_iter_1000.caffemodel F:/Caffe/caffe-master/data/mnist/mean.binaryproto F:/Caffe/caffe-master/data/mnist/labels.txt F:/Caffe/caffe-master/data/mnist/1.bmp
 
pause


caffe深度学习:mnist手写体的识别_第1张图片

你可能感兴趣的:(深度学习)