tinyvision / DAMO-YOLO

DAMO-YOLO: a fast and accurate object detection method with some new techs, including NAS backbones, efficient RepGFPN, ZeroHead, AlignedOTA, and distillation enhancement.
Apache License 2.0
3.78k stars 476 forks source link

Get class-wise precision & recall in the Evaluation #84

Closed Nuwan1654 closed 1 year ago

Nuwan1654 commented 1 year ago

Before Asking

Search before asking

Question

Hi, I have trained the DAMO Yolo on my custom dataset with 10 classes, I need to get the class-wise precision and recall, how can I get that in the evaluation.

Additional

No response

jyqi commented 1 year ago

Thanks for your attention to DAMO-YOLO. You can get class-wise precision & recall in the evaluation by following steps:

Step1. Edit PythonAPI/pycocotools/coco.py and add following code in green area. image

Step2. Edit PythonAPI/pycocotools/cocoeval.py and add following code in green area. image

Nuwan1654 commented 1 year ago

@jyqi Thanks for these instructions, I have another question though, I started the training using the following command python -m torch.distributed.launch --nproc_per_node=1 tools/train.py -f configs/damoyolo_tinynasL35_M.py, then after finishing it I got 20 checkpoints, saved, how can I select the best one,, like in yolov5/7, Is there any configuration to make it save only the best wights,

jyqi commented 1 year ago

Currently we do not have the feature of selecting the best checkpoint. You can find the best one by querying training logs.