毕业设计(三) 4.20

来源:互联网 发布:java处理数据的io发 编辑:程序博客网 时间:2024/05/16 10:52

caffe中imagenet的模型里用的图片是imagenet官网的数据,我在想如何修改这个训练数据,训练自己的图片。

在/caffe-master/data/ilsvrc12中有三个txt文件,分别列出了训练用到的图片:

训练集

测试集

验证集


我估计要做十个类型的图片,所以首先要生成自己的图像文件目录。参照薛开宇caffe笔记二,使用命令如下:

在caffe-master下:             

mkdir examples/_temp

(此行是我出错的代码,单引号怎么跟人家长得不一样?因为人家输的不是单引号。。。是按键数字1左面那个点!)

find  'pwd'/examples/images -type f -exec echo {} \;>examples/_temp/temp.txt

(正确代码) find `pwd`/examples/images -type f -exec echo {} \; > examples/_temp/temp.txt

sed "s/$/ 0/" examples/_temp/temp.txt > examples/_temp/file_list.txt


0 0