使用faster rcnn训练自己的数据(py-faster-rcnn )
来源:互联网 发布:mac itunes怎么下载 编辑:程序博客网 时间:2024/05/17 02:32
出于在csdn上面学到很多东西这里也帮自己的一些收获和大家分享一下
直奔主题~~
前提是已经安装好caffe的环境 本文是在Ubuntu 15.04下做的测试 $Faster_rcnn表示py-faster-rcnn根目录
1. 修改数据接口 ($Faster_rcnn/lib/datasets)
目录下面的pascal_voc.py是主要的数据读取接口
- self._classes = ('__background__', # always index 0
'bottle', 'bus', 'car', 'cat', 'chair',
'cow', 'diningtable', 'dog', 'horse',
'motorbike', 'person', 'pottedplant',
'sheep', 'sofa', 'train', 'tvmonitor')
这里定义了要训练的类别,修改这里为自己需要训练数据的类标签,注意总类别包括背景
- 如果需要使用PASCAL数据库中的个别类 需要在
if not self.config['use_diff']:
# Exclude the samples labeled as difficult
non_diff_objs = [
obj for obj in objs if int(obj.find('difficult').text) == 0]
# if len(non_diff_objs) != len(objs):
# print 'Removed {} difficult objects'.format(
# len(objs) - len(non_diff_objs))
objs = non_diff_objs
########################################
valid_class_objs = [
obj for obj in objs if obj.find('name').text in self._classes]
objs = valid_class_objs
########################################
num_objs = len(objs)
添加#两行中间部分
2. 修改模型参数($Faster_rcnn/models/pascal_voc)
其中有三种网络模型 VGG16 ZF VGG_CNN_M_1024
硬件需要参考RGB大神写的
Requirements: hardware
- For training smaller networks (ZF, VGG_CNN_M_1024) a good GPU (e.g., Titan, K20, K40, ...) with at least 3G of memory suffices
- For training Fast R-CNN with VGG16, you'll need a K40 (~11G of memory)
Usage
To train and test a Faster R-CNN detector using the alternating optimization algorithm from our NIPS 2015 paper, useexperiments/scripts/faster_rcnn_alt_opt.sh
. Output is written underneath $FRCN_ROOT/output
.
cd $FRCN_ROOT./experiments/scripts/faster_rcnn_alt_opt.sh [GPU_ID] [NET] [--set ...]# GPU_ID is the GPU you want to train on# NET in {ZF, VGG_CNN_M_1024, VGG16} is the network arch to use# --set ... allows you to specify fast_rcnn.config options, e.g.# --set EXP_DIR seed_rng1701 RNG_SEED 1701
("alt opt" refers to the alternating optimization training algorithm described in the NIPS paper.)
To train and test a Faster R-CNN detector using the approximate joint training method, useexperiments/scripts/faster_rcnn_end2end.sh
. Output is written underneath $FRCN_ROOT/output
.
cd $FRCN_ROOT./experiments/scripts/faster_rcnn_end2end.sh [GPU_ID] [NET] [--set ...]# GPU_ID is the GPU you want to train on# NET in {ZF, VGG_CNN_M_1024, VGG16} is the network arch to use# --set ... allows you to specify fast_rcnn.config options, e.g.# --set EXP_DIR seed_rng1701 RNG_SEED 1701
- 使用faster rcnn训练自己的数据(py-faster-rcnn )
- py-faster-rcnn训练自己的数据
- 使用py-faster-rcnn训练自己的数据
- 使用py-faster-rcnn训练自己的数据集
- 使用自己的数据训练Faster-RCNN
- py-faster-rcnn用自己的数据训练模型
- py-faster-rcnn+cpu配置并训练自己的数据
- py-faster-rcnn用自己的数据训练模型
- 用py-faster-rcnn训练自己的VOC数据集
- 训练py-faster-rcnn
- 用自己的数据训练Faster-RCNN
- faster-rcnn安装,训练自己的数据
- Faster RCNN 训练自己的数据集
- Faster-RCNN训练自己的数据集
- Faster-RCNN训练自己的数据集
- faster rcnn 训练自己的数据
- faster Rcnn训练自己的数据集
- Faster-Rcnn训练自己的数据集
- 线程、多线程与线程池总结
- 根据年和月计算这个月有多少天的算法
- mysql数据库服务启动和停止命令介绍
- 乐观锁
- Android使用ViewPager实现左右循环滑动及轮播效果
- 使用faster rcnn训练自己的数据(py-faster-rcnn )
- POI导出excel,基于jgrid的公共组件
- BaseAdapter的使用(笔记)
- C#编码标准
- Thinkphp微信支付开发坑
- 【bzoj3531】[Sdoi2014]旅行 动态开点的线段树
- flex3+struts 1.3+spring+ibatis 2.x整合代码实例
- 虚函数运行机制-虚函数表
- Android 启动页面引导页面登陆注册主页通用框架