区域提议网络的训练仅用于使用 Tensorflow 的对象检测 [英] Training on Regional Proposal Network only for object detection using Tensorflow

查看:44
本文介绍了区域提议网络的训练仅用于使用 Tensorflow 的对象检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢使用 tensorflowfaster rcnn 只训练 RPN 网络.在caffe中,我只训练过RPN.

在 tensorflow 中,本教程展示了如何训练自定义网络.然后其他教程在这里讨论了如何使用来自 modelzoo 的模型进行训练.>

所以对于我的情况,只训练 RPN 部分,哪种方法适合我?说如果我遵循定义 CNN 网络的第一种方法,我如何为 转移学习 加载 预训练模型.

解决方案

要仅使用 tensorflow object detection api 训练 RPN 网络,您只需要更改配置文件,因为该 API 支持 RPN only 选项,如所述here.要获得仅 RPN 的模型,只需在模型配置 area(类似于'num_of_classes : 90').(您也可以从配置文件中删除一些第二阶段参数,因为如果 number_of_stages 设置为 1,它们将毫无用处.

关于迁移学习的第二个问题,和训练faster rcnn网络一样,只需要保证from_detection_checkpoint为真,Finetune_checkpoint_path

I like to train only RPN network from faster rcnn using tensorflow. In caffe, I have done training only RPN.

In tensorflow, this tutorial shows training a customized network. Then the other tutorial here discussed how to train using models from modelzoo.

So for my case, to train only RPN part, which approach is appropriate for me? Say If I follow the first approach defining CNN network, how can I load pretrained model for transfer learning.

解决方案

To train RPN network only using tensorflow object detection api, you just need to change the config files because the API supports RPN only option as described here. To get the RPN only model, just add an option 'number_of_stages : 1' in the model config area (similar to 'num_of_classes : 90'). (You can also remove some second stage parameters from the config file since they are useless if the number_of_stages is set to 1).

As for the second question of transfer learning, it is the same as if training the faster rcnn network, just need to make sure from_detection_checkpoint is true and finetune_checkpoint_path is correct in the config file.

During training process you can use tensorboard to check the status, once evaluation is performed, you can see in 'images' tab that region proposals are visualized on the image and the labels are all 'object + confidence score'.

这篇关于区域提议网络的训练仅用于使用 Tensorflow 的对象检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆