supervisely 6.73.410__py3-none-any.whl → 6.73.470__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/__init__.py +136 -1
- supervisely/_utils.py +81 -0
- supervisely/annotation/json_geometries_map.py +2 -0
- supervisely/annotation/label.py +80 -3
- supervisely/api/annotation_api.py +9 -9
- supervisely/api/api.py +67 -43
- supervisely/api/app_api.py +72 -5
- supervisely/api/dataset_api.py +108 -33
- supervisely/api/entity_annotation/figure_api.py +113 -49
- supervisely/api/image_api.py +82 -0
- supervisely/api/module_api.py +10 -0
- supervisely/api/nn/deploy_api.py +15 -9
- supervisely/api/nn/ecosystem_models_api.py +201 -0
- supervisely/api/nn/neural_network_api.py +12 -3
- supervisely/api/pointcloud/pointcloud_api.py +38 -0
- supervisely/api/pointcloud/pointcloud_episode_annotation_api.py +3 -0
- supervisely/api/project_api.py +213 -6
- supervisely/api/task_api.py +11 -1
- supervisely/api/video/video_annotation_api.py +4 -2
- supervisely/api/video/video_api.py +79 -1
- supervisely/api/video/video_figure_api.py +24 -11
- supervisely/api/volume/volume_api.py +38 -0
- supervisely/app/__init__.py +1 -1
- supervisely/app/content.py +14 -6
- supervisely/app/fastapi/__init__.py +1 -0
- supervisely/app/fastapi/custom_static_files.py +1 -1
- supervisely/app/fastapi/multi_user.py +88 -0
- supervisely/app/fastapi/subapp.py +175 -42
- supervisely/app/fastapi/templating.py +1 -1
- supervisely/app/fastapi/websocket.py +77 -9
- supervisely/app/singleton.py +21 -0
- supervisely/app/v1/app_service.py +18 -2
- supervisely/app/v1/constants.py +7 -1
- supervisely/app/widgets/__init__.py +11 -1
- supervisely/app/widgets/agent_selector/template.html +1 -0
- supervisely/app/widgets/card/card.py +20 -0
- supervisely/app/widgets/dataset_thumbnail/dataset_thumbnail.py +11 -2
- supervisely/app/widgets/dataset_thumbnail/template.html +3 -1
- supervisely/app/widgets/deploy_model/deploy_model.py +750 -0
- supervisely/app/widgets/dialog/dialog.py +12 -0
- supervisely/app/widgets/dialog/template.html +2 -1
- supervisely/app/widgets/dropdown_checkbox_selector/__init__.py +0 -0
- supervisely/app/widgets/dropdown_checkbox_selector/dropdown_checkbox_selector.py +87 -0
- supervisely/app/widgets/dropdown_checkbox_selector/template.html +12 -0
- supervisely/app/widgets/ecosystem_model_selector/__init__.py +0 -0
- supervisely/app/widgets/ecosystem_model_selector/ecosystem_model_selector.py +195 -0
- supervisely/app/widgets/experiment_selector/experiment_selector.py +454 -263
- supervisely/app/widgets/fast_table/fast_table.py +713 -126
- supervisely/app/widgets/fast_table/script.js +492 -95
- supervisely/app/widgets/fast_table/style.css +54 -0
- supervisely/app/widgets/fast_table/template.html +45 -5
- supervisely/app/widgets/heatmap/__init__.py +0 -0
- supervisely/app/widgets/heatmap/heatmap.py +523 -0
- supervisely/app/widgets/heatmap/script.js +378 -0
- supervisely/app/widgets/heatmap/style.css +227 -0
- supervisely/app/widgets/heatmap/template.html +21 -0
- supervisely/app/widgets/input_tag/input_tag.py +102 -15
- supervisely/app/widgets/input_tag_list/__init__.py +0 -0
- supervisely/app/widgets/input_tag_list/input_tag_list.py +274 -0
- supervisely/app/widgets/input_tag_list/template.html +70 -0
- supervisely/app/widgets/radio_table/radio_table.py +10 -2
- supervisely/app/widgets/radio_tabs/radio_tabs.py +18 -2
- supervisely/app/widgets/radio_tabs/template.html +1 -0
- supervisely/app/widgets/select/select.py +6 -4
- supervisely/app/widgets/select_dataset/select_dataset.py +6 -0
- supervisely/app/widgets/select_dataset_tree/select_dataset_tree.py +83 -7
- supervisely/app/widgets/table/table.py +68 -13
- supervisely/app/widgets/tabs/tabs.py +22 -6
- supervisely/app/widgets/tabs/template.html +5 -1
- supervisely/app/widgets/transfer/style.css +3 -0
- supervisely/app/widgets/transfer/template.html +3 -1
- supervisely/app/widgets/transfer/transfer.py +48 -45
- supervisely/app/widgets/tree_select/tree_select.py +2 -0
- supervisely/convert/image/csv/csv_converter.py +24 -15
- supervisely/convert/pointcloud/nuscenes_conv/nuscenes_converter.py +43 -41
- supervisely/convert/pointcloud_episodes/nuscenes_conv/nuscenes_converter.py +75 -51
- supervisely/convert/pointcloud_episodes/nuscenes_conv/nuscenes_helper.py +137 -124
- supervisely/convert/video/video_converter.py +2 -2
- supervisely/geometry/polyline_3d.py +110 -0
- supervisely/io/env.py +161 -1
- supervisely/nn/artifacts/__init__.py +1 -1
- supervisely/nn/artifacts/artifacts.py +10 -2
- supervisely/nn/artifacts/detectron2.py +1 -0
- supervisely/nn/artifacts/hrda.py +1 -0
- supervisely/nn/artifacts/mmclassification.py +20 -0
- supervisely/nn/artifacts/mmdetection.py +5 -3
- supervisely/nn/artifacts/mmsegmentation.py +1 -0
- supervisely/nn/artifacts/ritm.py +1 -0
- supervisely/nn/artifacts/rtdetr.py +1 -0
- supervisely/nn/artifacts/unet.py +1 -0
- supervisely/nn/artifacts/utils.py +3 -0
- supervisely/nn/artifacts/yolov5.py +2 -0
- supervisely/nn/artifacts/yolov8.py +1 -0
- supervisely/nn/benchmark/semantic_segmentation/metric_provider.py +18 -18
- supervisely/nn/experiments.py +9 -0
- supervisely/nn/inference/cache.py +37 -17
- supervisely/nn/inference/gui/serving_gui_template.py +39 -13
- supervisely/nn/inference/inference.py +953 -211
- supervisely/nn/inference/inference_request.py +15 -8
- supervisely/nn/inference/instance_segmentation/instance_segmentation.py +1 -0
- supervisely/nn/inference/object_detection/object_detection.py +1 -0
- supervisely/nn/inference/predict_app/__init__.py +0 -0
- supervisely/nn/inference/predict_app/gui/__init__.py +0 -0
- supervisely/nn/inference/predict_app/gui/classes_selector.py +160 -0
- supervisely/nn/inference/predict_app/gui/gui.py +915 -0
- supervisely/nn/inference/predict_app/gui/input_selector.py +344 -0
- supervisely/nn/inference/predict_app/gui/model_selector.py +77 -0
- supervisely/nn/inference/predict_app/gui/output_selector.py +179 -0
- supervisely/nn/inference/predict_app/gui/preview.py +93 -0
- supervisely/nn/inference/predict_app/gui/settings_selector.py +881 -0
- supervisely/nn/inference/predict_app/gui/tags_selector.py +110 -0
- supervisely/nn/inference/predict_app/gui/utils.py +399 -0
- supervisely/nn/inference/predict_app/predict_app.py +176 -0
- supervisely/nn/inference/session.py +47 -39
- supervisely/nn/inference/tracking/bbox_tracking.py +5 -1
- supervisely/nn/inference/tracking/point_tracking.py +5 -1
- supervisely/nn/inference/tracking/tracker_interface.py +4 -0
- supervisely/nn/inference/uploader.py +9 -5
- supervisely/nn/model/model_api.py +44 -22
- supervisely/nn/model/prediction.py +15 -1
- supervisely/nn/model/prediction_session.py +70 -14
- supervisely/nn/prediction_dto.py +7 -0
- supervisely/nn/tracker/__init__.py +6 -8
- supervisely/nn/tracker/base_tracker.py +54 -0
- supervisely/nn/tracker/botsort/__init__.py +1 -0
- supervisely/nn/tracker/botsort/botsort_config.yaml +30 -0
- supervisely/nn/tracker/botsort/osnet_reid/__init__.py +0 -0
- supervisely/nn/tracker/botsort/osnet_reid/osnet.py +566 -0
- supervisely/nn/tracker/botsort/osnet_reid/osnet_reid_interface.py +88 -0
- supervisely/nn/tracker/botsort/tracker/__init__.py +0 -0
- supervisely/nn/tracker/{bot_sort → botsort/tracker}/basetrack.py +1 -2
- supervisely/nn/tracker/{utils → botsort/tracker}/gmc.py +51 -59
- supervisely/nn/tracker/{deep_sort/deep_sort → botsort/tracker}/kalman_filter.py +71 -33
- supervisely/nn/tracker/botsort/tracker/matching.py +202 -0
- supervisely/nn/tracker/{bot_sort/bot_sort.py → botsort/tracker/mc_bot_sort.py} +68 -81
- supervisely/nn/tracker/botsort_tracker.py +273 -0
- supervisely/nn/tracker/calculate_metrics.py +264 -0
- supervisely/nn/tracker/utils.py +273 -0
- supervisely/nn/tracker/visualize.py +520 -0
- supervisely/nn/training/gui/gui.py +152 -49
- supervisely/nn/training/gui/hyperparameters_selector.py +1 -1
- supervisely/nn/training/gui/model_selector.py +8 -6
- supervisely/nn/training/gui/train_val_splits_selector.py +144 -71
- supervisely/nn/training/gui/training_artifacts.py +3 -1
- supervisely/nn/training/train_app.py +225 -46
- supervisely/project/pointcloud_episode_project.py +12 -8
- supervisely/project/pointcloud_project.py +12 -8
- supervisely/project/project.py +221 -75
- supervisely/template/experiment/experiment.html.jinja +105 -55
- supervisely/template/experiment/experiment_generator.py +258 -112
- supervisely/template/experiment/header.html.jinja +31 -13
- supervisely/template/experiment/sly-style.css +7 -2
- supervisely/versions.json +3 -1
- supervisely/video/sampling.py +42 -20
- supervisely/video/video.py +41 -12
- supervisely/video_annotation/video_figure.py +38 -4
- supervisely/volume/stl_converter.py +2 -0
- supervisely/worker_api/agent_rpc.py +24 -1
- supervisely/worker_api/rpc_servicer.py +31 -7
- {supervisely-6.73.410.dist-info → supervisely-6.73.470.dist-info}/METADATA +22 -14
- {supervisely-6.73.410.dist-info → supervisely-6.73.470.dist-info}/RECORD +167 -148
- supervisely_lib/__init__.py +6 -1
- supervisely/app/widgets/experiment_selector/style.css +0 -27
- supervisely/app/widgets/experiment_selector/template.html +0 -61
- supervisely/nn/tracker/bot_sort/__init__.py +0 -21
- supervisely/nn/tracker/bot_sort/fast_reid_interface.py +0 -152
- supervisely/nn/tracker/bot_sort/matching.py +0 -127
- supervisely/nn/tracker/bot_sort/sly_tracker.py +0 -401
- supervisely/nn/tracker/deep_sort/__init__.py +0 -6
- supervisely/nn/tracker/deep_sort/deep_sort/__init__.py +0 -1
- supervisely/nn/tracker/deep_sort/deep_sort/detection.py +0 -49
- supervisely/nn/tracker/deep_sort/deep_sort/iou_matching.py +0 -81
- supervisely/nn/tracker/deep_sort/deep_sort/linear_assignment.py +0 -202
- supervisely/nn/tracker/deep_sort/deep_sort/nn_matching.py +0 -176
- supervisely/nn/tracker/deep_sort/deep_sort/track.py +0 -166
- supervisely/nn/tracker/deep_sort/deep_sort/tracker.py +0 -145
- supervisely/nn/tracker/deep_sort/deep_sort.py +0 -301
- supervisely/nn/tracker/deep_sort/generate_clip_detections.py +0 -90
- supervisely/nn/tracker/deep_sort/preprocessing.py +0 -70
- supervisely/nn/tracker/deep_sort/sly_tracker.py +0 -273
- supervisely/nn/tracker/tracker.py +0 -285
- supervisely/nn/tracker/utils/kalman_filter.py +0 -492
- supervisely/nn/tracking/__init__.py +0 -1
- supervisely/nn/tracking/boxmot.py +0 -114
- supervisely/nn/tracking/tracking.py +0 -24
- /supervisely/{nn/tracker/utils → app/widgets/deploy_model}/__init__.py +0 -0
- {supervisely-6.73.410.dist-info → supervisely-6.73.470.dist-info}/LICENSE +0 -0
- {supervisely-6.73.410.dist-info → supervisely-6.73.470.dist-info}/WHEEL +0 -0
- {supervisely-6.73.410.dist-info → supervisely-6.73.470.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.410.dist-info → supervisely-6.73.470.dist-info}/top_level.txt +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import os
|
|
1
2
|
from os.path import join
|
|
2
3
|
from typing import Any, Dict, List, Optional, Union
|
|
3
4
|
|
|
@@ -7,14 +8,25 @@ import supervisely.io.env as sly_env
|
|
|
7
8
|
import supervisely.io.fs as sly_fs
|
|
8
9
|
import supervisely.io.json as sly_json
|
|
9
10
|
from supervisely import Api
|
|
10
|
-
from supervisely.app.widgets import
|
|
11
|
-
|
|
11
|
+
from supervisely.app.widgets import (
|
|
12
|
+
Card,
|
|
13
|
+
Container,
|
|
14
|
+
Field,
|
|
15
|
+
RadioTabs,
|
|
16
|
+
SelectString,
|
|
17
|
+
Text,
|
|
18
|
+
Widget,
|
|
19
|
+
)
|
|
20
|
+
from supervisely.app.widgets.experiment_selector.experiment_selector import (
|
|
21
|
+
ExperimentSelector,
|
|
22
|
+
)
|
|
12
23
|
from supervisely.app.widgets.pretrained_models_selector.pretrained_models_selector import (
|
|
13
24
|
PretrainedModelsSelector,
|
|
14
25
|
)
|
|
15
26
|
from supervisely.nn.experiments import get_experiment_infos
|
|
16
27
|
from supervisely.nn.inference.gui.serving_gui import ServingGUI
|
|
17
28
|
from supervisely.nn.utils import ModelSource, RuntimeType, _get_model_name
|
|
29
|
+
from supervisely.nn.experiments import ExperimentInfo
|
|
18
30
|
|
|
19
31
|
|
|
20
32
|
class ServingGUITemplate(ServingGUI):
|
|
@@ -67,7 +79,7 @@ class ServingGUITemplate(ServingGUI):
|
|
|
67
79
|
# Custom models
|
|
68
80
|
if use_custom_models:
|
|
69
81
|
experiments = get_experiment_infos(self.api, self.team_id, self.framework_name)
|
|
70
|
-
self.experiment_selector = ExperimentSelector(self.team_id, experiments)
|
|
82
|
+
self.experiment_selector = ExperimentSelector(self.api, self.team_id, experiments)
|
|
71
83
|
else:
|
|
72
84
|
self.experiment_selector = None
|
|
73
85
|
|
|
@@ -132,11 +144,13 @@ class ServingGUITemplate(ServingGUI):
|
|
|
132
144
|
|
|
133
145
|
if self.runtime_select is not None:
|
|
134
146
|
self.runtime_select.value_changed(lambda _: self._update_export_message())
|
|
147
|
+
|
|
135
148
|
if self.experiment_selector is not None:
|
|
136
|
-
self.experiment_selector.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
149
|
+
self.experiment_selector.selection_changed(lambda _: self._update_export_message())
|
|
150
|
+
self.experiment_selector.checkpoint_changed(
|
|
151
|
+
lambda row, _: self._update_export_message()
|
|
152
|
+
)
|
|
153
|
+
|
|
140
154
|
if self.pretrained_models_table is not None:
|
|
141
155
|
self.pretrained_models_table.model_changed(lambda _: self._update_export_message())
|
|
142
156
|
|
|
@@ -156,7 +170,12 @@ class ServingGUITemplate(ServingGUI):
|
|
|
156
170
|
|
|
157
171
|
@property
|
|
158
172
|
def model_info(self) -> Dict[str, Any]:
|
|
159
|
-
|
|
173
|
+
model_info = self._get_selected_row()
|
|
174
|
+
if isinstance(model_info, ExperimentInfo):
|
|
175
|
+
# model info requires json format
|
|
176
|
+
# to match types of pretrained and custom model info
|
|
177
|
+
model_info = model_info.to_json()
|
|
178
|
+
return model_info
|
|
160
179
|
|
|
161
180
|
@property
|
|
162
181
|
def model_name(self) -> Optional[str]:
|
|
@@ -171,7 +190,14 @@ class ServingGUITemplate(ServingGUI):
|
|
|
171
190
|
model_meta = self.model_info.get("meta", {})
|
|
172
191
|
return model_meta.get("model_files", {})
|
|
173
192
|
else:
|
|
174
|
-
|
|
193
|
+
experiment_info = self.experiment_selector.get_selected_experiment_info()
|
|
194
|
+
artifacts_dir = experiment_info.artifacts_dir
|
|
195
|
+
model_files = experiment_info.model_files
|
|
196
|
+
full_model_files = {
|
|
197
|
+
name: os.path.join(artifacts_dir, file) for name, file in model_files.items()
|
|
198
|
+
}
|
|
199
|
+
full_model_files["checkpoint"] = self.experiment_selector.get_selected_checkpoint_path()
|
|
200
|
+
return full_model_files
|
|
175
201
|
|
|
176
202
|
@property
|
|
177
203
|
def runtime(self) -> str:
|
|
@@ -235,10 +261,10 @@ class ServingGUITemplate(ServingGUI):
|
|
|
235
261
|
|
|
236
262
|
checkpoint_name = None
|
|
237
263
|
if self.model_source == ModelSource.CUSTOM and self.experiment_selector is not None:
|
|
238
|
-
|
|
239
|
-
if
|
|
264
|
+
selected_experiment_info = self.experiment_selector.get_selected_experiment_info()
|
|
265
|
+
if selected_experiment_info is None:
|
|
240
266
|
return
|
|
241
|
-
checkpoint_name =
|
|
267
|
+
checkpoint_name = self.experiment_selector.get_selected_checkpoint_name()
|
|
242
268
|
if checkpoint_name is None:
|
|
243
269
|
return
|
|
244
270
|
|
|
@@ -250,7 +276,7 @@ class ServingGUITemplate(ServingGUI):
|
|
|
250
276
|
if key.lower().startswith(runtime.lower()):
|
|
251
277
|
available = True
|
|
252
278
|
break
|
|
253
|
-
if checkpoint_name !=
|
|
279
|
+
if checkpoint_name != selected_experiment_info.best_checkpoint:
|
|
254
280
|
available = False
|
|
255
281
|
|
|
256
282
|
if available:
|