Skip to content

Commit 53d87c5

Browse files
committed
dataloop comment bugfixed
1 parent 7b6b0ff commit 53d87c5

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

superannotate/input_converters/converters/coco_converters/coco_strategies.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,6 @@ def sa_to_output_format(self):
239239
write_to_json(
240240
self.output_dir / '{}.json'.format(self.dataset_name), out_json
241241
)
242-
# json_data = json.dumps(out_json, indent=4)
243-
# with open(
244-
# self.output_dir / '{}.json'.format(self.dataset_name), 'w+'
245-
# ) as coco_json:
246-
247-
# coco_json.write(json_data)
248-
249242
self.set_num_converted(len(jsons))
250243

251244

@@ -370,11 +363,4 @@ def sa_to_output_format(self):
370363
write_to_json(
371364
self.output_dir / '{}.json'.format(self.dataset_name), out_json
372365
)
373-
# json_data = json.dumps(out_json, indent=4)
374-
375-
# with open(
376-
# self.output_dir / '{}.json'.format(self.dataset_name), 'w+'
377-
# ) as coco_json:
378-
# coco_json.write(json_data)
379-
380366
self.set_num_converted(len(out_json['images']))

superannotate/input_converters/converters/dataloop_converters/dataloop_to_sa_vector.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,18 @@ def dataloop_to_sa(input_dir, task, output_dir):
7676
)
7777
sa_instances.append(sa_obj)
7878
elif ann['type'] == comment_type:
79+
points = (
80+
ann['coordinates']['box'][0]['x'],
81+
ann['coordinates']['box'][0]['y']
82+
)
7983
comments = []
8084
for note in ann['coordinates']['note']['messages']:
8185
comments.append(
8286
{
8387
'text': note['body'],
84-
'id': note['creator']
88+
'email': note['creator']
8589
}
8690
)
87-
points = (
88-
ann['coordinates']['box'][0]['x'],
89-
ann['coordinates']['box'][0]['y']
90-
)
9191
sa_comment = _create_comment(points, comments)
9292
sa_comments.append(sa_comment)
9393
elif ann['type'] == tags_type:

superannotate/input_converters/converters/sa_json_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def _create_comment(points, comments):
7979
'type': 'comment',
8080
'x': points[0],
8181
'y': points[1],
82-
'comments': comments
82+
'correspondence': comments
8383
}
8484
return sa_comment
8585

0 commit comments

Comments
 (0)