参考: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. indexOf(String.indexOf 方法)

    字符串的IndexOf()方法搜索在该字符串上是否出现了作为参数传递的字符串,如果找到字符串,则返回字符的起始位置 (0表示第一个字符,1表示第二个字符依此类推)如果说没有找到则返回 -1 返回 St ...

  2. Sharepoint2013搜索学习笔记之搜索构架简单概述(一)

    Sharepoint搜索引擎主要由6种组件构成,他们分别是爬网组件,内容处理组件,分析处理组件,索引组件,查询处理组件,搜索管理组件.可以将这6种组件分别部署到Sharepoint场内的多个服务器上, ...

  3. C++ TIM或者QQ 自动发送消息

    简单写了一下 很简单的demo 闲着没事干 #include "stdafx.h" #include <thread> #include <Windows.h&g ...

  4. C# 小球100米自由落下

    //一球从N 米高自由落下,每次落地后反跳回原高度的一般:再录下,求它在第十次落地时,共经过多少米?第10次反弹多高 static string ballDsitance(float height1, ...

  5. 20165219 《Java程序设计》实验三(敏捷开发与XP实践)实验报告

    20165219 <Java程序设计>实验三(敏捷开发与XP实践)实验报告 一.实验报告封面 课程:Java程序设计 班级:1652班 姓名:王彦博 学号:20165219 成绩: 指导教 ...

  6. javascript常用函数(find、filter、map)

    1.find 查询数组中符合条件的第一个元素,如果没有符合条件的元素则返回空数组var arr = [1,2,3,4,5,6,7];var dogs=arr.find(v=>v===4);结果: ...

  7. poj2154(polya定理+欧拉函数)

    题目链接:http://poj.org/problem?id=2154 题意:n 种颜色的珠子构成一个长为 n 的环,每种颜色珠子个数无限,也不一定要用上所有颜色,旋转可以得到状态只算一种,问有多少种 ...

  8. python—Celery异步分布式

    python—Celery异步分布式 Celery  是一个python开发的异步分布式任务调度模块,是一个消息传输的中间件,可以理解为一个邮箱,每当应用程序调用celery的异步任务时,会向brok ...

  9. luoguP4782 [模板]2-SAT问题

    https://www.luogu.org/problemnew/show/P4782 2-SAT模板,输出方案只需判断 \(a\) 和 \(a + n\) 两个点所在的 scc 编号大小就可以了 # ...

  10. requests模块处理cookie,代理ip,基于线程池数据爬取

    引入 有些时候,我们在使用爬虫程序去爬取一些用户相关信息的数据(爬取张三“人人网”个人主页数据)时,如果使用之前requests模块常规操作时,往往达不到我们想要的目的. 一.基于requests模块 ...