ObjectDetectionParameters Class Reference

Sets the object detection parameters. More...

Functions

 ObjectDetectionParameters (bool image_sync_=true, bool enable_tracking_=true, bool enable_mask_output_=false, DETECTION_MODEL detection_model=DETECTION_MODEL::MULTI_CLASS_BOX, bool enable_body_fitting_=false, float max_range_=-1.f, BatchParameters batch_trajectories_parameters=BatchParameters(), BODY_FORMAT body_format_=BODY_FORMAT::POSE_18, OBJECT_FILTERING_MODE filtering_mode_=OBJECT_FILTERING_MODE::NMS3D, float prediction_timeout_s=0.2f, bool allow_reduced_precision_inference=false)
 Default constructor. Set all parameters to their default values. More...
 
bool operator== (const ObjectDetectionParameters &param1) const
 
bool operator!= (const ObjectDetectionParameters &param1) const
 

Attributes

bool image_sync = true
 Defines if the object detection is synchronized to the image or runs in a separate thread. If set to true, the detection is run for every grab, otherwise, the thread runs at its own speed, which can lead to new detection once in a while. More...
 
bool enable_tracking = true
 Defines if the object detection will track objects across images flow. More...
 
bool enable_mask_output = false
 Defines if the mask object will be computed. More...
 
DETECTION_MODEL detection_model = DETECTION_MODEL::MULTI_CLASS_BOX
 Enable human pose estimation with skeleton keypoints output. More...
 
bool enable_body_fitting = false
 Defines if the body fitting will be applied. More...
 
BODY_FORMAT body_format = BODY_FORMAT::POSE_18
 Defines the body format outputed by the sdk when retrieveObjects is called. More...
 
float max_range = -1.f
 Defines a upper depth range for detections.
Defined in UNIT set at sl::Camera::open.
Default value is set to sl::Initparameters::depth_maximum_distance (can not be higher). More...
 
BatchParameters batch_parameters
 Batching system parameters. Batching system (introduced in 3.5) performs short-term re-identification with deep learning and trajectories filtering.
BatchParameters::enable need to be true to use this feature (by default disabled) More...
 
OBJECT_FILTERING_MODE filtering_mode
 Defines the filtering mode that should be applied to raw detections.
Default value is set to OBJECT_FILTERING_MODE::NMS_3D to keep the same behavior as previous SDK version. More...
 
float prediction_timeout_s
 When an object is not detected anymore, the SDK will predict its positions during a short period of time before its state switched to SEARCHING.
It prevents the jittering of the object state when there is a short misdetection. The user can define its own prediction time duration. More...
 
bool allow_reduced_precision_inference
 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. More...
 

Detailed Description

Sets the object detection parameters.

The default constructor sets all parameters to their default settings.

Note
Parameters can be user adjusted.

Constructor and Destructor

◆ ObjectDetectionParameters()

ObjectDetectionParameters ( bool  image_sync_ = true,
bool  enable_tracking_ = true,
bool  enable_mask_output_ = false,
DETECTION_MODEL  detection_model = DETECTION_MODEL::MULTI_CLASS_BOX,
bool  enable_body_fitting_ = false,
float  max_range_ = -1.f,
BatchParameters  batch_trajectories_parameters = BatchParameters(),
BODY_FORMAT  body_format_ = BODY_FORMAT::POSE_18,
OBJECT_FILTERING_MODE  filtering_mode_ = OBJECT_FILTERING_MODE::NMS3D,
float  prediction_timeout_s = 0.2f,
bool  allow_reduced_precision_inference = false 
)

Default constructor. Set all parameters to their default values.

Functions

◆ operator==()

bool operator== ( const ObjectDetectionParameters param1) const

Comparison operator ==

Parameters
ObjectDetectionParametersto compare
Returns
true if the two struct are identical

◆ operator!=()

bool operator!= ( const ObjectDetectionParameters param1) const

Comparison operator !=

Parameters
ObjectDetectionParametersto compare
Returns
true if the two struct are different

Variables

◆ image_sync

bool image_sync = true

Defines if the object detection is synchronized to the image or runs in a separate thread. If set to true, the detection is run for every grab, otherwise, the thread runs at its own speed, which can lead to new detection once in a while.

◆ enable_tracking

bool enable_tracking = true

Defines if the object detection will track objects across images flow.

◆ enable_mask_output

bool enable_mask_output = false

Defines if the mask object will be computed.

◆ detection_model

Enable human pose estimation with skeleton keypoints output.

◆ enable_body_fitting

bool enable_body_fitting = false

Defines if the body fitting will be applied.

◆ body_format

Defines the body format outputed by the sdk when retrieveObjects is called.

Warning
if BODY_FORMAT::POSE_34, the ZED SDK will automatically enable the fitting enable_body_fitting

◆ max_range

float max_range = -1.f

Defines a upper depth range for detections.
Defined in UNIT set at sl::Camera::open.
Default value is set to sl::Initparameters::depth_maximum_distance (can not be higher).

◆ batch_parameters

BatchParameters batch_parameters

Batching system parameters. Batching system (introduced in 3.5) performs short-term re-identification with deep learning and trajectories filtering.
BatchParameters::enable need to be true to use this feature (by default disabled)

◆ filtering_mode

OBJECT_FILTERING_MODE filtering_mode

Defines the filtering mode that should be applied to raw detections.
Default value is set to OBJECT_FILTERING_MODE::NMS_3D to keep the same behavior as previous SDK version.

Note
: This parameter is only used in Detection Model MULTI_CLASS_BOX_XXXX and CUSTOM_BOX_OBJECTS
: For Custom Object mode, it is recommended to use OBJECT_FILTERING_MODE::NMS_3D_PER_CLASS or OBJECT_FILTERING_MODE::NONE. In this case, you might need to add your own NMS filter before ingesting the boxes into the object detection module.

◆ prediction_timeout_s

float prediction_timeout_s

When an object is not detected anymore, the SDK will predict its positions during a short period of time before its state switched to SEARCHING.
It prevents the jittering of the object state when there is a short misdetection. The user can define its own prediction time duration.

Note
During this time, the object will have OK state even if it is not detected.
the duration is expressed in seconds
Warning
the prediction_timeout_s will be clamped to 1 second as the prediction is getting worst with time.
set this parameter to 0 to disable SDK predictions

◆ allow_reduced_precision_inference

bool allow_reduced_precision_inference

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.

Note
The fp16 is automatically enabled if the GPU is compatible and provides a speed up of almost x2 and reduce memory usage by almost half, no precision loss.
This setting allow int8 precision which can speed up by another x2 factor (compared to fp16, or x4 compared to fp32) and half the fp16 memory usage, however some accuracy can be lost. The accuracy loss should not exceed 1-2% on the compatible models. The current compatible models are all HUMAN_BODY_XXXX