C:\Windows\System32>pip install PyOpenGL PyOpenGL_accelerate --only-binary :all:
Looking in indexes: Simple index, https://pypi.ngc.nvidia.com
Requirement already satisfied: PyOpenGL in c:\users\tarangmehta\appdata\local\programs\python\python312\lib\site-packages (3.1.6)
Requirement already satisfied: PyOpenGL_accelerate in c:\users\tarangmehta\appdata\local\programs\python\python312\lib\site-packages (3.1.6)
C:\Windows\System32>“C:\Program Files (x86)\ZED SDK\get_python_api.py”
→ Downloading to ‘C:\Windows\System32’
Detected platform:
win_amd64
Python 3.12
ZED SDK 4.1
→ Checking if https://download.stereolabs.com/zedsdk/4.1/whl/win_amd64/pyzed-4.1-cp312-cp312-win_amd64.whl exists and is available
→ Found ! Downloading python package into C:\Windows\System32\pyzed-4.1-cp312-cp312-win_amd64.whl
→ Installing necessary dependencies
Looking in indexes: Simple index, https://pypi.ngc.nvidia.com
Requirement already satisfied: numpy in c:\users\tarangmehta\appdata\local\programs\python\python312\lib\site-packages (1.26.4)
Looking in indexes: Simple index, https://pypi.ngc.nvidia.com
Processing c:\windows\system32\pyzed-4.1-cp312-cp312-win_amd64.whl
Collecting numpy<2.0,>=1.13 (from pyzed==4.1)
Downloading numpy-1.26.4-cp312-cp312-win_amd64.whl.metadata (61 kB)
Collecting cython>=3.0.0 (from pyzed==4.1)
Downloading Cython-3.0.11-cp312-cp312-win_amd64.whl.metadata (3.2 kB)
Downloading Cython-3.0.11-cp312-cp312-win_amd64.whl (2.8 MB)
---------------------------------------- 2.8/2.8 MB 10.1 MB/s eta 0:00:00
Downloading numpy-1.26.4-cp312-cp312-win_amd64.whl (15.5 MB)
---------------------------------------- 15.5/15.5 MB 14.4 MB/s eta 0:00:00
Installing collected packages: numpy, cython, pyzed
Successfully installed cython-3.0.11 numpy-1.26.4 pyzed-4.1
Done
Installing OpenGL dependencies required to run the samples
→ Downloading PyOpenGL-3.1.6-cp312-cp312-win_amd64.whl
Looking in indexes: Simple index, https://pypi.ngc.nvidia.com
Processing c:\windows\system32\pyopengl-3.1.6-cp312-cp312-win_amd64.whl
ERROR: Wheel ‘pyopengl’ located at C:\Windows\System32\PyOpenGL-3.1.6-cp312-cp312-win_amd64.whl is invalid.
→ Downloading PyOpenGL_accelerate-3.1.6-cp312-cp312-win_amd64.whl
Looking in indexes: Simple index, https://pypi.ngc.nvidia.com
Processing c:\windows\system32\pyopengl_accelerate-3.1.6-cp312-cp312-win_amd64.whl
ERROR: Wheel ‘pyopengl-accelerate’ located at C:\Windows\System32\PyOpenGL_accelerate-3.1.6-cp312-cp312-win_amd64.whl is invalid.
Pyzed directory is C:\Users\TarangMehta\AppData\Local\Programs\Python\Python312\Lib\site-packages
Hello All,
I am facing error while running the get_python_api. This error leads to error while running all the codes in sample folders. I can run all the tutorial files and it works.
Can anyone help me?
I also tried pip install PyOpenGL PyOpenGL_accelerate --only-binary :all:
This show that
C:\Windows\System32>pip install PyOpenGL PyOpenGL_accelerate --only-binary :all:
Looking in indexes: Simple index, https://pypi.ngc.nvidia.com
Requirement already satisfied: PyOpenGL in c:\users\tarangmehta\appdata\local\programs\python\python312\lib\site-packages (3.1.6)
Requirement already satisfied: PyOpenGL_accelerate in c:\users\tarangmehta\appdata\local\programs\python\python312\lib\site-packages (3.1.6)
But running get_python_api is giving error.
I am not from coding background so dont know much.
Hello @mattrouss
when i changed the python to 3.10 it works without getting error.
But now i am not able to run few examples like body tracking samples or auomatic region of interst etc.
here is the error message for automatic region of interest.
= RESTART: C:\Program Files (x86)\ZED SDK\samples\depth sensing\automatic region of interest\python\automatic_region_of_interest.py
[Sample] Using default resolution
Press ‘a’ to apply the ROI
Press ‘r’ to reset the ROI
Press ‘s’ to save the ROI as image file to reload it later
Press ‘l’ to load the ROI from an image file
Traceback (most recent call last):
File “C:\Program Files (x86)\ZED SDK\samples\depth sensing\automatic region of interest\python\automatic_region_of_interest.py”, line 173, in
main()
File “C:\Program Files (x86)\ZED SDK\samples\depth sensing\automatic region of interest\python\automatic_region_of_interest.py”, line 108, in main
roi_param.auto_apply = True
AttributeError: ‘pyzed.sl.RegionOfInterestParameters’ object has no attribute ‘auto_apply’
Can you please help on why some examples are not working?
Hello @mattrouss ,
Thank you for the reply will try to change. I have tried the code and get the new error now:
ZED SDK/samples/depth sensing/automatic region of interest/python/automatic_region_of_interest.py"
[Sample] Using default resolution
[2024-08-29 06:55:49 UTC][ZED][INFO] Logging level INFO
[2024-08-29 06:55:50 UTC][ZED][INFO] Using USB input… Switched to default resolution HD720
[2024-08-29 06:55:52 UTC][ZED][INFO] [Init] Depth mode: NEURAL
[2024-08-29 06:55:52 UTC][ZED][INFO] [Init] Camera successfully opened.
[2024-08-29 06:55:52 UTC][ZED][INFO] [Init] Camera FW version: 1523
[2024-08-29 06:55:52 UTC][ZED][INFO] [Init] Video mode: HD720@60
[2024-08-29 06:55:52 UTC][ZED][INFO] [Init] Serial Number: S/N 35084232
Press ‘a’ to apply the ROI
Press ‘r’ to reset the ROI
Press ‘s’ to save the ROI as image file to reload it later
Press ‘l’ to load the ROI from an image file
Traceback (most recent call last):
File “c:\Program Files (x86)\ZED SDK\samples\depth sensing\automatic region of interest\python\automatic_region_of_interest.py”, line 173, in
main()
File “c:\Program Files (x86)\ZED SDK\samples\depth sensing\automatic region of interest\python\automatic_region_of_interest.py”, line 108, in main
roi_param.auto_apply_module = True
File “pyzed\sl.pyx”, line 4072, in pyzed.sl.RegionOfInterestParameters.auto_apply_module.set
TypeError: ‘bool’ object is not iterable
Can you please check for all the sample codes? because maximum are not working. Can you please suggest the what should be changed in them? Or shall I individually report them?
PS C:\Program Files (x86)\ZED SDK> & C:/Users/TarangMehta/AppData/Local/Programs/Python/Python310/python.exe “c:/Program Files (x86)/ZED SDK/samples/depth sensing/automatic region of interest/python/automatic_region_of_interest.py”
[Sample] Using default resolution
[2024-08-29 11:12:37 UTC][ZED][INFO] Logging level INFO
[2024-08-29 11:12:38 UTC][ZED][INFO] Using USB input… Switched to default resolution HD720
[2024-08-29 11:12:39 UTC][ZED][INFO] [Init] Depth mode: NEURAL
[2024-08-29 11:12:40 UTC][ZED][INFO] [Init] Camera successfully opened.
[2024-08-29 11:12:40 UTC][ZED][INFO] [Init] Camera FW version: 1523
[2024-08-29 11:12:40 UTC][ZED][INFO] [Init] Video mode: HD720@60
[2024-08-29 11:12:40 UTC][ZED][INFO] [Init] Serial Number: S/N 35084232
Press ‘a’ to apply the ROI
Press ‘r’ to reset the ROI
Press ‘s’ to save the ROI as image file to reload it later
Press ‘l’ to load the ROI from an image file
Traceback (most recent call last):
File “c:\Program Files (x86)\ZED SDK\samples\depth sensing\automatic region of interest\python\automatic_region_of_interest.py”, line 173, in
main()
File “c:\Program Files (x86)\ZED SDK\samples\depth sensing\automatic region of interest\python\automatic_region_of_interest.py”, line 136, in main
cv2.imshow(imWndName, cvImage)
cv2.error: OpenCV(4.10.0) error: (-5:Bad argument) in function ‘imshow’
Hello @mattrouss ,
this solved the issue for now but i am not able use the Yolo files…
ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
ultralytics 8.2.82 requires opencv-python>=4.6.0, but you have opencv-python 4.5.4.60 which is incompatible.
Successfully installed opencv-python-4.5.4.60
Also i have one issue now. I am attaching the image but usual it should be live feed data. The object detection code doesn’t detect this object and this is my main goal to use such metal object to detect. They can be shiny or can be in gray colour. How do I make it detect? Can you please give some clue?
Because after object detection my next step is finding the depth and in case if it moves then finding a new location of the same object.
sorry for asking silly question but i am new and trying to learn from the example codes.
I would suggest trying to upgrade opencv-python to 4.6.0 which should also work with the ZED SDK.
To detect your own object classes for your use case, you will have to “retrain” Yolo, meaning that you can use the existing image analysis capabilities of the original model, and update the last layer(s) of weights so it is adapted to your objects.
To do this you will have to create a dataset with many of your own images of the different objects, and run the training scripts of yolo on this dataset.