Traceback (most recent call last):
  File "D:\ProgramData\anaconda3\envs\yolo\lib\site-packages\werkzeug\wsgi.py", line 289, in __next__
    return self._next()
  File "D:\ProgramData\anaconda3\envs\yolo\lib\site-packages\werkzeug\wrappers\response.py", line 32, in _iter_encoded
    for item in iterable:
  File "D:\PycharmProjects\ultralytics-main\ultralytics-main\ultralytics\yolo\v8\detect\app.py", line 118, in gen
    image = cv2.imencode('.jpg', img_bgr)[1].tobytes()
cv2.error: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp:1109: error: (-215:Assertion failed) !image.empty() in function 'cv::imencode'