提取特征到数据库lmdb
1、先得到需要提取特征的图片的路径写到txt文件下:find pwd
/examples/images -type f -exec echo {} \; > examples/_temp/temp.txt
2、然后将得到的图片路径在后面加标签0 写到txt文件下:sed “s/$/ 0/” examples/_temp/temp.txt > examples/_temp/file_list.txt
3、当然必须要有mean文件(自己的数据图片最好是自己生产,如果直接是官网的那么下载一个即可./data/ilsvrc12/get_ilsvrc_aux.sh)
4、网络结构的定义文件复制到实验目录下:cp examples/feature_extraction/imagenet_val.prototxt examples/_temp
5、生产提取特征数据库:.build/tools/extract_features.bin models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel examples/_temp/imagenet_val.prototxt fc7 examples/_temp/features 10 lmdb
caffe官网提取fc7层图像特征到lmdb数据库
最新推荐文章于 2020-09-27 22:25:39 发布