Real-time Object Detection using state-of-the-art You Only Look Once (YOLO) algorithm.
- Create a weights folder in darkflow and paste the weights in there.
- Move the video into darkflow-master.
- Open cmd from there and use the command.
python flow --model cfg/yolo.cfg --load weights/yolov2.weights --demo "video.mp4" --gpu 0.6 --saveVideo
- Enter your video file name instead of "video.mp4"
- Leave off --gpu 0.6 if you are not using Tensorflow-gpu.
capture = cv2.VideoCapture(filename)