ultralytics 8.3.129__py3-none-any.whl → 8.3.130__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 CHANGED
@@ -12,6 +12,7 @@ from ultralytics.cfg import TASK2DATA, TASK2MODEL, TASKS
12
12
  from ultralytics.utils import ASSETS, WEIGHTS_DIR
13
13
  from ultralytics.utils.autodevice import GPUInfo
14
14
  from ultralytics.utils.checks import check_amp
15
+ from ultralytics.utils.torch_utils import TORCH_1_13
15
16
 
16
17
  # Try to find idle devices if CUDA is available
17
18
  DEVICES = []
@@ -36,6 +37,40 @@ def test_amp():
36
37
  assert check_amp(model)
37
38
 
38
39
 
40
+ @pytest.mark.slow
41
+ @pytest.mark.skipif(not DEVICES, reason="No CUDA devices available")
42
+ @pytest.mark.parametrize(
43
+ "task, dynamic, int8, half, batch, simplify, nms",
44
+ [ # generate all combinations except for exclusion cases
45
+ (task, dynamic, int8, half, batch, simplify, nms)
46
+ for task, dynamic, int8, half, batch, simplify, nms in product(
47
+ TASKS, [True, False], [False], [False], [1, 2], [True, False], [True, False]
48
+ )
49
+ if not (
50
+ (int8 and half)
51
+ or (task == "classify" and nms)
52
+ or (task == "obb" and nms and not TORCH_1_13)
53
+ or (simplify and dynamic) # onnxslim is slow when dynamic=True
54
+ )
55
+ ],
56
+ )
57
+ def test_export_onnx_matrix(task, dynamic, int8, half, batch, simplify, nms):
58
+ """Test YOLO exports to ONNX format with various configurations and parameters."""
59
+ file = YOLO(TASK2MODEL[task]).export(
60
+ format="onnx",
61
+ imgsz=32,
62
+ dynamic=dynamic,
63
+ int8=int8,
64
+ half=half,
65
+ batch=batch,
66
+ simplify=simplify,
67
+ nms=nms,
68
+ device=DEVICES[0],
69
+ )
70
+ YOLO(file)([SOURCE] * batch, imgsz=64 if dynamic else 32, device=DEVICES[0]) # exported model inference
71
+ Path(file).unlink() # cleanup
72
+
73
+
39
74
  @pytest.mark.slow
40
75
  @pytest.mark.skipif(True, reason="CUDA export tests disabled pending additional Ultralytics GPU server availability")
41
76
  @pytest.mark.skipif(not DEVICES, reason="No CUDA devices available")
@@ -60,7 +95,7 @@ def test_export_engine_matrix(task, dynamic, int8, half, batch):
60
95
  batch=batch,
61
96
  data=TASK2DATA[task],
62
97
  workspace=1, # reduce workspace GB for less resource utilization during testing
63
- simplify=True, # use 'onnxslim'
98
+ simplify=True,
64
99
  device=DEVICES[0],
65
100
  )
66
101
  YOLO(file)([SOURCE] * batch, imgsz=64 if dynamic else 32, device=DEVICES[0]) # exported model inference
tests/test_exports.py CHANGED
@@ -83,7 +83,12 @@ def test_export_openvino_matrix(task, dynamic, int8, half, batch, nms):
83
83
  for task, dynamic, int8, half, batch, simplify, nms in product(
84
84
  TASKS, [True, False], [False], [False], [1, 2], [True, False], [True, False]
85
85
  )
86
- if not ((int8 and half) or (task == "classify" and nms) or (task == "obb" and nms and not TORCH_1_13))
86
+ if not (
87
+ (int8 and half)
88
+ or (task == "classify" and nms)
89
+ or (task == "obb" and nms and not TORCH_1_13)
90
+ or (simplify and dynamic) # onnxslim is slow when dynamic=True
91
+ )
87
92
  ],
88
93
  )
89
94
  def test_export_onnx_matrix(task, dynamic, int8, half, batch, simplify, nms):
ultralytics/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
- __version__ = "8.3.129"
3
+ __version__ = "8.3.130"
4
4
 
5
5
  import os
6
6
 
ultralytics/data/split.py CHANGED
@@ -1,3 +1,5 @@
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
1
3
  import random
2
4
  import shutil
3
5
  from pathlib import Path
@@ -159,9 +159,9 @@ class AutoBackend(nn.Module):
159
159
 
160
160
  # In-memory PyTorch model
161
161
  if nn_module:
162
- model = weights.to(device)
163
162
  if fuse:
164
- model = model.fuse(verbose=verbose)
163
+ weights = weights.fuse(verbose=verbose) # fuse before move to gpu
164
+ model = weights.to(device)
165
165
  if hasattr(model, "kpt_shape"):
166
166
  kpt_shape = model.kpt_shape # pose-only
167
167
  stride = max(int(model.stride.max()), 32) # model stride
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ultralytics
3
- Version: 8.3.129
3
+ Version: 8.3.130
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,13 +1,13 @@
1
1
  tests/__init__.py,sha256=xnMhv3O_DF1YrW4zk__ZywQzAaoTDjPKPoiI1Ktss1w,670
2
2
  tests/conftest.py,sha256=rsIAipRKfrVNoTaJ1LdpYue8AbcJ_fr3d3WIlM_6uXY,2982
3
3
  tests/test_cli.py,sha256=PtMFl5Lp_6ygBbYDJ1ndofz2k7ZYupMPEAiZw6aZVm8,5450
4
- tests/test_cuda.py,sha256=7HKiXWQM4hUdouksEB7DJILos0gb6St7fIGqx6YMkLQ,6448
4
+ tests/test_cuda.py,sha256=j07QZ92aeBhpw4s7zyCO18MOXrfEamsee20IWAa31JI,7739
5
5
  tests/test_engine.py,sha256=aGqZ8P7QO5C_nOa1b4FOyk92Ysdk5WiP-ST310Vyxys,4962
6
- tests/test_exports.py,sha256=dhZn86LdbapW15RthQF870LGxDjC1MUZhlGdBgPmgIQ,9716
6
+ tests/test_exports.py,sha256=UeeBloqYYGZNh520R3CR80XBxA9XFrNmbK9An6V6C4w,9838
7
7
  tests/test_integrations.py,sha256=dQteeRsRVuT_p5-T88-7jqT65Zm9iAXkyKg-KQ1_TQ8,6341
8
8
  tests/test_python.py,sha256=m3tV3atrc3DvXZ5S-_C1ief_pDo4KlLgudjc7rq26l0,25492
9
9
  tests/test_solutions.py,sha256=IFlqyOUCvGbLe_YZqWmNCe_afg4as0p-SfAv3j7VURI,6205
10
- ultralytics/__init__.py,sha256=_4qVIlYpTWD26kHO3m7mogbYWHEbBryrprY88PxyREg,730
10
+ ultralytics/__init__.py,sha256=64fj1defF4QiUjr6meA82WlVHVXXIXQgyMW8iXIvJZM,730
11
11
  ultralytics/assets/bus.jpg,sha256=wCAZxJecGR63Od3ZRERe9Aja1Weayrb9Ug751DS_vGM,137419
12
12
  ultralytics/assets/zidane.jpg,sha256=Ftc4aeMmen1O0A3o6GCDO9FlfBslLpTAw0gnetx7bts,50427
13
13
  ultralytics/cfg/__init__.py,sha256=We3ti0mvUQrGRmUPcufDGboW0YAO3nSRYuoWxGagk3M,39462
@@ -109,7 +109,7 @@ ultralytics/data/build.py,sha256=FVIkgLGv5n1C7SRDrQiKOMDcI7V59WmEihKslzvEISg,965
109
109
  ultralytics/data/converter.py,sha256=znXH2XTdo0Q4NDHMny1ydVBvrxKn2kbbwI-X5bn1MlQ,26890
110
110
  ultralytics/data/dataset.py,sha256=hbsjhmZBO-T1_gkUAm128kKowdwsLNwnK2lhnzmxJB8,34826
111
111
  ultralytics/data/loaders.py,sha256=MRu9ylvwLfBxX2eH4wRNvk4rNyUEIHBb8c0QyDOX-8c,28488
112
- ultralytics/data/split.py,sha256=6LHB1z8woXurWjXfM-Zm2thRr1KXvzR18CFJA-SDUvE,4677
112
+ ultralytics/data/split.py,sha256=6UFXcbVrzYVAPmFbl4FeZFJOkdbN3jQFepJxi_pD-I0,4748
113
113
  ultralytics/data/split_dota.py,sha256=ihG56YfNFZJDq1r7Zcgk8fKzde3gn21W0f67ub6nT68,11879
114
114
  ultralytics/data/utils.py,sha256=rScK5o-WgcjZ-x-WOHv5EnPWfl2-ZHCg-EdDImND9xs,35263
115
115
  ultralytics/data/scripts/download_weights.sh,sha256=0y8XtZxOru7dVThXDFUXLHBuICgOIqZNUwpyL4Rh6lg,595
@@ -192,7 +192,7 @@ ultralytics/models/yolo/yoloe/train.py,sha256=St3zw_XWRol9pODWU4lvKlJnWYr1lmWQNu
192
192
  ultralytics/models/yolo/yoloe/train_seg.py,sha256=l0SOMQQd0Y_EBBHhTNekgrQsftqhYyK4oWTdCg1dLrE,4633
193
193
  ultralytics/models/yolo/yoloe/val.py,sha256=oA8cVT3pBXF6aPZy7ITq0mDcktRuIgks8tTtqMRISyY,8431
194
194
  ultralytics/nn/__init__.py,sha256=rjociYD9lo_K-d-1s6TbdWklPLjTcEHk7OIlRDJstIE,615
195
- ultralytics/nn/autobackend.py,sha256=S5GVyEcDbZgoZXg_neeVU8ZNaJJbwTjgqzbLeMd1ols,39337
195
+ ultralytics/nn/autobackend.py,sha256=X2cxCytBu9fmniy8uJ5aZb28IukQ-uxV1INXeS1lclA,39368
196
196
  ultralytics/nn/tasks.py,sha256=0rnM6Z01BUnRtUwCkTwVsPxZ_D3A5tNbBjd7aEoxxns,62943
197
197
  ultralytics/nn/text_model.py,sha256=8_7SRejKZA4Pi-ha0gjcWrQDDCDMBhtwlg8pPMWgjDE,13145
198
198
  ultralytics/nn/modules/__init__.py,sha256=dXLtIk9rt944WfsTdpgEdWOg3HQEHdwQztuZ6WNJygs,3144
@@ -263,9 +263,9 @@ ultralytics/utils/callbacks/neptune.py,sha256=JaI95Cj2kIjUhlEEOiDN0-Drc-fDelLhNI
263
263
  ultralytics/utils/callbacks/raytune.py,sha256=A8amUGpux7dYES-L1iSeMoMXBySGWCD1aUqT7vcG-pU,1284
264
264
  ultralytics/utils/callbacks/tensorboard.py,sha256=jgYnym3cUQFAgN1GzTyO7l3jINtfAh8zhrllDvnLuVQ,5339
265
265
  ultralytics/utils/callbacks/wb.py,sha256=iDRFXI4IIDm8R5OI89DMTmjs8aHLo1HRCLkOFKdaMG4,7507
266
- ultralytics-8.3.129.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
267
- ultralytics-8.3.129.dist-info/METADATA,sha256=xdQN3VRwLipjzvY9QN9pfRfM14ipYkSxfP9qYaSbEEQ,37223
268
- ultralytics-8.3.129.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
269
- ultralytics-8.3.129.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
270
- ultralytics-8.3.129.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
271
- ultralytics-8.3.129.dist-info/RECORD,,
266
+ ultralytics-8.3.130.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
267
+ ultralytics-8.3.130.dist-info/METADATA,sha256=1SYa9favgLNsK7DMawetxQPYQl_w1dKplZsZpEH4TLA,37223
268
+ ultralytics-8.3.130.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
269
+ ultralytics-8.3.130.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
270
+ ultralytics-8.3.130.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
271
+ ultralytics-8.3.130.dist-info/RECORD,,