WongKinYiu / yolov7

Implementation of paper - YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors
GNU General Public License v3.0
13k stars 4.11k forks source link

No detections ... #1680

Open sahamitul opened 1 year ago

sahamitul commented 1 year ago

I am running "python detect.py --weights yolov7.pt --conf 0.25 --img-size 640 --source inference/images/horses.jpg", exactly as listed in the repo page. But I do not get any detection. Any clue? (same for yolov7-e6e.pt, but yolov7-tiny.pt worked fine)

=== python detect.py --weights yolov7.pt --conf 0.25 --img-size 640 --source inference/images/horses.jpg Namespace(agnostic_nms=False, augment=False, classes=None, conf_thres=0.25, device='', exist_ok=False, img_size=640, iou_thres=0.45, name='exp', no_trace=False, nosave=False, project='runs/detect', save_conf=False, save_txt=False, source='inference/images/horses.jpg', update=False, view_img=False, weights=['yolov7.pt']) YOLOR 🚀 v0.1-122-g3b41c2c torch 1.10.0a0+3fd9dcf CUDA:0 (Quadro T1000, 3911.875MB)

Fusing layers... RepConv.fuse_repvgg_block RepConv.fuse_repvgg_block RepConv.fuse_repvgg_block Model Summary: 306 layers, 36905341 parameters, 6652669 gradients, 104.5 GFLOPS Convert model to Traced-model... traced_script_module saved! model is traced!

Done. (208.0ms) Inference, (0.3ms) NMS The image with the result is saved in: runs/detect/results/horses.jpg Done. (0.832s)

@WongKinYiu

knowlessthanenough commented 1 year ago

I have the same problem when i use yolov7.pt it work fine but when I use the model I train it show no bbox

Daromog commented 1 year ago

same issue here

knowlessthanenough commented 1 year ago

I solve mine is because the NMS you may want to check that

Daromog commented 1 year ago

I solve mine is because the NMS you may want to check that

where did you make changes?

knowlessthanenough commented 1 year ago

Give me a minute

knowlessthanenough commented 1 year ago

Line 171 and 172 in detect.py you can try set it to 0 to see if there is bbox

knowlessthanenough commented 1 year ago

Wait a second are you same situation with me or sahamitul

Daromog commented 1 year ago

haha

Wait a second are you same situation with me or sahamitul

haha I do not have any detection , the program just give the same image as output

knowlessthanenough commented 1 year ago

What is you output? I mean the message

knowlessthanenough commented 1 year ago

If you use gpu you can try this https://github.com/WongKinYiu/yolov7/issues/1432#issuecomment-1467696276