WongKinYiu / ScaledYOLOv4

Scaled-YOLOv4: Scaling Cross Stage Partial Network
GNU General Public License v3.0
2.02k stars 574 forks source link

Different Map on same dataset for testing and training (very low map while testing (0.00688) while training gave 0.79 Map) #93

Open bobbilichandu opened 3 years ago

bobbilichandu commented 3 years ago

I got 0.798 final MAP while testing. But using test.py , I am getting very low MAP score.

Scanning images: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4370/4370 [00:14<00:00, 308.58it/s] Scanning labels data/crowdhuman-608x608.cache (4369 found, 0 missing, 1 empty, 2 duplicate, for 4370 images): 100%|██████████████| 4370/4370 [00:00<00:00, 16752.60it/s] Class Images Targets P R mAP@.5 mAP@.5:.95: 21%|███████▌ | 58/274 [05:45<26:06, 7.25s/it] Class Images Targets P R mAP@.5 mAP@.5:.95: 100%|███████████████████████████████████| 274/274 [24:30<00:00, 3.69s/it] all 4.37e+03 1.83e+05 0.0379 0.0494 0.00688 0.00133 person 4.37e+03 8.26e+04 0.00798 0.011 0.000274 6.39e-05 head 4.37e+03 1.01e+05 0.0679 0.0878 0.0135 0.00259 Speed: 29.4/1.7/31.1 ms inference/NMS/total per 640x640 image at batch-size 16

command used : "python3 test.py --weights runs/exp4_yolov4-p6/weights/best_yolov4-p6.pt --iou-thres 0.50 --data data/coco.yaml --batch-size 16 --save-json --task test --device 1,2 --verbose --save-txt"

What might be the issue?

WongKinYiu commented 3 years ago

what is your training size?

bobbilichandu commented 3 years ago

15000 images, crowdhuman training dataset

WongKinYiu commented 3 years ago

oh, i mean input resolution.

bobbilichandu commented 3 years ago

608*608

WongKinYiu commented 3 years ago

try python3 test.py --weights runs/exp4_yolov4-p6/weights/best_yolov4-p6.pt --iou-thres 0.65 --thresh 0.001 --data data/coco.yaml --batch-size 8 --save-json --task test --device 1 --verbose --save-txt

Goru1890 commented 3 years ago

608*608

Is it possible to train the network with images with that size? How does using an input image size smaller than the network size affect the network?