Skip to content

Commit f441ff5

Browse files
committed
fixing comment instancein video
1 parent 52a7a9b commit f441ff5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/superannotate/lib/app/analytics/aggregators.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ class DataAggregator:
136136
"tag": lambda annotation: None,
137137
"mask": lambda annotation: {"parts": annotation["parts"]},
138138
"template": lambda annotation : None,
139-
"rbbox": lambda annotation: annotation["points"]
139+
"rbbox": lambda annotation: annotation["points"],
140+
"comment_inst": lambda annotation: annotation["points"]
140141
}
141142

142143
def __init__(
@@ -224,7 +225,6 @@ def __add_attributes_to_raws(self, raws, attributes, element_raw):
224225
raws.append(attribute_raw)
225226
if not attributes:
226227
raws.append(element_raw)
227-
228228
return raws
229229

230230
def aggregate_video_annotations_as_df(self, annotation_paths: List[str]):
@@ -259,6 +259,8 @@ def aggregate_video_annotations_as_df(self, annotation_paths: List[str]):
259259
instances = annotation_data.get("instances", [])
260260
for idx, instance in enumerate(instances):
261261
instance_type = instance["meta"].get("type", "event")
262+
if instance_type == "comment":
263+
instance_type = "comment_inst"
262264
instance_raw = copy.copy(raw_data)
263265
instance_raw.instanceId = int(idx)
264266
instance_raw.instanceStart = instance["meta"].get("start")

0 commit comments

Comments
 (0)