ScaledYOLOv4
ScaledYOLOv4 copied to clipboard
How to show Average Precision of Each Class
In our object detection model, there's 2 classes: Paper and Plastic. How can I show the average precision of paper and plastic separately and their mAP?
what exception? All I get is mAP, P, R, etc. like this below:
What I want to get is this:
I want to get the average precision
Can you demonstrate it to me? Here's the colab link: https://colab.research.google.com/drive/10KL3fJbImLXmMAw8aSLOLlngQsQ6MG5P?usp=sharing
for your reference. https://medium.datadriveninvestor.com/how-to-create-custom-coco-data-set-for-object-detection-96ec91958f36
i do not find the test script in your colab.
do you have an email address so we can send our test.py?
just prepare coco style gt and make sure it is put in the corresponding location as what in test.py, you will get the expected results.
what line in your test.py will you see the corresponding location? so we can check it out in your code.
please install pycocotools and put coco style gt file as https://github.com/WongKinYiu/ScaledYOLOv4/blob/yolov4-large/test.py#L228 and set opt.save_json = True https://github.com/WongKinYiu/ScaledYOLOv4/blob/yolov4-large/test.py#L264
thanks we will try it right now
How did you solve this? I have the same problem, too. i want to see per class but only can see "all". what should i do?
add following code after https://github.com/WongKinYiu/ScaledYOLOv4/blob/yolov4-large/test.py#L235
for cid in range(80):
print(names[cid])
cocoEval.params.catIds = [coco91class[cid]]
cocoEval.evaluate()
cocoEval.accumulate()
cocoEval.summarize()