pytorch-yolo-v3 icon indicating copy to clipboard operation
pytorch-yolo-v3 copied to clipboard

Cannot capture source

Open heromebius opened this issue 6 years ago • 5 comments

Hi,I`m try to use your code to run the video ,my video name is chicken.avi.But when I code python video_demo.py --video chicken.avi,the result is Traceback (most recent call last): File "video_demo.py", line 119, in assert cap.isOpened(), 'Cannot capture source' AssertionError: Cannot capture source Is it means that I have the wrong code or other question?Can anybody help me?Please!!

heromebius avatar Nov 30 '18 06:11 heromebius

I have the same problem as you. Can you tell me the solution?

silversl avatar Jan 25 '19 04:01 silversl

I meet this question, too! help!

erhahaha avatar May 06 '19 14:05 erhahaha

@heromebius @silversl @erhahaha the accompanying repository works on MacOS, Windows and Linux, includes multigpu and multithreading, performs inference on images, videos, webcams, and an iOS app. It also tests to slightly higher mAPs than darknet, including on the latest YOLOv3-SPP.weights (60.7 COCO mAP), and offers the ability to train custom datasets from scratch to darknet performance, all using PyTorch :) https://github.com/ultralytics/yolov3

glenn-jocher avatar May 06 '19 15:05 glenn-jocher

I think the error is simply a "file not found" error. Be sure that the video that you refer to , is really exist and its in the location that you have specified.

mattinjersey avatar Jul 17 '19 13:07 mattinjersey

I also encountered this problem before. Later, I found that my video was misplaced. If you use -- video chicken.avi, be sure to put your chicken.avi under the same path of video_ demo.py, if your video file is in MP4 format, change it to -- video chicken.mp4

siyuhe0120 avatar Aug 04 '21 01:08 siyuhe0120