supervisely 6.73.296__py3-none-any.whl → 6.73.298__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.
Potentially problematic release.
This version of supervisely might be problematic. Click here for more details.
- supervisely/convert/base_converter.py +7 -10
- supervisely/video_annotation/frame_collection.py +13 -4
- supervisely/video_annotation/video_annotation.py +8 -2
- {supervisely-6.73.296.dist-info → supervisely-6.73.298.dist-info}/METADATA +1 -1
- {supervisely-6.73.296.dist-info → supervisely-6.73.298.dist-info}/RECORD +9 -9
- {supervisely-6.73.296.dist-info → supervisely-6.73.298.dist-info}/LICENSE +0 -0
- {supervisely-6.73.296.dist-info → supervisely-6.73.298.dist-info}/WHEEL +0 -0
- {supervisely-6.73.296.dist-info → supervisely-6.73.298.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.296.dist-info → supervisely-6.73.298.dist-info}/top_level.txt +0 -0
|
@@ -426,20 +426,17 @@ class BaseConverter:
|
|
|
426
426
|
"""
|
|
427
427
|
existing = meta1.project_settings.labeling_interface
|
|
428
428
|
new = meta2.project_settings.labeling_interface
|
|
429
|
-
if existing == new:
|
|
429
|
+
if existing == new or new == LabelingInterface.DEFAULT:
|
|
430
430
|
return meta1
|
|
431
431
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
if existing == LabelingInterface.DEFAULT:
|
|
436
|
-
group_tag_name = meta2.project_settings.multiview_tag_name
|
|
437
|
-
if group_tag_name and renamed_tags:
|
|
438
|
-
group_tag_name = renamed_tags.get(group_tag_name, group_tag_name)
|
|
432
|
+
group_tag_name = meta2.project_settings.multiview_tag_name
|
|
433
|
+
if group_tag_name:
|
|
434
|
+
group_tag_name = renamed_tags.get(group_tag_name, group_tag_name)
|
|
439
435
|
new_settings = meta2.project_settings.clone(multiview_tag_name=group_tag_name)
|
|
436
|
+
else:
|
|
437
|
+
new_settings = meta2.project_settings
|
|
440
438
|
|
|
441
|
-
|
|
442
|
-
return meta1
|
|
439
|
+
return meta1.clone(project_settings=new_settings)
|
|
443
440
|
|
|
444
441
|
def _download_remote_ann_files(self) -> None:
|
|
445
442
|
"""
|
|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
|
|
6
6
|
from typing import Any, Dict, List, Optional, Tuple
|
|
7
7
|
|
|
8
|
+
from supervisely.sly_logger import logger
|
|
8
9
|
from supervisely.api.module_api import ApiField
|
|
9
10
|
from supervisely.collection.key_indexed_collection import KeyIndexedCollection
|
|
10
11
|
from supervisely.video_annotation.frame import Frame
|
|
@@ -244,6 +245,7 @@ class FrameCollection(KeyIndexedCollection):
|
|
|
244
245
|
objects: VideoObjectCollection,
|
|
245
246
|
frames_count: Optional[int] = None,
|
|
246
247
|
key_id_map: Optional[KeyIdMap] = None,
|
|
248
|
+
skip_corrupted: Optional[bool] = False,
|
|
247
249
|
) -> FrameCollection:
|
|
248
250
|
"""
|
|
249
251
|
Convert a list of json dicts to FrameCollection. Read more about `Supervisely format <https://docs.supervise.ly/data-organization/00_ann_format_navi>`_.
|
|
@@ -279,10 +281,17 @@ class FrameCollection(KeyIndexedCollection):
|
|
|
279
281
|
objects = []
|
|
280
282
|
fr_collection = sly.FrameCollection.from_json(fr_collection_json, objects)
|
|
281
283
|
"""
|
|
282
|
-
frames = [
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
284
|
+
frames = []
|
|
285
|
+
for frame_json in data:
|
|
286
|
+
try:
|
|
287
|
+
frame = cls.item_type.from_json(frame_json, objects, frames_count, key_id_map)
|
|
288
|
+
frames.append(frame)
|
|
289
|
+
except Exception as e:
|
|
290
|
+
if skip_corrupted:
|
|
291
|
+
logger.warning(f"Skipping corrupted frame: {e}", exc_info=True)
|
|
292
|
+
continue
|
|
293
|
+
else:
|
|
294
|
+
raise e
|
|
286
295
|
return cls(frames)
|
|
287
296
|
|
|
288
297
|
def __str__(self):
|
|
@@ -587,7 +587,11 @@ class VideoAnnotation:
|
|
|
587
587
|
|
|
588
588
|
@classmethod
|
|
589
589
|
def from_json(
|
|
590
|
-
cls,
|
|
590
|
+
cls,
|
|
591
|
+
data: Dict,
|
|
592
|
+
project_meta: ProjectMeta,
|
|
593
|
+
key_id_map: KeyIdMap = None,
|
|
594
|
+
skip_corrupted: Optional[bool] = False,
|
|
591
595
|
) -> VideoAnnotation:
|
|
592
596
|
"""
|
|
593
597
|
Convert a json dict to VideoAnnotation. Read more about `Supervisely format <https://docs.supervise.ly/data-organization/00_ann_format_navi>`_.
|
|
@@ -598,6 +602,8 @@ class VideoAnnotation:
|
|
|
598
602
|
:type project_meta: ProjectMeta
|
|
599
603
|
:param key_id_map: KeyIdMap object.
|
|
600
604
|
:type key_id_map: Union[KeyIdMap, None]
|
|
605
|
+
:param skip_corrupted: Skip corrupted items (currently only frames) during conversion.
|
|
606
|
+
:type skip_corrupted: bool, optional
|
|
601
607
|
:return: VideoAnnotation object
|
|
602
608
|
:rtype: :class:`VideoAnnotation`
|
|
603
609
|
|
|
@@ -638,7 +644,7 @@ class VideoAnnotation:
|
|
|
638
644
|
|
|
639
645
|
tags = VideoTagCollection.from_json(data[TAGS], project_meta.tag_metas, key_id_map)
|
|
640
646
|
objects = VideoObjectCollection.from_json(data[OBJECTS], project_meta, key_id_map)
|
|
641
|
-
frames = FrameCollection.from_json(data[FRAMES], objects, frames_count, key_id_map)
|
|
647
|
+
frames = FrameCollection.from_json(data[FRAMES], objects, frames_count, key_id_map, skip_corrupted)
|
|
642
648
|
|
|
643
649
|
return cls(
|
|
644
650
|
img_size=img_size,
|
|
@@ -561,7 +561,7 @@ supervisely/collection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
561
561
|
supervisely/collection/key_indexed_collection.py,sha256=x2UVlkprspWhhae9oLUzjTWBoIouiWY9UQSS_MozfH0,37643
|
|
562
562
|
supervisely/collection/str_enum.py,sha256=Zp29yFGvnxC6oJRYNNlXhO2lTSdsriU1wiGHj6ahEJE,1250
|
|
563
563
|
supervisely/convert/__init__.py,sha256=pF1bOrg8SzkdFn90AWGRmVa9OQrHABY0gTlgurJ86Tw,962
|
|
564
|
-
supervisely/convert/base_converter.py,sha256=
|
|
564
|
+
supervisely/convert/base_converter.py,sha256=eCFnvyoMI96rWjB5amFPZX2fI_TSdr__ruqxwQIbfFo,18537
|
|
565
565
|
supervisely/convert/converter.py,sha256=tWxTDfFv7hwzQhUQrBxzfr6WP8FUGFX_ewg5T2HbUYo,8959
|
|
566
566
|
supervisely/convert/image/__init__.py,sha256=JEuyaBiiyiYmEUYqdn8Mog5FVXpz0H1zFubKkOOm73I,1395
|
|
567
567
|
supervisely/convert/image/image_converter.py,sha256=8vak8ZoKTN1ye2ZmCTvCZ605-Rw1AFLIEo7bJMfnR68,10426
|
|
@@ -1036,9 +1036,9 @@ supervisely/video/video.py,sha256=4dHlMYvXtiMQYqrCnF-u61C6bmfnXfOyCTdISMlsxWM,16
|
|
|
1036
1036
|
supervisely/video_annotation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1037
1037
|
supervisely/video_annotation/constants.py,sha256=_gW9iMhVk1w_dUaFiaiyXn66mt13S6bkxC64xpjP-CU,529
|
|
1038
1038
|
supervisely/video_annotation/frame.py,sha256=H1G7Wl4LEEmQE-E0B2QWD8kyzZ4-w-GJSUdq7v_Qs2g,10568
|
|
1039
|
-
supervisely/video_annotation/frame_collection.py,sha256=
|
|
1039
|
+
supervisely/video_annotation/frame_collection.py,sha256=RZrnw7lURgvzRrskwvnEIQQfJkp9htMhircU3hLiHVY,15031
|
|
1040
1040
|
supervisely/video_annotation/key_id_map.py,sha256=KayYOhTtAe3ITq1-NQ82T6YIiBjmu4aJm8t4UxdvI8U,37712
|
|
1041
|
-
supervisely/video_annotation/video_annotation.py,sha256=
|
|
1041
|
+
supervisely/video_annotation/video_annotation.py,sha256=syqfhIerzhMWNh8scM_kWskBl8R2E-pfOSW_jN2Lb1Y,28867
|
|
1042
1042
|
supervisely/video_annotation/video_figure.py,sha256=j1ZoDnMLO_bFRUI19GDK3A2CzTWGr5pGYbd3NjC7ztE,23766
|
|
1043
1043
|
supervisely/video_annotation/video_object.py,sha256=i-oiliNpDr2X4Wcy9DJ7sBbuVUT3QYiSrtklCCJGVsY,16736
|
|
1044
1044
|
supervisely/video_annotation/video_object_collection.py,sha256=Epu9MAC9uZiThfBn4NxKbQ7JRbW4eFZHglTzaJJ9WUQ,9047
|
|
@@ -1070,9 +1070,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
1070
1070
|
supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
|
|
1071
1071
|
supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
|
|
1072
1072
|
supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
|
|
1073
|
-
supervisely-6.73.
|
|
1074
|
-
supervisely-6.73.
|
|
1075
|
-
supervisely-6.73.
|
|
1076
|
-
supervisely-6.73.
|
|
1077
|
-
supervisely-6.73.
|
|
1078
|
-
supervisely-6.73.
|
|
1073
|
+
supervisely-6.73.298.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
1074
|
+
supervisely-6.73.298.dist-info/METADATA,sha256=KRpOS5RHRzEpuetnO0yl7tAhP8BG9Ndpqz3zUNRAZDw,33573
|
|
1075
|
+
supervisely-6.73.298.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
1076
|
+
supervisely-6.73.298.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
1077
|
+
supervisely-6.73.298.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
1078
|
+
supervisely-6.73.298.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|