ModelElement

Inheritance diagram of ModelElement

ModelElement inheritance diagram

class savant.config.schema.ModelElement(element='???', element_type=None, version='v1', name='???', properties=<factory>, dynamic_properties=<factory>, model='???')

A pipeline element that will run inference with specified deep learning model.

For example,

- element: nvinfer
  element_type: detector
  name: my_detector
  model:
      <model specification>
element: str = '???'

Either a Gstreamer element name (gst factory name) or a short notation string to define element, element_type and version at the same time.

Short notation string format is <element>@<element_type>:<version>

Note

Version is v1 by default.

Examples.

The following three element definitions are equivalent:

- element: nvinfer
  element_type: attribute_model
  version: v1

...

- element: nvinfer@attribute_model:v1

...

- element: nvinfer@attribute_model

Some elements might not have subtypes, in this case version in the short notation can be defined immediately after the element:

- element: drawbin:v1
  location: /data/frames/image_%06d.jpg

Warning

Mixing short notation and full definition is not supported.

Examples of unsupported notation mixing:

- element: nvinfer@attribute_model
  version: v1

...

- element: nvinfer:v1
  element_type: attribute_model

...

- element: nvinfer
  element_type: attribute_model:v1
element_type: Optional[str] = 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.

version: str = 'v1'

Element version, can be defined as a substring of the element.

For example, v1 in

- element: nvinfer@detector:v1
properties: Dict[str, Any]

GstElement properties.

dynamic_properties: Dict[str, DynamicGstProperty]

GstElement properties that can be updated during runtime.

name: str = '???'

GstElement instance name. Arbitrary string, useful for identifying pipeline elements. Mandatory for model elements.

model: Any = '???'

Model configuration, any subclass of Model. Check detailed Model hierarchy at links base, nvinfer.