Why are the AP scores all 0 when running test.py?
connorlee77 opened this issue · comments
- I'm using the pretrained kitti weights.
- I'm testing on the KITTI 2d dataset downloaded from the official site.
- I converted the kitti labels to coco format and put them under PyTorch-YOLOv3-kitti\data\kitti\labels\test
- Test images are under PyTorch-YOLOv3-kitti\data\kitti\image\test
make sure val.txt have test image path. cause I set test_path = data_config["valid"] in test.py, you can change it by youself.
it is my results:
Detecting objects: 100%|████████████████████████| 47/47 [01:01<00:00, 1.24s/it]
Computing AP for class '0': 100%|███████████| 747/747 [00:00<00:00, 7063.08it/s]
Computing AP for class '1': 100%|██████████| 747/747 [00:00<00:00, 73969.95it/s]
Computing AP for class '2': 100%|█████████| 747/747 [00:00<00:00, 153887.28it/s]
Computing AP for class '3': 100%|██████████| 747/747 [00:00<00:00, 47469.02it/s]
Computing AP for class '4': 100%|█████████| 747/747 [00:00<00:00, 405060.77it/s]
Computing AP for class '5': 100%|██████████| 747/747 [00:00<00:00, 86269.76it/s]
Computing AP for class '6': 100%|█████████| 747/747 [00:00<00:00, 263821.58it/s]
Computing AP for class '7': 100%|█████████| 747/747 [00:00<00:00, 153736.27it/s]
Average Precisions:
- Class '0' - AP: 0.9037875496395236
- Class '1' - AP: 0.9242369542262239
- Class '2' - AP: 0.9158339295047374
- Class '3' - AP: 0.7671271411530298
- Class '4' - AP: 0.7692063492063491
- Class '5' - AP: 0.783446162852444
- Class '6' - AP: 0.8988244420575247
- Class '7' - AP: 0.6701750837797066
mAP: 0.8290797015524424
Ahh thats right, thanks!
Excuse me, I also Got 0 AP
.
I put kitti 1000 images to kitti/image/test
and 1000 transformed labels to kitti/label/test
.
I set val.txt point images in kitti/image/test
What am I doing wrong??
The path in dataset.py points to 'images' rather than 'image'. Change one or the other to get it to work.
@connorlee77 Oh I see. Thanks a lot.