ultralytics 8.3.198__py3-none-any.whl → 8.3.199__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.
- tests/test_cuda.py +2 -3
- ultralytics/__init__.py +22 -9
- ultralytics/cfg/default.yaml +1 -1
- ultralytics/engine/exporter.py +3 -2
- ultralytics/nn/tasks.py +1 -1
- ultralytics/utils/plotting.py +5 -1
- ultralytics/utils/torch_utils.py +4 -1
- {ultralytics-8.3.198.dist-info → ultralytics-8.3.199.dist-info}/METADATA +1 -1
- {ultralytics-8.3.198.dist-info → ultralytics-8.3.199.dist-info}/RECORD +13 -13
- {ultralytics-8.3.198.dist-info → ultralytics-8.3.199.dist-info}/WHEEL +0 -0
- {ultralytics-8.3.198.dist-info → ultralytics-8.3.199.dist-info}/entry_points.txt +0 -0
- {ultralytics-8.3.198.dist-info → ultralytics-8.3.199.dist-info}/licenses/LICENSE +0 -0
- {ultralytics-8.3.198.dist-info → ultralytics-8.3.199.dist-info}/top_level.txt +0 -0
tests/test_cuda.py
CHANGED
@@ -68,7 +68,7 @@ def test_export_onnx_matrix(task, dynamic, int8, half, batch, simplify, nms):
|
|
68
68
|
half=half,
|
69
69
|
batch=batch,
|
70
70
|
simplify=simplify,
|
71
|
-
nms=nms
|
71
|
+
nms=nms,
|
72
72
|
device=DEVICES[0],
|
73
73
|
)
|
74
74
|
YOLO(file)([SOURCE] * batch, imgsz=64 if dynamic else 32, device=DEVICES[0]) # exported model inference
|
@@ -76,7 +76,6 @@ def test_export_onnx_matrix(task, dynamic, int8, half, batch, simplify, nms):
|
|
76
76
|
|
77
77
|
|
78
78
|
@pytest.mark.slow
|
79
|
-
@pytest.mark.skipif(True, reason="CUDA export tests disabled pending additional Ultralytics GPU server availability")
|
80
79
|
@pytest.mark.skipif(not DEVICES, reason="No CUDA devices available")
|
81
80
|
@pytest.mark.parametrize(
|
82
81
|
"task, dynamic, int8, half, batch",
|
@@ -164,7 +163,7 @@ def test_autobatch():
|
|
164
163
|
|
165
164
|
|
166
165
|
@pytest.mark.slow
|
167
|
-
@pytest.mark.skipif(
|
166
|
+
@pytest.mark.skipif(not DEVICES, reason="No CUDA devices available")
|
168
167
|
def test_utils_benchmarks():
|
169
168
|
"""Profile YOLO models for performance benchmarks."""
|
170
169
|
from ultralytics.utils.benchmarks import ProfileModels
|
ultralytics/__init__.py
CHANGED
@@ -1,30 +1,43 @@
|
|
1
1
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
2
2
|
|
3
|
-
__version__ = "8.3.
|
3
|
+
__version__ = "8.3.199"
|
4
4
|
|
5
|
+
import importlib
|
5
6
|
import os
|
6
7
|
|
7
8
|
# Set ENV variables (place before imports)
|
8
9
|
if not os.environ.get("OMP_NUM_THREADS"):
|
9
10
|
os.environ["OMP_NUM_THREADS"] = "1" # default for reduced CPU utilization during training
|
10
11
|
|
11
|
-
from ultralytics.models import NAS, RTDETR, SAM, YOLO, YOLOE, FastSAM, YOLOWorld
|
12
12
|
from ultralytics.utils import ASSETS, SETTINGS
|
13
13
|
from ultralytics.utils.checks import check_yolo as checks
|
14
14
|
from ultralytics.utils.downloads import download
|
15
15
|
|
16
16
|
settings = SETTINGS
|
17
|
+
|
18
|
+
MODELS = ("YOLO", "YOLOWorld", "YOLOE", "NAS", "SAM", "FastSAM", "RTDETR")
|
19
|
+
|
17
20
|
__all__ = (
|
18
21
|
"__version__",
|
19
22
|
"ASSETS",
|
20
|
-
|
21
|
-
"YOLOWorld",
|
22
|
-
"YOLOE",
|
23
|
-
"NAS",
|
24
|
-
"SAM",
|
25
|
-
"FastSAM",
|
26
|
-
"RTDETR",
|
23
|
+
*MODELS,
|
27
24
|
"checks",
|
28
25
|
"download",
|
29
26
|
"settings",
|
30
27
|
)
|
28
|
+
|
29
|
+
|
30
|
+
def __getattr__(name: str):
|
31
|
+
"""Lazy-import model classes on first access."""
|
32
|
+
if name in MODELS:
|
33
|
+
return getattr(importlib.import_module("ultralytics.models"), name)
|
34
|
+
raise AttributeError(f"module {__name__} has no attribute {name}")
|
35
|
+
|
36
|
+
|
37
|
+
def __dir__():
|
38
|
+
"""Extend dir() to include lazily available model names for IDE autocompletion."""
|
39
|
+
return sorted(set(globals()) | set(MODELS))
|
40
|
+
|
41
|
+
|
42
|
+
if __name__ == "__main__":
|
43
|
+
print(__version__)
|
ultralytics/cfg/default.yaml
CHANGED
@@ -37,7 +37,7 @@ fraction: 1.0 # (float) fraction of training dataset to use (1.0 = all)
|
|
37
37
|
profile: False # (bool) profile ONNX/TensorRT speeds during training for loggers
|
38
38
|
freeze: # (int | list, optional) freeze first N layers (int) or specific layer indices (list)
|
39
39
|
multi_scale: False # (bool) multiscale training by varying image size
|
40
|
-
compile: False # (bool | str) enable torch.compile() backend='inductor'; True="default", False=off, or "default|reduce-overhead|max-autotune"
|
40
|
+
compile: False # (bool | str) enable torch.compile() backend='inductor'; True="default", False=off, or "default|reduce-overhead|max-autotune-no-cudagraphs"
|
41
41
|
|
42
42
|
# Segmentation
|
43
43
|
overlap_mask: True # (bool) merge instance masks into one mask during training (segment only)
|
ultralytics/engine/exporter.py
CHANGED
@@ -922,7 +922,8 @@ class Exporter:
|
|
922
922
|
import tensorrt as trt # noqa
|
923
923
|
except ImportError:
|
924
924
|
if LINUX:
|
925
|
-
|
925
|
+
cuda_version = torch.version.cuda.split(".")[0]
|
926
|
+
check_requirements(f"tensorrt-cu{cuda_version}>7.0.0,!=10.1.0")
|
926
927
|
import tensorrt as trt # noqa
|
927
928
|
check_version(trt.__version__, ">=7.0.0", hard=True)
|
928
929
|
check_version(trt.__version__, "!=10.1.0", msg="https://github.com/ultralytics/ultralytics/pull/14239")
|
@@ -1306,7 +1307,7 @@ class Exporter:
|
|
1306
1307
|
kpts = outputs[2] # (bs, max_detections, kpts 17*3)
|
1307
1308
|
out_kpts = torch.gather(kpts, 1, nms_outputs.indices.unsqueeze(-1).expand(-1, -1, kpts.size(-1)))
|
1308
1309
|
return nms_outputs.boxes, nms_outputs.scores, nms_outputs.labels, out_kpts
|
1309
|
-
return nms_outputs
|
1310
|
+
return nms_outputs.boxes, nms_outputs.scores, nms_outputs.labels, nms_outputs.n_valid
|
1310
1311
|
|
1311
1312
|
quant_model = NMSWrapper(
|
1312
1313
|
model=quant_model,
|
ultralytics/nn/tasks.py
CHANGED
@@ -1543,8 +1543,8 @@ def parse_model(d, ch, verbose=True):
|
|
1543
1543
|
max_channels = float("inf")
|
1544
1544
|
nc, act, scales = (d.get(x) for x in ("nc", "activation", "scales"))
|
1545
1545
|
depth, width, kpt_shape = (d.get(x, 1.0) for x in ("depth_multiple", "width_multiple", "kpt_shape"))
|
1546
|
+
scale = d.get("scale")
|
1546
1547
|
if scales:
|
1547
|
-
scale = d.get("scale")
|
1548
1548
|
if not scale:
|
1549
1549
|
scale = tuple(scales.keys())[0]
|
1550
1550
|
LOGGER.warning(f"no model scale passed. Assuming scale='{scale}'.")
|
ultralytics/utils/plotting.py
CHANGED
@@ -934,13 +934,14 @@ def plt_color_scatter(v, f, bins: int = 20, cmap: str = "viridis", alpha: float
|
|
934
934
|
|
935
935
|
|
936
936
|
@plt_settings()
|
937
|
-
def plot_tune_results(csv_file: str = "tune_results.csv"):
|
937
|
+
def plot_tune_results(csv_file: str = "tune_results.csv", exclude_zero_fitness_points: bool = True):
|
938
938
|
"""
|
939
939
|
Plot the evolution results stored in a 'tune_results.csv' file. The function generates a scatter plot for each key
|
940
940
|
in the CSV, color-coded based on fitness scores. The best-performing configurations are highlighted on the plots.
|
941
941
|
|
942
942
|
Args:
|
943
943
|
csv_file (str, optional): Path to the CSV file containing the tuning results.
|
944
|
+
exclude_zero_fitness_points (bool, optional): Don't include points with zero fitness in tuning plots.
|
944
945
|
|
945
946
|
Examples:
|
946
947
|
>>> plot_tune_results("path/to/tune_results.csv")
|
@@ -962,6 +963,9 @@ def plot_tune_results(csv_file: str = "tune_results.csv"):
|
|
962
963
|
keys = [x.strip() for x in data.columns][num_metrics_columns:]
|
963
964
|
x = data.to_numpy()
|
964
965
|
fitness = x[:, 0] # fitness
|
966
|
+
if exclude_zero_fitness_points:
|
967
|
+
mask = fitness > 0 # exclude zero-fitness points
|
968
|
+
x, fitness = x[mask], fitness[mask]
|
965
969
|
j = np.argmax(fitness) # max fitness index
|
966
970
|
n = math.ceil(len(keys) ** 0.5) # columns and rows in plot
|
967
971
|
plt.figure(figsize=(10, 10), tight_layout=True)
|
ultralytics/utils/torch_utils.py
CHANGED
@@ -1028,7 +1028,7 @@ def attempt_compile(
|
|
1028
1028
|
use_autocast (bool, optional): Whether to run warmup under autocast on CUDA or MPS devices.
|
1029
1029
|
warmup (bool, optional): Whether to execute a single dummy forward pass to warm up the compiled model.
|
1030
1030
|
mode (bool | str, optional): torch.compile mode. True → "default", False → no compile, or a string like
|
1031
|
-
"default", "reduce-overhead", "max-autotune".
|
1031
|
+
"default", "reduce-overhead", "max-autotune-no-cudagraphs".
|
1032
1032
|
|
1033
1033
|
Returns:
|
1034
1034
|
model (torch.nn.Module): Compiled model if compilation succeeds, otherwise the original unmodified model.
|
@@ -1050,6 +1050,9 @@ def attempt_compile(
|
|
1050
1050
|
mode = "default"
|
1051
1051
|
prefix = colorstr("compile:")
|
1052
1052
|
LOGGER.info(f"{prefix} starting torch.compile with '{mode}' mode...")
|
1053
|
+
if mode == "max-autotune":
|
1054
|
+
LOGGER.warning(f"{prefix} mode='{mode}' not recommended, using mode='max-autotune-no-cudagraphs' instead")
|
1055
|
+
mode = "max-autotune-no-cudagraphs"
|
1053
1056
|
t0 = time.perf_counter()
|
1054
1057
|
try:
|
1055
1058
|
model = torch.compile(model, mode=mode, backend="inductor")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ultralytics
|
3
|
-
Version: 8.3.
|
3
|
+
Version: 8.3.199
|
4
4
|
Summary: Ultralytics YOLO 🚀 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
|
5
5
|
Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>, Jing Qiu <jing.qiu@ultralytics.com>
|
6
6
|
Maintainer-email: Ultralytics <hello@ultralytics.com>
|
@@ -1,18 +1,18 @@
|
|
1
1
|
tests/__init__.py,sha256=b4KP5_q-2IO8Br8YHOSLYnn7IwZS81l_vfEF2YPa2lM,894
|
2
2
|
tests/conftest.py,sha256=LXtQJcFNWPGuzauTGkiXgsvVC3llJKfg22WcmhRzuQc,2593
|
3
3
|
tests/test_cli.py,sha256=EMf5gTAopOnIz8VvzaM-Qb044o7D0flnUHYQ-2ffOM4,5670
|
4
|
-
tests/test_cuda.py,sha256=
|
4
|
+
tests/test_cuda.py,sha256=3eiigQIWEkqLsIznlqAMrAi3Dhd_N54Ojtm5LCQELyo,8022
|
5
5
|
tests/test_engine.py,sha256=8W4_D48ZBUp-DsUlRYxHTXzougycY8yggvpbVwQDLPg,5025
|
6
6
|
tests/test_exports.py,sha256=dWuroSyqXnrc0lE-RNTf7pZoXXXEkOs31u7nhOiEHS0,10994
|
7
7
|
tests/test_integrations.py,sha256=kl_AKmE_Qs1GB0_91iVwbzNxofm_hFTt0zzU6JF-pg4,6323
|
8
8
|
tests/test_python.py,sha256=2V23f2-JQsO-K4p1kj0IkCRxHykGwgd0edKJzRsBgdI,27911
|
9
9
|
tests/test_solutions.py,sha256=6wJ9-lhyWSAm7zaR4D9L_DrUA3iJU1NgqmbQO6PIuvo,13211
|
10
|
-
ultralytics/__init__.py,sha256=
|
10
|
+
ultralytics/__init__.py,sha256=k_NhCYzBQ8jBVBIKdHD5Xwdmz9P0fjOmh9LE4pfpYZs,1120
|
11
11
|
ultralytics/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
|
12
12
|
ultralytics/assets/bus.jpg,sha256=wCAZxJecGR63Od3ZRERe9Aja1Weayrb9Ug751DS_vGM,137419
|
13
13
|
ultralytics/assets/zidane.jpg,sha256=Ftc4aeMmen1O0A3o6GCDO9FlfBslLpTAw0gnetx7bts,50427
|
14
14
|
ultralytics/cfg/__init__.py,sha256=xX7qUxdcDgcjCKoQFEVQgzrwZodeKTF88CTKZe05d0Y,39955
|
15
|
-
ultralytics/cfg/default.yaml,sha256=
|
15
|
+
ultralytics/cfg/default.yaml,sha256=lfiQ1PVxNhOzEiaRxThPedmMAhShdR4Ti8uYktJn5CI,8901
|
16
16
|
ultralytics/cfg/datasets/Argoverse.yaml,sha256=J4ItoUlE_EiYTmp1DFKYHfbqHkj8j4wUtRJQhaMIlBM,3275
|
17
17
|
ultralytics/cfg/datasets/DOTAv1.5.yaml,sha256=VZ_KKFX0H2YvlFVJ8JHcLWYBZ2xiQ6Z-ROSTiKWpS7c,1211
|
18
18
|
ultralytics/cfg/datasets/DOTAv1.yaml,sha256=JrDuYcQ0JU9lJlCA-dCkMNko_jaj6MAVGHjsfjeZ_u0,1181
|
@@ -121,7 +121,7 @@ ultralytics/data/scripts/get_coco.sh,sha256=UuJpJeo3qQpTHVINeOpmP0NYmg8PhEFE3A8J
|
|
121
121
|
ultralytics/data/scripts/get_coco128.sh,sha256=qmRQl_hOKrsdHrTrnyQuFIH01oDz3lfaz138OgGfLt8,650
|
122
122
|
ultralytics/data/scripts/get_imagenet.sh,sha256=hr42H16bM47iT27rgS7MpEo-GeOZAYUQXgr0B2cwn48,1705
|
123
123
|
ultralytics/engine/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXppv1-QUM,70
|
124
|
-
ultralytics/engine/exporter.py,sha256=
|
124
|
+
ultralytics/engine/exporter.py,sha256=4nEy6_ZRTxVOox0egroPgQjeRvwNAfTKp53VVfe8vb8,74985
|
125
125
|
ultralytics/engine/model.py,sha256=iwwaL2NR5NSwQ7R3juHzS3ds9W-CfhC_CjUcwMvcgsk,53426
|
126
126
|
ultralytics/engine/predictor.py,sha256=4lfw2RbBDE7939011FcSCuznscrcnMuabZtc8GXaKO4,22735
|
127
127
|
ultralytics/engine/results.py,sha256=uQ_tgvdxKAg28pRgb5WCHiqx9Ktu7wYiVbwZy_IJ5bo,71499
|
@@ -197,7 +197,7 @@ ultralytics/models/yolo/yoloe/train_seg.py,sha256=aCV7M8oQOvODFnU4piZdJh3tIrBJYA
|
|
197
197
|
ultralytics/models/yolo/yoloe/val.py,sha256=5Gd9EoFH0FmKKvWXBl4J7gBe9DVxIczN-s3ceHwdUDo,9458
|
198
198
|
ultralytics/nn/__init__.py,sha256=PJgOn2phQTTBR2P3s_JWvGeGXQpvw1znsumKow4tCuE,545
|
199
199
|
ultralytics/nn/autobackend.py,sha256=WWHIFvCI47Wpe3NCDkoUg3esjOTJ0XGEzG3luA_uG-8,41063
|
200
|
-
ultralytics/nn/tasks.py,sha256=
|
200
|
+
ultralytics/nn/tasks.py,sha256=WfZLAypHpNo0S99FSpQDHWXBe64nMxYktuTuHCidT-Q,70412
|
201
201
|
ultralytics/nn/text_model.py,sha256=pHqnKe8UueR1MuwJcIE_IvrnYIlt68QL796xjcRJs2A,15275
|
202
202
|
ultralytics/nn/modules/__init__.py,sha256=BPMbEm1daI7Tuds3zph2_afAX7Gq1uAqK8BfiCfKTZs,3198
|
203
203
|
ultralytics/nn/modules/activation.py,sha256=75JcIMH2Cu9GTC2Uf55r_5YLpxcrXQDaVoeGQ0hlUAU,2233
|
@@ -256,9 +256,9 @@ ultralytics/utils/metrics.py,sha256=42zu-qeSvtL4JtvFDQy-7_5OJLwU4M8b5V8uRHBPFUQ,
|
|
256
256
|
ultralytics/utils/nms.py,sha256=AVOmPuUTEJqmq2J6rvjq-nHNxYIyabgzHdc41siyA0w,14161
|
257
257
|
ultralytics/utils/ops.py,sha256=PW3fgw1d18CA2ZNQZVJqUy054cJ_9tIcxd1XnA0FPgU,26905
|
258
258
|
ultralytics/utils/patches.py,sha256=0-2G4jXCIPnMonlft-cPcjfFcOXQS6ODwUDNUwanfg4,6541
|
259
|
-
ultralytics/utils/plotting.py,sha256=
|
259
|
+
ultralytics/utils/plotting.py,sha256=XWXZi02smBeFji3BSkMZNNNssXzO-dIxFaD15_N1f-4,47221
|
260
260
|
ultralytics/utils/tal.py,sha256=LrziY_ZHz4wln3oOnqAzgyPaXKoup17Sa103BpuaQFU,20935
|
261
|
-
ultralytics/utils/torch_utils.py,sha256=
|
261
|
+
ultralytics/utils/torch_utils.py,sha256=PBScEx9l8svOvrVD-qpNdw12F4NCdzjkVtCJ9OMNXRI,43276
|
262
262
|
ultralytics/utils/tqdm.py,sha256=ny5RIg2OTkWQ7gdaXfYaoIgR0Xn2_hNGB6tUpO2Unns,16137
|
263
263
|
ultralytics/utils/triton.py,sha256=fbMfTAUyoGiyslWtySzLZw53XmZJa7rF31CYFot0Wjs,5422
|
264
264
|
ultralytics/utils/tuner.py,sha256=9D4dSIvwwxcNSJcH2QJ92qiIVi9zu-1L7_PBZ8okDyE,6816
|
@@ -274,9 +274,9 @@ ultralytics/utils/callbacks/platform.py,sha256=a7T_8htoBB0uX1WIc392UJnhDjxkRyQMv
|
|
274
274
|
ultralytics/utils/callbacks/raytune.py,sha256=S6Bq16oQDQ8BQgnZzA0zJHGN_BBr8iAM_WtGoLiEcwg,1283
|
275
275
|
ultralytics/utils/callbacks/tensorboard.py,sha256=_4nfGK1dDLn6ijpvphBDhc-AS8qhS3jjY2CAWB7SNF0,5283
|
276
276
|
ultralytics/utils/callbacks/wb.py,sha256=ngQO8EJ1kxJDF1YajScVtzBbm26jGuejA0uWeOyvf5A,7685
|
277
|
-
ultralytics-8.3.
|
278
|
-
ultralytics-8.3.
|
279
|
-
ultralytics-8.3.
|
280
|
-
ultralytics-8.3.
|
281
|
-
ultralytics-8.3.
|
282
|
-
ultralytics-8.3.
|
277
|
+
ultralytics-8.3.199.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
278
|
+
ultralytics-8.3.199.dist-info/METADATA,sha256=otTH4SnJ1YgGgkjfI2OQimGCmpdi9ox0C9iHIF0KRmo,37667
|
279
|
+
ultralytics-8.3.199.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
280
|
+
ultralytics-8.3.199.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
|
281
|
+
ultralytics-8.3.199.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
|
282
|
+
ultralytics-8.3.199.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|