Class containing a set of parameters for the object detection module. More...
Functions | |
ObjectDetectionParameters | __cinit__ (self, enable_tracking=True, enable_segmentation=False, detection_model=OBJECT_DETECTION_MODEL.MULTI_CLASS_BOX_FAST, max_range=-1.0, batch_trajectories_parameters=BatchParameters(), filtering_mode=OBJECT_FILTERING_MODE.NMS3D, prediction_timeout_s=0.2, allow_reduced_precision_inference=False, instance_module_id=0, fused_objects_group_name="", custom_onnx_file="", custom_onnx_dynamic_input_shape=Resolution(512, 512)) |
Default constructor. More... | |
bool | enable_tracking (self) |
Whether the object detection system includes object tracking capabilities across a sequence of images. More... | |
bool | enable_segmentation (self) |
Whether the object masks will be computed. More... | |
OBJECT_DETECTION_MODEL | detection_model (self) |
sl.OBJECT_DETECTION_MODEL to use. More... | |
str | fused_objects_group_name (self) |
In a multi camera setup, specify which group this model belongs to. More... | |
str | custom_onnx_file (self) |
Path to the YOLO-like onnx file for custom object detection ran in the ZED SDK. More... | |
sl.Resolution | custom_onnx_dynamic_input_shape (self) |
Resolution to the YOLO-like onnx file for custom object detection ran in the ZED SDK. More... | |
float | max_range (self) |
Upper depth range for detections. More... | |
BatchParameters | batch_parameters (self) |
Batching system parameters. More... | |
def | filtering_mode (self) |
Filtering mode that should be applied to raw detections. More... | |
float | prediction_timeout_s (self) |
Prediction duration of the ZED SDK when an object is not detected anymore before switching its state to sl.OBJECT_TRACKING_STATE.SEARCHING. More... | |
bool | allow_reduced_precision_inference (self) |
Whether to allow inference to run at a lower precision to improve runtime and memory usage. More... | |
int | instance_module_id (self) |
Id of the module instance. More... | |
str | custom_onnx_file (self) |
Path to the YOLO-like onnx file for custom object detection ran in the ZED SDK. More... | |
Resolution | custom_onnx_dynamic_input_shape (self) |
Resolution to the YOLO-like onnx file for custom object detection ran in the ZED SDK. More... | |
Class containing a set of parameters for the object detection module.
The default constructor sets all parameters to their default settings.
ObjectDetectionParameters __cinit__ | ( | self, | |
enable_tracking = True , |
|||
enable_segmentation = False , |
|||
detection_model = OBJECT_DETECTION_MODEL.MULTI_CLASS_BOX_FAST , |
|||
max_range = -1.0 , |
|||
batch_trajectories_parameters = BatchParameters() , |
|||
filtering_mode = OBJECT_FILTERING_MODE.NMS3D , |
|||
prediction_timeout_s = 0.2 , |
|||
allow_reduced_precision_inference = False , |
|||
instance_module_id = 0 , |
|||
fused_objects_group_name = "" , |
|||
custom_onnx_file = "" , |
|||
custom_onnx_dynamic_input_shape = Resolution(512, 512) |
|||
) |
Default constructor.
All the parameters are set to their default values.
enable_tracking | : Activates enable_tracking |
enable_segmentation | : Activates enable_segmentation |
detection_model | : Chosen detection_model |
max_range | : Chosen max_range |
batch_trajectories_parameters | : Chosen batch_parameters |
filtering_mode | : Chosen filtering_mode |
prediction_timeout_s | : Chosen prediction_timeout_s |
allow_reduced_precision_inference | : Activates allow_reduced_precision_inference |
instance_module_id | : Chosen instance_module_id |
bool enable_tracking | ( | self | ) |
Whether the object detection system includes object tracking capabilities across a sequence of images.
Default: True
bool enable_segmentation | ( | self | ) |
Whether the object masks will be computed.
Default: False
OBJECT_DETECTION_MODEL detection_model | ( | self | ) |
sl.OBJECT_DETECTION_MODEL to use.
str fused_objects_group_name | ( | self | ) |
In a multi camera setup, specify which group this model belongs to.
In a multi camera setup, multiple cameras can be used to detect objects and multiple detector having similar output layout can see the same object. Therefore, Fusion will fuse together the outputs received by multiple detectors only if they are part of the same fused_objects_group_name.
str custom_onnx_file | ( | self | ) |
Path to the YOLO-like onnx file for custom object detection ran in the ZED SDK.
When detection_model
is OBJECT_DETECTION_MODEL::CUSTOM_YOLOLIKE_BOX_OBJECTS, a onnx model must be passed so that the ZED SDK can optimize it for your GPU and run inference on it.
The resulting optimized model will be saved for re-use in the future.
custom_onnx_file
string along with your GPU specs to decide whether to use the cached optmized model or to optimize the passed onnx model. If you want to use a different model (i.e. an onnx with different weights), you must use a different custom_onnx_file
string or delete the cached optimized model in <ZED Installation path>/resources.Referenced by ObjectDetectionParameters.custom_onnx_file().
sl.Resolution custom_onnx_dynamic_input_shape | ( | self | ) |
Resolution to the YOLO-like onnx file for custom object detection ran in the ZED SDK.
This resolution defines the input tensor size for dynamic shape ONNX model only. The batch and channel dimensions are automatically handled, it assumes it's color images like default YOLO models.
\default Squared images 512x512 (input tensor will be 1x3x512x512)
Referenced by ObjectDetectionParameters.custom_onnx_dynamic_input_shape().
float max_range | ( | self | ) |
Upper depth range for detections.
Default: -1 (value set in sl.InitParameters.depth_maximum_distance)
BatchParameters batch_parameters | ( | self | ) |
Batching system parameters.
Batching system (introduced in 3.5) performs short-term re-identification with deep-learning and trajectories filtering.
sl.BatchParameters.enable must to be true to use this feature (by default disabled).
def filtering_mode | ( | self | ) |
Filtering mode that should be applied to raw detections.
Default: sl.OBJECT_FILTERING_MODE.NMS_3D (same behavior as previous ZED SDK version)
float prediction_timeout_s | ( | self | ) |
Prediction duration of the ZED SDK when an object is not detected anymore before switching its state to sl.OBJECT_TRACKING_STATE.SEARCHING.
It prevents the jittering of the object state when there is a short misdetection.
The user can define their own prediction time duration.
Default: 0.2
bool allow_reduced_precision_inference | ( | self | ) |
Whether to allow inference to run at a lower precision to improve runtime and memory usage.
It might increase the initial optimization time and could include downloading calibration data or calibration cache and slightly reduce the accuracy.
int instance_module_id | ( | self | ) |
Id of the module instance.
This is used to identify which object detection module instance is used.
str custom_onnx_file | ( | self | ) |
Path to the YOLO-like onnx file for custom object detection ran in the ZED SDK.
When detection_model
is OBJECT_DETECTION_MODEL::CUSTOM_YOLOLIKE_BOX_OBJECTS, a onnx model must be passed so that the ZED SDK can optimize it for your GPU and run inference on it. The resulting optimized model will be saved for re-use in the future.
custom_onnx_file
string along with your GPU specs to decide whether to use the cached optmized model or to optimize the passed onnx model. If you want to use a different model (i.e. an onnx with different weights), you must use a different custom_onnx_file
string or delete the cached optimized model in <ZED Installation path>/resources. Resolution custom_onnx_dynamic_input_shape | ( | self | ) |
Resolution to the YOLO-like onnx file for custom object detection ran in the ZED SDK.
This resolution defines the input tensor size for dynamic shape ONNX model only. The batch and channel dimensions are automatically handled, it assumes it's color images like default YOLO models.