caffe提取已训练好模型的特征
2015-11-26 12:29
573 查看
按照caffe官网教程:
1、创建一个临时文件夹 $ mkdir examples/_temp 2、我们为三张图片添加一个文件列表 $ find `pwd`/examples/images -type f -exec echo {} \; > examples/_temp/temp.txt 3、将使用 imagedatalayer 预计标签之后的每一个文件名,所以让我们添加一个 0 到每一行 的末尾 $ sed "s/$/ 0/" examples/_temp/temp.txt > examples/_temp/file_list.txt 4、从 ILSVRC dataset 中下载均值图像数据库 $ ./data/ilsvrc12/get_ilsvrc_aux.sh 5、使用其中的 data/ilsvrc212/imagenet_mean.binaryproto 去定义网络结构。将定义结构的文件 cope 到我们的临时文件夹。 $ cp examples/feature_extraction/imagenet_val.prototxt examples/_temp 6、进入 imagenet_val.prototxt 更改路径。更改其中$CAFFE的地方 7、提取特征 $ ./build/tools/extract_features.bin models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel examples/_temp/imagenet_val.prototxt fc7 examples/_temp/features 10 lmdb 8、出现错误“Check failed: status.ok() Failed to open leveldb examples/_temp/features” $ rm -rf examples/_temp/features/ 再运行一次基本就可以了。
相关文章推荐
- Html+Css+base标签是什么及其作用介绍
- jQuery实现图片轮播效果(仿QQ商城首页、天猫首页)
- HTML中小meta的大作用
- 向ES6靠齐的Class.js
- jquery Dom操作
- Bootstrap历练实例:标签修饰
- js使用cookie记录用户名的方法
- Bootstrap每天必学之导航
- Protocol Buffers 安装使用笔记
- 如何用js得到当前页面的url信息方法
- Bootstrap 标签
- js过滤HTML标签完整实例
- 利用JS验证查询参数-选择月份后必须选择年份
- 利用JS验证查询参数-选择月份后必须选择年份
- 使用EVAL处理jqchart jquery 折线图返回数据无效的解决办法
- DTCMS会员中心快速更改样式思路
- Node.js开发者必须熟悉的四个JavaScript概念
- 把PPT放入浏览器中——12款用于演示的JS库
- jQuery滑动选取数值范围插件
- [JavaScript/JQuery] jquery 复选框全选 全不选 反选