TLT Version → docker_tag: v3.21.08-py3
Network Type → Yolov4
training spec file → spec.txt (2.5 KB)
After Training till 100 epochs I got 96 map. But still getting bad result.
After running inference part I am getting bad result like multiple bounding boxes. There are only 3 classes images I have in my dataset with proper annotation.1536 images in the training set and 384 images in the validation dataset. I am not able to understand why the model is behaving like this. Find the attached spec file for your reference.
I have also attached the inference result of two images below. Looking forward for the help from your side.
So, you mean you get bad result even with validation dataset, right?
That is not expected because you mention that the training got 96% mAP. The mAP is evaluated via your validation dataset.
Could you double check your training log?
yeah, I got the bad result even with validation dataset. map is evaluated via validation dataset. in the training log at 90 epochs I got 98% and at 100 epoch I got 100% map. So i just used the model file of 90 epochs in order to run inference but got the bad result. Do i need to change something in the nms_config in order to get good result (having single bounding box)?
So, you mentioned with below.
“tao yolov4 evaluate xxx” against your val dataset: according to your training result, it is 98%.
“tao yolov4 inference xxx” against your val dataset: the result is bad.
log file i have already shared to u. I am sharing few commands that i have used
first I had calculated the anchor box using this command and put those shape values inside the spec file.
Command to get anchor shape :-
tao yolo_v4 kmeans -l “/workspace/tao-experiments/labels” -i “/workspace/tao-experiments/images” -x 416 -y 416
then used training command,training went upto 100 epcoh as i mentioned in the spec file.
tao yolo_v4 train --gpus 1 -e /workspace/tao-experiments/specs/spec.txt -r /workspace/tao-experiments/results -k KEY
after training I got 100% accuracy at 100th epoch. After that i ran the evaluation command
Evaluation command →
tao yolo_v4 evaluate -e /workspace/tao-experiments/specs/spec.txt -m /workspace/tao-experiments/results/weights/yolov4_resnet18_epoch_100.tlt -k KEY
after running the evalutation command I got output like this :-
Start to calculate AP for each class
biscuits AP 1.0
chips AP 1.0
chocolate AP 1.0