ZED SDK v4.0.8 custom object detection python pytorch yolov8 several issues during runtime

Just few days ago the demo ran without errors. The following warning and errors may have been detected today following some Python OS updates, causing the terminal window stuck blank.

The installed sdk is: ZED_SDK_Ubuntu22_cuda12.1_v4.0.8.zstd.run.
System: Ubuntu 22.04

A copy of the running terminal window messages is following.

eyal@eyal-System-Product-Name:/usr/local/zed/samples/object detection/custom detector/python/pytorch_yolov8$ python3 detector.py --weights yolov8m.pt
Intializing Network…
Initializing Camera…
Initialized Camera

0: 256x416 1 person, 1 cup, 1 chair, 2 tvs, 1 keyboard, 6 books, 1 clock, 60.0ms
Speed: 2.3ms preprocess, 60.0ms inference, 250.6ms postprocess per image at shape (1, 3, 256, 416)
/usr/local/zed/samples/object detection/custom detector/python/pytorch_yolov8/detector.py:57: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
obj.label = det.cls
/usr/local/zed/samples/object detection/custom detector/python/pytorch_yolov8/detector.py:58: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
obj.probability = det.conf
Traceback (most recent call last):
File “/usr/local/zed/samples/object detection/custom detector/python/pytorch_yolov8/detector.py”, line 212, in
main()
File “/usr/local/zed/samples/object detection/custom detector/python/pytorch_yolov8/detector.py”, line 191, in main
cv2.imshow(“ZED | 2D View and Birds View”, global_image)
cv2.error: OpenCV(4.8.1) /io/opencv/modules/highgui/src/window.cpp:1272: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function ‘cvShowImage’

I’ve reinstalled Ubuntu 22.04, made Ubuntu upgrades, reinstalled zed sdk, everything got back to normal.

Obviously, I believe that the reported problem here is nothing to do with the zed sdk release. Lots of system (Ubuntu OS) runtime crashes during the development process could be the reason for such a phenomena. I’m ready to delete this issue report, if it has nothing to add to the forum.

Hi, no problem. Glad you could solve the issue by yourself.