从git上下载了solver.prototxt,trainval.prototxt以及对应的预训练模型inception-resnet-v2.caffemodel。
1、准备训练数据,图片.jpg,train.txt , val.txt 。
2、转化训练数据为lmdb。
3、计算均值文件imagenet_mean.binaryproto,得到三个均值,修改 trainval.prototxt 中对应的mean_value.
4、修改 trainval.prototxt 中 source地址 以及 solver.prototxt中的相关参数。
训练和测试时报错:Check failed: top_shape[j] == bottom[i]->shape(j) (29 vs. 30) All inputs must have the same shape, exc
按照报错的输出日志,修改对应层的 kernel_size: 3 修改成 kernel_size: 2
参考博客:https://blog.csdn.net/chris_zhangrx/article/details/78278488
所用
solver.prototxt,
trainval.prototxt文件以及预训练模型
inception-resnet-v2.caffemodel地址:
https://download.csdn.net/download/bankeey/11119839
参考github:
https://github.com/revilokeb/inception_resnetv2_caffe 没有deploy文件 可以手动修改
https://github.com/soeaver/caffe-model trainval文件中没有测试source
https://github.com/twtygqyy/Inception-resnet-v2 需要用扩充版本caffe
https://github.com/SnailTyan/caffe-model-zoo/ 文件全,可以训练,需要修改solver里的策略,不然训练效果不好