I trained the YOLOV4 model and validation mAP became 0.44 , but when I inference on the validation images, no object is detected. So how is the mAP is 0.44?
How did you get the validation mAP, is it using "tao yolo_v4 evaluate xxx " ?
And for inference, did you use "tao yolo_v4 inference xxx "?
Yes, I used TAO evaluate and inference tasks
Can you share the training spec file?
Here is the spec file:
final_spec.txt (2.3 KB)
Please deduce the threshold in the command line when you run "tao yolo_v4 inference xxx ".
I set the threshold to 0.2, but an object with score of 0.2 was detected in only one of the images. So how is the mAP is 0.44?
Several comments here.
- Did you use latest TAO? If yes, I find that your training spec is not compatible. For example, loss_loc_weight, loss_neg_obj_weights and loss_class_weights are not correct.
- Could you please share the full training log? I need to check the loss and whether the mAP is 0.44.
- And for inference, you mention that “an object with score of 0.2 was detected in only one of the images”. How many images did you run inference? Do you mean only one image can detect bbox and its score is 0.2?
Yes I used the latest TAO version. But my training spec file is for the previous version and has the default values of the previous version. I will update the spec file and try again.
Here is the training log:
yolov4_training_log_resnet18.csv (3.5 KB)
inference was run on 20 images.
“Do you mean only one image can detect bbox and its score is 0.2?” yes
Yes, please update the spec file and retry.
For the validation 0.44 result, can you run
"tao yolo_v4 evaluate xxx " against your validation set to double confirm?
How many images in this validation set? Can you run "tao yolo_v4 inference xxx " against it as well?
I update the spec file and the results were much better.
I run evaluate and inference tasks on previous model with mAP 0.44 to double check and get the same results as before.
There are 20 images in the validation dataset.
What’s the new mAP? Can you share the training spec and full training log?
How many training images?
Also did you set correct anchor_shapes?
From all the mAP results, I am afraid it is still vibrating and the loss did not decrease to a better area.
It is need to finetune some parameters, such as learning rate, epoch, bs, etc.
Thanks for your help.
- There are 70 images.
- I used TAO kmeans task to generate anchor shapes.
Suggest to add more images. And also you can finetune parameters as mentioned above.