如何为我们自己的数据集重新训练SSD对象检测模型? [英] How do I retrain SSD object detection model for our own dataset?

查看:167
本文介绍了如何为我们自己的数据集重新训练SSD对象检测模型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试过Tensorflow中的SSD和YOLO实现。现在,我想为自己的数据集重新训练其中的任何一个,例如交通信号灯。除了pascal voc之外,如何重新训练ssd的数据?有人可以帮忙吗?我正在使用 https://github.com/balancap/SSD-Tensorflow

解决方案

不特定于实现,对于SSD,




  • 由于所有层都是卷积的,因此您需要更改在预测层中应用的过滤器的数量,因为(根据第4页的论文)输出的结果是所需类数的函数预测:即对于网络中的任何预测层,对于 m * n 特征图,我们期望(c + 4)kmn 用于分类和本地化的输出/预测; c 是您要预测的类的数量, k 是其中使用的锚点/默认框的数量功能图,以及 m n 是功能图的2维。

  • 您可能希望根据文件中给出的方程式更改锚点/默认框比例



特定于SSD-Tensorflow,




  • 您需要确保输入格式与 tf.contrib.slim 。目前,SSD-Tensorflow仅支持Pascal VOC格式。我一直很难调整它以接受其他数据集。您可以看到 https://github.com/balancap/SDC-Vehicle-Detection/作为示例KITTI界面。尽管部分代码库已过时,但SDC-Vehicle-Detection存储库与SSD-Tensorflow由同一作者撰写。


i have tried out SSD and YOLO implemetations in tensorflow. Now i want to retrain any of these for my own dataset, say traffic signals. How do i retrain ssd for data apart form pascal voc? can any one help? I am using tensorflow implementation from https://github.com/balancap/SSD-Tensorflow

解决方案

Not specific to the implementation, for SSD,

  • Since all layers are convolutional, you need to change the number of filters applied in the prediction layers, since (per the paper in p. 4) the output is given as a function of the number of classes you want to predict: i.e., for any prediction layer in the network, for an m*n feature map, we expect (c + 4)kmn outputs/predictions for both classification and localization; c is the number of classes you are trying to predict, k is the number of anchors/default boxes used in that feature map, and m and n are the 2 dimensions of the feature map.
  • You may want to change the anchor/default box scales, per the equations given in the paper

Specific to SSD-Tensorflow,

  • You need to make sure that the input format matches the interface provided by tf.contrib.slim. Currently SSD-Tensorflow only supports Pascal VOC format. I've been having trouble adapting it to accept other datasets. You can see https://github.com/balancap/SDC-Vehicle-Detection/ for an example KITTI interface. The SDC-Vehicle-Detection repo is by the same author as SSD-Tensorflow, though parts of the codebase are outdated.

这篇关于如何为我们自己的数据集重新训练SSD对象检测模型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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