wizyoung / YOLOv3_TensorFlow

Complete YOLO v3 TensorFlow implementation. Support training on your own dataset.
MIT License
1.55k stars 579 forks source link

How to test on webcam? #234

Open abdou31 opened 4 years ago

abdou31 commented 4 years ago

Hello, Thank you for this repository, I have two questions, the first is how can I use your model on webcam, I mean instead of using args ( video file ), I would like to use my webcam I'm trying changing this line:

vid = cv2.VideoCapture(args.input_video)

to

 vid= cv2.VideoCapture(0)

and comment on the two lines of args ( video file ). But I didn't get any results and any error. just in the last line a simple message and no frame.

[ WARN:0] terminating async callback

The second is how can I speed the video output:

the value of speed ms changes from 360 ms to 152 ms , that was a good way to speed the fps but with some not good predictions ( object detection). Can you give me a solution to the two problems?

System information: