otx.api.entities.scored_label#
This module define the scored label entity.
Classes
|
This dataclass contains information about the source of a scored label. |
|
This represents a label along with a probability. |
- class otx.api.entities.scored_label.LabelSource(user_id: str = '', model_id: ID = ID(), model_storage_id: ID = ID())[source]#
Bases:
object
This dataclass contains information about the source of a scored label.
For annotations, the id of the user who created the label and for predictions, the id and model storage id of the model that created the prediction. When a user has accepted a predictions as is, both the user id of the user who accepted and the model/model storage id of the model that predicted should be filled in.
- class otx.api.entities.scored_label.ScoredLabel(label: LabelEntity, probability: float = 0.0, label_source: LabelSource | None = None)[source]#
Bases:
object
This represents a label along with a probability. This is used inside Annotation class.
- Parameters:
label (LabelEntity) – Label entity to which probability and source are attached.
probability (float) – a float denoting the probability of the shape belonging to the label.
label_source (LabelSource) – a LabelSource dataclass containing the id of the user who created or the model that predicted this label.
- get_label() LabelEntity [source]#
Gets the label that the ScoredLabel object was initialized with.