supervisely 6.73.466__py3-none-any.whl → 6.73.467__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/nn/inference/inference.py +10 -9
- supervisely/nn/inference/inference_request.py +3 -9
- supervisely/nn/inference/session.py +3 -1
- {supervisely-6.73.466.dist-info → supervisely-6.73.467.dist-info}/METADATA +1 -1
- {supervisely-6.73.466.dist-info → supervisely-6.73.467.dist-info}/RECORD +9 -9
- {supervisely-6.73.466.dist-info → supervisely-6.73.467.dist-info}/LICENSE +0 -0
- {supervisely-6.73.466.dist-info → supervisely-6.73.467.dist-info}/WHEEL +0 -0
- {supervisely-6.73.466.dist-info → supervisely-6.73.467.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.466.dist-info → supervisely-6.73.467.dist-info}/top_level.txt +0 -0
|
@@ -1374,6 +1374,7 @@ class Inference:
|
|
|
1374
1374
|
|
|
1375
1375
|
if tracker == "botsort":
|
|
1376
1376
|
from supervisely.nn.tracker import BotSortTracker
|
|
1377
|
+
|
|
1377
1378
|
device = tracker_settings.get("device", self.device)
|
|
1378
1379
|
logger.debug(f"Initializing BotSort tracker with device: {device}")
|
|
1379
1380
|
return BotSortTracker(settings=tracker_settings, device=device)
|
|
@@ -1419,7 +1420,7 @@ class Inference:
|
|
|
1419
1420
|
def get_tracking_settings(self) -> Dict[str, Dict[str, Any]]:
|
|
1420
1421
|
"""
|
|
1421
1422
|
Get default parameters for all available tracking algorithms.
|
|
1422
|
-
|
|
1423
|
+
|
|
1423
1424
|
Returns:
|
|
1424
1425
|
{"botsort": {"track_high_thresh": 0.6, ...}}
|
|
1425
1426
|
Empty dict if tracking not supported.
|
|
@@ -1437,6 +1438,7 @@ class Inference:
|
|
|
1437
1438
|
try:
|
|
1438
1439
|
if tracker_name == "botsort":
|
|
1439
1440
|
from supervisely.nn.tracker import BotSortTracker
|
|
1441
|
+
|
|
1440
1442
|
trackers_params[tracker_name] = BotSortTracker.get_default_params()
|
|
1441
1443
|
# Add other trackers here as elif blocks
|
|
1442
1444
|
else:
|
|
@@ -1448,7 +1450,7 @@ class Inference:
|
|
|
1448
1450
|
for tracker_name, params in trackers_params.items():
|
|
1449
1451
|
trackers_params[tracker_name] = {
|
|
1450
1452
|
k: v for k, v in params.items() if k not in INTERNAL_FIELDS
|
|
1451
|
-
|
|
1453
|
+
}
|
|
1452
1454
|
return trackers_params
|
|
1453
1455
|
|
|
1454
1456
|
def get_human_readable_info(self, replace_none_with: Optional[str] = None):
|
|
@@ -2277,8 +2279,8 @@ class Inference:
|
|
|
2277
2279
|
frame_index=frame_index,
|
|
2278
2280
|
video_id=video_info.id,
|
|
2279
2281
|
dataset_id=video_info.dataset_id,
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
+
project_id=video_info.project_id,
|
|
2283
|
+
)
|
|
2282
2284
|
for ann, frame_index in zip(anns, batch)
|
|
2283
2285
|
]
|
|
2284
2286
|
for pred, this_slides_data in zip(predictions, slides_data):
|
|
@@ -3671,10 +3673,7 @@ class Inference:
|
|
|
3671
3673
|
data = {**inference_request.to_json(), **log_extra}
|
|
3672
3674
|
if inference_request.stage != InferenceRequest.Stage.INFERENCE:
|
|
3673
3675
|
data["progress"] = {"current": 0, "total": 1}
|
|
3674
|
-
logger.debug(
|
|
3675
|
-
f"Sending inference progress with uuid:",
|
|
3676
|
-
extra=data,
|
|
3677
|
-
)
|
|
3676
|
+
logger.debug(f"Sending inference progress with uuid:", extra=data)
|
|
3678
3677
|
return data
|
|
3679
3678
|
|
|
3680
3679
|
@server.post(f"/pop_inference_results")
|
|
@@ -4667,6 +4666,7 @@ def _filter_duplicated_predictions_from_ann_cpu(
|
|
|
4667
4666
|
|
|
4668
4667
|
return pred_ann.clone(labels=new_labels)
|
|
4669
4668
|
|
|
4669
|
+
|
|
4670
4670
|
def _filter_duplicated_predictions_from_ann(
|
|
4671
4671
|
gt_ann: Annotation, pred_ann: Annotation, iou_threshold: float
|
|
4672
4672
|
) -> Annotation:
|
|
@@ -5367,7 +5367,8 @@ def get_value_for_keys(data: dict, keys: List, ignore_none: bool = False):
|
|
|
5367
5367
|
return data[key]
|
|
5368
5368
|
return None
|
|
5369
5369
|
|
|
5370
|
-
|
|
5370
|
+
|
|
5371
|
+
def torch_load_safe(checkpoint_path: str, device: str = "cpu"):
|
|
5371
5372
|
import torch # pylint: disable=import-error
|
|
5372
5373
|
|
|
5373
5374
|
# TODO: handle torch.load(weights_only=True) - change in torch 2.6.0
|
|
@@ -14,13 +14,6 @@ from supervisely.sly_logger import logger
|
|
|
14
14
|
from supervisely.task.progress import Progress
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
def generate_uuid(self) -> str:
|
|
18
|
-
"""
|
|
19
|
-
Generates a unique UUID for the inference request.
|
|
20
|
-
"""
|
|
21
|
-
return uuid.uuid5(namespace=uuid.NAMESPACE_URL, name=f"{time.time()}-{rand_str(10)}").hex
|
|
22
|
-
|
|
23
|
-
|
|
24
17
|
class InferenceRequest:
|
|
25
18
|
class Stage:
|
|
26
19
|
PREPARING = "Preparing model for inference..."
|
|
@@ -59,7 +52,7 @@ class InferenceRequest:
|
|
|
59
52
|
self._created_at = time.monotonic()
|
|
60
53
|
self._updated_at = self._created_at
|
|
61
54
|
self._finished = False
|
|
62
|
-
|
|
55
|
+
|
|
63
56
|
self.tracker = None
|
|
64
57
|
|
|
65
58
|
self.global_progress = None
|
|
@@ -252,7 +245,8 @@ class InferenceRequest:
|
|
|
252
245
|
status_data.pop(key, None)
|
|
253
246
|
status_data.update(self.get_usage())
|
|
254
247
|
return status_data
|
|
255
|
-
|
|
248
|
+
|
|
249
|
+
|
|
256
250
|
class GlobalProgress:
|
|
257
251
|
def __init__(self):
|
|
258
252
|
self.progress = Progress(message="Ready", total_cnt=1)
|
|
@@ -543,7 +543,9 @@ class SessionJSON:
|
|
|
543
543
|
t0 = time.time()
|
|
544
544
|
while not has_started and not timeout_exceeded:
|
|
545
545
|
resp = self._get_inference_progress()
|
|
546
|
-
|
|
546
|
+
pending_results = resp.get("pending_results", None)
|
|
547
|
+
has_results = bool(pending_results)
|
|
548
|
+
has_started = bool(resp.get("result")) or resp["progress"]["total"] != 1 or has_results
|
|
547
549
|
if not has_started:
|
|
548
550
|
time.sleep(delay)
|
|
549
551
|
timeout_exceeded = timeout and time.time() - t0 > timeout
|
|
@@ -906,9 +906,9 @@ supervisely/nn/benchmark/visualization/widgets/table/__init__.py,sha256=47DEQpj8
|
|
|
906
906
|
supervisely/nn/benchmark/visualization/widgets/table/table.py,sha256=atmDnF1Af6qLQBUjLhK18RMDKAYlxnsuVHMSEa5a-e8,4319
|
|
907
907
|
supervisely/nn/inference/__init__.py,sha256=QFukX2ip-U7263aEPCF_UCFwj6EujbMnsgrXp5Bbt8I,1623
|
|
908
908
|
supervisely/nn/inference/cache.py,sha256=Hkxvu70rrB-j7ztQ4TBOxQePAxiKS7Erdb2FmK7aetY,35795
|
|
909
|
-
supervisely/nn/inference/inference.py,sha256=
|
|
910
|
-
supervisely/nn/inference/inference_request.py,sha256=
|
|
911
|
-
supervisely/nn/inference/session.py,sha256=
|
|
909
|
+
supervisely/nn/inference/inference.py,sha256=c-jzwBuPiFdMfu78mSc6qw6SO59LZ9IwePyafEkiL04,230468
|
|
910
|
+
supervisely/nn/inference/inference_request.py,sha256=Hyf5R8gxaUCoxljNReIhbf5bK7ZMRtpV6C-flh8mgcQ,14660
|
|
911
|
+
supervisely/nn/inference/session.py,sha256=17abxb237JMftb12gPV-R07N6bUZwIaL4N39K-BupAQ,36357
|
|
912
912
|
supervisely/nn/inference/uploader.py,sha256=Dn5MfMRq7tclEWpP0B9fJjTiQPBpwumfXxC8-lOYgnM,5659
|
|
913
913
|
supervisely/nn/inference/video_inference.py,sha256=8Bshjr6rDyLay5Za8IB8Dr6FURMO2R_v7aELasO8pR4,5746
|
|
914
914
|
supervisely/nn/inference/gui/__init__.py,sha256=wCxd-lF5Zhcwsis-wScDA8n1Gk_1O00PKgDviUZ3F1U,221
|
|
@@ -1129,9 +1129,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
1129
1129
|
supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
|
|
1130
1130
|
supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
|
|
1131
1131
|
supervisely_lib/__init__.py,sha256=yRwzEQmVwSd6lUQoAUdBngKEOlnoQ6hA9ZcoZGJRNC4,331
|
|
1132
|
-
supervisely-6.73.
|
|
1133
|
-
supervisely-6.73.
|
|
1134
|
-
supervisely-6.73.
|
|
1135
|
-
supervisely-6.73.
|
|
1136
|
-
supervisely-6.73.
|
|
1137
|
-
supervisely-6.73.
|
|
1132
|
+
supervisely-6.73.467.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
1133
|
+
supervisely-6.73.467.dist-info/METADATA,sha256=y8n5gJ_mKQyF43P0JvdgAS6xVG3IJ_WxW1XhH1Nax8k,35604
|
|
1134
|
+
supervisely-6.73.467.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
1135
|
+
supervisely-6.73.467.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
1136
|
+
supervisely-6.73.467.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
1137
|
+
supervisely-6.73.467.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|