ultralytics 8.3.3__py3-none-any.whl → 8.3.4__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.

ultralytics/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ultralytics YOLO 🚀, AGPL-3.0 license
2
2
 
3
- __version__ = "8.3.3"
3
+ __version__ = "8.3.4"
4
4
 
5
5
  import os
6
6
 
@@ -178,6 +178,16 @@ class Exporter:
178
178
  if fmt in {"mlmodel", "mlpackage", "mlprogram", "apple", "ios", "coreml"}: # 'coreml' aliases
179
179
  fmt = "coreml"
180
180
  fmts = tuple(export_formats()["Argument"][1:]) # available export formats
181
+ if fmt not in fmts:
182
+ import difflib
183
+
184
+ # Get the closest match if format is invalid
185
+ matches = difflib.get_close_matches(fmt, fmts, n=1, cutoff=0.6) # 60% similarity required to match
186
+ if matches:
187
+ LOGGER.warning(f"WARNING ⚠️ Invalid export format='{fmt}', updating to format='{matches[0]}'")
188
+ fmt = matches[0]
189
+ else:
190
+ raise ValueError(f"Invalid export format='{fmt}'. Valid formats are {fmts}")
181
191
  flags = [x == fmt for x in fmts]
182
192
  if sum(flags) != 1:
183
193
  raise ValueError(f"Invalid export format='{fmt}'. Valid formats are {fmts}")
@@ -12,7 +12,7 @@ import os
12
12
  import subprocess
13
13
  import time
14
14
  import warnings
15
- from copy import deepcopy
15
+ from copy import copy, deepcopy
16
16
  from datetime import datetime, timedelta
17
17
  from pathlib import Path
18
18
 
@@ -749,7 +749,7 @@ class BaseTrainer:
749
749
  self.train_loader.dataset.mosaic = False
750
750
  if hasattr(self.train_loader.dataset, "close_mosaic"):
751
751
  LOGGER.info("Closing dataloader mosaic")
752
- self.train_loader.dataset.close_mosaic(hyp=self.args)
752
+ self.train_loader.dataset.close_mosaic(hyp=copy(self.args))
753
753
 
754
754
  def build_optimizer(self, model, name="auto", lr=0.001, momentum=0.9, decay=1e-5, iterations=1e5):
755
755
  """
@@ -196,6 +196,7 @@ class Predictor(BasePredictor):
196
196
  bboxes = self.prompts.pop("bboxes", bboxes)
197
197
  points = self.prompts.pop("points", points)
198
198
  masks = self.prompts.pop("masks", masks)
199
+ labels = self.prompts.pop("labels", labels)
199
200
 
200
201
  if all(i is None for i in [bboxes, points, masks]):
201
202
  return self.generate(im, *args, **kwargs)
@@ -1030,6 +1030,7 @@ def set_sentry():
1030
1030
  sentry_sdk.init(
1031
1031
  dsn="https://888e5a0778212e1d0314c37d4b9aae5d@o4504521589325824.ingest.us.sentry.io/4504521592406016",
1032
1032
  debug=False,
1033
+ auto_enabling_integrations=False,
1033
1034
  traces_sample_rate=1.0,
1034
1035
  release=__version__,
1035
1036
  environment="production", # 'dev' or 'production'
@@ -170,6 +170,8 @@ def select_device(device="", batch=0, newline=False, verbose=True):
170
170
  elif device: # non-cpu device requested
171
171
  if device == "cuda":
172
172
  device = "0"
173
+ if "," in device:
174
+ device = ",".join([x for x in device.split(",") if x]) # remove sequential commas, i.e. "0,,1" -> "0,1"
173
175
  visible = os.environ.get("CUDA_VISIBLE_DEVICES", None)
174
176
  os.environ["CUDA_VISIBLE_DEVICES"] = device # set environment variable - must be before assert is_available()
175
177
  if not (torch.cuda.is_available() and torch.cuda.device_count() >= len(device.split(","))):
@@ -191,7 +193,7 @@ def select_device(device="", batch=0, newline=False, verbose=True):
191
193
  )
192
194
 
193
195
  if not cpu and not mps and torch.cuda.is_available(): # prefer GPU if available
194
- devices = device.split(",") if device else "0" # range(torch.cuda.device_count()) # i.e. 0,1,6,7
196
+ devices = device.split(",") if device else "0" # i.e. "0,1" -> ["0", "1"]
195
197
  n = len(devices) # device count
196
198
  if n > 1: # multi-GPU
197
199
  if batch < 1:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ultralytics
3
- Version: 8.3.3
3
+ Version: 8.3.4
4
4
  Summary: Ultralytics YOLO for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
5
5
  Author: Ayush Chaurasia
6
6
  Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>, Jing Qiu <jing.qiu@ultralytics.com>
@@ -33,7 +33,7 @@ Classifier: Operating System :: Microsoft :: Windows
33
33
  Requires-Python: >=3.8
34
34
  Description-Content-Type: text/markdown
35
35
  License-File: LICENSE
36
- Requires-Dist: numpy<2.0.0,>=1.23.0
36
+ Requires-Dist: numpy>=1.23.0
37
37
  Requires-Dist: matplotlib>=3.3.0
38
38
  Requires-Dist: opencv-python>=4.6.0
39
39
  Requires-Dist: pillow>=7.1.2
@@ -76,6 +76,7 @@ Requires-Dist: numpy==1.23.5; platform_machine == "aarch64" and extra == "export
76
76
  Requires-Dist: h5py!=3.11.0; platform_machine == "aarch64" and extra == "export"
77
77
  Requires-Dist: tensorstore>=0.1.63; (platform_machine == "aarch64" and python_version >= "3.9") and extra == "export"
78
78
  Requires-Dist: coremltools>=7.0; (platform_system != "Windows" and python_version <= "3.11") and extra == "export"
79
+ Requires-Dist: scikit-learn>=1.3.2; (platform_system != "Windows" and python_version <= "3.11") and extra == "export"
79
80
  Provides-Extra: extra
80
81
  Requires-Dist: hub-sdk>=0.0.12; extra == "extra"
81
82
  Requires-Dist: ipython; extra == "extra"
@@ -8,7 +8,7 @@ tests/test_exports.py,sha256=fpTKEVBUGLF3WiZPNKRs-IEcIY4cfxgvgKjUNfodjww,8042
8
8
  tests/test_integrations.py,sha256=f5-QCUk1SU_-qn4mBCZwS3GN3tXEBIIXo4z2EhExbHw,6126
9
9
  tests/test_python.py,sha256=I1RRdCwLdrc3jX06huVxct8HX8ccQOmQgVpuEflRl0U,23560
10
10
  tests/test_solutions.py,sha256=eAaLf1wM7IJ6DjT7NEw6sRaeDuTX0ZgsTjrI33XFCXE,3300
11
- ultralytics/__init__.py,sha256=EBK5aoP9DP2M_QXggxoUlGqceIsrS3Pv0LXlAQforQU,693
11
+ ultralytics/__init__.py,sha256=JkiE8I9-uPGkhvc3KD7MpGn6E2kVJQCe1o-nZlJrriQ,693
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=62PSSAa0W4-gAEcRNKoKbcxUWBeFNs0ss2O4XJQhOPY,33145
@@ -104,11 +104,11 @@ ultralytics/data/explorer/utils.py,sha256=EvvukQiQUTBrsZznmMnyEX2EqTuwZo_Geyc8yf
104
104
  ultralytics/data/explorer/gui/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7JI8grmQDTs,42
105
105
  ultralytics/data/explorer/gui/dash.py,sha256=vZ476NaUH4FKU08rAJ1K9WNyKtg0soMyJJxqg176yWc,10498
106
106
  ultralytics/engine/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7JI8grmQDTs,42
107
- ultralytics/engine/exporter.py,sha256=BFYvv763kbEm5q0-AYIh979vL0ccU4RNvON2w8qtm1s,57019
107
+ ultralytics/engine/exporter.py,sha256=qhuPMBjBDVj9Qaa2qJYR954a-YS4BJtVN9jJeyFzyOg,57527
108
108
  ultralytics/engine/model.py,sha256=TDuy9JzzyvOaq5aKVljL_MFRKBDMCFwaLo3JD_d45CU,51462
109
109
  ultralytics/engine/predictor.py,sha256=MgMWHUJdRcVCaVmOyvdy2Gjk_EyRHv-ar0SSGxQe8F4,17471
110
110
  ultralytics/engine/results.py,sha256=8RJlN8J-_9w-mrDZm9wC-DZJTPBS7v1c_r_R173QyRM,75043
111
- ultralytics/engine/trainer.py,sha256=lBMKJDpu8owE0eeNkAsYszbAROk-WOB3vlhoGB1Vicc,36971
111
+ ultralytics/engine/trainer.py,sha256=O2xCZ6mriLfPhU2IRe8XCCyZiI5A_AknjpQw3O5bAIE,36983
112
112
  ultralytics/engine/tuner.py,sha256=gPqDTHH7vRB2O3YyH26m1BjVKbXxuA2XAlPRzTKFZsc,11838
113
113
  ultralytics/engine/validator.py,sha256=483Ad87Irk7IBlJNLu2SQAJsb7YriALTX9GIgriCmRg,14650
114
114
  ultralytics/hub/__init__.py,sha256=3SKvZ5aRina3h94xMPQIB3D4maF62qFcyIqPPHRHNAc,5644
@@ -135,7 +135,7 @@ ultralytics/models/sam/__init__.py,sha256=o4_D6y8YJlOXIK7Lwo9RHnIJJ9xoFNi4zK99QS
135
135
  ultralytics/models/sam/amg.py,sha256=GrmO_8YfIDt_QkPEMF_WFjPZkhwhf7iwx7ig8JgOUnE,8709
136
136
  ultralytics/models/sam/build.py,sha256=np9vP7AETCZA2Wdds-uj2eQKVnpHQaVpRrE2-U2uMTI,12153
137
137
  ultralytics/models/sam/model.py,sha256=2KFUp8SHiqOgwUjkdqdau0oduJwKQxm4N9GHWjdhUFo,7382
138
- ultralytics/models/sam/predict.py,sha256=unsoNrEx6pexKD28-HTpALa02PtNtE4e2ERdzs9qbYw,38556
138
+ ultralytics/models/sam/predict.py,sha256=_spP0uYNFzUnybwBvzZhF3iEMwvAi6bxryRdUwxwweM,38608
139
139
  ultralytics/models/sam/modules/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7JI8grmQDTs,42
140
140
  ultralytics/models/sam/modules/blocks.py,sha256=Q-KwhFbdyZhl1tjG_kP2LcQkZbzoNt618i-NRrKNx2Y,45919
141
141
  ultralytics/models/sam/modules/decoders.py,sha256=mODsqnTN_CjE3H0Sh9cd8PfTnHANPjGB1bjqHxfezSg,25830
@@ -202,7 +202,7 @@ ultralytics/trackers/utils/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7J
202
202
  ultralytics/trackers/utils/gmc.py,sha256=VcURuY041qGCeWUGMxHZBr10T16LtcMqyv7AmTfE1MY,14557
203
203
  ultralytics/trackers/utils/kalman_filter.py,sha256=cH9zD3fwkuezP97H9mw8cSBN7a8hHKx_Sx1j7t3oYGs,21349
204
204
  ultralytics/trackers/utils/matching.py,sha256=3Ie1WNNRZ4_q3365F03XD7Nr9juZB_08mw4yUKC3w74,7162
205
- ultralytics/utils/__init__.py,sha256=R2VpuwIfwpTSTX2T_MFdW1tNdX27FZW5XAH984tjR1Q,48834
205
+ ultralytics/utils/__init__.py,sha256=jGfv0ejbMp1hYcxeZtbcCtTIyW4UpzfdvAikyC2xubQ,48880
206
206
  ultralytics/utils/autobatch.py,sha256=AXboYfNSnTGsYj5FmgGYPQd0crfkeleyms6QXQfZGQ4,4194
207
207
  ultralytics/utils/benchmarks.py,sha256=8FYp5WPzcxcDaeg8ol2sgzRBHVGYatEO7f3MrmPF6nI,25097
208
208
  ultralytics/utils/checks.py,sha256=tiwVY1SCf7AlDOUQDh6fJlmhQ3CxQEqLUrXRvwRBoKs,28998
@@ -217,7 +217,7 @@ ultralytics/utils/ops.py,sha256=dsXNdyrYx_p6io6zezig9p84dxS7U-10vceHNVu2IL0,3288
217
217
  ultralytics/utils/patches.py,sha256=J-iOwIRbfUs-inBZerhnXby5tUKjYcOIyvhLTS352JE,3270
218
218
  ultralytics/utils/plotting.py,sha256=Sqs9Q7mhenCsFed_oyw_64wgvd0TTae9L3Lc4g2_lSI,62296
219
219
  ultralytics/utils/tal.py,sha256=ECsu95xEqOItmxMDN4YTD3FsUiIsQNWy0pZC3TfvFfk,16877
220
- ultralytics/utils/torch_utils.py,sha256=tqOyNnUZbLBOIueSWwljZua65cz6_RvClxYv8gNHIw0,29673
220
+ ultralytics/utils/torch_utils.py,sha256=RsTzm3__J4K1OUaxqc32O9WT6azcl4hPNkDdxhEp3q4,29792
221
221
  ultralytics/utils/triton.py,sha256=gg1finxno_tY2Ge9PMhmu7PI9wvoFZoiicdT4Bhqv3w,3936
222
222
  ultralytics/utils/tuner.py,sha256=AtEtK6pOt9xVTyx864OpNRVxNdAxz5aKHzveiXwkD1A,6250
223
223
  ultralytics/utils/callbacks/__init__.py,sha256=YrWqC3BVVaTLob4iCPR6I36mUxIUOpPJW7B_LjT78Qw,214
@@ -231,9 +231,9 @@ ultralytics/utils/callbacks/neptune.py,sha256=5Z3ua5YBTUS56FH8VQKQG1aaIo9fH8GEyz
231
231
  ultralytics/utils/callbacks/raytune.py,sha256=ODVYzy-CoM4Uge0zjkh3Hnh9nF2M0vhDrSenXnvcizw,705
232
232
  ultralytics/utils/callbacks/tensorboard.py,sha256=0kn4IR10no99UCIheojWRujgybmUHSx5fPI6Vsq6l_g,4135
233
233
  ultralytics/utils/callbacks/wb.py,sha256=9-fjQIdLjr3b73DTE3rHO171KvbH1VweJ-bmbv-rqTw,6747
234
- ultralytics-8.3.3.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
235
- ultralytics-8.3.3.dist-info/METADATA,sha256=K4q0V89-JTwWjGWue29_CsVQH9AhLpZVmt3b61x-iMc,34574
236
- ultralytics-8.3.3.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
237
- ultralytics-8.3.3.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
238
- ultralytics-8.3.3.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
239
- ultralytics-8.3.3.dist-info/RECORD,,
234
+ ultralytics-8.3.4.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
235
+ ultralytics-8.3.4.dist-info/METADATA,sha256=oNkPldiv138BEelfph38kxAuGZAOiadiFH5Z2B3B6MY,34685
236
+ ultralytics-8.3.4.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
237
+ ultralytics-8.3.4.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
238
+ ultralytics-8.3.4.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
239
+ ultralytics-8.3.4.dist-info/RECORD,,