darkflow icon indicating copy to clipboard operation
darkflow copied to clipboard

Assertion error: cannot capture camera

Open ramarajan09 opened this issue 9 years ago • 6 comments

Hi,

I am trying to run the demo on a video file on windows setup.

python ./flow --model cfg/yolo-new.cfg --load bin/yolo-new.weights --demo videofile.avi

I get an assertion error: cannot capture camera. However, the demo on images work well. error

ramarajan09 avatar Apr 01 '17 07:04 ramarajan09

put full path of video within double quotes

Prakash19921206 avatar Apr 01 '17 08:04 Prakash19921206

Still get the same error even after providing full path within quotes :(

ramarajan09 avatar Apr 01 '17 08:04 ramarajan09

did u replace backward slash with forward slash also try providing other(.mp4) videos formats..

Prakash19921206 avatar Apr 01 '17 08:04 Prakash19921206

I tired with the forward, backward slash and also on a avi file. it does not work. When looked into the code, it looks like it requires a webcam input and the code is not modified to take a video input.

def camera(self, file): camera = cv2.VideoCapture(0) self.say('Press [ESC] to quit demo') assert camera.isOpened(),
'Cannot capture source'

ramarajan09 avatar Apr 01 '17 10:04 ramarajan09

I think this has been fixed in the latest commits. Hence closing the issue.

ramarajan09 avatar Apr 01 '17 10:04 ramarajan09

how does one fix this issue

OnershenN avatar Mar 27 '19 20:03 OnershenN