supervisely 6.73.230__py3-none-any.whl → 6.73.231__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/api/video/video_api.py +19 -6
- supervisely/convert/video/video_converter.py +2 -1
- {supervisely-6.73.230.dist-info → supervisely-6.73.231.dist-info}/METADATA +1 -1
- {supervisely-6.73.230.dist-info → supervisely-6.73.231.dist-info}/RECORD +8 -8
- {supervisely-6.73.230.dist-info → supervisely-6.73.231.dist-info}/LICENSE +0 -0
- {supervisely-6.73.230.dist-info → supervisely-6.73.231.dist-info}/WHEEL +0 -0
- {supervisely-6.73.230.dist-info → supervisely-6.73.231.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.230.dist-info → supervisely-6.73.231.dist-info}/top_level.txt +0 -0
|
@@ -340,6 +340,7 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
340
340
|
filters: Optional[List[Dict[str, str]]] = None,
|
|
341
341
|
raw_video_meta: Optional[bool] = False,
|
|
342
342
|
fields: Optional[List[str]] = None,
|
|
343
|
+
force_metadata_for_links: Optional[bool] = False,
|
|
343
344
|
) -> List[VideoInfo]:
|
|
344
345
|
"""
|
|
345
346
|
Get list of information about all videos for a given dataset ID.
|
|
@@ -352,6 +353,8 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
352
353
|
:type raw_video_meta: bool
|
|
353
354
|
:param fields: List of fields to return.
|
|
354
355
|
:type fields: List[str], optional
|
|
356
|
+
:param force_metadata_for_links: Specify whether to force retrieving video metadata from the server.
|
|
357
|
+
:type force_metadata_for_links: Optional[bool]
|
|
355
358
|
:return: List of information about videos in given dataset.
|
|
356
359
|
:rtype: :class:`List[VideoInfo]`
|
|
357
360
|
|
|
@@ -379,6 +382,7 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
379
382
|
ApiField.DATASET_ID: dataset_id,
|
|
380
383
|
ApiField.FILTER: filters or [],
|
|
381
384
|
ApiField.RAW_VIDEO_META: raw_video_meta,
|
|
385
|
+
ApiField.FORCE_METADATA_FOR_LINKS: force_metadata_for_links,
|
|
382
386
|
}
|
|
383
387
|
if fields is not None:
|
|
384
388
|
data[ApiField.FIELDS] = fields
|
|
@@ -393,6 +397,7 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
393
397
|
limit: Optional[int] = None,
|
|
394
398
|
raw_video_meta: Optional[bool] = False,
|
|
395
399
|
batch_size: Optional[int] = None,
|
|
400
|
+
force_metadata_for_links: Optional[bool] = False,
|
|
396
401
|
) -> Iterator[List[VideoInfo]]:
|
|
397
402
|
data = {
|
|
398
403
|
ApiField.DATASET_ID: dataset_id,
|
|
@@ -401,6 +406,7 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
401
406
|
ApiField.SORT_ORDER: sort_order,
|
|
402
407
|
ApiField.RAW_VIDEO_META: raw_video_meta,
|
|
403
408
|
ApiField.PAGINATION_MODE: ApiField.TOKEN,
|
|
409
|
+
ApiField.FORCE_METADATA_FOR_LINKS: force_metadata_for_links,
|
|
404
410
|
}
|
|
405
411
|
if batch_size is not None:
|
|
406
412
|
data[ApiField.PER_PAGE] = batch_size
|
|
@@ -428,7 +434,7 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
428
434
|
:type id: int
|
|
429
435
|
:param raise_error: Return an error if the video info was not received.
|
|
430
436
|
:type raise_error: bool
|
|
431
|
-
:param force_metadata_for_links:
|
|
437
|
+
:param force_metadata_for_links: Specify whether to force retrieving video metadata from the server.
|
|
432
438
|
:type force_metadata_for_links: bool
|
|
433
439
|
:return: Information about Video. See :class:`info_sequence<info_sequence>`
|
|
434
440
|
:rtype: :class:`VideoInfo`
|
|
@@ -508,7 +514,7 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
508
514
|
:type ids: List[int]
|
|
509
515
|
:param progress_cb: Function for tracking download progress.
|
|
510
516
|
:type progress_cb: Optional[Union[tqdm, Callable]]
|
|
511
|
-
:param force_metadata_for_links:
|
|
517
|
+
:param force_metadata_for_links: Specify whether to force retrieving video metadata from the server.
|
|
512
518
|
:type force_metadata_for_links: bool
|
|
513
519
|
:return: List of information about Videos. See :class:`info_sequence<info_sequence>`.
|
|
514
520
|
:rtype: List[VideoInfo]
|
|
@@ -582,6 +588,8 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
582
588
|
:type id: int
|
|
583
589
|
:param raise_error: Return an error if the video info was not received.
|
|
584
590
|
:type raise_error: bool
|
|
591
|
+
:param force_metadata_for_links: Specify whether to force retrieving video metadata from the server.
|
|
592
|
+
:type force_metadata_for_links: bool
|
|
585
593
|
:return: Information about Video. See :class:`info_sequence<info_sequence>`
|
|
586
594
|
:rtype: dict
|
|
587
595
|
|
|
@@ -969,6 +977,7 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
969
977
|
links_names,
|
|
970
978
|
metas=links_metas,
|
|
971
979
|
skip_download=True,
|
|
980
|
+
force_metadata_for_links=False,
|
|
972
981
|
)
|
|
973
982
|
|
|
974
983
|
for info, pos in zip(res_infos_links, links_order):
|
|
@@ -1044,7 +1053,7 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
1044
1053
|
if len(set(vid_info.dataset_id for vid_info in ids_info)) > 1:
|
|
1045
1054
|
raise ValueError("Videos ids have to be from the same dataset")
|
|
1046
1055
|
|
|
1047
|
-
existing_videos = self.get_list(dst_dataset_id)
|
|
1056
|
+
existing_videos = self.get_list(dst_dataset_id, force_metadata_for_links=False)
|
|
1048
1057
|
existing_names = {video.name for video in existing_videos}
|
|
1049
1058
|
|
|
1050
1059
|
if change_name_if_conflict:
|
|
@@ -1848,7 +1857,7 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
1848
1857
|
:type skip_download: Optional[bool]
|
|
1849
1858
|
:param progress_cb: Function for tracking the progress of copying.
|
|
1850
1859
|
:type progress_cb: tqdm or callable, optional
|
|
1851
|
-
:param force_metadata_for_links: Specify
|
|
1860
|
+
:param force_metadata_for_links: Specify whether to force retrieving videos metadata from the server after upload
|
|
1852
1861
|
:type force_metadata_for_links: Optional[bool]
|
|
1853
1862
|
:return: List with information about Videos. See :class:`info_sequence<info_sequence>`
|
|
1854
1863
|
:rtype: :class:`List[VideoInfo]`
|
|
@@ -1941,6 +1950,7 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
1941
1950
|
hash: Optional[str] = None,
|
|
1942
1951
|
meta: Optional[List[Dict]] = None,
|
|
1943
1952
|
skip_download: Optional[bool] = False,
|
|
1953
|
+
force_metadata_for_links: Optional[bool] = True,
|
|
1944
1954
|
):
|
|
1945
1955
|
"""
|
|
1946
1956
|
Upload Video from given link to Dataset.
|
|
@@ -1959,6 +1969,8 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
1959
1969
|
:type meta: List[Dict], optional
|
|
1960
1970
|
:param skip_download: Skip download video to local storage.
|
|
1961
1971
|
:type skip_download: Optional[bool]
|
|
1972
|
+
:param force_metadata_for_links: Specify whether to force retrieving video metadata from the server after upload
|
|
1973
|
+
:type force_metadata_for_links: Optional[bool]
|
|
1962
1974
|
:return: List with information about Video. See :class:`info_sequence<info_sequence>`
|
|
1963
1975
|
:rtype: :class:`List[VideoInfo]`
|
|
1964
1976
|
|
|
@@ -2043,6 +2055,7 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
2043
2055
|
hashes=[h],
|
|
2044
2056
|
metas=[meta],
|
|
2045
2057
|
skip_download=skip_download,
|
|
2058
|
+
force_metadata_for_links=force_metadata_for_links
|
|
2046
2059
|
)
|
|
2047
2060
|
if len(links) != 1:
|
|
2048
2061
|
raise RuntimeError(
|
|
@@ -2218,7 +2231,7 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
2218
2231
|
:rtype: List[str]
|
|
2219
2232
|
"""
|
|
2220
2233
|
|
|
2221
|
-
videos_in_dataset = self.get_list(dataset_id)
|
|
2234
|
+
videos_in_dataset = self.get_list(dataset_id, force_metadata_for_links=False)
|
|
2222
2235
|
used_names = {video_info.name for video_info in videos_in_dataset}
|
|
2223
2236
|
new_names = [
|
|
2224
2237
|
generate_free_name(used_names, name, with_ext=True, extend_used_names=True)
|
|
@@ -2244,7 +2257,7 @@ class VideoApi(RemoveableBulkModuleApi):
|
|
|
2244
2257
|
:return: None
|
|
2245
2258
|
:rtype: None
|
|
2246
2259
|
"""
|
|
2247
|
-
videos_in_dataset = self.get_list(dataset_id)
|
|
2260
|
+
videos_in_dataset = self.get_list(dataset_id, force_metadata_for_links=False)
|
|
2248
2261
|
used_names = {video_info.name for video_info in videos_in_dataset}
|
|
2249
2262
|
name_intersections = used_names.intersection(set(names))
|
|
2250
2263
|
if message is None:
|
|
@@ -123,7 +123,8 @@ class VideoConverter(BaseConverter):
|
|
|
123
123
|
|
|
124
124
|
meta, renamed_classes, renamed_tags = self.merge_metas_with_conflicts(api, dataset_id)
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
videos_in_dataset = api.video.get_list(dataset_id, force_metadata_for_links=False)
|
|
127
|
+
existing_names = {video_info.name for video_info in videos_in_dataset}
|
|
127
128
|
|
|
128
129
|
# check video codecs, mimetypes and convert if needed
|
|
129
130
|
convert_progress, convert_progress_cb = self.get_progress(
|
|
@@ -64,7 +64,7 @@ supervisely/api/pointcloud/pointcloud_object_api.py,sha256=bO1USWb9HAywG_CW4CDu1
|
|
|
64
64
|
supervisely/api/pointcloud/pointcloud_tag_api.py,sha256=iShtr052nOElxsyMyZEUT2vypEm6kP00gnP13ABX24A,4691
|
|
65
65
|
supervisely/api/video/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
66
66
|
supervisely/api/video/video_annotation_api.py,sha256=Um_7UOJtP_E25X6v41mrZfDbJaJuLMGoZm2IULwyg3w,10977
|
|
67
|
-
supervisely/api/video/video_api.py,sha256=
|
|
67
|
+
supervisely/api/video/video_api.py,sha256=2yFm1pbL-ziHl8vDyrf8z1qLbZxlo_22FyqjKPQbNg4,94228
|
|
68
68
|
supervisely/api/video/video_figure_api.py,sha256=quksohjhgrK2l2-PtbbNE99fOW6uWXX59-_4xfc-I-k,6244
|
|
69
69
|
supervisely/api/video/video_frame_api.py,sha256=4GwSI4xdCNYEUvTqzKc-Ewd44fw5zqkFoD24jrrN_aY,10214
|
|
70
70
|
supervisely/api/video/video_object_api.py,sha256=IC0NP8EoIT_d3xxDRgz2cA3ixSiuJ5ymy64eS-RfmDM,2227
|
|
@@ -623,7 +623,7 @@ supervisely/convert/pointcloud_episodes/sly/__init__.py,sha256=47DEQpj8HBSa-_TIm
|
|
|
623
623
|
supervisely/convert/pointcloud_episodes/sly/sly_pointcloud_episodes_converter.py,sha256=7ONcZMOUJCNpmc0tmMX6FnNG0lu8Nj9K2SSTQHaSXFM,6188
|
|
624
624
|
supervisely/convert/pointcloud_episodes/sly/sly_pointcloud_episodes_helper.py,sha256=h4WvNH6cEHtjxxhCnU7Hs2vkyJMye0qwabqXNYVTywE,3570
|
|
625
625
|
supervisely/convert/video/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
626
|
-
supervisely/convert/video/video_converter.py,sha256=
|
|
626
|
+
supervisely/convert/video/video_converter.py,sha256=f-b6FexBjXw9xWv5w8lxlNxCh4FvacNolX-WQDibWFs,11338
|
|
627
627
|
supervisely/convert/video/davis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
628
628
|
supervisely/convert/video/davis/davis_converter.py,sha256=zaPsJdN6AvyPT7fVnswuPbgrz5T-X2RFbHEdkuMhWGk,415
|
|
629
629
|
supervisely/convert/video/mot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -997,9 +997,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
997
997
|
supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
|
|
998
998
|
supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
|
|
999
999
|
supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
|
|
1000
|
-
supervisely-6.73.
|
|
1001
|
-
supervisely-6.73.
|
|
1002
|
-
supervisely-6.73.
|
|
1003
|
-
supervisely-6.73.
|
|
1004
|
-
supervisely-6.73.
|
|
1005
|
-
supervisely-6.73.
|
|
1000
|
+
supervisely-6.73.231.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
1001
|
+
supervisely-6.73.231.dist-info/METADATA,sha256=6Nn3J-8unL0hd-sYLQcavVvRFWolrgNpy30IxKd6-So,33150
|
|
1002
|
+
supervisely-6.73.231.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
1003
|
+
supervisely-6.73.231.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
1004
|
+
supervisely-6.73.231.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
1005
|
+
supervisely-6.73.231.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|