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.09k stars 215 forks source link

Suggestions for a better Yolov5 compatibility #103

Closed denguir closed 2 years ago

denguir commented 2 years ago

Hi there, I cloned your repo today to evaluate my YoloV5 model and I noticed some things that could be changed:

  1. When you go the yolov5 repo and run the command python detect.py --save-txt --save-conf, the detections are saved in the following format: <_width> <_height> <_confidence> (relative). The closest format proposed by your GUI is <_confidence> <_width> <_height> (relative), which required me to change yolov5 source code here. Basically swapping the order of conf and *xywh. I suggest you modify the format to be directly compatible with Yolov5 repo.

  2. The second thing is more like a bug, basically the "Detections" part and the "Metrics" part of the GUI fail when the naming of the images and the labels contains dots. For example I have this couple of (image, detection) in my disk: (20220325_200012_png.rf.c8bf5af8f6582ccc9f2599a9373aa779.jpg, 20220325_200012_png.rf.c8bf5af8f6582ccc9f2599a9373aa779.txt) and I had to rename them (20220325_200012.jpg, 20220325_200012.txt) for the GUI to not throw an error. This might seem dumb but when you use a labeling website like Roboflow, after exportation, the images are automatically renamed using the format aforementioned.

Apart from this the tool works great, thank you for your work !

rafaelpadilla commented 2 years ago

Hi @denguir ,

Thank you for your comments.

Definitely being flexible to other formats as you suggested will make the tool more robust and we wouldn't have to change the order of the confidence in the txt files.

In the second point you mentioned, unfortunately the current code does not support files with a dot (.) in the filename, which makes the code to fail. I think that treading the file paths as a Path object from pathlib could solve this problem, by using the stem and suffix properties.

Would you be opened to contribute with our project, applying one of these changes and open a PR? :pray:

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Mekcyed commented 1 year ago

hey @denguir, if i see correctly the issue with the yolov5 format still exists right?