My project is object detection and I am using google colab to training my model with YOLOv5. But, the notebook that roboflow gives to me to use as an example, does not have something that I want.
I would like to calculate the mAP for my test set (test images in the same dataset version used to train the model).
When I train the dataset with the roboflow model, I got this metrics:
But, using the model YOLOv5 in colab, and exporting it and its weights to the roboflow, I got only the part of Training Graphs.
The part of AP for each class in Validation set, I got when the training finished. And when I ran inference with trained weights on Test set, I only got images with labels as result, and not metrics.
The command used:
%cd /content/yolov5/
!python detect.py --weights runs/train/yolov5s_results/weights/best.pt --img 256 --conf 0.5 --source TDM-15/test/images
I think this can be easy, but I have no idea what command I can use to get the mAP, or compare the ground truth with the predictions.
Edit1: I was able to calculate the mAP for all class, changing the code to this:
!python val.py --data /content/yolov5/test.yaml --weights runs/train/yolov5s_results/weights/best.pt --img 256 --conf 0.5 --iou-thres 0.5 --task "test"
But how can I calculate this for each class?