dgenerate-ultralytics-headless 8.3.190__py3-none-any.whl → 8.3.192__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.
Files changed (103) hide show
  1. {dgenerate_ultralytics_headless-8.3.190.dist-info → dgenerate_ultralytics_headless-8.3.192.dist-info}/METADATA +1 -1
  2. {dgenerate_ultralytics_headless-8.3.190.dist-info → dgenerate_ultralytics_headless-8.3.192.dist-info}/RECORD +103 -102
  3. tests/test_cuda.py +6 -5
  4. tests/test_exports.py +1 -6
  5. tests/test_python.py +1 -4
  6. tests/test_solutions.py +1 -1
  7. ultralytics/__init__.py +1 -1
  8. ultralytics/cfg/__init__.py +16 -14
  9. ultralytics/cfg/datasets/SKU-110K.yaml +1 -1
  10. ultralytics/cfg/datasets/VisDrone.yaml +4 -4
  11. ultralytics/data/annotator.py +6 -6
  12. ultralytics/data/augment.py +53 -51
  13. ultralytics/data/base.py +15 -13
  14. ultralytics/data/build.py +7 -4
  15. ultralytics/data/converter.py +9 -10
  16. ultralytics/data/dataset.py +24 -22
  17. ultralytics/data/loaders.py +13 -11
  18. ultralytics/data/split.py +4 -3
  19. ultralytics/data/split_dota.py +14 -12
  20. ultralytics/data/utils.py +29 -23
  21. ultralytics/engine/exporter.py +2 -2
  22. ultralytics/engine/model.py +16 -14
  23. ultralytics/engine/predictor.py +8 -6
  24. ultralytics/engine/results.py +54 -52
  25. ultralytics/engine/trainer.py +8 -3
  26. ultralytics/engine/tuner.py +230 -42
  27. ultralytics/hub/google/__init__.py +7 -6
  28. ultralytics/hub/session.py +8 -6
  29. ultralytics/hub/utils.py +3 -4
  30. ultralytics/models/fastsam/model.py +8 -6
  31. ultralytics/models/nas/model.py +5 -3
  32. ultralytics/models/rtdetr/train.py +4 -3
  33. ultralytics/models/rtdetr/val.py +6 -4
  34. ultralytics/models/sam/amg.py +13 -10
  35. ultralytics/models/sam/model.py +3 -2
  36. ultralytics/models/sam/modules/blocks.py +21 -21
  37. ultralytics/models/sam/modules/decoders.py +11 -11
  38. ultralytics/models/sam/modules/encoders.py +25 -25
  39. ultralytics/models/sam/modules/memory_attention.py +9 -8
  40. ultralytics/models/sam/modules/sam.py +8 -10
  41. ultralytics/models/sam/modules/tiny_encoder.py +21 -20
  42. ultralytics/models/sam/modules/transformer.py +6 -5
  43. ultralytics/models/sam/modules/utils.py +7 -5
  44. ultralytics/models/sam/predict.py +32 -31
  45. ultralytics/models/utils/loss.py +29 -27
  46. ultralytics/models/utils/ops.py +10 -8
  47. ultralytics/models/yolo/classify/train.py +9 -7
  48. ultralytics/models/yolo/classify/val.py +11 -9
  49. ultralytics/models/yolo/detect/predict.py +1 -1
  50. ultralytics/models/yolo/detect/train.py +8 -6
  51. ultralytics/models/yolo/detect/val.py +22 -20
  52. ultralytics/models/yolo/model.py +14 -14
  53. ultralytics/models/yolo/obb/train.py +5 -3
  54. ultralytics/models/yolo/obb/val.py +11 -9
  55. ultralytics/models/yolo/pose/train.py +7 -5
  56. ultralytics/models/yolo/pose/val.py +12 -10
  57. ultralytics/models/yolo/segment/train.py +4 -5
  58. ultralytics/models/yolo/segment/val.py +13 -11
  59. ultralytics/models/yolo/world/train.py +10 -8
  60. ultralytics/models/yolo/yoloe/train.py +10 -10
  61. ultralytics/models/yolo/yoloe/val.py +11 -9
  62. ultralytics/nn/autobackend.py +17 -19
  63. ultralytics/nn/modules/block.py +12 -12
  64. ultralytics/nn/modules/conv.py +4 -3
  65. ultralytics/nn/modules/head.py +41 -37
  66. ultralytics/nn/modules/transformer.py +22 -21
  67. ultralytics/nn/tasks.py +2 -2
  68. ultralytics/nn/text_model.py +6 -5
  69. ultralytics/solutions/analytics.py +7 -5
  70. ultralytics/solutions/config.py +12 -10
  71. ultralytics/solutions/distance_calculation.py +3 -3
  72. ultralytics/solutions/heatmap.py +4 -2
  73. ultralytics/solutions/object_counter.py +5 -3
  74. ultralytics/solutions/parking_management.py +4 -2
  75. ultralytics/solutions/region_counter.py +7 -5
  76. ultralytics/solutions/similarity_search.py +5 -3
  77. ultralytics/solutions/solutions.py +38 -36
  78. ultralytics/solutions/streamlit_inference.py +8 -7
  79. ultralytics/trackers/bot_sort.py +11 -9
  80. ultralytics/trackers/byte_tracker.py +17 -15
  81. ultralytics/trackers/utils/gmc.py +4 -3
  82. ultralytics/utils/__init__.py +16 -88
  83. ultralytics/utils/autobatch.py +3 -2
  84. ultralytics/utils/autodevice.py +10 -10
  85. ultralytics/utils/benchmarks.py +11 -10
  86. ultralytics/utils/callbacks/comet.py +9 -9
  87. ultralytics/utils/checks.py +17 -26
  88. ultralytics/utils/export.py +12 -11
  89. ultralytics/utils/files.py +8 -7
  90. ultralytics/utils/git.py +139 -0
  91. ultralytics/utils/instance.py +8 -7
  92. ultralytics/utils/loss.py +15 -13
  93. ultralytics/utils/metrics.py +62 -62
  94. ultralytics/utils/ops.py +3 -2
  95. ultralytics/utils/patches.py +6 -4
  96. ultralytics/utils/plotting.py +20 -18
  97. ultralytics/utils/torch_utils.py +4 -2
  98. ultralytics/utils/tqdm.py +18 -14
  99. ultralytics/utils/triton.py +3 -2
  100. {dgenerate_ultralytics_headless-8.3.190.dist-info → dgenerate_ultralytics_headless-8.3.192.dist-info}/WHEEL +0 -0
  101. {dgenerate_ultralytics_headless-8.3.190.dist-info → dgenerate_ultralytics_headless-8.3.192.dist-info}/entry_points.txt +0 -0
  102. {dgenerate_ultralytics_headless-8.3.190.dist-info → dgenerate_ultralytics_headless-8.3.192.dist-info}/licenses/LICENSE +0 -0
  103. {dgenerate_ultralytics_headless-8.3.190.dist-info → dgenerate_ultralytics_headless-8.3.192.dist-info}/top_level.txt +0 -0
ultralytics/utils/tqdm.py CHANGED
@@ -165,11 +165,18 @@ class TQDM:
165
165
 
166
166
  # For bytes with scaling, use binary units
167
167
  if self.unit in ("B", "bytes") and self.unit_scale:
168
- for threshold, unit in [(1073741824, "GB/s"), (1048576, "MB/s"), (1024, "KB/s")]: # 1 << 30, << 20, << 10
169
- if rate >= threshold:
170
- return f"{rate / threshold:.1f}{unit}"
171
- return f"{rate:.1f}B/s"
172
-
168
+ return next(
169
+ (
170
+ f"{rate / threshold:.1f}{unit}"
171
+ for threshold, unit in [
172
+ (1073741824, "GB/s"),
173
+ (1048576, "MB/s"),
174
+ (1024, "KB/s"),
175
+ ]
176
+ if rate >= threshold
177
+ ),
178
+ f"{rate:.1f}B/s",
179
+ )
173
180
  # For other scalable units, use decimal units
174
181
  if self.unit_scale and self.unit in ("it", "items", ""):
175
182
  for threshold, prefix in [(1000000, "M"), (1000, "K")]:
@@ -210,7 +217,7 @@ class TQDM:
210
217
  filled = int(frac * width)
211
218
  bar = "━" * filled + "─" * (width - filled)
212
219
  if filled < width and frac * width - filled > 0.5:
213
- bar = bar[:filled] + "" + bar[filled + 1 :]
220
+ bar = f"{bar[:filled]}{bar[filled + 1 :]}"
214
221
  return bar
215
222
 
216
223
  def _should_update(self, dt: float, dn: int) -> bool:
@@ -218,10 +225,7 @@ class TQDM:
218
225
  if self.noninteractive:
219
226
  return False
220
227
 
221
- if self.total and self.n >= self.total:
222
- return True
223
-
224
- return dt >= self.mininterval
228
+ return True if self.total and self.n >= self.total else dt >= self.mininterval
225
229
 
226
230
  def _display(self, final: bool = False) -> None:
227
231
  """Display progress bar."""
@@ -258,8 +262,9 @@ class TQDM:
258
262
 
259
263
  # Calculate remaining time
260
264
  remaining_str = ""
261
- if self.total and 0 < self.n < self.total and rate > 0:
262
- remaining_str = self._format_time((self.total - self.n) / rate)
265
+ if self.total and 0 < self.n < self.total and elapsed > 0:
266
+ est_rate = rate or self.n / elapsed
267
+ remaining_str = self._format_time((self.total - self.n) / est_rate)
263
268
 
264
269
  # Build progress components
265
270
  if self.total:
@@ -449,8 +454,7 @@ if __name__ == "__main__":
449
454
 
450
455
  def process_files():
451
456
  """Simulate processing files of unknown count."""
452
- files = [f"file_{i}.txt" for i in range(18)]
453
- return files
457
+ return [f"file_{i}.txt" for i in range(18)]
454
458
 
455
459
  pbar = TQDM(desc="Scanning files", unit="files")
456
460
  files = process_files()
@@ -1,6 +1,7 @@
1
1
  # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
- from typing import List
3
+ from __future__ import annotations
4
+
4
5
  from urllib.parse import urlsplit
5
6
 
6
7
  import numpy as np
@@ -86,7 +87,7 @@ class TritonRemoteModel:
86
87
  self.output_names = [x["name"] for x in config["output"]]
87
88
  self.metadata = eval(config.get("parameters", {}).get("metadata", {}).get("string_value", "None"))
88
89
 
89
- def __call__(self, *inputs: np.ndarray) -> List[np.ndarray]:
90
+ def __call__(self, *inputs: np.ndarray) -> list[np.ndarray]:
90
91
  """
91
92
  Call the model with the given inputs and return inference results.
92
93