使用 Tensorflow 仅在区域提案网络上进行对象检测训练

Training on Regional Proposal Network only for object detection using Tensorflow

我只喜欢使用 tensorflowfaster rcnn 训练 RPN network。 在caffe中,我只训练过RPN

在张量流中,this tutorial shows training a customized network. Then the other tutorial here discussed how to train using models from modelzoo

所以对于我的情况,只训练 RPN 部分,哪种方法适合我? 假设如果我按照定义 CNN 网络的第一种方法,我如何为 transfer learning.

加载 pretrained model

要仅使用 tensorflow 对象检测 api 训练 RPN 网络,您只需更改配置文件,因为 API 仅支持 RPN 选项,如 here. To get the RPN only model, just add an option 'number_of_stages : 1' in the model config area 所述(类似于 ' num_of_classes : 90')。 (您还可以从配置文件中删除一些第二阶段参数,因为如果 number_of_stages 设置为 1,它们将无用)。

关于迁移学习的第二个问题,和训练faster rcnn网络一样,只需要确保from_detection_checkpoint为真,finetune_checkpoint_path正确config file.

在训练过程中你可以使用tensorboard来检查状态,一旦执行评估,你可以在'images'选项卡中看到region proposals在图像上可视化并且标签都是'object + confidence score' .