@@ -60,12 +60,12 @@ def from_common(cls,
6060 'x' : point .x ,
6161 'y' : point .y
6262 },
63- dataRow = DataRow (id = data .uid ),
64- name = name ,
65- schema_id = feature_schema_id ,
66- uuid = extra .get ('uuid' ),
67- classifications = classifications ,
68- confidence = confidence )
63+ dataRow = DataRow (id = data .uid ),
64+ name = name ,
65+ schema_id = feature_schema_id ,
66+ uuid = extra .get ('uuid' ),
67+ classifications = classifications ,
68+ confidence = confidence )
6969
7070
7171class NDFramePoint (VideoSupported ):
@@ -93,22 +93,24 @@ def to_common(self) -> Line:
9393 return Line (points = [Point (x = pt .x , y = pt .y ) for pt in self .line ])
9494
9595 @classmethod
96- def from_common (cls , line : Line ,
97- classifications : List [ClassificationAnnotation ], name : str ,
98- feature_schema_id : Cuid , extra : Dict [str , Any ],
99- data : Union [ImageData ,
100- TextData ],
96+ def from_common (cls ,
97+ line : Line ,
98+ classifications : List [ClassificationAnnotation ],
99+ name : str ,
100+ feature_schema_id : Cuid ,
101+ extra : Dict [str , Any ],
102+ data : Union [ImageData , TextData ],
101103 confidence : Optional [float ] = None ) -> "NDLine" :
102104 return cls (line = [{
103105 'x' : pt .x ,
104106 'y' : pt .y
105107 } for pt in line .points ],
106- dataRow = DataRow (id = data .uid ),
107- name = name ,
108- schema_id = feature_schema_id ,
109- uuid = extra .get ('uuid' ),
110- classifications = classifications ,
111- confidence = confidence )
108+ dataRow = DataRow (id = data .uid ),
109+ name = name ,
110+ schema_id = feature_schema_id ,
111+ uuid = extra .get ('uuid' ),
112+ classifications = classifications ,
113+ confidence = confidence )
112114
113115
114116class NDFrameLine (VideoSupported ):
@@ -152,12 +154,12 @@ def from_common(cls,
152154 'x' : pt .x ,
153155 'y' : pt .y
154156 } for pt in polygon .points ],
155- dataRow = DataRow (id = data .uid ),
156- name = name ,
157- schema_id = feature_schema_id ,
158- uuid = extra .get ('uuid' ),
159- classifications = classifications ,
160- confidence = confidence )
157+ dataRow = DataRow (id = data .uid ),
158+ name = name ,
159+ schema_id = feature_schema_id ,
160+ uuid = extra .get ('uuid' ),
161+ classifications = classifications ,
162+ confidence = confidence )
161163
162164
163165class NDRectangle (NDBaseObject , ConfidenceMixin ):
@@ -321,8 +323,7 @@ def from_common(cls,
321323 confidence : Optional [float ] = None ) -> "NDMask" :
322324
323325 if mask .mask .url is not None :
324- lbv1_mask = _URIMask (
325- instanceURI = mask .mask .url , colorRGB = mask .color )
326+ lbv1_mask = _URIMask (instanceURI = mask .mask .url , colorRGB = mask .color )
326327 else :
327328 binary = np .all (mask .mask .value == mask .color , axis = - 1 )
328329 im_bytes = BytesIO ()
@@ -360,12 +361,12 @@ def from_common(cls, text_entity: TextEntity,
360361 start = text_entity .start ,
361362 end = text_entity .end ,
362363 ),
363- dataRow = DataRow (id = data .uid ),
364- name = name ,
365- schema_id = feature_schema_id ,
366- uuid = extra .get ('uuid' ),
367- classifications = classifications ,
368- confidence = confidence )
364+ dataRow = DataRow (id = data .uid ),
365+ name = name ,
366+ schema_id = feature_schema_id ,
367+ uuid = extra .get ('uuid' ),
368+ classifications = classifications ,
369+ confidence = confidence )
369370
370371
371372class NDObject :
0 commit comments