|
3 | 3 |
|
4 | 4 | from pydantic import BaseModel, validator
|
5 | 5 |
|
6 |
| -from labelbox.orm.model import Entity |
7 | 6 | from labelbox.schema import ontology
|
8 | 7 | from .annotation import (ClassificationAnnotation, ObjectAnnotation,
|
9 | 8 | VideoClassificationAnnotation, VideoObjectAnnotation)
|
|
13 | 12 | from .metrics import ScalarMetric, ConfusionMatrixMetric
|
14 | 13 | from .types import Cuid
|
15 | 14 | from ..ontology import get_feature_schema_lookup
|
| 15 | +from ... import Dataset |
16 | 16 |
|
17 | 17 |
|
18 | 18 | class Label(BaseModel):
|
@@ -55,13 +55,13 @@ def _get_annotations_by_type(self, annotation_type):
|
55 | 55 | ]
|
56 | 56 |
|
57 | 57 | def frame_annotations(
|
58 |
| - self |
| 58 | + self |
59 | 59 | ) -> Dict[str, Union[VideoObjectAnnotation, VideoClassificationAnnotation]]:
|
60 | 60 | frame_dict = defaultdict(list)
|
61 | 61 | for annotation in self.annotations:
|
62 | 62 | if isinstance(
|
63 | 63 | annotation,
|
64 |
| - (VideoObjectAnnotation, VideoClassificationAnnotation)): |
| 64 | + (VideoObjectAnnotation, VideoClassificationAnnotation)): |
65 | 65 | frame_dict[annotation.frame].append(annotation)
|
66 | 66 | return frame_dict
|
67 | 67 |
|
@@ -103,7 +103,7 @@ def add_url_to_masks(self, signer) -> "Label":
|
103 | 103 | mask.create_url(signer)
|
104 | 104 | return self
|
105 | 105 |
|
106 |
| - def create_data_row(self, dataset: "Entity.Dataset", |
| 106 | + def create_data_row(self, dataset: "Dataset", |
107 | 107 | signer: Callable[[bytes], str]) -> "Label":
|
108 | 108 | """
|
109 | 109 | Creates a data row and adds to the given dataset.
|
|
0 commit comments