foschmitz / yolo-python-rtsp

Object detection using deep learning with Yolo, OpenCV and Python via Real Time Streaming Protocol (RTSP)
MIT License
143 stars 42 forks source link

MAGEIO FFMPEG_WRITER WARNING #4

Open DennisFaucher opened 4 years ago

DennisFaucher commented 4 years ago

Environment

TIA

python3 yolo_opencv.py --input sampledata/commuters.mp4 --config cfg/yolov3-tiny.cfg --weights yolov3-tiny.weights --classes cfg/yolov3.txt

IMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=16, resizing from (1920, 1080) to (1920, 1088) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to 1 (risking incompatibility). Detecting objects in frame 1 Traceback (most recent call last): File "yolo_opencv.py", line 188, in processvideo(os.path.join(args.input)) File "yolo_opencv.py", line 140, in processvideo image = detect(frame) File "yolo_opencv.py", line 81, in detect net = cv2.dnn.readNet(args.weights, args.config) cv2.error: OpenCV(4.2.0) /io/opencv/modules/dnn/src/darknet/darknet_importer.cpp:214: error: (-212:Parsing error) Failed to parse NetParameter file: yolov3-tiny.weights in function 'readNetFromDarknet'

No frames have been written; the written video is invalid. Finishing stream 0:0 without any data written to it.

nigharsh commented 4 years ago

Problem is with yolov3-tiny.weights file. Please check the filename/location.

DennisFaucher commented 4 years ago

Thank you