ClassificationInstance Objects
classification_hash
classification_name
feature_hash
set_for_frames
True
, the currently specified values will be overwritten.
Arguments:
frames
- The frame to add the classification instance to. Defaulting to the first frame for convenience.overwrite
- IfTrue
, overwrite existing data for the given frames. This will not reset all the non-specified values. IfFalse
and data already exists for the given frames, raises an error.created_at
- Optionally specify the creation time of the classification instance on this frame. Defaults todatetime.now()
.created_by
- Optionally specify the creator of the classification instance on this frame. Defaults to the current SDK user.last_edited_at
- Optionally specify the last edit time of the classification instance on this frame. Defaults todatetime.now()
.last_edited_by
- Optionally specify the last editor of the classification instance on this frame. Defaults to the current SDK user.confidence
- Optionally specify the confidence of the classification instance on this frame. Defaults to1.0
.manual_annotation
- Optionally specify whether the classification instance on this frame was manually annotated. Defaults toTrue
.reviews
- Should only be set by internal functions.
get_annotation
frame
- Either the frame number or the image hash if the data type is an image or image group. Defaults to the first frame.
get_annotations
ClassificationInstance.Annotation
in order of available frames.
set_answer
answer
- The answer to set.attribute
- The ontology attribute to set the answer for. If not set, this will be attempted to be inferred. For answers to :class:encord.objects.common.RadioAttribute
or :class:encord.objects.common.ChecklistAttribute
, this can be inferred automatically. For :class:encord.objects.common.TextAttribute
, this will only be inferred if there is only one possible TextAttribute to set for the entire classification instance. Otherwise, a :class:encord.exceptionsLabelRowError
will be thrown.overwrite
- IfTrue
, the answer will be overwritten if it already exists. IfFalse
, this will throw a LabelRowError if the answer already exists.
set_answer_from_list
answers_list
- The list to set the answer from.
get_answer
None
if the attribute is not yet answered.
For the ChecklistAttribute, it returns None if and only if
the attribute is nested and the parent is unselected. Otherwise, if not yet answered it will return an empty
list.
Arguments:
attribute
- The ontology attribute to get the answer for.
delete_answer
attribute
- The ontology attribute to delete the answer for. If not provided, the first level attribute is used.
copy
LabelRowV2
s.