rafaelpadilla / review_object_detection_metrics

Object Detection Metrics. 14 object detection metrics: mean Average Precision (mAP), Average Recall (AR), Spatio-Temporal Tube Average Precision (STT-AP). This project supports different bounding box formats as in COCO, PASCAL, Imagenet, etc.
Other
1.08k stars 215 forks source link

Bounding box not displayed correctly when using absolute values #51

Closed matt-sharp closed 3 years ago

matt-sharp commented 3 years ago

I'm using the following bounding box co-ordinates:

class_id, xmin, ymin, xmax, ymax (absolute) 0 288 330 985 694 100000003.txt

When I view this ground truth label in the GUI it's not displayed correctly:

image

If I use the YOLO format co-ordinates it does display correctly:

class_id, centre X, centre Y, width, height (relative) 0 0.5594664998900839 0.6356930616425305 0.6354730515252976 0.4891887385670732

image

Here's my image:

100000003

Please can you help me to understand why this is occurring and advise how I can fix this? (if it's a bug)

rafaelpadilla commented 3 years ago

Hi @matt-sharp,

The absolute values considered by the option "Absolute values (.txt)" must be in the format: <class> <left> <top> <width> <height>

You provided the annotations in the format class_id, xmin, ymin, xmax, ymax. Thus, your coordinates should be modified from 0 288 330 985 694 to 0 288 330 697 364 (697=985-288 and 364=694-330).

That will make your bounding box look like: image

I guess the confusion is due to the wrong tool tip message that appeared when the mouse cursor is laying on the radio button "Absolute values (.txt)". I have just made an update correcting it to: image

I believe it would be very useful if the tool could support both formats <class> <left> <top> <width> <height> and <class> <left> <top> <right> <bottom> in a future version.

Thank you again for your contribution.

matt-sharp commented 3 years ago

@rafaelpadilla thanks for your speedy response. Yes, it was the tool tip message that confused me.

is a very common format so support for this co-ordinate notation would be much appreciated.