ultralytics 8.2.16__py3-none-any.whl → 8.2.17__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.2.16"
3
+ __version__ = "8.2.17"
4
4
 
5
5
  from ultralytics.data.explorer.explorer import Explorer
6
6
  from ultralytics.models import RTDETR, SAM, YOLO, YOLOWorld
@@ -94,7 +94,9 @@ class Results(SimpleClass):
94
94
  tojson(normalize=False): Converts detection results to JSON format.
95
95
  """
96
96
 
97
- def __init__(self, orig_img, path, names, boxes=None, masks=None, probs=None, keypoints=None, obb=None) -> None:
97
+ def __init__(
98
+ self, orig_img, path, names, boxes=None, masks=None, probs=None, keypoints=None, obb=None, speed=None
99
+ ) -> None:
98
100
  """
99
101
  Initialize the Results class.
100
102
 
@@ -115,7 +117,7 @@ class Results(SimpleClass):
115
117
  self.probs = Probs(probs) if probs is not None else None
116
118
  self.keypoints = Keypoints(keypoints, self.orig_shape) if keypoints is not None else None
117
119
  self.obb = OBB(obb, self.orig_shape) if obb is not None else None
118
- self.speed = {"preprocess": None, "inference": None, "postprocess": None} # milliseconds per image
120
+ self.speed = speed if speed is not None else {"preprocess": None, "inference": None, "postprocess": None}
119
121
  self.names = names
120
122
  self.path = path
121
123
  self.save_dir = None
@@ -180,8 +182,8 @@ class Results(SimpleClass):
180
182
  return self._apply("to", *args, **kwargs)
181
183
 
182
184
  def new(self):
183
- """Return a new Results object with the same image, path, and names."""
184
- return Results(orig_img=self.orig_img, path=self.path, names=self.names)
185
+ """Return a new Results object with the same image, path, names and speed."""
186
+ return Results(orig_img=self.orig_img, path=self.path, names=self.names, speed=self.speed)
185
187
 
186
188
  def plot(
187
189
  self,
@@ -515,7 +515,7 @@ def is_online() -> bool:
515
515
  import socket
516
516
 
517
517
  for dns in ("1.1.1.1", "8.8.8.8"): # check Cloudflare and Google DNS
518
- socket.create_connection(address=(dns, 80), timeout=1.0).close()
518
+ socket.create_connection(address=(dns, 80), timeout=2.0).close()
519
519
  return True
520
520
  return False
521
521
 
@@ -100,7 +100,7 @@ def _plot_curve(
100
100
 
101
101
  def _log_plots(plots, step):
102
102
  """Logs plots from the input dictionary if they haven't been logged already at the specified step."""
103
- for name, params in plots.items():
103
+ for name, params in plots.copy().items(): # shallow copy to prevent plots dict changing during iteration
104
104
  timestamp = params["timestamp"]
105
105
  if _processed_plots.get(name) != timestamp:
106
106
  wb.run.log({name.stem: wb.Image(str(name))}, step=step)
@@ -391,7 +391,7 @@ def check_requirements(requirements=ROOT.parent / "requirements.txt", exclude=()
391
391
  t = time.time()
392
392
  assert ONLINE, "AutoUpdate skipped (offline)"
393
393
  with Retry(times=2, delay=1): # run up to 2 times with 1-second retry delay
394
- LOGGER.info(subprocess.check_output(f"pip install --no-cache {s} {cmds}", shell=True).decode())
394
+ LOGGER.info(subprocess.check_output(f"pip install --no-cache-dir {s} {cmds}", shell=True).decode())
395
395
  dt = time.time() - t
396
396
  LOGGER.info(
397
397
  f"{prefix} AutoUpdate success ✅ {dt:.1f}s, installed {n} package{'s' * (n > 1)}: {pkgs}\n"
@@ -535,7 +535,8 @@ def check_imshow(warn=False):
535
535
  """Check if environment supports image displays."""
536
536
  try:
537
537
  if LINUX:
538
- assert "DISPLAY" in os.environ and not IS_DOCKER and not IS_COLAB and not IS_KAGGLE
538
+ assert not IS_COLAB and not IS_KAGGLE
539
+ assert "DISPLAY" in os.environ, "The DISPLAY environment variable isn't set."
539
540
  cv2.imshow("test", np.zeros((8, 8, 3), dtype=np.uint8)) # show a small 8-pixel image
540
541
  cv2.waitKey(1)
541
542
  cv2.destroyAllWindows()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ultralytics
3
- Version: 8.2.16
3
+ Version: 8.2.17
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
@@ -1,4 +1,4 @@
1
- ultralytics/__init__.py,sha256=U9gq2dVgJR4iYEqbeRhy4SDx2LIkYY0kzorgUp0siAA,633
1
+ ultralytics/__init__.py,sha256=G0Fr2DYO26jojNMc5L1Cj1hwMNfDIfVIM3BrrbrHY1o,633
2
2
  ultralytics/assets/bus.jpg,sha256=wCAZxJecGR63Od3ZRERe9Aja1Weayrb9Ug751DS_vGM,137419
3
3
  ultralytics/assets/zidane.jpg,sha256=Ftc4aeMmen1O0A3o6GCDO9FlfBslLpTAw0gnetx7bts,50427
4
4
  ultralytics/cfg/__init__.py,sha256=lR6jykSO_0cigsjrqSyFj_8JG_LvYi796viasyWhcfs,21358
@@ -81,7 +81,7 @@ ultralytics/engine/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7JI8grmQDT
81
81
  ultralytics/engine/exporter.py,sha256=2troO7ah3gAhHyQ2VCjFvaK9NBc6uleIVft5IRBjeFM,58122
82
82
  ultralytics/engine/model.py,sha256=IE6HE9VIzqO3DscxSLexub0LUR673eiPFrCPCt6ozEE,40103
83
83
  ultralytics/engine/predictor.py,sha256=wQRKdWGDTP5A6CS0gTC6U3RPDMhP3QkEzWSPm6eqCkU,17022
84
- ultralytics/engine/results.py,sha256=tVcViFF2pT1THaNaM6LIDxzhIQQ7SZf2NN-vKjLlN6Y,30919
84
+ ultralytics/engine/results.py,sha256=1ZY6eXb5uHmDShAXPmXZ-117ZlqeffEZLd2LqFgg8Ik,30975
85
85
  ultralytics/engine/trainer.py,sha256=P5XbPxh5hj4TLwuKeriuAlvcBWmILStm40-SgPrYvLk,35149
86
86
  ultralytics/engine/tuner.py,sha256=iZrgMmXSDpfuDu4bdFRflmAsscys2-8W8qAGxSyOVJE,11844
87
87
  ultralytics/engine/validator.py,sha256=Y21Uo8_Zto4qjk_YqQk6k7tyfpq_Qk9cfjeXeyDRxs8,14643
@@ -170,10 +170,10 @@ ultralytics/trackers/utils/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7J
170
170
  ultralytics/trackers/utils/gmc.py,sha256=vwcPA1n5zjPaBGhCDt8ItN7rq_6Sczsjn4gsXJfRylU,13688
171
171
  ultralytics/trackers/utils/kalman_filter.py,sha256=0oqhk59NKEiwcJ2FXnw6_sT4bIFC6Wu5IY2B-TGxJKU,15168
172
172
  ultralytics/trackers/utils/matching.py,sha256=UxhSGa5pN6WoYwYSBAkkt-O7xMxUR47VuUB6PfVNkb4,5404
173
- ultralytics/utils/__init__.py,sha256=BGA9z_s-MnB5DgzMPsGjBnC88582MiapOiFV09hplGs,39518
173
+ ultralytics/utils/__init__.py,sha256=AjzSdFGfEPMPyFFX9JaONkmI5xgWLHFMO77aBA0ghpM,39518
174
174
  ultralytics/utils/autobatch.py,sha256=ygZ3f2ByIkcujB89ENcTnGWWnAQw5Pbg6nBuShg-5t4,3863
175
175
  ultralytics/utils/benchmarks.py,sha256=PlnUqhl2Om7jp7bKICDj9a2ABpJSl31VFI3ESnGdme8,23552
176
- ultralytics/utils/checks.py,sha256=wppGRXSjjjCkdGkFUSzICiMpIQyo9kqbVTlwoEXLQcA,28076
176
+ ultralytics/utils/checks.py,sha256=lca-tqMVbMgsHXb_g-LaVqXv6zoDKFXHqc2SXvO0njM,28124
177
177
  ultralytics/utils/dist.py,sha256=3HeNbY2gp7vYhcvVhsrvTrQXpQmgT8tpmnzApf3eQRA,2267
178
178
  ultralytics/utils/downloads.py,sha256=cmO2Ev1DV1m_lYgQ2yGDG5xVRIBVS_z9nS_Frec_NeU,21496
179
179
  ultralytics/utils/errors.py,sha256=GqP_Jgj_n0paxn8OMhn3DTCgoNkB2WjUcUaqs-M6SQk,816
@@ -198,10 +198,10 @@ ultralytics/utils/callbacks/mlflow.py,sha256=AVuYE4UKA5Eeg8sffbkCOe4tGgtCvBlGG4D
198
198
  ultralytics/utils/callbacks/neptune.py,sha256=5Z3ua5YBTUS56FH8VQKQG1aaIo9fH8GEyzC5q7p4ipQ,3756
199
199
  ultralytics/utils/callbacks/raytune.py,sha256=ODVYzy-CoM4Uge0zjkh3Hnh9nF2M0vhDrSenXnvcizw,705
200
200
  ultralytics/utils/callbacks/tensorboard.py,sha256=Z1veCVcn9THPhdplWuIzwlsW2yF7y-On9IZIk3khM0Y,4135
201
- ultralytics/utils/callbacks/wb.py,sha256=woCQVuZzqtM5KnwxIibcfM3sFBYojeMPnv11jrRaIQA,6674
202
- ultralytics-8.2.16.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
203
- ultralytics-8.2.16.dist-info/METADATA,sha256=7V-oI3J4lEAQXotsnu38UXuKiSLljYqFHd2HWSeLDDs,40694
204
- ultralytics-8.2.16.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
205
- ultralytics-8.2.16.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
206
- ultralytics-8.2.16.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
207
- ultralytics-8.2.16.dist-info/RECORD,,
201
+ ultralytics/utils/callbacks/wb.py,sha256=DViD0KeXH_i3eVT_CLR4bZFs1TMMUZBVBBYIS3aUfp0,6745
202
+ ultralytics-8.2.17.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
203
+ ultralytics-8.2.17.dist-info/METADATA,sha256=GcIxwa4tBdg4vIjFyoAMvBvp04FpuhAF3hN8KWHt64o,40694
204
+ ultralytics-8.2.17.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
205
+ ultralytics-8.2.17.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
206
+ ultralytics-8.2.17.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
207
+ ultralytics-8.2.17.dist-info/RECORD,,