dgenerate-ultralytics-headless 8.3.229__py3-none-any.whl → 8.3.231__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.
- {dgenerate_ultralytics_headless-8.3.229.dist-info → dgenerate_ultralytics_headless-8.3.231.dist-info}/METADATA +17 -19
- {dgenerate_ultralytics_headless-8.3.229.dist-info → dgenerate_ultralytics_headless-8.3.231.dist-info}/RECORD +41 -41
- ultralytics/__init__.py +1 -1
- ultralytics/data/augment.py +3 -131
- ultralytics/engine/model.py +0 -5
- ultralytics/engine/results.py +1 -68
- ultralytics/models/rtdetr/predict.py +1 -1
- ultralytics/models/sam/model.py +0 -4
- ultralytics/models/sam/modules/blocks.py +0 -51
- ultralytics/models/sam/modules/decoders.py +0 -10
- ultralytics/models/sam/modules/encoders.py +0 -44
- ultralytics/models/sam/modules/memory_attention.py +0 -12
- ultralytics/models/sam/modules/sam.py +0 -16
- ultralytics/models/sam/predict.py +1 -18
- ultralytics/models/yolo/classify/predict.py +1 -1
- ultralytics/models/yolo/classify/val.py +0 -6
- ultralytics/models/yolo/detect/predict.py +1 -1
- ultralytics/models/yolo/model.py +0 -5
- ultralytics/models/yolo/obb/predict.py +0 -6
- ultralytics/models/yolo/pose/predict.py +1 -13
- ultralytics/models/yolo/pose/train.py +1 -7
- ultralytics/models/yolo/pose/val.py +6 -17
- ultralytics/models/yolo/world/train_world.py +0 -18
- ultralytics/nn/autobackend.py +1 -1
- ultralytics/nn/text_model.py +0 -16
- ultralytics/trackers/bot_sort.py +0 -13
- ultralytics/trackers/byte_tracker.py +0 -11
- ultralytics/trackers/utils/gmc.py +0 -4
- ultralytics/trackers/utils/kalman_filter.py +0 -4
- ultralytics/utils/__init__.py +2 -1
- ultralytics/utils/benchmarks.py +0 -6
- ultralytics/utils/errors.py +0 -6
- ultralytics/utils/metrics.py +4 -1
- ultralytics/utils/plotting.py +5 -4
- ultralytics/utils/torch_utils.py +1 -1
- ultralytics/utils/tqdm.py +0 -5
- ultralytics/utils/triton.py +0 -4
- {dgenerate_ultralytics_headless-8.3.229.dist-info → dgenerate_ultralytics_headless-8.3.231.dist-info}/WHEEL +0 -0
- {dgenerate_ultralytics_headless-8.3.229.dist-info → dgenerate_ultralytics_headless-8.3.231.dist-info}/entry_points.txt +0 -0
- {dgenerate_ultralytics_headless-8.3.229.dist-info → dgenerate_ultralytics_headless-8.3.231.dist-info}/licenses/LICENSE +0 -0
- {dgenerate_ultralytics_headless-8.3.229.dist-info → dgenerate_ultralytics_headless-8.3.231.dist-info}/top_level.txt +0 -0
ultralytics/utils/benchmarks.py
CHANGED
|
@@ -423,12 +423,6 @@ class ProfileModels:
|
|
|
423
423
|
trt (bool): Flag to indicate whether to profile using TensorRT.
|
|
424
424
|
device (torch.device | str | None): Device used for profiling. If None, it is determined automatically.
|
|
425
425
|
|
|
426
|
-
Examples:
|
|
427
|
-
Initialize and profile models
|
|
428
|
-
>>> from ultralytics.utils.benchmarks import ProfileModels
|
|
429
|
-
>>> profiler = ProfileModels(["yolo11n.yaml", "yolov8s.yaml"], imgsz=640)
|
|
430
|
-
>>> profiler.run()
|
|
431
|
-
|
|
432
426
|
Notes:
|
|
433
427
|
FP16 'half' argument option removed for ONNX as slower on CPU than FP32.
|
|
434
428
|
"""
|
ultralytics/utils/errors.py
CHANGED
|
@@ -31,11 +31,5 @@ class HUBModelError(Exception):
|
|
|
31
31
|
|
|
32
32
|
Args:
|
|
33
33
|
message (str, optional): The error message to display when the exception is raised.
|
|
34
|
-
|
|
35
|
-
Examples:
|
|
36
|
-
>>> try:
|
|
37
|
-
... raise HUBModelError("Custom model error message")
|
|
38
|
-
... except HUBModelError as e:
|
|
39
|
-
... print(e)
|
|
40
34
|
"""
|
|
41
35
|
super().__init__(emojis(message))
|
ultralytics/utils/metrics.py
CHANGED
|
@@ -15,7 +15,10 @@ import torch
|
|
|
15
15
|
from ultralytics.utils import LOGGER, DataExportMixin, SimpleClass, TryExcept, checks, plt_settings
|
|
16
16
|
|
|
17
17
|
OKS_SIGMA = (
|
|
18
|
-
np.array(
|
|
18
|
+
np.array(
|
|
19
|
+
[0.26, 0.25, 0.25, 0.35, 0.35, 0.79, 0.79, 0.72, 0.72, 0.62, 0.62, 1.07, 1.07, 0.87, 0.87, 0.89, 0.89],
|
|
20
|
+
dtype=np.float32,
|
|
21
|
+
)
|
|
19
22
|
/ 10.0
|
|
20
23
|
)
|
|
21
24
|
|
ultralytics/utils/plotting.py
CHANGED
|
@@ -207,7 +207,7 @@ class Annotator:
|
|
|
207
207
|
elif im.shape[2] > 3: # multispectral
|
|
208
208
|
im = np.ascontiguousarray(im[..., :3])
|
|
209
209
|
if self.pil: # use PIL
|
|
210
|
-
self.im = im if input_is_pil else Image.fromarray(im)
|
|
210
|
+
self.im = im if input_is_pil else Image.fromarray(im) # stay in BGR since color palette is in BGR
|
|
211
211
|
if self.im.mode not in {"RGB", "RGBA"}: # multispectral
|
|
212
212
|
self.im = self.im.convert("RGB")
|
|
213
213
|
self.draw = ImageDraw.Draw(self.im, "RGBA")
|
|
@@ -515,9 +515,10 @@ class Annotator:
|
|
|
515
515
|
self.im = im if isinstance(im, Image.Image) else Image.fromarray(im)
|
|
516
516
|
self.draw = ImageDraw.Draw(self.im)
|
|
517
517
|
|
|
518
|
-
def result(self):
|
|
519
|
-
"""Return annotated image as array."""
|
|
520
|
-
|
|
518
|
+
def result(self, pil=False):
|
|
519
|
+
"""Return annotated image as array or PIL image."""
|
|
520
|
+
im = np.asarray(self.im) # self.im is in BGR
|
|
521
|
+
return Image.fromarray(im[..., ::-1]) if pil else im
|
|
521
522
|
|
|
522
523
|
def show(self, title: str | None = None):
|
|
523
524
|
"""Show the annotated image."""
|
ultralytics/utils/torch_utils.py
CHANGED
|
@@ -179,7 +179,7 @@ def select_device(device="", newline=False, verbose=True):
|
|
|
179
179
|
cpu = device == "cpu"
|
|
180
180
|
mps = device in {"mps", "mps:0"} # Apple Metal Performance Shaders (MPS)
|
|
181
181
|
if cpu or mps:
|
|
182
|
-
os.environ["CUDA_VISIBLE_DEVICES"] = "
|
|
182
|
+
os.environ["CUDA_VISIBLE_DEVICES"] = "" # force torch.cuda.is_available() = False
|
|
183
183
|
elif device: # non-cpu device requested
|
|
184
184
|
if device == "cuda":
|
|
185
185
|
device = "0"
|
ultralytics/utils/tqdm.py
CHANGED
|
@@ -109,11 +109,6 @@ class TQDM:
|
|
|
109
109
|
bar_format (str, optional): Custom bar format string.
|
|
110
110
|
initial (int, optional): Initial counter value.
|
|
111
111
|
**kwargs (Any): Additional keyword arguments for compatibility (ignored).
|
|
112
|
-
|
|
113
|
-
Examples:
|
|
114
|
-
>>> pbar = TQDM(range(100), desc="Processing")
|
|
115
|
-
>>> with TQDM(total=1000, unit="B", unit_scale=True) as pbar:
|
|
116
|
-
... pbar.update(1024) # Updates by 1KB
|
|
117
112
|
"""
|
|
118
113
|
# Disable if not verbose
|
|
119
114
|
if disable is None:
|
ultralytics/utils/triton.py
CHANGED
|
@@ -47,10 +47,6 @@ class TritonRemoteModel:
|
|
|
47
47
|
url (str): The URL of the Triton server.
|
|
48
48
|
endpoint (str, optional): The name of the model on the Triton server.
|
|
49
49
|
scheme (str, optional): The communication scheme ('http' or 'grpc').
|
|
50
|
-
|
|
51
|
-
Examples:
|
|
52
|
-
>>> model = TritonRemoteModel(url="localhost:8000", endpoint="yolov8", scheme="http")
|
|
53
|
-
>>> model = TritonRemoteModel(url="http://localhost:8000/yolov8")
|
|
54
50
|
"""
|
|
55
51
|
if not endpoint and not scheme: # Parse all args from URL string
|
|
56
52
|
splits = urlsplit(url)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|