facebookresearch / detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
https://detectron2.readthedocs.io/en/latest/
Apache License 2.0
30.59k stars 7.5k forks source link

Fine tuning Object Keypoint Similarity (OKS) #3192

Open codingforpleasure opened 3 years ago

codingforpleasure commented 3 years ago

I have been trying to figure out how to compute the object similarity (OKS), In my custom dataset I have 4 keypoints per image, I'd like during training to improve the Object Keypoint Similarity's score properly, therefore I need to initial the simgas values (cfg.TEST.KEYPOINT_OKS_SIGMAS ) with a list of values (Each simga for each keypoint). I have read thoroughly the Object Keypoint Similarity, BUT unfortunately it's still unclear for me how to find those values:

For each keypoint type i we measured the per-keypoint standard deviation σi with respect to object scale s.
That is we compute σi^2=E[di^2/s^2].

it's not clear for me how can I calculate a head of time the Sigmas (Standard deviation) values if the Expected value depends on the Euclidean distances between each corresponding ground truth and detected keypoint, which has not been calculated yet?

Can someone PLEASE give a simple example or explanation so it will be a more clear, Thank you.

darwinharianto commented 3 years ago

From what I know, to make OKS, we need to make our own keypoints on the same image multiple times (make redundant annotations). Pick one as your base, then calculate the euclidean distance and its deviation. This then would be used as sigmas.

AbhayKarade commented 1 year ago

Thanks @codingforpleasure and @darwinharianto, I created my own custom dataset in which keypoints are auto generated, in this case how should I tune the simgas values, do I have to run the auto labeling pipeline multiple times and then calculates the values?