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
13.33k stars 4.2k forks source link

Detect.py error for video type #1087

Open namasang1 opened 1 year ago

namasang1 commented 1 year ago

Hello

when i detect a video, which are .avi or .mp4 video types, detected results did not exist unlike detected results for image type.

In the mp4 video type,

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='4.mp4', update=False, view_img=False, weights=['yolov7.pt']) YOLOR šŸš€ v0.1-115-g072f76c torch 1.10.0a0+3fd9dcf CUDA:0 (NVIDIA TITAN RTX, 24220.1875MB) CUDA:1 (NVIDIA TITAN RTX, 24220.1875MB) CUDA:2 (NVIDIA TITAN RTX, 24220.1875MB) CUDA:3 (NVIDIA TITAN RTX, 24220.1875MB)

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. (0.000s)

In the avi video type,

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='paper/2.avi', update=False, view_img=False, weights=['yolov7.pt']) YOLOR šŸš€ v0.1-115-g072f76c torch 1.10.0a0+3fd9dcf CUDA:0 (NVIDIA TITAN RTX, 24220.1875MB) CUDA:1 (NVIDIA TITAN RTX, 24220.1875MB) CUDA:2 (NVIDIA TITAN RTX, 24220.1875MB) CUDA:3 (NVIDIA TITAN RTX, 24220.1875MB)

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!

Unexpected list type. Expected: hdrl. Got: movi. Unexpected list type. Expected: hdrl. Got: movi. Unexpected list type. Expected: hdrl. Got: movi. Done. (0.000s)

The detection result did not exist, do you know what the problem?

I used nvcr.io/nvidia/pytorch:21.08-py3 docker image

namasang1 commented 1 year ago

I found the problem

vijjisomu commented 1 year ago

Even I got the same issue

vijjisomu commented 1 year ago

I found the problem

Can you let me know the issue

Garbage123King commented 1 year ago

I use docker, and this helps me.

pip uninstall opencv-python
pip uninstall opencv-contrib-python
pip install opencv_python==3.4.10.37