openvinotoolkit / training_extensions

Train, Evaluate, Optimize, Deploy Computer Vision Models via OpenVINO™
https://openvinotoolkit.github.io/training_extensions/
Apache License 2.0
1.14k stars 442 forks source link

Questions about priors in tensorflow_toolkit/ssd_detector for vlp #223

Closed JimLee1996 closed 3 years ago

JimLee1996 commented 4 years ago

First of all, thanks for your awesome works!

I want to figure out:

  1. What do these priors mean for anchors in SSD?
  2. How are they generated? (Is it by clustering (h_bbox / h_image, w_bbox / w_image) for each annotation and how?)
  3. Is there any code or reference to refer to adapting these priors to other dataset? (as the shape of plates and vehicles may vary in many different situations)

https://github.com/opencv/openvino_training_extensions/blob/21ef3330a60ce0b5d503ba0a413ddfdb2cbc98f6/tensorflow_toolkit/ssd_detector/vlp/config.py#L115-L122

AlexanderDokuchaev commented 4 years ago

Hi @JimLee1996

What do these priors mean for anchors in SSD?

For more information you can can read in original paper "SSD: Single Shot MultiBox Detector" and "Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks" in 3.1 contains information about anchors that used in SSD.

How are they generated? (Is it by clustering (h_bbox / h_image, w_bbox / w_image) for each annotation and how?)

Yes, you are right. Usually used k means clustering algorithm where distance between object is IOU. Number of anchors for one class depends depends on a variety of sizes of objects.

Is there any code or reference to refer to adapting these priors to other dataset? (as the shape of plates and vehicles may vary in many different situations)

Unfortunately, on current moment no. Now you can look at https://lars76.github.io/object-detection/k-means-anchor-boxes/.

And recommend use pytorch_toolkit/object_detection.

JimLee1996 commented 4 years ago

Thanks a lot!

I really appreciate for your help.