DrawFunc
- class savant.config.schema.DrawFunc(module='savant.deepstream.drawfunc', class_name='NvDsDrawFunc', kwargs=None, dev_mode=False, element='pyfunc', element_type=None, version='v1', name=None, properties=<factory>, rendered_objects=None, condition=<factory>)
A pipeline element that will use an object implementing
BaseNvDsDrawFunc
to draw metadata on frames.Note
Default values for
module
andclass_name
attributes are set to useNvDsDrawFunc
drawfunc implementation.- __call__(*args, **kwargs)
Calls resolved PyFunc implementation if its a subclass of
BasePyFuncCallableImpl
, otherwise no-op.
- check_reload()
Checks if reload is needed and reloads in case it is.
- element_type: str | None = None
Element type/subtype, can be defined as a substring of the
element
.For example,
detector
in- element: nvinfer@detector
- property full_name
Full element name.
- property instance: BasePyFuncImpl
Returns resolved PyFunc implementation.
- load_user_code()
Load (or reload) the user module/class specified in the PyFunc fields. It’s necessary to call this at least once before starting the pipeline.
- name: str | None = None
GstElement instance name. Arbitrary string, useful for identifying pipeline elements.
- version: str = 'v1'
Element version, can be defined as a substring of the
element
.For example,
v1
in- element: nvinfer@detector:v1
- rendered_objects: Dict[str, Dict[str, Any]] | None = None
A specification of objects to be rendered by the default draw function.
For more details, look at Declarative Configuration.
- condition: FrameProcessingCondition
Conditions for filtering frames to be processed by the draw function.
The draw function will be applied only to frames when all conditions are met.