Object Detection Module

Classes

class  ObjectData
 Class containing data of a detected object such as its bounding_box, label, id and its 3D position. More...
 
class  CustomBoxObjectData
 Class that store externally detected objects. More...
 
class  Objects
 Class containing the results of the object detection module. More...
 
class  ObjectsBatch
 Class containing batched data of a detected objects from the object detection module. More...
 
class  BatchParameters
 Structure containing a set of parameters for batch object detection. More...
 
class  ObjectDetectionParameters
 Structure containing a set of parameters for the object detection module. More...
 
class  ObjectDetectionRuntimeParameters
 Structure containing a set of runtime parameters for the object detection module. More...
 
class  AI_Model_status
 Structure containing AI model status. More...
 

Enumerations

enum class  OBJECT_DETECTION_MODEL
 Lists available models for the object detection module. More...
 
enum class  AI_MODELS
 Lists available AI models. More...
 
enum class  OBJECT_CLASS
 Lists available object classes. More...
 
enum class  OBJECT_SUBCLASS
 List available object subclasses. More...
 
enum class  OBJECT_TRACKING_STATE
 Lists the different states of object tracking. More...
 
enum class  OBJECT_ACTION_STATE
 Lists the different states of an object's actions. More...
 
enum class  OBJECT_FILTERING_MODE
 Lists supported bounding box preprocessing. More...
 

Functions

AI_Model_status checkAIModelStatus (AI_MODELS model, int gpu_id=0)
 Checks if a corresponding optimized engine is found for the requested Model based on your rig configuration. More...
 
ERROR_CODE downloadAIModel (sl::AI_MODELS model, int gpu_id=0)
 Downloads the requested model. More...
 
ERROR_CODE optimizeAIModel (sl::AI_MODELS model, int gpu_id=0)
 Optimizes the requested model (and download the model if it is not present on the host). More...
 
String generate_unique_id ()
 Generate a UUID like unique id to help identify and track AI detections. More...
 

Enumeration Type Documentation

◆ OBJECT_DETECTION_MODEL

Lists available models for the object detection module.

Enumerator
MULTI_CLASS_BOX_FAST 

Any objects, bounding box based.

MULTI_CLASS_BOX_MEDIUM 

Any objects, bounding box based, compromise between accuracy and speed.

MULTI_CLASS_BOX_ACCURATE 

Any objects, bounding box based, more accurate but slower than the base model.

PERSON_HEAD_BOX_FAST 

Bounding box detector specialized in person heads particularly well suited for crowded environments. The person localization is also improved.

PERSON_HEAD_BOX_ACCURATE 

Bounding box detector specialized in person heads, particularly well suited for crowded environments. The person localization is also improved, more accurate but slower than the base model.

CUSTOM_BOX_OBJECTS 

For external inference, using your own custom model and/or frameworks. This mode disables the internal inference engine, the 2D bounding box detection must be provided.

◆ AI_MODELS

enum AI_MODELS
strong

Lists available AI models.

Enumerator
MULTI_CLASS_DETECTION 

Related to sl::OBJECT_DETECTION_MODEL::MULTI_CLASS_BOX_FAST

MULTI_CLASS_MEDIUM_DETECTION 

Related to sl::OBJECT_DETECTION_MODEL::MULTI_CLASS_BOX_MEDIUM

MULTI_CLASS_ACCURATE_DETECTION 

Related to sl::OBJECT_DETECTION_MODEL::MULTI_CLASS_BOX_ACCURATE

HUMAN_BODY_FAST_DETECTION 

Related to sl::BODY_TRACKING_MODEL::HUMAN_BODY_FAST

HUMAN_BODY_MEDIUM_DETECTION 

Related to sl::BODY_TRACKING_MODEL::HUMAN_BODY_MEDIUM

HUMAN_BODY_ACCURATE_DETECTION 

Related to sl::BODY_TRACKING_MODEL::HUMAN_BODY_ACCURATE

HUMAN_BODY_38_FAST_DETECTION 

Related to sl::BODY_TRACKING_MODEL::HUMAN_BODY_FAST

HUMAN_BODY_38_MEDIUM_DETECTION 

Related to sl::BODY_TRACKING_MODEL::HUMAN_BODY_FAST

HUMAN_BODY_38_ACCURATE_DETECTION 

Related to sl::BODY_TRACKING_MODEL::HUMAN_BODY_FAST

PERSON_HEAD_DETECTION 

Related to sl::OBJECT_DETECTION_MODEL::PERSON_HEAD_BOX_FAST

PERSON_HEAD_ACCURATE_DETECTION 

Related to sl::OBJECT_DETECTION_MODEL::PERSON_HEAD_BOX_ACCURATE

REID_ASSOCIATION 

Related to sl::BatchParameters.enable

NEURAL_DEPTH 

Related to sl::DEPTH_MODE::NEURAL

NEURAL_PLUS_DEPTH 

Related to sl::DEPTH_MODE::NEURAL_PLUS

◆ OBJECT_CLASS

enum OBJECT_CLASS
strong

Lists available object classes.

Enumerator
PERSON 

For people detection

VEHICLE 

For vehicle detection (cars, trucks, buses, motorcycles, etc.)

BAG 

For bag detection (backpack, handbag, suitcase, etc.)

ANIMAL 

For animal detection (cow, sheep, horse, dog, cat, bird, etc.)

ELECTRONICS 

For electronic device detection (cellphone, laptop, etc.)

FRUIT_VEGETABLE 

For fruit and vegetable detection (banana, apple, orange, carrot, etc.)

SPORT 

For sport-related object detection (sport ball, etc.)

◆ OBJECT_SUBCLASS

enum OBJECT_SUBCLASS
strong

List available object subclasses.

Given as hint, when using object tracking an object can change of sl::OBJECT_SUBCLASS while keeping the same sl::OBJECT_CLASS (i.e.: frame n: MOTORBIKE, frame n+1: BICYCLE).

Enumerator
PERSON 

PERSON

PERSON_HEAD 

PERSON

BICYCLE 

VEHICLE

CAR 

VEHICLE

MOTORBIKE 

VEHICLE

BUS 

VEHICLE

TRUCK 

VEHICLE

BOAT 

VEHICLE

BACKPACK 

BAG

HANDBAG 

BAG

SUITCASE 

BAG

BIRD 

ANIMAL

CAT 

ANIMAL

DOG 

ANIMAL

HORSE 

ANIMAL

SHEEP 

ANIMAL

COW 

ANIMAL

CELLPHONE 

ELECTRONICS

LAPTOP 

ELECTRONICS

BANANA 

FRUIT_VEGETABLE

APPLE 

FRUIT_VEGETABLE

ORANGE 

FRUIT_VEGETABLE

CARROT 

FRUIT_VEGETABLE

SPORTSBALL 

SPORT

◆ OBJECT_TRACKING_STATE

enum OBJECT_TRACKING_STATE
strong

Lists the different states of object tracking.

Enumerator
OFF 

The tracking is not yet initialized.
The object id is not usable.

OK 

The object is tracked.

SEARCHING 

The object could not be detected in the image and is potentially occluded.
The trajectory is estimated.

TERMINATE 

This is the last searching state of the track.
The track will be deleted in the next sl::Camera.retrieveObjects().

◆ OBJECT_ACTION_STATE

enum OBJECT_ACTION_STATE
strong

Lists the different states of an object's actions.

Enumerator
IDLE 

The object is staying static.

MOVING 

The object is moving.

◆ OBJECT_FILTERING_MODE

enum OBJECT_FILTERING_MODE
strong

Lists supported bounding box preprocessing.

Enumerator
NONE 

The ZED SDK will not apply any preprocessing to the detected objects.

NMS3D 

The ZED SDK will remove objects that are in the same 3D position as an already tracked object (independent of class id).

NMS3D_PER_CLASS 

The ZED SDK will remove objects that are in the same 3D position as an already tracked object of the same class id.

Function Documentation

◆ checkAIModelStatus()

AI_Model_status sl::checkAIModelStatus ( AI_MODELS  model,
int  gpu_id = 0 
)

Checks if a corresponding optimized engine is found for the requested Model based on your rig configuration.

Returns
The status of the given model for the specified GPU.

◆ downloadAIModel()

ERROR_CODE sl::downloadAIModel ( sl::AI_MODELS  model,
int  gpu_id = 0 
)

Downloads the requested model.

Returns
sl::ERROR_CODE::SUCCESS if the model is already download.

◆ optimizeAIModel()

ERROR_CODE sl::optimizeAIModel ( sl::AI_MODELS  model,
int  gpu_id = 0 
)

Optimizes the requested model (and download the model if it is not present on the host).

Returns
sl::ERROR_CODE::SUCCESS if the model is well optimized.

◆ generate_unique_id()

String sl::generate_unique_id ( )

Generate a UUID like unique id to help identify and track AI detections.