参考:Configuring an object detection pipeline

1、config文件

配置好的config文件存放路径:object_detection/samples/configs

2、PASCAL VOC数据集配置

选取faster_rcnn_resnet101_voc07.config做为该数据集的config文件,并复制到对应目录,下面为该文件的内容,需要修改的部分见备注

 # Faster R-CNN with Resnet-101 (v1), configured for Pascal VOC Dataset.
# Users should configure the fine_tune_checkpoint field in the train config as
# well as the label_map_path and input_path fields in the train_input_reader and
# eval_input_reader. Search for "PATH_TO_BE_CONFIGURED" to find the fields that
# should be configured. model {
faster_rcnn {
num_classes: 20 # 如果是自己数据集需要修改类目数
image_resizer {
keep_aspect_ratio_resizer {
min_dimension: 600
max_dimension: 1024
}
}
feature_extractor {
type: 'faster_rcnn_resnet101'
first_stage_features_stride: 16
}
first_stage_anchor_generator {
grid_anchor_generator {
scales: [0.25, 0.5, 1.0, 2.0]
aspect_ratios: [0.5, 1.0, 2.0]
height_stride: 16
width_stride: 16
}
}
first_stage_box_predictor_conv_hyperparams {
op: CONV
regularizer {
l2_regularizer {
weight: 0.0
}
}
initializer {
truncated_normal_initializer {
stddev: 0.01
}
}
}
first_stage_nms_score_threshold: 0.0
first_stage_nms_iou_threshold: 0.7
first_stage_max_proposals: 300
first_stage_localization_loss_weight: 2.0
first_stage_objectness_loss_weight: 1.0
initial_crop_size: 14
maxpool_kernel_size: 2
maxpool_stride: 2
second_stage_box_predictor {
mask_rcnn_box_predictor {
use_dropout: false
dropout_keep_probability: 1.0
fc_hyperparams {
op: FC
regularizer {
l2_regularizer {
weight: 0.0
}
}
initializer {
variance_scaling_initializer {
factor: 1.0
uniform: true
mode: FAN_AVG
}
}
}
}
}
second_stage_post_processing {
batch_non_max_suppression {
score_threshold: 0.0
iou_threshold: 0.6
max_detections_per_class: 100
max_total_detections: 300
}
score_converter: SOFTMAX
}
second_stage_localization_loss_weight: 2.0
second_stage_classification_loss_weight: 1.0
}
} train_config: {
batch_size: 1 # 每次喂的数据量
optimizer {
momentum_optimizer: {
learning_rate: {
manual_step_learning_rate {
initial_learning_rate: 0.0001
schedule {
step: 500000
learning_rate: .00001
}
schedule {
step: 700000
learning_rate: .000001
}
}
}
momentum_optimizer_value: 0.9
}
use_moving_average: false
}
gradient_clipping_by_norm: 10.0
fine_tune_checkpoint: "PATH_TO_BE_CONFIGURED/model.ckpt" # 是否需要加入别人预先训练好的模型,如是需要加入完整文件路径,别人预先训练好的模型可以从这找到:https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md
from_detection_checkpoint: false # 布尔值,true为使用别人预先训练好的模型,这里暂时先不加,后面在来研究怎么去匹配
num_steps: 800000 # 最大训练次数
data_augmentation_options {
random_horizontal_flip {
}
}
} train_input_reader: {
tf_record_input_reader {
input_path: "/data/zxx/models/research/date/VOCdevkit/pascal_train.record" # 对应修改路径
}
label_map_path: "object_detection/data/pascal_label_map.pbtxt" # 对应修改路径
} eval_config: {
num_examples: 4952
} eval_input_reader: {
tf_record_input_reader {
input_path: "/data/zxx/models/research/date/VOCdevkit/pascal_val.record" # 对应修改路径
}
label_map_path: "object_detection/data/pascal_label_map.pbtxt" # 对应修改路径
shuffle: false
num_readers: 1
}

修改好后,保存

【Tensorflow】 Object_detection之配置Training Pipeline的更多相关文章

  1. Tensorflow使用环境配置

    windows中不能直接使用Tensorflow,所以得费点劲.(2016.11.29更新,TensorFlow 0.12 中已加入初步的 Windows 原生支持) 先是直接使用了<Deep ...

  2. Ubuntu 14.04 关于 TensorFlow 环境的配置

    Ubuntu 14.04 关于 TensorFlow 环境的配置   本教程截图于 TensorFlow 官方文档中文版  https://github.com/jikexueyuanwiki/ten ...

  3. Tensorflow开发环境配置及其基本概念

    Tensorflow开发环境配置及其基本概念 1.1. 安装Tensorflow开发环境 1.1.1. 安装pycharm 1.1.2. 安装pythe3.6 1.1.3. 安装Tensorflow ...

  4. 【深度学习】在linux和windows下anaconda+pycharm+tensorflow+cuda的配置

    在linux和windows下anaconda+pycharm+tensorflow+cuda的配置 在linux和windows下anaconda+pycharm+tensorflow+cuda的配 ...

  5. Tensorflow Object_Detection 目标检测 笔记

    Tensorflow models Code:https://github.com/tensorflow/models 编写时间:2017.7 记录在使用Object_Detection 中遇到的问题 ...

  6. 【目标检测】SSD+Tensorflow 300&512 配置详解

    SSD_300_vgg和SSD_512_vgg weights下载链接[需要科学上网~]: Model Training data Testing data mAP FPS SSD-300 VGG-b ...

  7. 02 Tensorflow的安装配置

    1 anaconda 64 位,win10 安装 清华大学镜像网络,下载地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ 选择下载文件 ...

  8. 使用tensorflow object_detection API训练自己的数据遇到的问题及解决方法

    1.Windows下出现找不到object_detection包的问题. 解决方法 在Anaconda3\soft\Lib\site-packages新建一个pth文件,将PedestrianDete ...

  9. Windows10下Anaconda+Tensorflow+Keras环境配置

    注意!注意!!注意!!! (重要的事情说三遍) 安装前检查: 1.Tensorflow不支持Anaconda2,Tensorflow也不支持python2.7和python3.7(满满的辛酸泪!) 2 ...

随机推荐

  1. 检查Windows上安装的.net版本

    cmd reg query "HKLM\Software\Microsoft\NET Framework Setup\NDP" /s /v version | findstr /i ...

  2. Permission denied: .gvfs

    $ sudo umount /home/william/.gvfs $ rm -rf ~/.gvfs/ Reference: (Permission denied: .gvfs)[https://an ...

  3. lower_bound下确界

    //lower_bound用于找到首个大于等于某个值的元素 #include<algorithm> #include<iostream> using namespace std ...

  4. 解决org.hibernate.NonUniqueObjectException的问题

    不知道是不是之前处理懒加载的问题对session工厂进行了处理,导致了之前没有问题的地方出现了错误. 当修改班级操作时出现了错误 前端错误信息 后台处理以及报错信息 16:37:36,034 ERRO ...

  5. react.js学习之路四

    针对学习react.js中,我感觉最大的疑惑点就是bind(this)的绑定和指向问题了,我被这个问题弄的头昏,有时候调用组件的时候,直接显示undefined,不存在这个组件,当时的心情是崩溃的,整 ...

  6. 渗透测试工具实战技巧 (转载freebuf)

    最好的 NMAP 扫描策略 # 适用所有大小网络最好的 nmap 扫描策略 # 主机发现,生成存活主机列表 $ nmap -sn -T4 -oG Discovery.gnmap 192.168.56. ...

  7. 题解 CF520E 【Pluses everywhere】

    题目链接 ps:可能组合数一不小心打错了,请发现的大佬提出,谢谢. 我们来讨论每一位数$a_{i}$被算了多少次. 总共有$n-1$个空位可以放$'+'$所以,$a_{i}$左边有$i-1$个空位,右 ...

  8. 浅谈PHP的Public、Protected、Private三种方法的区别

    public:权限是最大的,可以内部调用,实例调用等.protected: 受保护类型,用于本类和继承类调用.private: 私有类型,只有在本类中使用. <?php error_report ...

  9. tomcat添加管理后台的用户名和密码(为jenkins连接tomcat用)

    vim  ./conf/tomcat-users.xml <role rolename="admin"/> <role rolename="admin- ...

  10. Domoticz 中接入斐讯 M1 空气质量检测仪

    前言 M1 是翻车讯出的一款空气质量检测仪,如今斐讯的服务器经常连不上了,M1 不动动手接到 Domoticz 怕是变成摆设了.教程参考了这里和官方的 Using Python plugins. 步骤 ...