am getting this error while playing a video in mp4

152 views Asked by At

WARNING 'source' is missing. Using 'source=C:\Users\ZAKARIYA\PycharmProjects\object-detection-yolo\venv311\Lib\site-packages\ultralytics\assets'.

image 1/2 C:\Users\ZAKARIYA\PycharmProjects\object-detection-yolo\venv311\Lib\site-packages\ultralytics\assets\bus.jpg: 640x480 4 persons, 1 bus, 1 stop sign, 141.7ms image 2/2 C:\Users\ZAKARIYA\PycharmProjects\object-detection-yolo\venv311\Lib\site-packages\ultralytics\assets\zidane.jpg: 384x640 2 persons, 1 tie, 92.9ms Speed: 4.0ms preprocess, 117.3ms inference, 5.6ms postprocess per image at shape (1, 3, 384, 640) Traceback (most recent call last): File "C:\Users\ZAKARIYA\PycharmProjects\object-detection-yolo\chapter 6- yolo webcam\yolo-webcam.py", line 43, in cv2.imshow("image",img) File "C:\Users\ZAKARIYA\PycharmProjects\object-detection-yolo\venv311\Lib\site-packages\ultralytics\utils\patches.py", line 55, in imshow _imshow(winname.encode('unicode_escape').decode(), mat) cv2.error: OpenCV(4.8.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:971: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'

Process finished with exit code 1

I tried to run but wasnt able to get any result also when a checking video in pycharm it shows following alert. enter image description here

0

There are 0 answers