Skip to content

Commit e63b306

Browse files
chore: simplifiy drastically
1 parent b186359 commit e63b306

File tree

3 files changed

+396
-390
lines changed

3 files changed

+396
-390
lines changed

libs/labelbox/src/labelbox/data/annotation_types/classification/classification.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,17 @@ class ClassificationAnswer(FeatureSchema, ConfidenceMixin, CustomMetricsMixin):
1717
Each answer can have a keyframe independent of the others.
1818
So unlike object annotations, classification annotations
1919
track keyframes at a classification answer level.
20+
21+
- For temporal classifications (audio/video), optional start_frame/end_frame can specify
22+
the time range for this answer. Must be within root annotation's frame range.
23+
Defaults to root frame range if not specified.
2024
"""
2125

2226
extra: Dict[str, Any] = {}
2327
keyframe: Optional[bool] = None
2428
classifications: Optional[List["ClassificationAnnotation"]] = None
29+
start_frame: Optional[int] = None
30+
end_frame: Optional[int] = None
2531

2632

2733
class Radio(ConfidenceMixin, CustomMetricsMixin, BaseModel):
@@ -69,8 +75,12 @@ class ClassificationAnnotation(
6975
classifications (Optional[List[ClassificationAnnotation]]): Optional sub classification of the annotation
7076
feature_schema_id (Optional[Cuid])
7177
value (Union[Text, Checklist, Radio])
78+
start_frame (Optional[int]): Start frame for temporal classifications (audio/video). Must be within root annotation's frame range. Defaults to root start_frame if not specified.
79+
end_frame (Optional[int]): End frame for temporal classifications (audio/video). Must be within root annotation's frame range. Defaults to root end_frame if not specified.
7280
extra (Dict[str, Any])
7381
"""
7482

7583
value: Union[Text, Checklist, Radio]
7684
message_id: Optional[str] = None
85+
start_frame: Optional[int] = None
86+
end_frame: Optional[int] = None

0 commit comments

Comments
 (0)