ultralytics 8.3.124__py3-none-any.whl → 8.3.125__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.
- tests/test_python.py +5 -8
- ultralytics/__init__.py +1 -1
- ultralytics/cfg/__init__.py +4 -5
- ultralytics/cfg/default.yaml +2 -2
- ultralytics/data/utils.py +7 -7
- ultralytics/engine/exporter.py +7 -7
- ultralytics/engine/model.py +3 -3
- ultralytics/engine/trainer.py +2 -2
- ultralytics/engine/tuner.py +3 -3
- ultralytics/hub/session.py +1 -1
- ultralytics/models/yolo/model.py +3 -3
- ultralytics/nn/autobackend.py +4 -4
- ultralytics/nn/tasks.py +2 -2
- ultralytics/solutions/analytics.py +7 -6
- ultralytics/trackers/track.py +2 -2
- ultralytics/utils/__init__.py +114 -56
- ultralytics/utils/benchmarks.py +4 -8
- ultralytics/utils/checks.py +2 -2
- ultralytics/utils/metrics.py +6 -2
- ultralytics/utils/plotting.py +11 -5
- {ultralytics-8.3.124.dist-info → ultralytics-8.3.125.dist-info}/METADATA +1 -1
- {ultralytics-8.3.124.dist-info → ultralytics-8.3.125.dist-info}/RECORD +26 -26
- {ultralytics-8.3.124.dist-info → ultralytics-8.3.125.dist-info}/WHEEL +1 -1
- {ultralytics-8.3.124.dist-info → ultralytics-8.3.125.dist-info}/entry_points.txt +0 -0
- {ultralytics-8.3.124.dist-info → ultralytics-8.3.125.dist-info}/licenses/LICENSE +0 -0
- {ultralytics-8.3.124.dist-info → ultralytics-8.3.125.dist-info}/top_level.txt +0 -0
tests/test_python.py
CHANGED
@@ -10,7 +10,6 @@ import cv2
|
|
10
10
|
import numpy as np
|
11
11
|
import pytest
|
12
12
|
import torch
|
13
|
-
import yaml
|
14
13
|
from PIL import Image
|
15
14
|
|
16
15
|
from tests import CFG, MODEL, SOURCE, SOURCES_LIST, TMP
|
@@ -28,6 +27,7 @@ from ultralytics.utils import (
|
|
28
27
|
ROOT,
|
29
28
|
WEIGHTS_DIR,
|
30
29
|
WINDOWS,
|
30
|
+
YAML,
|
31
31
|
checks,
|
32
32
|
is_dir_writeable,
|
33
33
|
is_github_action_running,
|
@@ -190,13 +190,10 @@ def test_track_stream():
|
|
190
190
|
|
191
191
|
# Test Global Motion Compensation (GMC) methods
|
192
192
|
for gmc in "orb", "sift", "ecc":
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
with open(tracker, "w", encoding="utf-8") as f:
|
198
|
-
yaml.safe_dump(data, f)
|
199
|
-
model.track(video_url, imgsz=160, tracker=tracker)
|
193
|
+
default_args = YAML.load(ROOT / "cfg/trackers/botsort.yaml")
|
194
|
+
custom_yaml = TMP / f"botsort-{gmc}.yaml"
|
195
|
+
YAML.save(custom_yaml, {**default_args, "gmc_method": gmc})
|
196
|
+
model.track(video_url, imgsz=160, tracker=custom_yaml)
|
200
197
|
|
201
198
|
|
202
199
|
def test_val():
|
ultralytics/__init__.py
CHANGED
ultralytics/cfg/__init__.py
CHANGED
@@ -23,13 +23,12 @@ from ultralytics.utils import (
|
|
23
23
|
SETTINGS,
|
24
24
|
SETTINGS_FILE,
|
25
25
|
TESTS_RUNNING,
|
26
|
+
YAML,
|
26
27
|
IterableSimpleNamespace,
|
27
28
|
checks,
|
28
29
|
colorstr,
|
29
30
|
deprecation_warn,
|
30
31
|
vscode_msg,
|
31
|
-
yaml_load,
|
32
|
-
yaml_print,
|
33
32
|
)
|
34
33
|
|
35
34
|
# Define valid solutions
|
@@ -270,7 +269,7 @@ def cfg2dict(cfg: Union[str, Path, Dict, SimpleNamespace]) -> Dict:
|
|
270
269
|
- If cfg is already a dictionary, it's returned unchanged.
|
271
270
|
"""
|
272
271
|
if isinstance(cfg, (str, Path)):
|
273
|
-
cfg =
|
272
|
+
cfg = YAML.load(cfg) # load dict
|
274
273
|
elif isinstance(cfg, SimpleNamespace):
|
275
274
|
cfg = vars(cfg) # convert to dict
|
276
275
|
return cfg
|
@@ -853,7 +852,7 @@ def entrypoint(debug: str = "") -> None:
|
|
853
852
|
"checks": checks.collect_system_info,
|
854
853
|
"version": lambda: LOGGER.info(__version__),
|
855
854
|
"settings": lambda: handle_yolo_settings(args[1:]),
|
856
|
-
"cfg": lambda:
|
855
|
+
"cfg": lambda: YAML.print(DEFAULT_CFG_PATH),
|
857
856
|
"hub": lambda: handle_yolo_hub(args[1:]),
|
858
857
|
"login": lambda: handle_yolo_hub(args),
|
859
858
|
"logout": lambda: handle_yolo_hub(args),
|
@@ -880,7 +879,7 @@ def entrypoint(debug: str = "") -> None:
|
|
880
879
|
k, v = parse_key_value_pair(a)
|
881
880
|
if k == "cfg" and v is not None: # custom.yaml passed
|
882
881
|
LOGGER.info(f"Overriding {DEFAULT_CFG_PATH} with {v}")
|
883
|
-
overrides = {k: val for k, val in
|
882
|
+
overrides = {k: val for k, val in YAML.load(checks.check_yaml(v)).items() if k != "cfg"}
|
884
883
|
else:
|
885
884
|
overrides[k] = v
|
886
885
|
except (NameError, SyntaxError, ValueError, AssertionError) as e:
|
ultralytics/cfg/default.yaml
CHANGED
@@ -35,7 +35,7 @@ resume: False # (bool) resume training from last checkpoint
|
|
35
35
|
amp: True # (bool) Automatic Mixed Precision (AMP) training, choices=[True, False], True runs AMP check
|
36
36
|
fraction: 1.0 # (float) dataset fraction to train on (default is 1.0, all images in train set)
|
37
37
|
profile: False # (bool) profile ONNX and TensorRT speeds during training for loggers
|
38
|
-
freeze:
|
38
|
+
freeze: # (int | list, optional) freeze first n layers, or freeze list of layer indices during training
|
39
39
|
multi_scale: False # (bool) Whether to use multiscale during training
|
40
40
|
# Segmentation
|
41
41
|
overlap_mask: True # (bool) merge object masks into a single image mask during training (segment train only)
|
@@ -84,7 +84,7 @@ int8: False # (bool) CoreML/TF INT8 quantization
|
|
84
84
|
dynamic: False # (bool) ONNX/TF/TensorRT: dynamic axes
|
85
85
|
simplify: True # (bool) ONNX: simplify model using `onnxslim`
|
86
86
|
opset: # (int, optional) ONNX: opset version
|
87
|
-
workspace:
|
87
|
+
workspace: # (float, optional) TensorRT: workspace size (GiB), `None` will let TensorRT auto-allocate memory
|
88
88
|
nms: False # (bool) CoreML: add NMS
|
89
89
|
|
90
90
|
# Hyperparameters ------------------------------------------------------------------------------------------------------
|
ultralytics/data/utils.py
CHANGED
@@ -18,16 +18,16 @@ from ultralytics.nn.autobackend import check_class_names
|
|
18
18
|
from ultralytics.utils import (
|
19
19
|
DATASETS_DIR,
|
20
20
|
LOGGER,
|
21
|
+
MACOS,
|
21
22
|
NUM_THREADS,
|
22
23
|
ROOT,
|
23
24
|
SETTINGS_FILE,
|
24
25
|
TQDM,
|
26
|
+
YAML,
|
25
27
|
clean_url,
|
26
28
|
colorstr,
|
27
29
|
emojis,
|
28
30
|
is_dir_writeable,
|
29
|
-
yaml_load,
|
30
|
-
yaml_save,
|
31
31
|
)
|
32
32
|
from ultralytics.utils.checks import check_file, check_font, is_ascii
|
33
33
|
from ultralytics.utils.downloads import download, safe_download, unzip_file
|
@@ -36,7 +36,7 @@ from ultralytics.utils.ops import segments2boxes
|
|
36
36
|
HELP_URL = "See https://docs.ultralytics.com/datasets for dataset formatting guidance."
|
37
37
|
IMG_FORMATS = {"bmp", "dng", "jpeg", "jpg", "mpo", "png", "tif", "tiff", "webp", "pfm", "heic"} # image suffixes
|
38
38
|
VID_FORMATS = {"asf", "avi", "gif", "m4v", "mkv", "mov", "mp4", "mpeg", "mpg", "ts", "wmv", "webm"} # video suffixes
|
39
|
-
PIN_MEMORY = str(os.getenv("PIN_MEMORY",
|
39
|
+
PIN_MEMORY = str(os.getenv("PIN_MEMORY", not MACOS)).lower() == "true" # global pin_memory for dataloaders
|
40
40
|
FORMATS_HELP_MSG = f"Supported formats are:\nimages: {IMG_FORMATS}\nvideos: {VID_FORMATS}"
|
41
41
|
|
42
42
|
|
@@ -399,7 +399,7 @@ def check_det_dataset(dataset, autodownload=True):
|
|
399
399
|
extract_dir, autodownload = file.parent, False
|
400
400
|
|
401
401
|
# Read YAML
|
402
|
-
data =
|
402
|
+
data = YAML.load(file, append_filename=True) # dictionary
|
403
403
|
|
404
404
|
# Checks
|
405
405
|
for k in "train", "val":
|
@@ -492,7 +492,7 @@ def check_cls_dataset(dataset, split=""):
|
|
492
492
|
# Download (optional if dataset=https://file.zip is passed directly)
|
493
493
|
if str(dataset).startswith(("http:/", "https:/")):
|
494
494
|
dataset = safe_download(dataset, dir=DATASETS_DIR, unzip=True, delete=False)
|
495
|
-
elif
|
495
|
+
elif str(dataset).endswith((".zip", ".tar", ".gz")):
|
496
496
|
file = check_file(dataset)
|
497
497
|
dataset = safe_download(file, dir=DATASETS_DIR, unzip=True, delete=False)
|
498
498
|
|
@@ -599,9 +599,9 @@ class HUBDatasetStats:
|
|
599
599
|
_, data_dir, yaml_path = self._unzip(Path(path))
|
600
600
|
try:
|
601
601
|
# Load YAML with checks
|
602
|
-
data =
|
602
|
+
data = YAML.load(yaml_path)
|
603
603
|
data["path"] = "" # strip path since YAML should be in dataset root for all HUB datasets
|
604
|
-
|
604
|
+
YAML.save(yaml_path, data)
|
605
605
|
data = check_det_dataset(yaml_path, autodownload) # dict
|
606
606
|
data["path"] = data_dir # YAML path should be set to '' (relative) or parent (absolute)
|
607
607
|
except Exception as e:
|
ultralytics/engine/exporter.py
CHANGED
@@ -89,10 +89,10 @@ from ultralytics.utils import (
|
|
89
89
|
RKNN_CHIPS,
|
90
90
|
ROOT,
|
91
91
|
WINDOWS,
|
92
|
+
YAML,
|
92
93
|
callbacks,
|
93
94
|
colorstr,
|
94
95
|
get_default_args,
|
95
|
-
yaml_save,
|
96
96
|
)
|
97
97
|
from ultralytics.utils.checks import (
|
98
98
|
check_imgsz,
|
@@ -631,7 +631,7 @@ class Exporter:
|
|
631
631
|
ov_model.set_rt_info("fit_to_window_letterbox", ["model_info", "resize_type"])
|
632
632
|
|
633
633
|
ov.save_model(ov_model, file, compress_to_fp16=self.args.half)
|
634
|
-
|
634
|
+
YAML.save(Path(file).parent / "metadata.yaml", self.metadata) # add metadata.yaml
|
635
635
|
|
636
636
|
if self.args.int8:
|
637
637
|
fq = str(self.file).replace(self.file.suffix, f"_int8_openvino_model{os.sep}")
|
@@ -690,7 +690,7 @@ class Exporter:
|
|
690
690
|
f = str(self.file).replace(self.file.suffix, f"_paddle_model{os.sep}")
|
691
691
|
|
692
692
|
pytorch2paddle(module=self.model, save_dir=f, jit_type="trace", input_examples=[self.im]) # export
|
693
|
-
|
693
|
+
YAML.save(Path(f) / "metadata.yaml", self.metadata) # add metadata.yaml
|
694
694
|
return f, None
|
695
695
|
|
696
696
|
@try_export
|
@@ -783,7 +783,7 @@ class Exporter:
|
|
783
783
|
for f_debug in ("debug.bin", "debug.param", "debug2.bin", "debug2.param", *pnnx_files):
|
784
784
|
Path(f_debug).unlink(missing_ok=True)
|
785
785
|
|
786
|
-
|
786
|
+
YAML.save(f / "metadata.yaml", self.metadata) # add metadata.yaml
|
787
787
|
return str(f), None
|
788
788
|
|
789
789
|
@try_export
|
@@ -974,7 +974,7 @@ class Exporter:
|
|
974
974
|
output_signaturedefs=True, # fix error with Attention block group convolution
|
975
975
|
optimization_for_gpu_delegate=True,
|
976
976
|
)
|
977
|
-
|
977
|
+
YAML.save(f / "metadata.yaml", self.metadata) # add metadata.yaml
|
978
978
|
|
979
979
|
# Remove/rename TFLite models
|
980
980
|
if self.args.int8:
|
@@ -1087,7 +1087,7 @@ class Exporter:
|
|
1087
1087
|
LOGGER.warning(f"{prefix} your model may not work correctly with spaces in path '{f}'.")
|
1088
1088
|
|
1089
1089
|
# Add metadata
|
1090
|
-
|
1090
|
+
YAML.save(Path(f) / "metadata.yaml", self.metadata) # add metadata.yaml
|
1091
1091
|
return f, None
|
1092
1092
|
|
1093
1093
|
@try_export
|
@@ -1114,7 +1114,7 @@ class Exporter:
|
|
1114
1114
|
rknn.build(do_quantization=self.args.int8)
|
1115
1115
|
f = f.replace(".onnx", f"-{self.args.name}-int8.rknn" if self.args.int8 else f"-{self.args.name}-fp16.rknn")
|
1116
1116
|
rknn.export_rknn(f"{export_path / f}")
|
1117
|
-
|
1117
|
+
YAML.save(export_path / "metadata.yaml", self.metadata)
|
1118
1118
|
return export_path, None
|
1119
1119
|
|
1120
1120
|
@try_export
|
ultralytics/engine/model.py
CHANGED
@@ -18,9 +18,9 @@ from ultralytics.utils import (
|
|
18
18
|
LOGGER,
|
19
19
|
RANK,
|
20
20
|
SETTINGS,
|
21
|
+
YAML,
|
21
22
|
callbacks,
|
22
23
|
checks,
|
23
|
-
yaml_load,
|
24
24
|
)
|
25
25
|
|
26
26
|
|
@@ -142,7 +142,7 @@ class Model(torch.nn.Module):
|
|
142
142
|
|
143
143
|
# Load or create new YOLO model
|
144
144
|
__import__("os").environ["CUBLAS_WORKSPACE_CONFIG"] = ":4096:8" # to avoid deterministic warnings
|
145
|
-
if
|
145
|
+
if str(model).endswith((".yaml", ".yml")):
|
146
146
|
self._new(model, task=task, verbose=verbose)
|
147
147
|
else:
|
148
148
|
self._load(model, task=task)
|
@@ -773,7 +773,7 @@ class Model(torch.nn.Module):
|
|
773
773
|
|
774
774
|
checks.check_pip_update_available()
|
775
775
|
|
776
|
-
overrides =
|
776
|
+
overrides = YAML.load(checks.check_yaml(kwargs["cfg"])) if kwargs.get("cfg") else self.overrides
|
777
777
|
custom = {
|
778
778
|
# NOTE: handle the case when 'cfg' includes 'data'.
|
779
779
|
"data": overrides.get("data") or DEFAULT_CFG_DICT["data"] or TASK2DATA[self.task],
|
ultralytics/engine/trainer.py
CHANGED
@@ -31,11 +31,11 @@ from ultralytics.utils import (
|
|
31
31
|
LOGGER,
|
32
32
|
RANK,
|
33
33
|
TQDM,
|
34
|
+
YAML,
|
34
35
|
callbacks,
|
35
36
|
clean_url,
|
36
37
|
colorstr,
|
37
38
|
emojis,
|
38
|
-
yaml_save,
|
39
39
|
)
|
40
40
|
from ultralytics.utils.autobatch import check_train_batch_size
|
41
41
|
from ultralytics.utils.checks import check_amp, check_file, check_imgsz, check_model_file_from_stem, print_args
|
@@ -117,7 +117,7 @@ class BaseTrainer:
|
|
117
117
|
if RANK in {-1, 0}:
|
118
118
|
self.wdir.mkdir(parents=True, exist_ok=True) # make dir
|
119
119
|
self.args.save_dir = str(self.save_dir)
|
120
|
-
|
120
|
+
YAML.save(self.save_dir / "args.yaml", vars(self.args)) # save run args
|
121
121
|
self.last, self.best = self.wdir / "last.pt", self.wdir / "best.pt" # checkpoint paths
|
122
122
|
self.save_period = self.args.save_period
|
123
123
|
|
ultralytics/engine/tuner.py
CHANGED
@@ -23,7 +23,7 @@ import numpy as np
|
|
23
23
|
import torch
|
24
24
|
|
25
25
|
from ultralytics.cfg import get_cfg, get_save_dir
|
26
|
-
from ultralytics.utils import DEFAULT_CFG, LOGGER, callbacks, colorstr, remove_colorstr
|
26
|
+
from ultralytics.utils import DEFAULT_CFG, LOGGER, YAML, callbacks, colorstr, remove_colorstr
|
27
27
|
from ultralytics.utils.plotting import plot_tune_results
|
28
28
|
|
29
29
|
|
@@ -235,9 +235,9 @@ class Tuner:
|
|
235
235
|
)
|
236
236
|
LOGGER.info("\n" + header)
|
237
237
|
data = {k: float(x[best_idx, i + 1]) for i, k in enumerate(self.space.keys())}
|
238
|
-
|
238
|
+
YAML.save(
|
239
239
|
self.tune_dir / "best_hyperparameters.yaml",
|
240
240
|
data=data,
|
241
241
|
header=remove_colorstr(header.replace(self.prefix, "# ")) + "\n",
|
242
242
|
)
|
243
|
-
|
243
|
+
YAML.print(self.tune_dir / "best_hyperparameters.yaml")
|
ultralytics/hub/session.py
CHANGED
@@ -201,7 +201,7 @@ class HUBTrainingSession:
|
|
201
201
|
HUBModelError: If the identifier format is not recognized.
|
202
202
|
"""
|
203
203
|
api_key, model_id, filename = None, None, None
|
204
|
-
if
|
204
|
+
if str(identifier).endswith((".pt", ".yaml")):
|
205
205
|
filename = identifier
|
206
206
|
elif identifier.startswith(f"{HUB_WEB_ROOT}/models/"):
|
207
207
|
parsed_url = urlparse(identifier)
|
ultralytics/models/yolo/model.py
CHANGED
@@ -15,7 +15,7 @@ from ultralytics.nn.tasks import (
|
|
15
15
|
YOLOEModel,
|
16
16
|
YOLOESegModel,
|
17
17
|
)
|
18
|
-
from ultralytics.utils import ROOT,
|
18
|
+
from ultralytics.utils import ROOT, YAML
|
19
19
|
|
20
20
|
|
21
21
|
class YOLO(Model):
|
@@ -107,7 +107,7 @@ class YOLOWorld(Model):
|
|
107
107
|
|
108
108
|
# Assign default COCO class names when there are no custom names
|
109
109
|
if not hasattr(self.model, "names"):
|
110
|
-
self.model.names =
|
110
|
+
self.model.names = YAML.load(ROOT / "cfg/datasets/coco8.yaml").get("names")
|
111
111
|
|
112
112
|
@property
|
113
113
|
def task_map(self):
|
@@ -156,7 +156,7 @@ class YOLOE(Model):
|
|
156
156
|
|
157
157
|
# Assign default COCO class names when there are no custom names
|
158
158
|
if not hasattr(self.model, "names"):
|
159
|
-
self.model.names =
|
159
|
+
self.model.names = YAML.load(ROOT / "cfg/datasets/coco8.yaml").get("names")
|
160
160
|
|
161
161
|
@property
|
162
162
|
def task_map(self):
|
ultralytics/nn/autobackend.py
CHANGED
@@ -14,7 +14,7 @@ import torch
|
|
14
14
|
import torch.nn as nn
|
15
15
|
from PIL import Image
|
16
16
|
|
17
|
-
from ultralytics.utils import ARM64, IS_JETSON, LINUX, LOGGER, PYTHON_VERSION, ROOT,
|
17
|
+
from ultralytics.utils import ARM64, IS_JETSON, LINUX, LOGGER, PYTHON_VERSION, ROOT, YAML
|
18
18
|
from ultralytics.utils.checks import check_requirements, check_suffix, check_version, check_yaml, is_rockchip
|
19
19
|
from ultralytics.utils.downloads import attempt_download_asset, is_url
|
20
20
|
|
@@ -33,7 +33,7 @@ def check_class_names(names):
|
|
33
33
|
f"{min(names.keys())}-{max(names.keys())} defined in your dataset YAML."
|
34
34
|
)
|
35
35
|
if isinstance(names[0], str) and names[0].startswith("n0"): # imagenet class codes, i.e. 'n01440764'
|
36
|
-
names_map =
|
36
|
+
names_map = YAML.load(ROOT / "cfg/datasets/ImageNet.yaml")["map"] # human-readable names
|
37
37
|
names = {k: names_map[v] for k, v in names.items()}
|
38
38
|
return names
|
39
39
|
|
@@ -42,7 +42,7 @@ def default_class_names(data=None):
|
|
42
42
|
"""Applies default class names to an input YAML file or returns numerical class names."""
|
43
43
|
if data:
|
44
44
|
try:
|
45
|
-
return
|
45
|
+
return YAML.load(check_yaml(data))["names"]
|
46
46
|
except Exception:
|
47
47
|
pass
|
48
48
|
return {i: f"class{i}" for i in range(999)} # return default if above errors
|
@@ -536,7 +536,7 @@ class AutoBackend(nn.Module):
|
|
536
536
|
|
537
537
|
# Load external metadata YAML
|
538
538
|
if isinstance(metadata, (str, Path)) and Path(metadata).exists():
|
539
|
-
metadata =
|
539
|
+
metadata = YAML.load(metadata)
|
540
540
|
if metadata and isinstance(metadata, dict):
|
541
541
|
for k, v in metadata.items():
|
542
542
|
if k in {"stride", "batch", "channels"}:
|
ultralytics/nn/tasks.py
CHANGED
@@ -69,7 +69,7 @@ from ultralytics.nn.modules import (
|
|
69
69
|
YOLOESegment,
|
70
70
|
v10Detect,
|
71
71
|
)
|
72
|
-
from ultralytics.utils import DEFAULT_CFG_DICT, DEFAULT_CFG_KEYS, LOGGER, colorstr, emojis
|
72
|
+
from ultralytics.utils import DEFAULT_CFG_DICT, DEFAULT_CFG_KEYS, LOGGER, YAML, colorstr, emojis
|
73
73
|
from ultralytics.utils.checks import check_requirements, check_suffix, check_yaml
|
74
74
|
from ultralytics.utils.loss import (
|
75
75
|
E2EDetectLoss,
|
@@ -1523,7 +1523,7 @@ def yaml_model_load(path):
|
|
1523
1523
|
|
1524
1524
|
unified_path = re.sub(r"(\d+)([nslmx])(.+)?$", r"\1\3", str(path)) # i.e. yolov8x.yaml -> yolov8.yaml
|
1525
1525
|
yaml_file = check_yaml(unified_path, hard=False) or check_yaml(path)
|
1526
|
-
d =
|
1526
|
+
d = YAML.load(yaml_file) # model dict
|
1527
1527
|
d["scale"] = guess_model_scale(path)
|
1528
1528
|
d["yaml_file"] = str(path)
|
1529
1529
|
return d
|
@@ -3,10 +3,7 @@
|
|
3
3
|
from itertools import cycle
|
4
4
|
|
5
5
|
import cv2
|
6
|
-
import matplotlib.pyplot as plt
|
7
6
|
import numpy as np
|
8
|
-
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
|
9
|
-
from matplotlib.figure import Figure
|
10
7
|
|
11
8
|
from ultralytics.solutions.solutions import BaseSolution, SolutionResults # Import a parent class
|
12
9
|
|
@@ -32,7 +29,7 @@ class Analytics(BaseSolution):
|
|
32
29
|
clswise_count (Dict[str, int]): Dictionary for class-wise object counts.
|
33
30
|
fig (Figure): Matplotlib figure object for the chart.
|
34
31
|
ax (Axes): Matplotlib axes object for the chart.
|
35
|
-
canvas (
|
32
|
+
canvas (FigureCanvasAgg): Canvas for rendering the chart.
|
36
33
|
lines (dict): Dictionary to store line objects for area charts.
|
37
34
|
color_mapping (Dict[str, str]): Dictionary mapping class labels to colors for consistent visualization.
|
38
35
|
|
@@ -51,6 +48,10 @@ class Analytics(BaseSolution):
|
|
51
48
|
"""Initialize Analytics class with various chart types for visual data representation."""
|
52
49
|
super().__init__(**kwargs)
|
53
50
|
|
51
|
+
import matplotlib.pyplot as plt # scope for faster 'import ultralytics'
|
52
|
+
from matplotlib.backends.backend_agg import FigureCanvasAgg
|
53
|
+
from matplotlib.figure import Figure
|
54
|
+
|
54
55
|
self.type = self.CFG["analytics_type"] # type of analytics i.e "line", "pie", "bar" or "area" charts.
|
55
56
|
self.x_label = "Classes" if self.type in {"bar", "pie"} else "Frame#"
|
56
57
|
self.y_label = "Total Counts"
|
@@ -71,14 +72,14 @@ class Analytics(BaseSolution):
|
|
71
72
|
if self.type in {"line", "area"}:
|
72
73
|
self.lines = {}
|
73
74
|
self.fig = Figure(facecolor=self.bg_color, figsize=figsize)
|
74
|
-
self.canvas =
|
75
|
+
self.canvas = FigureCanvasAgg(self.fig) # Set common axis properties
|
75
76
|
self.ax = self.fig.add_subplot(111, facecolor=self.bg_color)
|
76
77
|
if self.type == "line":
|
77
78
|
(self.line,) = self.ax.plot([], [], color="cyan", linewidth=self.line_width)
|
78
79
|
elif self.type in {"bar", "pie"}:
|
79
80
|
# Initialize bar or pie plot
|
80
81
|
self.fig, self.ax = plt.subplots(figsize=figsize, facecolor=self.bg_color)
|
81
|
-
self.canvas =
|
82
|
+
self.canvas = FigureCanvasAgg(self.fig) # Set common axis properties
|
82
83
|
self.ax.set_facecolor(self.bg_color)
|
83
84
|
self.color_mapping = {}
|
84
85
|
|
ultralytics/trackers/track.py
CHANGED
@@ -5,7 +5,7 @@ from pathlib import Path
|
|
5
5
|
|
6
6
|
import torch
|
7
7
|
|
8
|
-
from ultralytics.utils import
|
8
|
+
from ultralytics.utils import YAML, IterableSimpleNamespace
|
9
9
|
from ultralytics.utils.checks import check_yaml
|
10
10
|
|
11
11
|
from .bot_sort import BOTSORT
|
@@ -39,7 +39,7 @@ def on_predict_start(predictor: object, persist: bool = False) -> None:
|
|
39
39
|
return
|
40
40
|
|
41
41
|
tracker = check_yaml(predictor.args.tracker)
|
42
|
-
cfg = IterableSimpleNamespace(**
|
42
|
+
cfg = IterableSimpleNamespace(**YAML.load(tracker))
|
43
43
|
|
44
44
|
if cfg.tracker_type not in {"bytetrack", "botsort"}:
|
45
45
|
raise AssertionError(f"Only 'bytetrack' and 'botsort' are supported for now, but got '{cfg.tracker_type}'")
|
ultralytics/utils/__init__.py
CHANGED
@@ -20,11 +20,9 @@ from typing import Union
|
|
20
20
|
from urllib.parse import unquote
|
21
21
|
|
22
22
|
import cv2
|
23
|
-
import matplotlib.pyplot as plt
|
24
23
|
import numpy as np
|
25
24
|
import torch
|
26
25
|
import tqdm
|
27
|
-
import yaml
|
28
26
|
|
29
27
|
from ultralytics import __version__
|
30
28
|
from ultralytics.utils.patches import imread, imshow, imwrite, torch_load, torch_save # for patches
|
@@ -330,6 +328,8 @@ def plt_settings(rcparams=None, backend="Agg"):
|
|
330
328
|
|
331
329
|
def wrapper(*args, **kwargs):
|
332
330
|
"""Sets rc parameters and backend, calls the original function, and restores the settings."""
|
331
|
+
import matplotlib.pyplot as plt # scope for faster 'import ultralytics'
|
332
|
+
|
333
333
|
original_backend = plt.get_backend()
|
334
334
|
switch = backend.lower() != original_backend.lower()
|
335
335
|
if switch:
|
@@ -468,84 +468,142 @@ class ThreadingLocked:
|
|
468
468
|
return decorated
|
469
469
|
|
470
470
|
|
471
|
-
|
471
|
+
class YAML:
|
472
472
|
"""
|
473
|
-
|
473
|
+
YAML utility class for efficient file operations with automatic C-implementation detection.
|
474
474
|
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
475
|
+
This class provides optimized YAML loading and saving operations using PyYAML's fastest available implementation
|
476
|
+
(C-based when possible). It implements a singleton pattern with lazy initialization, allowing direct class method
|
477
|
+
usage without explicit instantiation. The class handles file path creation, validation, and character encoding
|
478
|
+
issues automatically.
|
479
479
|
|
480
|
-
|
481
|
-
|
480
|
+
The implementation prioritizes performance through:
|
481
|
+
- Automatic C-based loader/dumper selection when available
|
482
|
+
- Singleton pattern to reuse the same instance
|
483
|
+
- Lazy initialization to defer import costs until needed
|
484
|
+
- Fallback mechanisms for handling problematic YAML content
|
485
|
+
|
486
|
+
Attributes:
|
487
|
+
_instance: Internal singleton instance storage.
|
488
|
+
yaml: Reference to the PyYAML module.
|
489
|
+
SafeLoader: Best available YAML loader (CSafeLoader if available).
|
490
|
+
SafeDumper: Best available YAML dumper (CSafeDumper if available).
|
491
|
+
|
492
|
+
Examples:
|
493
|
+
>>> data = YAML.load("config.yaml")
|
494
|
+
>>> data["new_value"] = 123
|
495
|
+
>>> YAML.save("updated_config.yaml", data)
|
496
|
+
>>> YAML.print(data)
|
482
497
|
"""
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
498
|
+
|
499
|
+
_instance = None
|
500
|
+
|
501
|
+
@classmethod
|
502
|
+
def _get_instance(cls):
|
503
|
+
"""Initialize singleton instance on first use."""
|
504
|
+
if cls._instance is None:
|
505
|
+
cls._instance = cls()
|
506
|
+
return cls._instance
|
507
|
+
|
508
|
+
def __init__(self):
|
509
|
+
"""Initialize with optimal YAML implementation (C-based when available)."""
|
510
|
+
import yaml
|
511
|
+
|
512
|
+
self.yaml = yaml
|
513
|
+
# Use C-based implementation if available for better performance
|
514
|
+
try:
|
515
|
+
self.SafeLoader = yaml.CSafeLoader
|
516
|
+
self.SafeDumper = yaml.CSafeDumper
|
517
|
+
except (AttributeError, ImportError):
|
518
|
+
self.SafeLoader = yaml.SafeLoader
|
519
|
+
self.SafeDumper = yaml.SafeDumper
|
520
|
+
|
521
|
+
@classmethod
|
522
|
+
def save(cls, file="data.yaml", data=None, header=""):
|
523
|
+
"""
|
524
|
+
Save Python object as YAML file.
|
525
|
+
|
526
|
+
Args:
|
527
|
+
file (str | Path): Path to save YAML file.
|
528
|
+
data (dict | None): Dict or compatible object to save.
|
529
|
+
header (str): Optional string to add at file beginning.
|
530
|
+
"""
|
531
|
+
instance = cls._get_instance()
|
532
|
+
if data is None:
|
533
|
+
data = {}
|
534
|
+
|
535
|
+
# Create parent directories if needed
|
536
|
+
file = Path(file)
|
488
537
|
file.parent.mkdir(parents=True, exist_ok=True)
|
489
538
|
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
539
|
+
# Convert non-serializable objects to strings
|
540
|
+
valid_types = int, float, str, bool, list, tuple, dict, type(None)
|
541
|
+
for k, v in data.items():
|
542
|
+
if not isinstance(v, valid_types):
|
543
|
+
data[k] = str(v)
|
495
544
|
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
545
|
+
# Write YAML file
|
546
|
+
with open(file, "w", errors="ignore", encoding="utf-8") as f:
|
547
|
+
if header:
|
548
|
+
f.write(header)
|
549
|
+
instance.yaml.dump(data, f, sort_keys=False, allow_unicode=True, Dumper=instance.SafeDumper)
|
501
550
|
|
551
|
+
@classmethod
|
552
|
+
def load(cls, file="data.yaml", append_filename=False):
|
553
|
+
"""
|
554
|
+
Load YAML file to Python object with robust error handling.
|
502
555
|
|
503
|
-
|
504
|
-
|
505
|
-
|
556
|
+
Args:
|
557
|
+
file (str | Path): Path to YAML file.
|
558
|
+
append_filename (bool): Whether to add filename to returned dict.
|
506
559
|
|
507
|
-
|
508
|
-
|
509
|
-
|
560
|
+
Returns:
|
561
|
+
(dict): Loaded YAML content.
|
562
|
+
"""
|
563
|
+
instance = cls._get_instance()
|
564
|
+
assert str(file).endswith((".yaml", ".yml")), f"Not a YAML file: {file}"
|
510
565
|
|
511
|
-
|
512
|
-
(
|
513
|
-
|
514
|
-
assert Path(file).suffix in {".yaml", ".yml"}, f"Attempting to load non-YAML file {file} with yaml_load()"
|
515
|
-
with open(file, errors="ignore", encoding="utf-8") as f:
|
516
|
-
s = f.read() # string
|
566
|
+
# Read file content
|
567
|
+
with open(file, errors="ignore", encoding="utf-8") as f:
|
568
|
+
s = f.read()
|
517
569
|
|
518
|
-
#
|
519
|
-
|
570
|
+
# Try loading YAML with fallback for problematic characters
|
571
|
+
try:
|
572
|
+
data = instance.yaml.load(s, Loader=instance.SafeLoader) or {}
|
573
|
+
except Exception:
|
574
|
+
# Remove problematic characters and retry
|
520
575
|
s = re.sub(r"[^\x09\x0A\x0D\x20-\x7E\x85\xA0-\uD7FF\uE000-\uFFFD\U00010000-\U0010ffff]+", "", s)
|
576
|
+
data = instance.yaml.load(s, Loader=instance.SafeLoader) or {}
|
577
|
+
|
578
|
+
# Check for accidental user-error None strings (should be 'null' in YAML)
|
579
|
+
if "None" in data.values():
|
580
|
+
data = {k: None if v == "None" else v for k, v in data.items()}
|
521
581
|
|
522
|
-
# Add YAML filename to dict and return
|
523
|
-
data = yaml.safe_load(s) or {} # always return a dict (yaml.safe_load() may return None for empty files)
|
524
582
|
if append_filename:
|
525
583
|
data["yaml_file"] = str(file)
|
526
584
|
return data
|
527
585
|
|
586
|
+
@classmethod
|
587
|
+
def print(cls, yaml_file):
|
588
|
+
"""
|
589
|
+
Pretty print YAML file or object to console.
|
528
590
|
|
529
|
-
|
530
|
-
|
531
|
-
|
591
|
+
Args:
|
592
|
+
yaml_file (str | Path | dict): Path to YAML file or dict to print.
|
593
|
+
"""
|
594
|
+
instance = cls._get_instance()
|
532
595
|
|
533
|
-
|
534
|
-
|
596
|
+
# Load file if path provided
|
597
|
+
yaml_dict = cls.load(yaml_file) if isinstance(yaml_file, (str, Path)) else yaml_file
|
535
598
|
|
536
|
-
|
537
|
-
(
|
538
|
-
|
539
|
-
|
540
|
-
dump = yaml.dump(yaml_dict, sort_keys=False, allow_unicode=True, width=float("inf"))
|
541
|
-
LOGGER.info(f"Printing '{colorstr('bold', 'black', yaml_file)}'\n\n{dump}")
|
599
|
+
# Use -1 for unlimited width in C implementation
|
600
|
+
dump = instance.yaml.dump(yaml_dict, sort_keys=False, allow_unicode=True, width=-1, Dumper=instance.SafeDumper)
|
601
|
+
|
602
|
+
LOGGER.info(f"Printing '{colorstr('bold', 'black', yaml_file)}'\n\n{dump}")
|
542
603
|
|
543
604
|
|
544
605
|
# Default configuration
|
545
|
-
DEFAULT_CFG_DICT =
|
546
|
-
for k, v in DEFAULT_CFG_DICT.items():
|
547
|
-
if isinstance(v, str) and v.lower() == "none":
|
548
|
-
DEFAULT_CFG_DICT[k] = None
|
606
|
+
DEFAULT_CFG_DICT = YAML.load(DEFAULT_CFG_PATH)
|
549
607
|
DEFAULT_CFG_KEYS = DEFAULT_CFG_DICT.keys()
|
550
608
|
DEFAULT_CFG = IterableSimpleNamespace(**DEFAULT_CFG_DICT)
|
551
609
|
|
ultralytics/utils/benchmarks.py
CHANGED
@@ -36,12 +36,11 @@ from pathlib import Path
|
|
36
36
|
|
37
37
|
import numpy as np
|
38
38
|
import torch.cuda
|
39
|
-
import yaml
|
40
39
|
|
41
40
|
from ultralytics import YOLO, YOLOWorld
|
42
41
|
from ultralytics.cfg import TASK2DATA, TASK2METRIC
|
43
42
|
from ultralytics.engine.exporter import export_formats
|
44
|
-
from ultralytics.utils import ARM64, ASSETS, LINUX, LOGGER, MACOS, TQDM, WEIGHTS_DIR
|
43
|
+
from ultralytics.utils import ARM64, ASSETS, LINUX, LOGGER, MACOS, TQDM, WEIGHTS_DIR, YAML
|
45
44
|
from ultralytics.utils.checks import IS_PYTHON_3_13, check_imgsz, check_requirements, check_yolo, is_rockchip
|
46
45
|
from ultralytics.utils.downloads import safe_download
|
47
46
|
from ultralytics.utils.files import file_size
|
@@ -283,12 +282,10 @@ class RF100Benchmark:
|
|
283
282
|
@staticmethod
|
284
283
|
def fix_yaml(path):
|
285
284
|
"""Fix the train and validation paths in a given YAML file."""
|
286
|
-
|
287
|
-
yaml_data = yaml.safe_load(file)
|
285
|
+
yaml_data = YAML.load(path)
|
288
286
|
yaml_data["train"] = "train/images"
|
289
287
|
yaml_data["val"] = "valid/images"
|
290
|
-
|
291
|
-
yaml.safe_dump(yaml_data, file)
|
288
|
+
YAML.dump(yaml_data, path)
|
292
289
|
|
293
290
|
def evaluate(self, yaml_path, val_log_file, eval_log_file, list_ind):
|
294
291
|
"""
|
@@ -309,8 +306,7 @@ class RF100Benchmark:
|
|
309
306
|
>>> benchmark.evaluate("path/to/data.yaml", "path/to/val_log.txt", "path/to/eval_log.txt", 0)
|
310
307
|
"""
|
311
308
|
skip_symbols = ["🚀", "⚠️", "💡", "❌"]
|
312
|
-
|
313
|
-
class_names = yaml.safe_load(stream)["names"]
|
309
|
+
class_names = YAML.load(yaml_path)["names"]
|
314
310
|
with open(val_log_file, encoding="utf-8") as f:
|
315
311
|
lines = f.readlines()
|
316
312
|
eval_lines = []
|
ultralytics/utils/checks.py
CHANGED
@@ -305,7 +305,7 @@ def check_font(font="Arial.ttf"):
|
|
305
305
|
Returns:
|
306
306
|
(Path): Resolved font file path.
|
307
307
|
"""
|
308
|
-
from matplotlib import font_manager
|
308
|
+
from matplotlib import font_manager # scope for faster 'import ultralytics'
|
309
309
|
|
310
310
|
# Check USER_CONFIG_DIR
|
311
311
|
name = Path(font).name
|
@@ -454,7 +454,7 @@ def check_suffix(file="yolo11n.pt", suffix=".pt", msg=""):
|
|
454
454
|
"""
|
455
455
|
if file and suffix:
|
456
456
|
if isinstance(suffix, str):
|
457
|
-
suffix =
|
457
|
+
suffix = {suffix}
|
458
458
|
for f in file if isinstance(file, (list, tuple)) else [file]:
|
459
459
|
s = Path(f).suffix.lower().strip() # file suffix
|
460
460
|
if len(s):
|
ultralytics/utils/metrics.py
CHANGED
@@ -5,7 +5,6 @@ import math
|
|
5
5
|
import warnings
|
6
6
|
from pathlib import Path
|
7
7
|
|
8
|
-
import matplotlib.pyplot as plt
|
9
8
|
import numpy as np
|
10
9
|
import torch
|
11
10
|
|
@@ -418,7 +417,8 @@ class ConfusionMatrix:
|
|
418
417
|
names (tuple): Names of classes, used as labels on the plot.
|
419
418
|
on_plot (func): An optional callback to pass plots path and data when they are rendered.
|
420
419
|
"""
|
421
|
-
import
|
420
|
+
import matplotlib.pyplot as plt # scope for faster 'import ultralytics'
|
421
|
+
import seaborn
|
422
422
|
|
423
423
|
array = self.matrix / ((self.matrix.sum(0).reshape(1, -1) + 1e-9) if normalize else 1) # normalize columns
|
424
424
|
array[array < 0.005] = np.nan # don't annotate (would appear as 0.00)
|
@@ -479,6 +479,8 @@ def plot_pr_curve(px, py, ap, save_dir=Path("pr_curve.png"), names={}, on_plot=N
|
|
479
479
|
names (dict, optional): Dictionary mapping class indices to class names.
|
480
480
|
on_plot (callable, optional): Function to call after plot is saved.
|
481
481
|
"""
|
482
|
+
import matplotlib.pyplot as plt # scope for faster 'import ultralytics'
|
483
|
+
|
482
484
|
fig, ax = plt.subplots(1, 1, figsize=(9, 6), tight_layout=True)
|
483
485
|
py = np.stack(py, axis=1)
|
484
486
|
|
@@ -515,6 +517,8 @@ def plot_mc_curve(px, py, save_dir=Path("mc_curve.png"), names={}, xlabel="Confi
|
|
515
517
|
ylabel (str, optional): Y-axis label.
|
516
518
|
on_plot (callable, optional): Function to call after plot is saved.
|
517
519
|
"""
|
520
|
+
import matplotlib.pyplot as plt # scope for faster 'import ultralytics'
|
521
|
+
|
518
522
|
fig, ax = plt.subplots(1, 1, figsize=(9, 6), tight_layout=True)
|
519
523
|
|
520
524
|
if 0 < len(names) < 21: # display per-class legend if < 21 classes
|
ultralytics/utils/plotting.py
CHANGED
@@ -6,7 +6,6 @@ from pathlib import Path
|
|
6
6
|
from typing import Callable, Dict, List, Optional, Union
|
7
7
|
|
8
8
|
import cv2
|
9
|
-
import matplotlib.pyplot as plt
|
10
9
|
import numpy as np
|
11
10
|
import torch
|
12
11
|
from PIL import Image, ImageDraw, ImageFont
|
@@ -534,8 +533,9 @@ def plot_labels(boxes, cls, names=(), save_dir=Path(""), on_plot=None):
|
|
534
533
|
save_dir (Path, optional): Directory to save the plot.
|
535
534
|
on_plot (Callable, optional): Function to call after plot is saved.
|
536
535
|
"""
|
537
|
-
import
|
538
|
-
import
|
536
|
+
import matplotlib.pyplot as plt # scope for faster 'import ultralytics'
|
537
|
+
import pandas
|
538
|
+
import seaborn
|
539
539
|
|
540
540
|
# Filter matplotlib>=3.7.2 warning and Seaborn use_inf and is_categorical FutureWarnings
|
541
541
|
warnings.filterwarnings("ignore", category=UserWarning, message="The figure layout has changed to tight")
|
@@ -819,7 +819,8 @@ def plot_results(file="path/to/results.csv", dir="", segment=False, pose=False,
|
|
819
819
|
>>> from ultralytics.utils.plotting import plot_results
|
820
820
|
>>> plot_results("path/to/results.csv", segment=True)
|
821
821
|
"""
|
822
|
-
import
|
822
|
+
import matplotlib.pyplot as plt # scope for faster 'import ultralytics'
|
823
|
+
import pandas as pd
|
823
824
|
from scipy.ndimage import gaussian_filter1d
|
824
825
|
|
825
826
|
save_dir = Path(file).parent if file else Path(dir)
|
@@ -878,6 +879,8 @@ def plt_color_scatter(v, f, bins=20, cmap="viridis", alpha=0.8, edgecolors="none
|
|
878
879
|
>>> f = np.random.rand(100)
|
879
880
|
>>> plt_color_scatter(v, f)
|
880
881
|
"""
|
882
|
+
import matplotlib.pyplot as plt # scope for faster 'import ultralytics'
|
883
|
+
|
881
884
|
# Calculate 2D histogram and corresponding colors
|
882
885
|
hist, xedges, yedges = np.histogram2d(v, f, bins=bins)
|
883
886
|
colors = [
|
@@ -903,7 +906,8 @@ def plot_tune_results(csv_file="tune_results.csv"):
|
|
903
906
|
Examples:
|
904
907
|
>>> plot_tune_results("path/to/tune_results.csv")
|
905
908
|
"""
|
906
|
-
import
|
909
|
+
import matplotlib.pyplot as plt # scope for faster 'import ultralytics'
|
910
|
+
import pandas as pd
|
907
911
|
from scipy.ndimage import gaussian_filter1d
|
908
912
|
|
909
913
|
def _save_one_file(file):
|
@@ -980,6 +984,8 @@ def feature_visualization(x, module_type, stage, n=32, save_dir=Path("runs/detec
|
|
980
984
|
n (int, optional): Maximum number of feature maps to plot.
|
981
985
|
save_dir (Path, optional): Directory to save results.
|
982
986
|
"""
|
987
|
+
import matplotlib.pyplot as plt # scope for faster 'import ultralytics'
|
988
|
+
|
983
989
|
for m in {"Detect", "Segment", "Pose", "Classify", "OBB", "RTDETRDecoder"}: # all model heads
|
984
990
|
if m in module_type:
|
985
991
|
return
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ultralytics
|
3
|
-
Version: 8.3.
|
3
|
+
Version: 8.3.125
|
4
4
|
Summary: Ultralytics YOLO 🚀 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
|
5
5
|
Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>, Jing Qiu <jing.qiu@ultralytics.com>
|
6
6
|
Maintainer-email: Ultralytics <hello@ultralytics.com>
|
@@ -5,13 +5,13 @@ tests/test_cuda.py,sha256=vCpPMAkEUQrQMVe4oMwGZQVOiuujEAkZ2zturNXFF-4,6256
|
|
5
5
|
tests/test_engine.py,sha256=aGqZ8P7QO5C_nOa1b4FOyk92Ysdk5WiP-ST310Vyxys,4962
|
6
6
|
tests/test_exports.py,sha256=dhZn86LdbapW15RthQF870LGxDjC1MUZhlGdBgPmgIQ,9716
|
7
7
|
tests/test_integrations.py,sha256=dQteeRsRVuT_p5-T88-7jqT65Zm9iAXkyKg-KQ1_TQ8,6341
|
8
|
-
tests/test_python.py,sha256=
|
8
|
+
tests/test_python.py,sha256=hkOJc0Ejin3Bywyw0BT4pPex5hwwfbmw0K5ChRtvdvw,25398
|
9
9
|
tests/test_solutions.py,sha256=BIvg9zW0a_ggEmrPKgB_Y0MncveH-eYuN5KlqdJ6nHs,5726
|
10
|
-
ultralytics/__init__.py,sha256=
|
10
|
+
ultralytics/__init__.py,sha256=4QZuLQ9zDL-596BL2iVx4dIiVPri_412418f6UrtZDQ,730
|
11
11
|
ultralytics/assets/bus.jpg,sha256=wCAZxJecGR63Od3ZRERe9Aja1Weayrb9Ug751DS_vGM,137419
|
12
12
|
ultralytics/assets/zidane.jpg,sha256=Ftc4aeMmen1O0A3o6GCDO9FlfBslLpTAw0gnetx7bts,50427
|
13
|
-
ultralytics/cfg/__init__.py,sha256=
|
14
|
-
ultralytics/cfg/default.yaml,sha256=
|
13
|
+
ultralytics/cfg/__init__.py,sha256=We3ti0mvUQrGRmUPcufDGboW0YAO3nSRYuoWxGagk3M,39462
|
14
|
+
ultralytics/cfg/default.yaml,sha256=ceGQ1n6gAhImYs5xwn4uWrX4jzQffVbNnKcWOScy-k0,8296
|
15
15
|
ultralytics/cfg/datasets/Argoverse.yaml,sha256=_xlEDIJ9XkUo0v_iNL7FW079BoSeZtKSuLteKTtGbA8,3275
|
16
16
|
ultralytics/cfg/datasets/DOTAv1.5.yaml,sha256=SHND_CFkojxw5iQD5Mcgju2kCZIl0gW2ajuzv1cqoL0,1224
|
17
17
|
ultralytics/cfg/datasets/DOTAv1.yaml,sha256=j_DvXVQzZ4dQmf8I7oPX4v9xO3WZXztxV4Xo9VhUTsM,1194
|
@@ -111,22 +111,22 @@ ultralytics/data/dataset.py,sha256=hbsjhmZBO-T1_gkUAm128kKowdwsLNwnK2lhnzmxJB8,3
|
|
111
111
|
ultralytics/data/loaders.py,sha256=MRu9ylvwLfBxX2eH4wRNvk4rNyUEIHBb8c0QyDOX-8c,28488
|
112
112
|
ultralytics/data/split.py,sha256=6LHB1z8woXurWjXfM-Zm2thRr1KXvzR18CFJA-SDUvE,4677
|
113
113
|
ultralytics/data/split_dota.py,sha256=ihG56YfNFZJDq1r7Zcgk8fKzde3gn21W0f67ub6nT68,11879
|
114
|
-
ultralytics/data/utils.py,sha256=
|
114
|
+
ultralytics/data/utils.py,sha256=rScK5o-WgcjZ-x-WOHv5EnPWfl2-ZHCg-EdDImND9xs,35263
|
115
115
|
ultralytics/data/scripts/download_weights.sh,sha256=0y8XtZxOru7dVThXDFUXLHBuICgOIqZNUwpyL4Rh6lg,595
|
116
116
|
ultralytics/data/scripts/get_coco.sh,sha256=UuJpJeo3qQpTHVINeOpmP0NYmg8PhEFE3A8J3jKrnPw,1768
|
117
117
|
ultralytics/data/scripts/get_coco128.sh,sha256=qmRQl_hOKrsdHrTrnyQuFIH01oDz3lfaz138OgGfLt8,650
|
118
118
|
ultralytics/data/scripts/get_imagenet.sh,sha256=hr42H16bM47iT27rgS7MpEo-GeOZAYUQXgr0B2cwn48,1705
|
119
119
|
ultralytics/engine/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXppv1-QUM,70
|
120
|
-
ultralytics/engine/exporter.py,sha256=
|
121
|
-
ultralytics/engine/model.py,sha256=
|
120
|
+
ultralytics/engine/exporter.py,sha256=aaZ_-np1q0klWtDXp6CxVjyiZ0DDXx-8Pqg4jZSByuE,70246
|
121
|
+
ultralytics/engine/model.py,sha256=37qGh6aqqPTUyMfpsvBQMaZ1Av7eJDe6mfRl9GvlfKg,52860
|
122
122
|
ultralytics/engine/predictor.py,sha256=YJ5l-0qIpr6JAJxowswtZ0IqmXBqVTvAA9vR40v0sCM,21752
|
123
123
|
ultralytics/engine/results.py,sha256=-JPBn_YMyZv6HhdlyhjRIZCcMf41LTyWID7JrEP64rc,79632
|
124
|
-
ultralytics/engine/trainer.py,sha256=
|
125
|
-
ultralytics/engine/tuner.py,sha256=
|
124
|
+
ultralytics/engine/trainer.py,sha256=1J_by51vXccnF-uCB_40eUsuPLDexCEWv4775v7RrAQ,38859
|
125
|
+
ultralytics/engine/tuner.py,sha256=zEW1UpLlZ6N4xbvS7MxICkshRlaFgLNfuADA0VfRpao,12629
|
126
126
|
ultralytics/engine/validator.py,sha256=jfV81wuFDgrVVXEcPzgOpxAPrAZn-1LgpKwu9l_1-ts,17050
|
127
127
|
ultralytics/hub/__init__.py,sha256=wDtAUKdfqob95tfFHgDJFXcsNSDSdoIQkJTm-CfIUTI,6616
|
128
128
|
ultralytics/hub/auth.py,sha256=_bGQVLTgP-ina4fQxq2M7qkj9zKKfxb99_VWgN3S_4k,5549
|
129
|
-
ultralytics/hub/session.py,sha256=
|
129
|
+
ultralytics/hub/session.py,sha256=Hohzn2L2QJTYszIHqwxnsK4V-0MOU-8ldMIfpxMtLSE,18708
|
130
130
|
ultralytics/hub/utils.py,sha256=luSqI4Ym7A1NRFrDsryPTDrlFL8FJdWQ9Zyrl9d-Abs,9661
|
131
131
|
ultralytics/hub/google/__init__.py,sha256=rV9_KoRBwYlwyx3QLaBp1opw5Sjrbgl0YoDHtXoHIMw,8429
|
132
132
|
ultralytics/models/__init__.py,sha256=DqQFFYJ4IQlqIDb61H1HzcnZU7SuHN-43bw94-l-YAQ,309
|
@@ -162,7 +162,7 @@ ultralytics/models/utils/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXp
|
|
162
162
|
ultralytics/models/utils/loss.py,sha256=FShJFvzFBk0HRepRhiSVNz9J-Cq08FxkSNXhLppycI0,19993
|
163
163
|
ultralytics/models/utils/ops.py,sha256=SuBnwwgUTqByNHpufobGLW72yO2cyfZFi14KAFWSjjw,13613
|
164
164
|
ultralytics/models/yolo/__init__.py,sha256=or0j5xvcM0usMlsFTYhNAOcQUri7reD0cD9JR5b7zDk,307
|
165
|
-
ultralytics/models/yolo/model.py,sha256=
|
165
|
+
ultralytics/models/yolo/model.py,sha256=tZoatV-pWVi4ADyYoesui_3qr-QLdbRpFMMG55CsY_k,14272
|
166
166
|
ultralytics/models/yolo/classify/__init__.py,sha256=9--HVaNOfI1K7rn_rRqclL8FUAnpfeBrRqEQIaQw2xM,383
|
167
167
|
ultralytics/models/yolo/classify/predict.py,sha256=JV9szginTQ9Lpob0FozhKMiEIu1vVaYg4YItuVK2AFM,4081
|
168
168
|
ultralytics/models/yolo/classify/train.py,sha256=rv2CJv9fzvtHf2q4l5g0RsjplWKeLpz637kKqjtrLNY,9737
|
@@ -192,8 +192,8 @@ ultralytics/models/yolo/yoloe/train.py,sha256=St3zw_XWRol9pODWU4lvKlJnWYr1lmWQNu
|
|
192
192
|
ultralytics/models/yolo/yoloe/train_seg.py,sha256=l0SOMQQd0Y_EBBHhTNekgrQsftqhYyK4oWTdCg1dLrE,4633
|
193
193
|
ultralytics/models/yolo/yoloe/val.py,sha256=oA8cVT3pBXF6aPZy7ITq0mDcktRuIgks8tTtqMRISyY,8431
|
194
194
|
ultralytics/nn/__init__.py,sha256=rjociYD9lo_K-d-1s6TbdWklPLjTcEHk7OIlRDJstIE,615
|
195
|
-
ultralytics/nn/autobackend.py,sha256=
|
196
|
-
ultralytics/nn/tasks.py,sha256=
|
195
|
+
ultralytics/nn/autobackend.py,sha256=03DGRLuVDJ8T2zWFqmAX0eOhy42bhIRS7KdpSII8bEE,39309
|
196
|
+
ultralytics/nn/tasks.py,sha256=0rnM6Z01BUnRtUwCkTwVsPxZ_D3A5tNbBjd7aEoxxns,62943
|
197
197
|
ultralytics/nn/text_model.py,sha256=8_7SRejKZA4Pi-ha0gjcWrQDDCDMBhtwlg8pPMWgjDE,13145
|
198
198
|
ultralytics/nn/modules/__init__.py,sha256=dXLtIk9rt944WfsTdpgEdWOg3HQEHdwQztuZ6WNJygs,3144
|
199
199
|
ultralytics/nn/modules/activation.py,sha256=PvXZkA9AzEntR575JkFORdmtcRwATyy0lje-uHA5_8w,2210
|
@@ -204,7 +204,7 @@ ultralytics/nn/modules/transformer.py,sha256=tC80QKFaLtWZo0zVNTuORX4pOu6HVs2wS0v
|
|
204
204
|
ultralytics/nn/modules/utils.py,sha256=rn8yTObZGkQoqVzjbZWLaHiytppG4ffjMME4Lw60glM,6092
|
205
205
|
ultralytics/solutions/__init__.py,sha256=pjNYva0qnw-4hf_tTLx_dgIfg24XrYLLp3kygPj95rs,1113
|
206
206
|
ultralytics/solutions/ai_gym.py,sha256=QRrZGMka83NY4B9gU3N2GxTaomo0WmTMNLxkNZTxo9U,5763
|
207
|
-
ultralytics/solutions/analytics.py,sha256=
|
207
|
+
ultralytics/solutions/analytics.py,sha256=u-khRAViGupjq9mkuAFCl9G3yE8hXfXASfKZd_SQZ-8,12111
|
208
208
|
ultralytics/solutions/config.py,sha256=ogXWpE0LhVXHz05M2ChrVu5usIxsRy2yxraHuSyc_V0,5330
|
209
209
|
ultralytics/solutions/distance_calculation.py,sha256=E13siGlQTqaGCk0xULk5Q86PwxiBAL4XWp83kQPb0YE,5751
|
210
210
|
ultralytics/solutions/heatmap.py,sha256=lXYptA_EbypipF7YJMjsxxBzLAgsroLcdqypvNAhduA,5569
|
@@ -225,15 +225,15 @@ ultralytics/trackers/__init__.py,sha256=Zlu_Ig5osn7hqch_g5Be_e4pwZUkeeTQiesJCi0p
|
|
225
225
|
ultralytics/trackers/basetrack.py,sha256=LYvWB5d7Woyrz_RlxaopjV07RQKH3sff_lZJfMcMxcA,4450
|
226
226
|
ultralytics/trackers/bot_sort.py,sha256=rpaj7X8COT0Vi5GFR9z-CGSBgJ7gTfFx2wTSZFTnhco,11466
|
227
227
|
ultralytics/trackers/byte_tracker.py,sha256=D7JQ_6V8OUMQryxTrAr010UXMSaboQnI7T1xppzHXYg,20921
|
228
|
-
ultralytics/trackers/track.py,sha256=
|
228
|
+
ultralytics/trackers/track.py,sha256=ghFyAaXg1fp7QPX_SDWkH05cx07xnAlhUypkT3djXD0,4825
|
229
229
|
ultralytics/trackers/utils/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXppv1-QUM,70
|
230
230
|
ultralytics/trackers/utils/gmc.py,sha256=dz3I5LbIv7h1__Xg7rGHecQFE32VFTe54tUnxb8F0Z8,14466
|
231
231
|
ultralytics/trackers/utils/kalman_filter.py,sha256=A0CqOnnaKH6kr0XwuHzyHmIU6aJAjJYxF9jVlNBKZHo,21326
|
232
232
|
ultralytics/trackers/utils/matching.py,sha256=7eIufSdeN7cXuFMjvcfvz0Ldq84m4YKZl5IGxBR8IIo,7169
|
233
|
-
ultralytics/utils/__init__.py,sha256=
|
233
|
+
ultralytics/utils/__init__.py,sha256=mmLPuinPhaSyvSfDdsyADIjlJQ2ow5z3OhYFo2NxwE0,52679
|
234
234
|
ultralytics/utils/autobatch.py,sha256=kg05q2qKg74y_Uq2vvr01i3KhLfpVR7sT0IXBt3_kyI,4921
|
235
|
-
ultralytics/utils/benchmarks.py,sha256=
|
236
|
-
ultralytics/utils/checks.py,sha256=
|
235
|
+
ultralytics/utils/benchmarks.py,sha256=Tcmq8e04Gw5nNtV4vXIWnr7zfV21PQ6Tqg_0srbt-fc,30162
|
236
|
+
ultralytics/utils/checks.py,sha256=NtDOmKMmsiOiOecjBoaLFQLp2K_kr7LFFO-gxSBDgYU,32688
|
237
237
|
ultralytics/utils/dist.py,sha256=aytW0JEkcA5ZTZucV92ot7Bn-apiej8aLk3QNWicjAc,4103
|
238
238
|
ultralytics/utils/downloads.py,sha256=Rn8xDwn2bzgBqiYz3Xn0rm3MWjk4T-QUd2Ajlu1EpQ4,22312
|
239
239
|
ultralytics/utils/errors.py,sha256=vY9h2evFSrHnZdHJVVrmm8Zzw4qVDLyo9DeYW5g0dFk,1573
|
@@ -241,10 +241,10 @@ ultralytics/utils/export.py,sha256=1MgT6rSuofvLRR-J01EQvfHylzyO_b5BDM13imypQzA,8
|
|
241
241
|
ultralytics/utils/files.py,sha256=0K4O1cgqRiXaDw7EQK13TqA5SME_RrvfDVQSPetNr5w,8042
|
242
242
|
ultralytics/utils/instance.py,sha256=UOEsXR9V-bXNRk6BTonASBEgeMqvzzAk4S7VdXZJUAM,18090
|
243
243
|
ultralytics/utils/loss.py,sha256=zIDWS_0AOH-yEYLcsfmFRUkApPIZhu2ENsB0UwJYIuw,37607
|
244
|
-
ultralytics/utils/metrics.py,sha256=
|
244
|
+
ultralytics/utils/metrics.py,sha256=L0d1nOqxuc_TuveiIchGclkahsUkXOpbYpwjQ8ZVzyw,53937
|
245
245
|
ultralytics/utils/ops.py,sha256=YFwPrKlPcgEmgAWqnJVR0Ccx5NQgp5e3P-YYHwVSP0k,34779
|
246
246
|
ultralytics/utils/patches.py,sha256=6rVT-l8WDp_Py3O-gZdv9t3PnrYRRkrX_lF3mZ1XS8c,4928
|
247
|
-
ultralytics/utils/plotting.py,sha256=
|
247
|
+
ultralytics/utils/plotting.py,sha256=8n9G1RvFAv4fk09iqZt7D-VXUqfAHoOTBcGXE7BHEE0,46807
|
248
248
|
ultralytics/utils/tal.py,sha256=P5nPoR9qNnFuDIda0fsn8WP6m1V8r7EbvXUuhNRFFTA,20805
|
249
249
|
ultralytics/utils/torch_utils.py,sha256=SOdT9asxyQ-MEJGZQIH_Va9jcbonjISeHOwiFg1gRYE,39180
|
250
250
|
ultralytics/utils/triton.py,sha256=xK9Db_ZUVDnIK1u76S2G-6ulIBsLfj9HN_YOaSrnMuU,5304
|
@@ -260,9 +260,9 @@ ultralytics/utils/callbacks/neptune.py,sha256=JaI95Cj2kIjUhlEEOiDN0-Drc-fDelLhNI
|
|
260
260
|
ultralytics/utils/callbacks/raytune.py,sha256=A8amUGpux7dYES-L1iSeMoMXBySGWCD1aUqT7vcG-pU,1284
|
261
261
|
ultralytics/utils/callbacks/tensorboard.py,sha256=jgYnym3cUQFAgN1GzTyO7l3jINtfAh8zhrllDvnLuVQ,5339
|
262
262
|
ultralytics/utils/callbacks/wb.py,sha256=iDRFXI4IIDm8R5OI89DMTmjs8aHLo1HRCLkOFKdaMG4,7507
|
263
|
-
ultralytics-8.3.
|
264
|
-
ultralytics-8.3.
|
265
|
-
ultralytics-8.3.
|
266
|
-
ultralytics-8.3.
|
267
|
-
ultralytics-8.3.
|
268
|
-
ultralytics-8.3.
|
263
|
+
ultralytics-8.3.125.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
264
|
+
ultralytics-8.3.125.dist-info/METADATA,sha256=Z_UvZKfIDM36rzOfTtP77x_sD2rdAApQONjqSwDs6KI,37180
|
265
|
+
ultralytics-8.3.125.dist-info/WHEEL,sha256=GHB6lJx2juba1wDgXDNlMTyM13ckjBMKf-OnwgKOCtA,91
|
266
|
+
ultralytics-8.3.125.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
|
267
|
+
ultralytics-8.3.125.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
|
268
|
+
ultralytics-8.3.125.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|