caffe训练自己的数据集
来源:互联网 发布:windows10 配置mysql 编辑:程序博客网 时间:2024/05/21 06:22
利用python生成txt文件后,就可以利用caffe自带工具将图片转换为lmdb格式,其代码如下
#!/usr/bin/env sh# Create the imagenet lmdb inputs# N.B. set the path to the imagenet train + val data dirsset -eEXAMPLE=/home/yh/caffe/examples/H-WDATA=/home/yh/caffe/examples/H-WTOOLS=/home/yh/caffe/build/toolsTRAIN_DATA_ROOT=/home/yh/caffe/examples/H-W/train/VAL_DATA_ROOT=/home/yh/caffe/examples/H-W/val/# Set RESIZE=true to resize the images to 256x256. Leave as false if images have# already been resized using another tool.RESIZE=trueif $RESIZE; then RESIZE_HEIGHT=256 RESIZE_WIDTH=256else RESIZE_HEIGHT=0 RESIZE_WIDTH=0fiif [ ! -d "$TRAIN_DATA_ROOT" ]; then echo "Error: TRAIN_DATA_ROOT is not a path to a directory: $TRAIN_DATA_ROOT" echo "Set the TRAIN_DATA_ROOT variable in create_imagenet.sh to the path" \ "where the ImageNet training data is stored." exit 1fiif [ ! -d "$VAL_DATA_ROOT" ]; then echo "Error: VAL_DATA_ROOT is not a path to a directory: $VAL_DATA_ROOT" echo "Set the VAL_DATA_ROOT variable in create_imagenet.sh to the path" \ "where the ImageNet validation data is stored." exit 1fiecho "Creating train lmdb..."GLOG_logtostderr=1 $TOOLS/convert_imageset \ --resize_height=$RESIZE_HEIGHT \ --resize_width=$RESIZE_WIDTH \ --shuffle \ $TRAIN_DATA_ROOT \ $DATA/trainlist.txt \ $EXAMPLE/hw_train_lmdbecho "Creating val lmdb..."GLOG_logtostderr=1 $TOOLS/convert_imageset \ --resize_height=$RESIZE_HEIGHT \ --resize_width=$RESIZE_WIDTH \ --shuffle \ $VAL_DATA_ROOT \ $DATA/val.txt \ $EXAMPLE/hw_val_lmdbecho "Done."
阅读全文
0 0
- caffe 训练测试自己的数据集
- caffe训练测试自己的数据集
- caffe训练自己的数据集
- caffe训练自己的数据
- caffe训练自己的数据
- Caffe训练自己的数据
- caffe训练自己的数据
- Caffe训练自己的数据
- caffe 训练自己的数据
- caffe训练自己的数据
- caffe中训练自己的数据集的步骤
- caffe学习笔记6--训练自己的数据集
- windows-caffe 训练和测试自己的数据集
- Caffe训练和测试自己的数据集
- Caffe训练和测试自己的数据集
- Caffe训练和测试自己的数据集
- caffe训练自己的数据集——3. 数据处理
- FCN制作自己的数据集、训练和测试 caffe
- spring boot security mybitis
- 堆内存过大 Grow heap (frag case) to 39.580MB for 2560016-byte allocation
- 通过rsync+inotify实现多服务器文件的实时同步
- 丰富的应用图标库--阿里矢量图库
- 单向循环链表的简单实现
- caffe训练自己的数据集
- 【Linux】TCP 三次握手与四次挥手
- 解决沉浸式状态栏输入法弹起把状态栏顶上去的问题
- VLC优化(1) avformat_find_stream_info接口延迟降低——已知流信息
- 2017西安交大ACM小学期 文本查找[AC自动机]
- 循环链表与双向链表
- 628. Maximum Product of Three Numbers
- [bzoj1098][POI2007]办公楼biu
- redis安装