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

AttributeError: 'list' object has no attribute 'items' #50

Closed ozanpkr closed 2 years ago

ozanpkr commented 3 years ago

Hi @rafaelpadilla . I used mmdetection toolbox for my project. After detection, I can get detection results in JSON format. But I couldn't use this file with your toolbox. How can I solve that? I read the same issue but I don't know that how can I convert my son to your JSON format? You can reach my JSON with the help of the URL that followed;

https://drive.google.com/file/d/19zrA94O1CjP9H-ogkuy5Tid0XKDXFamx/view?usp=sharing

rafaelpadilla commented 3 years ago

Hi @ozanpkr ,

The current version does not support the mmdetection JSON format. I see that the format you provided me contains the detections. Do the ground-truth annotations follow the same format or your ground-truth format is different and is supported by the tool?

Anyway, to make it work, you could write a converter to export your JSON file to any supported format or you could create a function to parse the JSON file, so the tool can read your annotations.

If you want to take the second option, basically, your function needs to read the JSON file and return a list of BoundingBox objects.

All parsing functions are in converter.py.

You can take a look at coco2bb function, which parses a JSON file. If you modify coco2bb function with your own parser, you would just have to select the "COCO (.json)" option on the interface and it will work.

ozanpkr commented 3 years ago

Hi @rafaelpadilla ,

Firstly, the ground-truth annotations format is supported by the tool. You can reach my ground truth JSON with the help of the URL that followed;

https://drive.google.com/file/d/14Mc9IuMPj883T6vBkLLwZ1KOdOTEOJua/view?usp=sharing

Secondly, I will check coco2bb function after that I will let you know.

rafaelpadilla commented 3 years ago

@ozanpkr , Nice. Thanks.

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.