ultralytics 8.2.84__py3-none-any.whl → 8.2.85__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 ultralytics might be problematic. Click here for more details.

tests/test_explorer.py CHANGED
@@ -5,9 +5,11 @@ import pytest
5
5
 
6
6
  from ultralytics import Explorer
7
7
  from ultralytics.utils import ASSETS
8
+ from ultralytics.utils.torch_utils import TORCH_1_13
8
9
 
9
10
 
10
11
  @pytest.mark.slow
12
+ @pytest.mark.skipif(not TORCH_1_13, reason="Explorer requires torch>=1.13")
11
13
  def test_similarity():
12
14
  """Test the correctness and response length of similarity calculations and SQL queries in the Explorer."""
13
15
  exp = Explorer(data="coco8.yaml")
@@ -25,6 +27,7 @@ def test_similarity():
25
27
 
26
28
 
27
29
  @pytest.mark.slow
30
+ @pytest.mark.skipif(not TORCH_1_13, reason="Explorer requires torch>=1.13")
28
31
  def test_det():
29
32
  """Test detection functionalities and verify embedding table includes bounding boxes."""
30
33
  exp = Explorer(data="coco8.yaml", model="yolov8n.pt")
@@ -38,6 +41,7 @@ def test_det():
38
41
 
39
42
 
40
43
  @pytest.mark.slow
44
+ @pytest.mark.skipif(not TORCH_1_13, reason="Explorer requires torch>=1.13")
41
45
  def test_seg():
42
46
  """Test segmentation functionalities and ensure the embedding table includes segmentation masks."""
43
47
  exp = Explorer(data="coco8-seg.yaml", model="yolov8n-seg.pt")
@@ -50,6 +54,7 @@ def test_seg():
50
54
 
51
55
 
52
56
  @pytest.mark.slow
57
+ @pytest.mark.skipif(not TORCH_1_13, reason="Explorer requires torch>=1.13")
53
58
  def test_pose():
54
59
  """Test pose estimation functionality and verify the embedding table includes keypoints."""
55
60
  exp = Explorer(data="coco8-pose.yaml", model="yolov8n-pose.pt")
ultralytics/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ultralytics YOLO 🚀, AGPL-3.0 license
2
2
 
3
- __version__ = "8.2.84"
3
+ __version__ = "8.2.85"
4
4
 
5
5
  import os
6
6
 
@@ -204,8 +204,9 @@ class Exporter:
204
204
  self.args.half = False
205
205
  assert not self.args.dynamic, "half=True not compatible with dynamic=True, i.e. use only one."
206
206
  self.imgsz = check_imgsz(self.args.imgsz, stride=model.stride, min_dim=2) # check image size
207
- if self.args.int8 and (engine or xml):
207
+ if self.args.int8 and not self.args.dynamic and (engine or xml):
208
208
  self.args.dynamic = True # enforce dynamic to export TensorRT INT8; ensures ONNX is dynamic
209
+ LOGGER.warning("WARNING ⚠️ INT8 export requires dynamic image sizes, setting dynamic=True.")
209
210
  if self.args.optimize:
210
211
  assert not ncnn, "optimize=True not compatible with format='ncnn', i.e. use optimize=False"
211
212
  assert self.device.type == "cpu", "optimize=True not compatible with cuda devices, i.e. use device='cpu'"
@@ -248,6 +249,7 @@ class Exporter:
248
249
  m.dynamic = self.args.dynamic
249
250
  m.export = True
250
251
  m.format = self.args.format
252
+ m.max_det = self.args.max_det
251
253
  elif isinstance(m, C2f) and not is_tf_format:
252
254
  # EdgeTPU does not support FlexSplitV while split provides cleaner ONNX graph
253
255
  m.forward = m.forward_split
@@ -144,12 +144,12 @@ class Detect(nn.Module):
144
144
  (torch.Tensor): Processed predictions with shape (batch_size, min(max_det, num_anchors), 6) and last
145
145
  dimension format [x, y, w, h, max_class_prob, class_index].
146
146
  """
147
- batch_size, anchors, predictions = preds.shape # i.e. shape(16,8400,84)
147
+ batch_size, anchors, _ = preds.shape # i.e. shape(16,8400,84)
148
148
  boxes, scores = preds.split([4, nc], dim=-1)
149
149
  index = scores.amax(dim=-1).topk(min(max_det, anchors))[1].unsqueeze(-1)
150
150
  boxes = boxes.gather(dim=1, index=index.repeat(1, 1, 4))
151
151
  scores = scores.gather(dim=1, index=index.repeat(1, 1, nc))
152
- scores, index = scores.flatten(1).topk(max_det)
152
+ scores, index = scores.flatten(1).topk(min(max_det, anchors))
153
153
  i = torch.arange(batch_size)[..., None] # batch indices
154
154
  return torch.cat([boxes[i, index // nc], scores[..., None], (index % nc)[..., None].float()], dim=-1)
155
155
 
ultralytics/utils/ops.py CHANGED
@@ -218,7 +218,7 @@ def non_max_suppression(
218
218
  classes = torch.tensor(classes, device=prediction.device)
219
219
 
220
220
  if prediction.shape[-1] == 6: # end-to-end model (BNC, i.e. 1,300,6)
221
- output = [pred[pred[:, 4] > conf_thres] for pred in prediction]
221
+ output = [pred[pred[:, 4] > conf_thres][:max_det] for pred in prediction]
222
222
  if classes is not None:
223
223
  output = [pred[(pred[:, 5:6] == classes).any(1)] for pred in output]
224
224
  return output
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ultralytics
3
- Version: 8.2.84
3
+ Version: 8.2.85
4
4
  Summary: Ultralytics YOLOv8 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
5
5
  Author: Glenn Jocher, Ayush Chaurasia, Jing Qiu
6
6
  Maintainer: Glenn Jocher, Ayush Chaurasia, Jing Qiu
@@ -55,7 +55,7 @@ Requires-Dist: mkdocs-material>=9.5.9; extra == "dev"
55
55
  Requires-Dist: mkdocstrings[python]; extra == "dev"
56
56
  Requires-Dist: mkdocs-jupyter; extra == "dev"
57
57
  Requires-Dist: mkdocs-redirects; extra == "dev"
58
- Requires-Dist: mkdocs-ultralytics-plugin>=0.1.2; extra == "dev"
58
+ Requires-Dist: mkdocs-ultralytics-plugin>=0.1.6; extra == "dev"
59
59
  Requires-Dist: mkdocs-macros-plugin>=1.0.5; extra == "dev"
60
60
  Provides-Extra: explorer
61
61
  Requires-Dist: lancedb; extra == "explorer"
@@ -3,12 +3,12 @@ tests/conftest.py,sha256=3ZtD4VlMKK5jVJwIPCrNAcG63vywJzdLq7U2AfYR2VI,2919
3
3
  tests/test_cli.py,sha256=as6cuNdDF2s_h3DxVXKmy45V3DXWB6y40xect93TKHc,4810
4
4
  tests/test_cuda.py,sha256=uD-ddNEcBMFQmQ9iE4fIGh0EIcGwEoDEUNVCEHicaWE,5133
5
5
  tests/test_engine.py,sha256=xW-UT9_9xZp-7-hSnbJgMw_ezTk6NqTOIiA59XZDmxA,4934
6
- tests/test_explorer.py,sha256=NcxSJeB6FxwkN09hQl7nnQL--HjfHB_WcZk0mEmBNHI,2215
6
+ tests/test_explorer.py,sha256=IMFvZ9uMoEXVC5FwdaVh0821wBgs7muVF6aw1F-auAI,2572
7
7
  tests/test_exports.py,sha256=Uezf3OatpPHlo5qoPw-2kqkZxuMCF9L4XF2riD4vmII,8225
8
8
  tests/test_integrations.py,sha256=xglcfMPjfVh346PV8WTpk6tBxraCXEFJEQyyJMr5tyU,6064
9
9
  tests/test_python.py,sha256=SxBf5GNu7vXQP8QxTlSOzCzcQNN0PLA6EX8M33VDHsU,21927
10
10
  tests/test_solutions.py,sha256=p_2edhl96Ty3jwzSf02Q2m2mTu9skc0Z-eMcUuuXfLg,3300
11
- ultralytics/__init__.py,sha256=YbOKlDA48wG1Ggkk8XH3ZxSQHQ2ys3jxPb9nb-H0lhk,694
11
+ ultralytics/__init__.py,sha256=CYC3oYkIVt9BRuPGKa6heCwh_I4xsSvaUgy7ObTtOpo,694
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=pkB7wk0pHOA3xzKzMbS-hA0iJoPOWVNnwZJh0LuWh-w,33089
@@ -98,7 +98,7 @@ ultralytics/data/explorer/utils.py,sha256=EvvukQiQUTBrsZznmMnyEX2EqTuwZo_Geyc8yf
98
98
  ultralytics/data/explorer/gui/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7JI8grmQDTs,42
99
99
  ultralytics/data/explorer/gui/dash.py,sha256=vZ476NaUH4FKU08rAJ1K9WNyKtg0soMyJJxqg176yWc,10498
100
100
  ultralytics/engine/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7JI8grmQDTs,42
101
- ultralytics/engine/exporter.py,sha256=R46KseDRaSoPo8NTZX2yybxjJoLP8KCXIgMHNagE314,58888
101
+ ultralytics/engine/exporter.py,sha256=e7j3RBTtXyZaLnzmm7kLdgeIqa1yHOEeotd9h2WxFH8,59069
102
102
  ultralytics/engine/model.py,sha256=AB9tu7kJW-QiTAp0F_J8KQJ4FijsHXcYBTaVHb7aMrg,52281
103
103
  ultralytics/engine/predictor.py,sha256=TtCOhjCOAz4iUXog8V2h_3VhsKPJM8HmP3i6W_qqdhk,17460
104
104
  ultralytics/engine/results.py,sha256=PgRcz90S7eMwlogqEvax8O1sU3CPA2tEmrAL5kSr6II,70537
@@ -174,7 +174,7 @@ ultralytics/nn/modules/__init__.py,sha256=m8x-XRHVLWMECPeysVlv1TQenV-n8oAbK1gxno
174
174
  ultralytics/nn/modules/activation.py,sha256=RS0DRDm9r56tojN79X8UBVtiktde9Wasw7GIbiopSMk,945
175
175
  ultralytics/nn/modules/block.py,sha256=NGCF4giEy0POEF0m-b3DCPqiYpOWRv4c4jcBvFkIErw,34378
176
176
  ultralytics/nn/modules/conv.py,sha256=zAnLM2G3PkfhcPvh9J4TBOZqeN9xAnxV821oFNOsAGQ,12693
177
- ultralytics/nn/modules/head.py,sha256=kAWlJ2nvh2n9nMrkh9g2ZPrhVztssbOYJREuGfsDtIM,26452
177
+ ultralytics/nn/modules/head.py,sha256=C_toYU2yvDs9pCNhIwh3yr0D68_-V75L6BcBwZIPQkU,26456
178
178
  ultralytics/nn/modules/transformer.py,sha256=tGiK8NmPfswwW1rbF21r5ILUkkZQ6Nk4s8j16vFBmps,18069
179
179
  ultralytics/nn/modules/utils.py,sha256=a88cKl2wz1nMVSEBiajtvaCbDBQIkESWOKTZ_WAJy90,3195
180
180
  ultralytics/solutions/__init__.py,sha256=6RDeXWO1QSaMgCq8YrWXaj2xvPw2sJwJL_a0dgjCvz0,648
@@ -207,7 +207,7 @@ ultralytics/utils/files.py,sha256=zxKNaH6YJvGKrD4DVPk0kkoo44Q7Xi-n_1Fy48TzTxw,82
207
207
  ultralytics/utils/instance.py,sha256=QSms7mPHZ5e8JGuJYLohLWltzI0aBE8dob2rOUK4RtM,16249
208
208
  ultralytics/utils/loss.py,sha256=mDHGmF-gjggAUVhI1dkCm7TtfZHCwz25XKm4M2xJKLs,33916
209
209
  ultralytics/utils/metrics.py,sha256=OIRyet-EvUwzo1baad-aeQ90H0w9cHANNTfUkqhuc_M,53927
210
- ultralytics/utils/ops.py,sha256=zeONcBrEKCuQMMidgYBO1mMkqkq_TsPSsifwB_ctia8,32878
210
+ ultralytics/utils/ops.py,sha256=dsXNdyrYx_p6io6zezig9p84dxS7U-10vceHNVu2IL0,32888
211
211
  ultralytics/utils/patches.py,sha256=Oo3DkP7MbXnNGvPfoFSocAkVvaPh9kwMT_9RQUfjVhI,3594
212
212
  ultralytics/utils/plotting.py,sha256=m-JR-kAS_l3i-Dy1sFnGxfJuGGb0jlJZWZKORQtYZtQ,56183
213
213
  ultralytics/utils/tal.py,sha256=ECsu95xEqOItmxMDN4YTD3FsUiIsQNWy0pZC3TfvFfk,16877
@@ -225,9 +225,9 @@ ultralytics/utils/callbacks/neptune.py,sha256=5Z3ua5YBTUS56FH8VQKQG1aaIo9fH8GEyz
225
225
  ultralytics/utils/callbacks/raytune.py,sha256=ODVYzy-CoM4Uge0zjkh3Hnh9nF2M0vhDrSenXnvcizw,705
226
226
  ultralytics/utils/callbacks/tensorboard.py,sha256=0kn4IR10no99UCIheojWRujgybmUHSx5fPI6Vsq6l_g,4135
227
227
  ultralytics/utils/callbacks/wb.py,sha256=9-fjQIdLjr3b73DTE3rHO171KvbH1VweJ-bmbv-rqTw,6747
228
- ultralytics-8.2.84.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
229
- ultralytics-8.2.84.dist-info/METADATA,sha256=NPkRQek_u6FUwJA7J-GnbT4OSmqxRJYZTR6CIWVTE24,41778
230
- ultralytics-8.2.84.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
231
- ultralytics-8.2.84.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
232
- ultralytics-8.2.84.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
233
- ultralytics-8.2.84.dist-info/RECORD,,
228
+ ultralytics-8.2.85.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
229
+ ultralytics-8.2.85.dist-info/METADATA,sha256=42tXAY42rYGY7Fg9wVlixKhq8Tw7VKCoaTl9_o8860s,41778
230
+ ultralytics-8.2.85.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
231
+ ultralytics-8.2.85.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
232
+ ultralytics-8.2.85.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
233
+ ultralytics-8.2.85.dist-info/RECORD,,