Skip to content

Commit 33a098e

Browse files
committed
Update wrapper for ZED SDK 4.0.1 release
1 parent b2586ac commit 33a098e

File tree

6 files changed

+3360
-804
lines changed

6 files changed

+3360
-804
lines changed

README.md

+16-19
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ This package lets you use the ZED stereo camera in Python 3. The Python API is a
1111

1212
To start using the ZED SDK in Python, you will need to install the following dependencies on your system:
1313

14-
- [ZED SDK 3.8](https://www.stereolabs.com/developers/) and its dependency [CUDA](https://developer.nvidia.com/cuda-downloads)
14+
- [ZED SDK 4.0](https://www.stereolabs.com/developers/) and its dependency [CUDA](https://developer.nvidia.com/cuda-downloads)
15+
16+
For the ZED SDK 3.8 compatible version, use the [zedsdk_3.X branch](https://github.com/stereolabs/zed-python-api/tree/zedsdk_3.X) or the [3.8 release tag](https://github.com/stereolabs/zed-python-api/releases/tag/v3.8)
17+
1518
- Python 3.7+ x64 ([Windows installer](https://www.python.org/ftp/python/3.7.6/python-3.7.6-amd64.exe))
1619
- [Cython 0.28](http://cython.org/#download)
1720
- [Numpy 1.13](https://www.scipy.org/scipylib/download.html)
@@ -58,29 +61,23 @@ Run the script:
5861
```bash
5962
$ cd "/usr/local/zed/"
6063
$ python get_python_api.py
61-
6264
# The script displays the detected platform versions
63-
CUDA 10.0
64-
Platform ubuntu18
65-
ZED 3.1
66-
Python 3.7
67-
# Downloads the whl package
68-
Downloading python package from https://download.stereolabs.com/zedsdk/3.1/ubuntu18/cu100/py37 ...
69-
70-
# Gives instruction on how to install the downloaded package
71-
File saved into pyzed-3.1-cp37-cp37m-linux_x86_64.whl
72-
To install it run :
73-
python3 -m pip install pyzed-3.1-cp37-cp37m-linux_x86_64.whl
65+
Detected platform:
66+
linux_x86_64
67+
Python 3.11
68+
ZED SDK 4.0
69+
# Downloads and install the whl package
70+
-> Checking if https://download.stereolabs.com/zedsdk/4.0/whl/linux_x86_64/pyzed-4.0-cp311-cp311-linux_x86_64.whl exists and is available
71+
-> Found ! Downloading python package into /home/user/pyzed-4.0-cp311-cp311-linux_x86_64.whl
72+
-> Installing necessary dependencies
73+
...
74+
Successfully installed pyzed-4.0
7475
```
7576
76-
Now install the downloaded package with pip:
77+
To install it later or on a different environment run :
7778
7879
```bash
79-
$ python3 -m pip install pyzed-3.1-cp37-cp37m-linux_x86_64.whl
80-
81-
Processing ./pyzed-3.1-cp37-cp37m-linux_x86_64.whl
82-
Installing collected packages: pyzed
83-
Successfully installed pyzed-3.1
80+
$ python -m pip install --ignore-installed /home/user/pyzed-4.0-cp311-cp311-linux_x86_64.wh
8481
```
8582
8683
That's it ! The Python API is now installed.

src/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
### Prerequisites
88

9-
- [ZED SDK 3.8](https://www.stereolabs.com/developers/) and its dependency [CUDA](https://developer.nvidia.com/cuda-downloads)
9+
- [ZED SDK 4.0](https://www.stereolabs.com/developers/) and its dependency [CUDA](https://developer.nvidia.com/cuda-downloads)
1010
- Python 3.7+ x64
1111
- C++ compiler (VS2017 recommended)
1212
- [Cython 0.26](http://cython.org/#download)
1313
- [Numpy 1.13.1](https://www.scipy.org/scipylib/download.html)
1414

15-
The ZED SDK 2.X compatible API can be found in the [zedsdk_2.X branch](https://github.com/stereolabs/zed-python-api/tree/zedsdk_2.X).
15+
The ZED SDK 3.X compatible API can be found in the [zedsdk_3.X branch](https://github.com/stereolabs/zed-python-api/tree/zedsdk_3.X).
1616

17-
Please check your python version with the following command. The result should be 3.6 or higher.
17+
Please check your python version with the following command. The result should be 3.7 or higher.
1818

1919
```
2020
python --version

src/pyzed/Utils.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,7 @@ namespace sl {
196196

197197
sl::ObjectDetectionRuntimeParameters* create_object_detection_runtime_parameters(float confidence_threshold,
198198
std::vector<int> object_vector,
199-
std::map<int,float> object_class_confidence_map,
200-
int minimum_keypoints_threshold) {
199+
std::map<int,float> object_class_confidence_map) {
201200

202201
std::vector<sl::OBJECT_CLASS> object_vector_cpy;
203202
for (unsigned int i = 0; i < object_vector.size(); i++)
@@ -209,6 +208,6 @@ namespace sl {
209208
object_class_confidence_map_cpy[static_cast<sl::OBJECT_CLASS>(map_elem.first)] = map_elem.second;
210209
}
211210
}
212-
return new ObjectDetectionRuntimeParameters(confidence_threshold, object_vector_cpy, object_class_confidence_map_cpy, minimum_keypoints_threshold);
211+
return new ObjectDetectionRuntimeParameters(confidence_threshold, object_vector_cpy, object_class_confidence_map_cpy);
213212
}
214213
}

0 commit comments

Comments
 (0)