ObjectDetectionRuntimeParameters Class Reference

Sets the object detection runtime parameters. More...

Functions

def __cinit__ (self, detection_confidence_threshold=50, object_class_filter=[], object_class_detection_confidence_threshold={})
 Default constructor. More...
 
def detection_confidence_threshold (self)
 Defines the confidence threshold: interval between 1 and 99. More...
 
def object_class_filter (self)
 Selects which object types to detect and track. More...
 
def object_class_detection_confidence_threshold (self)
 Defines a detection threshold for each object class. More...
 

Detailed Description

Sets the object detection runtime parameters.

Functions

◆ __cinit__()

def __cinit__ (   self,
  detection_confidence_threshold = 50,
  object_class_filter = [],
  object_class_detection_confidence_threshold = {} 
)

Default constructor.

Parameters
detection_confidence_threshold: sets detection_confidence_threshold. Default: 50
object_class_filter: sets object_class_filter. Default: empty list (all classes are tracked)
object_class_detection_confidence_threshold: sets object_class_detection_confidence_threshold. Default: empty dict (detection_confidence_threshold value will be taken for each class)

◆ detection_confidence_threshold()

def detection_confidence_threshold (   self)

Defines the confidence threshold: interval between 1 and 99.

A confidence of 1 meaning a low threshold, more uncertain objects and 99 very few but very precise objects. If the scene contains a lot of objects, increasing the confidence can slightly speed up the process, since every object instances are tracked.

◆ object_class_filter()

def object_class_filter (   self)

Selects which object types to detect and track.

By default all classes are tracked. Fewer object types can slightly speed up the process, since every objects are tracked.


In order to get all the available classes, the filter vector must be empty (default behaviour):

object_detection_parameters_rt = sl.ObjectDetectionRuntimeParameters()
object_detection_parameters_rt.object_class_filter = []


To select a set of specific object classes, like vehicles, persons and animals for instance:

object_detection_parameters_rt.object_class_filter = [sl.OBJECT_CLASS.VEHICLE,sl.OBJECT_CLASS.PERSON,sl.OBJECT_CLASS.ANIMAL]

◆ object_class_detection_confidence_threshold()

def object_class_detection_confidence_threshold (   self)

Defines a detection threshold for each object class.

It can be empty for some classes, detection_confidence_threshold will be taken as fallback/default value.


To set a specific confidence threshold per class:

object_detection_parameters_rt = sl.ObjectDetectionRuntimeParameters()
object_detection_parameters_rt.object_class_detection_confidence_threshold = {sl.OBJECT_CLASS.VEHICLE: 30,sl.OBJECT_CLASS.PERSON: 50}