supervisely 6.73.425__py3-none-any.whl → 6.73.427__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/api/annotation_api.py +1 -1
- supervisely/api/pointcloud/pointcloud_episode_annotation_api.py +3 -0
- supervisely/project/pointcloud_episode_project.py +12 -8
- supervisely/project/pointcloud_project.py +14 -18
- supervisely/video/sampling.py +4 -1
- {supervisely-6.73.425.dist-info → supervisely-6.73.427.dist-info}/METADATA +1 -1
- {supervisely-6.73.425.dist-info → supervisely-6.73.427.dist-info}/RECORD +11 -11
- {supervisely-6.73.425.dist-info → supervisely-6.73.427.dist-info}/LICENSE +0 -0
- {supervisely-6.73.425.dist-info → supervisely-6.73.427.dist-info}/WHEEL +0 -0
- {supervisely-6.73.425.dist-info → supervisely-6.73.427.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.425.dist-info → supervisely-6.73.427.dist-info}/top_level.txt +0 -0
|
@@ -865,7 +865,7 @@ class AnnotationApi(ModuleApi):
|
|
|
865
865
|
return
|
|
866
866
|
if len(img_ids) != len(anns):
|
|
867
867
|
raise RuntimeError(
|
|
868
|
-
'
|
|
868
|
+
f'Lists "img_ids" and "anns" have different lengths: {len(img_ids)} != {len(anns)}.'
|
|
869
869
|
)
|
|
870
870
|
|
|
871
871
|
# use context to avoid redundant API calls
|
|
@@ -107,6 +107,9 @@ class PointcloudEpisodeAnnotationAPI(EntityAnnotationAPI):
|
|
|
107
107
|
"""
|
|
108
108
|
|
|
109
109
|
response = self._api.post(self._method_download, {ApiField.DATASET_ID: dataset_id})
|
|
110
|
+
result = response.json()
|
|
111
|
+
if len(result) == 0:
|
|
112
|
+
return PointcloudEpisodeAnnotation().to_json()
|
|
110
113
|
return response.json()[0]
|
|
111
114
|
|
|
112
115
|
def download_bulk(self, dataset_id, entity_ids):
|
|
@@ -740,15 +740,19 @@ def download_pointcloud_episode_project(
|
|
|
740
740
|
if progress_cb is not None:
|
|
741
741
|
log_progress = False
|
|
742
742
|
|
|
743
|
-
|
|
743
|
+
filter_fn = lambda x: True
|
|
744
744
|
if dataset_ids is not None:
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
745
|
+
filter_fn = lambda ds: ds.id in dataset_ids
|
|
746
|
+
|
|
747
|
+
for parents, dataset in api.dataset.tree(project_id):
|
|
748
|
+
if not filter_fn(dataset):
|
|
749
|
+
continue
|
|
750
|
+
dataset_path = None
|
|
751
|
+
if parents:
|
|
752
|
+
dataset_path = "/datasets/".join(parents + [dataset.name])
|
|
753
|
+
dataset_fs: PointcloudEpisodeDataset = project_fs.create_dataset(
|
|
754
|
+
dataset.name, ds_path=dataset_path
|
|
755
|
+
)
|
|
752
756
|
pointclouds = api.pointcloud_episode.get_list(dataset.id)
|
|
753
757
|
|
|
754
758
|
# Download annotation to project_path/dataset_path/annotation.json
|
|
@@ -994,24 +994,20 @@ def download_pointcloud_project(
|
|
|
994
994
|
if progress_cb is not None:
|
|
995
995
|
log_progress = False
|
|
996
996
|
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
dataset_fs: PointcloudDataset = project_fs.create_dataset(
|
|
1012
|
-
ds_name=dataset.name, ds_path=fs_path
|
|
1013
|
-
)
|
|
1014
|
-
pointclouds.extend(api.pointcloud.get_list(dataset.id))
|
|
997
|
+
filter_fn = lambda ds: True
|
|
998
|
+
if dataset_ids is not None:
|
|
999
|
+
filter_fn = lambda ds: ds.id in dataset_ids
|
|
1000
|
+
|
|
1001
|
+
for parents, dataset in api.dataset.tree(project_id):
|
|
1002
|
+
if not filter_fn(dataset):
|
|
1003
|
+
continue
|
|
1004
|
+
dataset_path = None
|
|
1005
|
+
if parents:
|
|
1006
|
+
dataset_path = "/datasets/".join(parents + [dataset.name])
|
|
1007
|
+
dataset_fs: PointcloudDataset = project_fs.create_dataset(
|
|
1008
|
+
ds_name=dataset.name, ds_path=dataset_path
|
|
1009
|
+
)
|
|
1010
|
+
pointclouds = api.pointcloud.get_list(dataset.id)
|
|
1015
1011
|
|
|
1016
1012
|
ds_progress = progress_cb
|
|
1017
1013
|
if log_progress:
|
supervisely/video/sampling.py
CHANGED
|
@@ -94,13 +94,16 @@ def _frame_to_annotation(frame: Frame, video_annotation: VideoAnnotation) -> Ann
|
|
|
94
94
|
|
|
95
95
|
def _upload_annotations(api: Api, image_ids, frame_indices, video_annotation: VideoAnnotation):
|
|
96
96
|
anns = []
|
|
97
|
-
for
|
|
97
|
+
for frame_index in frame_indices:
|
|
98
98
|
frame = video_annotation.frames.get(frame_index, None)
|
|
99
99
|
if frame is not None:
|
|
100
100
|
anns.append(_frame_to_annotation(frame, video_annotation))
|
|
101
|
+
else:
|
|
102
|
+
anns.append(Annotation(video_annotation.img_size))
|
|
101
103
|
api.annotation.upload_anns(image_ids, anns=anns)
|
|
102
104
|
|
|
103
105
|
|
|
106
|
+
|
|
104
107
|
def _upload_frames(
|
|
105
108
|
api: Api,
|
|
106
109
|
frames: List[np.ndarray],
|
|
@@ -22,7 +22,7 @@ supervisely/annotation/tag_meta_mapper.py,sha256=RWeTrxJ64syodyhXIRSH007bX6Hr3B4
|
|
|
22
22
|
supervisely/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
supervisely/api/advanced_api.py,sha256=Nd5cCnHFWc3PSUrCtENxTGtDjS37_lCHXsgXvUI3Ti8,2054
|
|
24
24
|
supervisely/api/agent_api.py,sha256=8EQBwD6v7KLS0-xKcZ12B7mtzKwG7RRgq1fk1vaN144,8893
|
|
25
|
-
supervisely/api/annotation_api.py,sha256=
|
|
25
|
+
supervisely/api/annotation_api.py,sha256=JdcCKuy_7PvtNcHsRhi4ANhn3aynLY44rtbqau2Y9A4,82891
|
|
26
26
|
supervisely/api/api.py,sha256=gRItQzO6Xj7k_pJIpVUS2dV1vkTTHV25_1Uia6xxZSc,67930
|
|
27
27
|
supervisely/api/app_api.py,sha256=Q6XxLxp3D_Vc3PIVyBmP7wJtTLbgYCPNOLND5UvJhMw,79010
|
|
28
28
|
supervisely/api/constants.py,sha256=WfqIcEpRnU4Mcfb6q0njeRs2VVSoTAJaIyrqBkBjP8I,253
|
|
@@ -62,7 +62,7 @@ supervisely/api/nn/neural_network_api.py,sha256=U1drXTtJsojBA2hJ1fOvbpNES8r3eyDd
|
|
|
62
62
|
supervisely/api/pointcloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
63
|
supervisely/api/pointcloud/pointcloud_annotation_api.py,sha256=xIXqCu0rKYsGt5ezh2EFT2utwsVrr2Xo-MOWUCnbvXc,11259
|
|
64
64
|
supervisely/api/pointcloud/pointcloud_api.py,sha256=mPnVXWnxPxrb2P5giFLuabU969vV0xpeP6biETBNvUI,53875
|
|
65
|
-
supervisely/api/pointcloud/pointcloud_episode_annotation_api.py,sha256=
|
|
65
|
+
supervisely/api/pointcloud/pointcloud_episode_annotation_api.py,sha256=DNmIpjzD8rkdBqfZS7dwk54OPISmrHl9Kju1l57M9SY,7133
|
|
66
66
|
supervisely/api/pointcloud/pointcloud_episode_api.py,sha256=xg1zRKONV9ly0-B72V1dR6OMPFIw35bujazuEdrPGTQ,7922
|
|
67
67
|
supervisely/api/pointcloud/pointcloud_episode_object_api.py,sha256=k2_wV0EVPo9vxSTVe1qOvqVOMSVE6zGDSkfR6TRNsKs,691
|
|
68
68
|
supervisely/api/pointcloud/pointcloud_episode_tag_api.py,sha256=qqqNScrcLPV2FGBqjWlXHfOTfJLYQMqzscNIq9C0YUw,911
|
|
@@ -1045,8 +1045,8 @@ supervisely/pointcloud_episodes/pointcloud_episodes.py,sha256=trjCTqJEfHMnsk_HmY
|
|
|
1045
1045
|
supervisely/project/__init__.py,sha256=hlzdj9Pgy53Q3qdP8LMtGTChvZHQuuShdtui2eRUQeE,2601
|
|
1046
1046
|
supervisely/project/data_version.py,sha256=P5Lui6i64pYeJWmAdGJDv8GRXxjfpSSZ8zT_MxIrynE,19553
|
|
1047
1047
|
supervisely/project/download.py,sha256=yCFpRum_q8fbY_z2mcRAhYAcYFcDc215ldioO3Gzg3Q,28680
|
|
1048
|
-
supervisely/project/pointcloud_episode_project.py,sha256=
|
|
1049
|
-
supervisely/project/pointcloud_project.py,sha256=
|
|
1048
|
+
supervisely/project/pointcloud_episode_project.py,sha256=f7kbsXRI1XedKQd3inmq4j3PNsab3q4xyb_RHqFthmI,48563
|
|
1049
|
+
supervisely/project/pointcloud_project.py,sha256=YBtv7Lh1ivXCgpM59MiXJGgqxfdehDeD87Fe1tOHVR0,57011
|
|
1050
1050
|
supervisely/project/project.py,sha256=Xl_L_dRJp0KZJMioabXWGO2Zt1X6dl2W9v4-Zt66zYs,246561
|
|
1051
1051
|
supervisely/project/project_meta.py,sha256=UTQPstRmRJvbtCcQ1noCtzcw3Sd4llwRMHes-Sz-JQg,51429
|
|
1052
1052
|
supervisely/project/project_settings.py,sha256=NLThzU_DCynOK6hkHhVdFyezwprn9UqlnrLDe_3qhkY,9347
|
|
@@ -1082,7 +1082,7 @@ supervisely/user/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
1082
1082
|
supervisely/user/user.py,sha256=4GSVIupPAxWjIxZmUtH3Dtms_vGV82-49kM_aaR2gBI,319
|
|
1083
1083
|
supervisely/video/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1084
1084
|
supervisely/video/import_utils.py,sha256=b1Nl0gscNsV0iB9nWPeqt8GrkhOeuTZsN1p-d3gDUmE,544
|
|
1085
|
-
supervisely/video/sampling.py,sha256=
|
|
1085
|
+
supervisely/video/sampling.py,sha256=6w-FjpWbEq_u7zonnPEo0MhXN7RofhdgSZd27h45YMQ,20249
|
|
1086
1086
|
supervisely/video/video.py,sha256=QGV1R3qNOJ0zgsfItqv-e7mbEnWqFpE3rcJwt7izC28,20206
|
|
1087
1087
|
supervisely/video_annotation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1088
1088
|
supervisely/video_annotation/constants.py,sha256=_gW9iMhVk1w_dUaFiaiyXn66mt13S6bkxC64xpjP-CU,529
|
|
@@ -1121,9 +1121,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
1121
1121
|
supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
|
|
1122
1122
|
supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
|
|
1123
1123
|
supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
|
|
1124
|
-
supervisely-6.73.
|
|
1125
|
-
supervisely-6.73.
|
|
1126
|
-
supervisely-6.73.
|
|
1127
|
-
supervisely-6.73.
|
|
1128
|
-
supervisely-6.73.
|
|
1129
|
-
supervisely-6.73.
|
|
1124
|
+
supervisely-6.73.427.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
1125
|
+
supervisely-6.73.427.dist-info/METADATA,sha256=8GWIKJx9OORuou4fT66QXiasJmRPeH3QMNjeV-e8jJ0,35433
|
|
1126
|
+
supervisely-6.73.427.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
1127
|
+
supervisely-6.73.427.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
1128
|
+
supervisely-6.73.427.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
1129
|
+
supervisely-6.73.427.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|