Skip to content

Commit 858c188

Browse files
committed
docs updated
1 parent 9e383e2 commit 858c188

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

superannotate/input_converters/conversion.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ def import_annotation(
238238
Vector object_detection
239239
Vector instance_segmentation
240240
Vector vector_annotation
241+
Pixel instance_segmentation
241242
============== ======================
242243
243244
============== ======================

superannotate/input_converters/converters/sagemaker_converters/sagemaker_to_sa_vector.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,21 @@ def sagemaker_object_detection_to_sa_vector(data_path, main_key, output_dir):
2828
manifest = dataset_manifest[int(img['datasetObjectId'])]
2929
file_name = '%s___objects.json' % Path(manifest['source-ref']).name
3030

31-
sa_metadata = {'name': Path(manifest['source-ref']).name}
32-
3331
classes = img['consolidatedAnnotation']['content'][
3432
main_key + '-metadata']['class-map']
3533
for key, value in classes.items():
3634
if key not in classes_ids.keys():
3735
classes_ids[key] = value
3836

37+
image_size = img['consolidatedAnnotation']['content'][main_key][
38+
'image_size']
39+
40+
sa_metadata = {
41+
'name': Path(manifest['source-ref']).name,
42+
'width': image_size['width'],
43+
'height': image_size['height']
44+
}
45+
3946
annotations = img['consolidatedAnnotation']['content'][main_key][
4047
'annotations']
4148
sa_instances = []

superannotate/input_converters/export_from_sa_conversions.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ def _move_files(data_set, src):
5353
for tup in data_set:
5454
for i in tup:
5555
shutil.copy(i, train_path / Path(i).name)
56+
else:
57+
logger.warning("Images doesn't exist")
5658

5759

5860
def _create_classes_mapper(imgs, classes_json):
@@ -70,9 +72,6 @@ def export_from_sa(args):
7072
:param args: All arguments that will be used during convertion.
7173
:type args: Namespace
7274
"""
73-
# if args.platform == "Desktop":
74-
# args.input_dir = _split_json(args.input_dir)
75-
7675
data_set = None
7776

7877
(args.output_dir / "image_set").mkdir(parents=True, exist_ok=True)

0 commit comments

Comments
 (0)