Video-streaming Stopped is showing google colab while using video in YOLOV3 model

Viewed 1980
!./darknet detector demo cfg/coco.data cfg/yolov3.cfg /content/drive/My\ Drive/checking/yolov3.weights -dont_show -ext_output video.mp4 -i 0 -out_filename res.avi

I am trying to run a video.mp4 in google colab using Yolov3 for object detection but it is continuously showing Video-streaming stopped! as an error. I am stuck at that point.

2 Answers

Had the same issue on Google Colab running this code:

!./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights test.mp4 -dont_show -i 0 -out_filename results.avi

I managed to solve it specifying the exact path of the input video:

!./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights /content/test.mp4 -dont_show -i 0 -out_filename results.avi

Hope it solves your problem too!

If you want to define the paths of the input video or output video as variables, then you can use these variables in the python command if you add the prefix $.

Here's how:

input_video = /content/test.mp4
output_video = /content/results.avi

!./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights $input_video -dont_show -i 0 -out_filename $output_video
Related