AttributeModelOutputAttribute

Inheritance diagram of AttributeModelOutputAttribute

AttributeModelOutputAttribute inheritance diagram

class savant.base.model.AttributeModelOutputAttribute(name='???', labels=<factory>, threshold=None, multi_label=False, internal=False)

AttributeModel output attribute configuration template. Validates entries in a module config under model.output.attributes.

Example,

attributes:
    - name: color
      labels: ['red', 'green']
name: str = '???'

Attribute name will be used in the label under which a model’s results are added to metadata.

labels: List[str]

A list of text labels that correspond to class ids of a classification model. The number and order of these labels should match those of a classification model’s result classes.

threshold: float | None = None

Minimum threshold label probability. The model outputs the label having the highest probability if it is greater than this threshold.

multi_label: bool = False

Output all labels/values whose probability/confidence exceeds the threshold value.

internal: bool = False

Indicates whether this attribute should be excluded from outbound messages. Set to True for attributes which are only useful for internal pipeline operation.