supervisely 6.73.388__py3-none-any.whl → 6.73.390__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- supervisely/convert/image/sly/fast_sly_image_converter.py +5 -2
- supervisely/convert/image/sly/sly_image_converter.py +4 -2
- {supervisely-6.73.388.dist-info → supervisely-6.73.390.dist-info}/METADATA +1 -1
- {supervisely-6.73.388.dist-info → supervisely-6.73.390.dist-info}/RECORD +8 -8
- {supervisely-6.73.388.dist-info → supervisely-6.73.390.dist-info}/LICENSE +0 -0
- {supervisely-6.73.388.dist-info → supervisely-6.73.390.dist-info}/WHEEL +0 -0
- {supervisely-6.73.388.dist-info → supervisely-6.73.390.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.388.dist-info → supervisely-6.73.390.dist-info}/top_level.txt +0 -0
|
@@ -77,14 +77,17 @@ class FastSlyImageConverter(SLYImageConverter, ImageConverter):
|
|
|
77
77
|
ann_json = ann_json["annotation"]
|
|
78
78
|
if renamed_classes or renamed_tags:
|
|
79
79
|
ann_json = helper.rename_in_json(ann_json, renamed_classes, renamed_tags)
|
|
80
|
-
img_size =
|
|
80
|
+
img_size = ann_json["size"] # dict { "width": 1280, "height": 720 }
|
|
81
|
+
if "width" not in img_size or "height" not in img_size:
|
|
82
|
+
raise ValueError("Invalid image size in annotation JSON")
|
|
83
|
+
img_size = (img_size["height"], img_size["width"])
|
|
81
84
|
labels = validate_image_bounds(
|
|
82
85
|
[Label.from_json(obj, meta) for obj in ann_json["objects"]],
|
|
83
86
|
Rectangle.from_size(img_size),
|
|
84
87
|
)
|
|
85
88
|
return Annotation.from_json(ann_json, meta).clone(labels=labels)
|
|
86
89
|
except Exception as e:
|
|
87
|
-
logger.
|
|
90
|
+
logger.warning(f"Failed to convert annotation: {repr(e)}")
|
|
88
91
|
return None
|
|
89
92
|
|
|
90
93
|
def upload_dataset(
|
|
@@ -130,7 +130,6 @@ class SLYImageConverter(ImageConverter):
|
|
|
130
130
|
is_valid = self.validate_ann_file(ann_path, meta)
|
|
131
131
|
if is_valid:
|
|
132
132
|
item.ann_data = ann_path
|
|
133
|
-
|
|
134
133
|
meta_path = img_meta_dict.get(json_name, img_meta_dict.get(json_name_noext))
|
|
135
134
|
if meta_path:
|
|
136
135
|
item.set_meta_data(meta_path)
|
|
@@ -162,7 +161,10 @@ class SLYImageConverter(ImageConverter):
|
|
|
162
161
|
ann_json = ann_json["annotation"]
|
|
163
162
|
if renamed_classes or renamed_tags:
|
|
164
163
|
ann_json = sly_image_helper.rename_in_json(ann_json, renamed_classes, renamed_tags)
|
|
165
|
-
img_size =
|
|
164
|
+
img_size = ann_json["size"] # dict { "width": 1280, "height": 720 }
|
|
165
|
+
if "width" not in img_size or "height" not in img_size:
|
|
166
|
+
raise ValueError("Invalid image size in annotation JSON")
|
|
167
|
+
img_size = (img_size["height"], img_size["width"])
|
|
166
168
|
labels = validate_image_bounds(
|
|
167
169
|
[Label.from_json(obj, meta) for obj in ann_json["objects"]],
|
|
168
170
|
Rectangle.from_size(img_size),
|
|
@@ -616,8 +616,8 @@ supervisely/convert/image/pdf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
|
|
|
616
616
|
supervisely/convert/image/pdf/pdf_converter.py,sha256=LKvVng9jPp0cSIjYEjKLOb48wtdOdB7LXS2gjmOdZhE,2442
|
|
617
617
|
supervisely/convert/image/pdf/pdf_helper.py,sha256=IDwLEvsVy8lu-KC1lXvSRkZZ9BCC6ylebnNEtLQU5L4,1288
|
|
618
618
|
supervisely/convert/image/sly/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
619
|
-
supervisely/convert/image/sly/fast_sly_image_converter.py,sha256=
|
|
620
|
-
supervisely/convert/image/sly/sly_image_converter.py,sha256=
|
|
619
|
+
supervisely/convert/image/sly/fast_sly_image_converter.py,sha256=r_Nhowicm-oah-XfGEeAOrGNbIzMh63m6ZRYaLKHUu0,5903
|
|
620
|
+
supervisely/convert/image/sly/sly_image_converter.py,sha256=dT7fVivM-u2hhKehGJWPeLsVTi4nW-WX1X6Lktl2mks,14812
|
|
621
621
|
supervisely/convert/image/sly/sly_image_helper.py,sha256=5Ri8fKb5dzh5b3v8AJ5u8xVFOQfAtoWqZ7HktPsCjTI,7373
|
|
622
622
|
supervisely/convert/image/yolo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
623
623
|
supervisely/convert/image/yolo/yolo_converter.py,sha256=Wn5dR05y4SEPONcaxWr9ofnbvbf-SbRZN0fkksk5Dps,11391
|
|
@@ -1103,9 +1103,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
1103
1103
|
supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
|
|
1104
1104
|
supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
|
|
1105
1105
|
supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
|
|
1106
|
-
supervisely-6.73.
|
|
1107
|
-
supervisely-6.73.
|
|
1108
|
-
supervisely-6.73.
|
|
1109
|
-
supervisely-6.73.
|
|
1110
|
-
supervisely-6.73.
|
|
1111
|
-
supervisely-6.73.
|
|
1106
|
+
supervisely-6.73.390.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
1107
|
+
supervisely-6.73.390.dist-info/METADATA,sha256=TqfUilWvWkT1w_BZMqgjL5NuKwydVNxJzivkWUNco9k,35154
|
|
1108
|
+
supervisely-6.73.390.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
1109
|
+
supervisely-6.73.390.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
1110
|
+
supervisely-6.73.390.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
1111
|
+
supervisely-6.73.390.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|