supervisely 6.73.446__py3-none-any.whl → 6.73.448__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/app/widgets/dialog/dialog.py +12 -0
- supervisely/app/widgets/dialog/template.html +2 -1
- supervisely/convert/video/video_converter.py +2 -2
- supervisely/nn/inference/inference.py +29 -23
- supervisely/video/video.py +1 -1
- {supervisely-6.73.446.dist-info → supervisely-6.73.448.dist-info}/METADATA +1 -1
- {supervisely-6.73.446.dist-info → supervisely-6.73.448.dist-info}/RECORD +11 -11
- {supervisely-6.73.446.dist-info → supervisely-6.73.448.dist-info}/LICENSE +0 -0
- {supervisely-6.73.446.dist-info → supervisely-6.73.448.dist-info}/WHEEL +0 -0
- {supervisely-6.73.446.dist-info → supervisely-6.73.448.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.446.dist-info → supervisely-6.73.448.dist-info}/top_level.txt +0 -0
|
@@ -28,6 +28,8 @@ class Dialog(Widget):
|
|
|
28
28
|
dialog = Dialog(title="Dialog title", content=Input("Input"), size="large")
|
|
29
29
|
dialog.show()
|
|
30
30
|
"""
|
|
31
|
+
class Routes:
|
|
32
|
+
ON_CLOSE = "close_cb"
|
|
31
33
|
|
|
32
34
|
def __init__(
|
|
33
35
|
self,
|
|
@@ -41,6 +43,16 @@ class Dialog(Widget):
|
|
|
41
43
|
self._size = size
|
|
42
44
|
super().__init__(widget_id=widget_id, file_path=__file__)
|
|
43
45
|
|
|
46
|
+
server = self._sly_app.get_server()
|
|
47
|
+
route = self.get_route_path(Dialog.Routes.ON_CLOSE)
|
|
48
|
+
@server.post(route)
|
|
49
|
+
def _on_close():
|
|
50
|
+
# * Change visibility state to False when dialog is closed on client side
|
|
51
|
+
visible = StateJson()[self.widget_id]["visible"]
|
|
52
|
+
if visible is True:
|
|
53
|
+
StateJson()[self.widget_id]["visible"] = False
|
|
54
|
+
# * no need to call send_changes(), as it is already changed on client side
|
|
55
|
+
|
|
44
56
|
def get_json_data(self) -> Dict[str, str]:
|
|
45
57
|
"""Returns dictionary with widget data, which defines the appearance and behavior of the widget.
|
|
46
58
|
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
:title=data.{{{widget.widget_id}}}.title
|
|
3
3
|
:size=data.{{{widget.widget_id}}}.size
|
|
4
4
|
:visible.sync="state.{{{widget.widget_id}}}.visible"
|
|
5
|
+
@close="post('/{{{widget.widget_id}}}/close_cb');"
|
|
5
6
|
>
|
|
6
7
|
<div>
|
|
7
8
|
{{{widget._content}}}
|
|
8
9
|
</div>
|
|
9
|
-
</el-dialog>
|
|
10
|
+
</el-dialog>
|
|
@@ -266,8 +266,8 @@ class VideoConverter(BaseConverter):
|
|
|
266
266
|
if codec_type not in ["video", "audio"]:
|
|
267
267
|
continue
|
|
268
268
|
codec_name = stream["codecName"]
|
|
269
|
-
if codec_type == "video" and codec_name
|
|
270
|
-
logger.info(f"Video codec is not h264, transcoding is required: {codec_name}")
|
|
269
|
+
if codec_type == "video" and codec_name not in ["h264", "h265", "hevc", "av1"]:
|
|
270
|
+
logger.info(f"Video codec is not h264/h265/hevc/av1, transcoding is required: {codec_name}")
|
|
271
271
|
need_video_transc = True
|
|
272
272
|
elif codec_type == "audio" and codec_name != "aac":
|
|
273
273
|
logger.info(f"Audio codec is not aac, transcoding is required: {codec_name}")
|
|
@@ -1105,31 +1105,37 @@ class Inference:
|
|
|
1105
1105
|
self.model_precision = deploy_params.get("model_precision", ModelPrecision.FP32)
|
|
1106
1106
|
self._hardware = get_hardware_info(self.device)
|
|
1107
1107
|
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1108
|
+
model_files = deploy_params.get("model_files", None)
|
|
1109
|
+
if model_files is not None:
|
|
1110
|
+
checkpoint_path = deploy_params["model_files"]["checkpoint"]
|
|
1111
|
+
checkpoint_ext = sly_fs.get_file_ext(checkpoint_path)
|
|
1112
|
+
if self.runtime == RuntimeType.TENSORRT and checkpoint_ext == ".engine":
|
|
1113
|
+
try:
|
|
1114
|
+
self.load_model(**deploy_params)
|
|
1115
|
+
except Exception as e:
|
|
1116
|
+
logger.warning(
|
|
1117
|
+
f"Failed to load model with TensorRT. Downloading PyTorch to export to TensorRT. Error: {repr(e)}"
|
|
1118
|
+
)
|
|
1119
|
+
checkpoint_path = self._fallback_download_custom_model_pt(deploy_params)
|
|
1120
|
+
deploy_params["model_files"]["checkpoint"] = checkpoint_path
|
|
1121
|
+
logger.info("Exporting PyTorch model to TensorRT...")
|
|
1122
|
+
self._remove_exported_checkpoints(checkpoint_path)
|
|
1123
|
+
checkpoint_path = self.export_tensorrt(deploy_params)
|
|
1124
|
+
deploy_params["model_files"]["checkpoint"] = checkpoint_path
|
|
1125
|
+
self.load_model(**deploy_params)
|
|
1126
|
+
if checkpoint_ext in (".pt", ".pth") and not self.runtime == RuntimeType.PYTORCH:
|
|
1127
|
+
if self.runtime == RuntimeType.ONNXRUNTIME:
|
|
1128
|
+
logger.info("Exporting PyTorch model to ONNX...")
|
|
1129
|
+
self._remove_exported_checkpoints(checkpoint_path)
|
|
1130
|
+
checkpoint_path = self.export_onnx(deploy_params)
|
|
1131
|
+
elif self.runtime == RuntimeType.TENSORRT:
|
|
1132
|
+
logger.info("Exporting PyTorch model to TensorRT...")
|
|
1133
|
+
self._remove_exported_checkpoints(checkpoint_path)
|
|
1134
|
+
checkpoint_path = self.export_tensorrt(deploy_params)
|
|
1120
1135
|
deploy_params["model_files"]["checkpoint"] = checkpoint_path
|
|
1121
1136
|
self.load_model(**deploy_params)
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
logger.info("Exporting PyTorch model to ONNX...")
|
|
1125
|
-
self._remove_exported_checkpoints(checkpoint_path)
|
|
1126
|
-
checkpoint_path = self.export_onnx(deploy_params)
|
|
1127
|
-
elif self.runtime == RuntimeType.TENSORRT:
|
|
1128
|
-
logger.info("Exporting PyTorch model to TensorRT...")
|
|
1129
|
-
self._remove_exported_checkpoints(checkpoint_path)
|
|
1130
|
-
checkpoint_path = self.export_tensorrt(deploy_params)
|
|
1131
|
-
deploy_params["model_files"]["checkpoint"] = checkpoint_path
|
|
1132
|
-
self.load_model(**deploy_params)
|
|
1137
|
+
else:
|
|
1138
|
+
self.load_model(**deploy_params)
|
|
1133
1139
|
else:
|
|
1134
1140
|
self.load_model(**deploy_params)
|
|
1135
1141
|
|
supervisely/video/video.py
CHANGED
|
@@ -18,7 +18,7 @@ ALLOWED_VIDEO_EXTENSIONS = [".avi", ".mp4", ".3gp", ".flv", ".webm", ".wmv", ".m
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
_SUPPORTED_CONTAINERS = {"mp4", "webm", "ogg", "ogv"}
|
|
21
|
-
_SUPPORTED_CODECS = {"h264", "vp8", "vp9"}
|
|
21
|
+
_SUPPORTED_CODECS = {"h264", "vp8", "vp9", "h265", "hevc", "av1"}
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
class VideoExtensionError(Exception):
|
|
@@ -230,8 +230,8 @@ supervisely/app/widgets/destination_project/__init__.py,sha256=47DEQpj8HBSa-_TIm
|
|
|
230
230
|
supervisely/app/widgets/destination_project/destination_project.py,sha256=zSFrCfvFMbeZY4uC3FRz-EkEpuqU24Mq-KqAckOc184,5476
|
|
231
231
|
supervisely/app/widgets/destination_project/template.html,sha256=AhhHte0PDFwbYRs06Q824gz3uy68ouVur_KM4FaCWtE,5526
|
|
232
232
|
supervisely/app/widgets/dialog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
233
|
-
supervisely/app/widgets/dialog/dialog.py,sha256=
|
|
234
|
-
supervisely/app/widgets/dialog/template.html,sha256=
|
|
233
|
+
supervisely/app/widgets/dialog/dialog.py,sha256=Uc7K6wLv4HYUiISbmyNZnLsyjDMYgZ2P5NedhniXl8I,3563
|
|
234
|
+
supervisely/app/widgets/dialog/template.html,sha256=ccYatR1_h9MktDpGUHNTw88_Hihw7Wsxl0k4l7r54WQ,261
|
|
235
235
|
supervisely/app/widgets/done_label/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
236
236
|
supervisely/app/widgets/done_label/done_label.py,sha256=7IMLbt4v-six26QNfuJUg2CzvL-lMiarEMCF1Fwywsg,1944
|
|
237
237
|
supervisely/app/widgets/done_label/template.html,sha256=PShF4P5x4InVFYAJUPRdMfjY7lJGSfaAFUAG8chxllo,238
|
|
@@ -671,7 +671,7 @@ supervisely/convert/pointcloud_episodes/sly/__init__.py,sha256=47DEQpj8HBSa-_TIm
|
|
|
671
671
|
supervisely/convert/pointcloud_episodes/sly/sly_pointcloud_episodes_converter.py,sha256=mHmmxeP63oaaXBTEMsmR4hISAiPVptn6qriNGTPPXzo,6322
|
|
672
672
|
supervisely/convert/pointcloud_episodes/sly/sly_pointcloud_episodes_helper.py,sha256=h4WvNH6cEHtjxxhCnU7Hs2vkyJMye0qwabqXNYVTywE,3570
|
|
673
673
|
supervisely/convert/video/__init__.py,sha256=8T99u_2rurKksx24aNQZf8b_TPFEiGViSDPzCqjDBfU,157
|
|
674
|
-
supervisely/convert/video/video_converter.py,sha256=
|
|
674
|
+
supervisely/convert/video/video_converter.py,sha256=PgbHaxMoZIZR945HQxf1qQS0e_ix20-TmsF_Aez2uS4,11381
|
|
675
675
|
supervisely/convert/video/davis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
676
676
|
supervisely/convert/video/davis/davis_converter.py,sha256=zaPsJdN6AvyPT7fVnswuPbgrz5T-X2RFbHEdkuMhWGk,415
|
|
677
677
|
supervisely/convert/video/mot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -904,7 +904,7 @@ supervisely/nn/benchmark/visualization/widgets/table/__init__.py,sha256=47DEQpj8
|
|
|
904
904
|
supervisely/nn/benchmark/visualization/widgets/table/table.py,sha256=atmDnF1Af6qLQBUjLhK18RMDKAYlxnsuVHMSEa5a-e8,4319
|
|
905
905
|
supervisely/nn/inference/__init__.py,sha256=QFukX2ip-U7263aEPCF_UCFwj6EujbMnsgrXp5Bbt8I,1623
|
|
906
906
|
supervisely/nn/inference/cache.py,sha256=rfmb1teJ9lNDfisUSh6bwDCVkPZocn8GMvDgLQktnbo,35023
|
|
907
|
-
supervisely/nn/inference/inference.py,sha256=
|
|
907
|
+
supervisely/nn/inference/inference.py,sha256=71E5_DG5He2y9TWu2YN8P9MWz0EwldGJa_7pK6pVp7E,207512
|
|
908
908
|
supervisely/nn/inference/inference_request.py,sha256=1Tq-OV7bYtr0bKDqvBXh72wpR5Misgk-iQn5waCxtqo,14830
|
|
909
909
|
supervisely/nn/inference/session.py,sha256=f2Tyvj21oO9AKxqr6_yHZ81Ol-wXC-h5cweTHEoljkg,35796
|
|
910
910
|
supervisely/nn/inference/uploader.py,sha256=Dn5MfMRq7tclEWpP0B9fJjTiQPBpwumfXxC8-lOYgnM,5659
|
|
@@ -1089,7 +1089,7 @@ supervisely/user/user.py,sha256=4GSVIupPAxWjIxZmUtH3Dtms_vGV82-49kM_aaR2gBI,319
|
|
|
1089
1089
|
supervisely/video/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1090
1090
|
supervisely/video/import_utils.py,sha256=b1Nl0gscNsV0iB9nWPeqt8GrkhOeuTZsN1p-d3gDUmE,544
|
|
1091
1091
|
supervisely/video/sampling.py,sha256=6w-FjpWbEq_u7zonnPEo0MhXN7RofhdgSZd27h45YMQ,20249
|
|
1092
|
-
supervisely/video/video.py,sha256=
|
|
1092
|
+
supervisely/video/video.py,sha256=YIRVyEfib4WmxWRDY57-VWyLiyeUEojbtrZHZbkfx0Q,20229
|
|
1093
1093
|
supervisely/video_annotation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1094
1094
|
supervisely/video_annotation/constants.py,sha256=_gW9iMhVk1w_dUaFiaiyXn66mt13S6bkxC64xpjP-CU,529
|
|
1095
1095
|
supervisely/video_annotation/frame.py,sha256=np21FqavJ3xW9VbLbohifDwZQtF5dWIsNSGVSjn-NnY,10574
|
|
@@ -1127,9 +1127,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
1127
1127
|
supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
|
|
1128
1128
|
supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
|
|
1129
1129
|
supervisely_lib/__init__.py,sha256=yRwzEQmVwSd6lUQoAUdBngKEOlnoQ6hA9ZcoZGJRNC4,331
|
|
1130
|
-
supervisely-6.73.
|
|
1131
|
-
supervisely-6.73.
|
|
1132
|
-
supervisely-6.73.
|
|
1133
|
-
supervisely-6.73.
|
|
1134
|
-
supervisely-6.73.
|
|
1135
|
-
supervisely-6.73.
|
|
1130
|
+
supervisely-6.73.448.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
1131
|
+
supervisely-6.73.448.dist-info/METADATA,sha256=VS9lv6VB9ZzDgTBuFYAqg219eOSnybIeTAggm0K_7xE,35480
|
|
1132
|
+
supervisely-6.73.448.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
1133
|
+
supervisely-6.73.448.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
1134
|
+
supervisely-6.73.448.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
1135
|
+
supervisely-6.73.448.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|