ultralytics 8.3.89__py3-none-any.whl → 8.3.90__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/conftest.py +2 -2
- tests/test_cli.py +13 -11
- tests/test_cuda.py +10 -1
- tests/test_integrations.py +1 -5
- tests/test_python.py +16 -16
- tests/test_solutions.py +9 -9
- ultralytics/__init__.py +1 -1
- ultralytics/cfg/__init__.py +3 -1
- ultralytics/cfg/models/11/yolo11-cls.yaml +5 -5
- ultralytics/cfg/models/11/yolo11-obb.yaml +5 -5
- ultralytics/cfg/models/11/yolo11-pose.yaml +5 -5
- ultralytics/cfg/models/11/yolo11-seg.yaml +5 -5
- ultralytics/cfg/models/11/yolo11.yaml +5 -5
- ultralytics/cfg/models/v8/yolov8-ghost-p2.yaml +5 -5
- ultralytics/cfg/models/v8/yolov8-ghost-p6.yaml +5 -5
- ultralytics/cfg/models/v8/yolov8-ghost.yaml +5 -5
- ultralytics/cfg/models/v8/yolov8-obb.yaml +5 -5
- ultralytics/cfg/models/v8/yolov8-p6.yaml +5 -5
- ultralytics/cfg/models/v8/yolov8-rtdetr.yaml +5 -5
- ultralytics/cfg/models/v8/yolov8-world.yaml +5 -5
- ultralytics/cfg/models/v8/yolov8-worldv2.yaml +5 -5
- ultralytics/cfg/models/v8/yolov8.yaml +5 -5
- ultralytics/cfg/models/v9/yolov9c-seg.yaml +1 -1
- ultralytics/cfg/models/v9/yolov9c.yaml +1 -1
- ultralytics/cfg/models/v9/yolov9e-seg.yaml +1 -1
- ultralytics/cfg/models/v9/yolov9e.yaml +1 -1
- ultralytics/cfg/models/v9/yolov9m.yaml +1 -1
- ultralytics/cfg/models/v9/yolov9s.yaml +1 -1
- ultralytics/cfg/models/v9/yolov9t.yaml +1 -1
- ultralytics/data/annotator.py +9 -14
- ultralytics/data/base.py +118 -30
- ultralytics/data/build.py +63 -24
- ultralytics/data/converter.py +5 -5
- ultralytics/data/dataset.py +207 -53
- ultralytics/data/loaders.py +1 -0
- ultralytics/data/split_dota.py +39 -12
- ultralytics/data/utils.py +13 -19
- ultralytics/engine/exporter.py +19 -17
- ultralytics/engine/model.py +67 -88
- ultralytics/engine/predictor.py +106 -21
- ultralytics/engine/trainer.py +32 -23
- ultralytics/engine/tuner.py +21 -18
- ultralytics/engine/validator.py +75 -41
- ultralytics/hub/__init__.py +12 -13
- ultralytics/hub/auth.py +9 -12
- ultralytics/hub/session.py +76 -21
- ultralytics/hub/utils.py +19 -17
- ultralytics/models/fastsam/model.py +20 -11
- ultralytics/models/fastsam/predict.py +36 -16
- ultralytics/models/fastsam/utils.py +5 -5
- ultralytics/models/fastsam/val.py +6 -6
- ultralytics/models/nas/model.py +22 -11
- ultralytics/models/nas/predict.py +9 -4
- ultralytics/models/nas/val.py +5 -5
- ultralytics/models/rtdetr/model.py +20 -11
- ultralytics/models/rtdetr/predict.py +18 -15
- ultralytics/models/rtdetr/train.py +20 -16
- ultralytics/models/rtdetr/val.py +42 -6
- ultralytics/models/sam/__init__.py +1 -1
- ultralytics/models/sam/amg.py +50 -4
- ultralytics/models/sam/model.py +8 -14
- ultralytics/models/sam/modules/decoders.py +18 -21
- ultralytics/models/sam/modules/encoders.py +25 -46
- ultralytics/models/sam/modules/memory_attention.py +19 -15
- ultralytics/models/sam/modules/sam.py +18 -25
- ultralytics/models/sam/modules/tiny_encoder.py +19 -29
- ultralytics/models/sam/modules/transformer.py +35 -57
- ultralytics/models/sam/modules/utils.py +15 -15
- ultralytics/models/sam/predict.py +0 -3
- ultralytics/models/utils/loss.py +87 -36
- ultralytics/models/utils/ops.py +26 -31
- ultralytics/models/yolo/classify/predict.py +24 -3
- ultralytics/models/yolo/classify/train.py +77 -10
- ultralytics/models/yolo/classify/val.py +40 -15
- ultralytics/models/yolo/detect/predict.py +23 -10
- ultralytics/models/yolo/detect/train.py +85 -15
- ultralytics/models/yolo/detect/val.py +145 -21
- ultralytics/models/yolo/model.py +1 -2
- ultralytics/models/yolo/obb/predict.py +12 -4
- ultralytics/models/yolo/obb/train.py +7 -0
- ultralytics/models/yolo/obb/val.py +25 -7
- ultralytics/models/yolo/pose/predict.py +22 -6
- ultralytics/models/yolo/pose/train.py +17 -1
- ultralytics/models/yolo/pose/val.py +46 -21
- ultralytics/models/yolo/segment/predict.py +22 -8
- ultralytics/models/yolo/segment/train.py +6 -0
- ultralytics/models/yolo/segment/val.py +100 -14
- ultralytics/models/yolo/world/train.py +38 -8
- ultralytics/models/yolo/world/train_world.py +39 -10
- ultralytics/nn/autobackend.py +28 -14
- ultralytics/nn/modules/__init__.py +3 -0
- ultralytics/nn/modules/activation.py +12 -3
- ultralytics/nn/modules/block.py +587 -84
- ultralytics/nn/modules/conv.py +418 -54
- ultralytics/nn/modules/head.py +3 -4
- ultralytics/nn/modules/transformer.py +320 -34
- ultralytics/nn/modules/utils.py +17 -3
- ultralytics/nn/tasks.py +221 -69
- ultralytics/solutions/ai_gym.py +2 -2
- ultralytics/solutions/analytics.py +4 -4
- ultralytics/solutions/heatmap.py +4 -4
- ultralytics/solutions/instance_segmentation.py +10 -4
- ultralytics/solutions/object_blurrer.py +2 -2
- ultralytics/solutions/object_counter.py +2 -2
- ultralytics/solutions/object_cropper.py +2 -2
- ultralytics/solutions/parking_management.py +9 -9
- ultralytics/solutions/queue_management.py +1 -1
- ultralytics/solutions/region_counter.py +2 -2
- ultralytics/solutions/security_alarm.py +7 -7
- ultralytics/solutions/solutions.py +7 -4
- ultralytics/solutions/speed_estimation.py +2 -2
- ultralytics/solutions/streamlit_inference.py +6 -6
- ultralytics/solutions/trackzone.py +9 -2
- ultralytics/solutions/vision_eye.py +4 -4
- ultralytics/trackers/basetrack.py +1 -1
- ultralytics/trackers/bot_sort.py +23 -22
- ultralytics/trackers/byte_tracker.py +4 -4
- ultralytics/trackers/track.py +2 -1
- ultralytics/trackers/utils/gmc.py +26 -27
- ultralytics/trackers/utils/kalman_filter.py +31 -29
- ultralytics/trackers/utils/matching.py +7 -7
- ultralytics/utils/__init__.py +32 -27
- ultralytics/utils/autobatch.py +5 -5
- ultralytics/utils/benchmarks.py +111 -18
- ultralytics/utils/callbacks/base.py +3 -3
- ultralytics/utils/callbacks/clearml.py +11 -11
- ultralytics/utils/callbacks/comet.py +35 -22
- ultralytics/utils/callbacks/dvc.py +11 -10
- ultralytics/utils/callbacks/hub.py +8 -8
- ultralytics/utils/callbacks/mlflow.py +1 -1
- ultralytics/utils/callbacks/neptune.py +12 -10
- ultralytics/utils/callbacks/raytune.py +1 -1
- ultralytics/utils/callbacks/tensorboard.py +6 -6
- ultralytics/utils/callbacks/wb.py +16 -16
- ultralytics/utils/checks.py +116 -35
- ultralytics/utils/dist.py +15 -2
- ultralytics/utils/downloads.py +13 -9
- ultralytics/utils/files.py +12 -13
- ultralytics/utils/instance.py +112 -45
- ultralytics/utils/loss.py +28 -33
- ultralytics/utils/metrics.py +246 -181
- ultralytics/utils/ops.py +61 -53
- ultralytics/utils/patches.py +8 -6
- ultralytics/utils/plotting.py +64 -45
- ultralytics/utils/tal.py +88 -57
- ultralytics/utils/torch_utils.py +181 -33
- ultralytics/utils/triton.py +13 -3
- ultralytics/utils/tuner.py +8 -16
- {ultralytics-8.3.89.dist-info → ultralytics-8.3.90.dist-info}/METADATA +1 -1
- ultralytics-8.3.90.dist-info/RECORD +250 -0
- ultralytics-8.3.89.dist-info/RECORD +0 -250
- {ultralytics-8.3.89.dist-info → ultralytics-8.3.90.dist-info}/LICENSE +0 -0
- {ultralytics-8.3.89.dist-info → ultralytics-8.3.90.dist-info}/WHEEL +0 -0
- {ultralytics-8.3.89.dist-info → ultralytics-8.3.90.dist-info}/entry_points.txt +0 -0
- {ultralytics-8.3.89.dist-info → ultralytics-8.3.90.dist-info}/top_level.txt +0 -0
tests/conftest.py
CHANGED
@@ -25,10 +25,10 @@ def pytest_collection_modifyitems(config, items):
|
|
25
25
|
|
26
26
|
Args:
|
27
27
|
config (pytest.config.Config): The pytest configuration object that provides access to command-line options.
|
28
|
-
items (
|
28
|
+
items (List): The list of collected pytest item objects to be modified based on the presence of --slow option.
|
29
29
|
|
30
30
|
Returns:
|
31
|
-
(None) The function modifies the 'items' list in place
|
31
|
+
(None): The function modifies the 'items' list in place.
|
32
32
|
"""
|
33
33
|
if not config.getoption("--slow"):
|
34
34
|
# Remove the item entirely from the list of test items if it's marked as 'slow'
|
tests/test_cli.py
CHANGED
@@ -15,12 +15,12 @@ TASK_MODEL_DATA = [(task, WEIGHTS_DIR / TASK2MODEL[task], TASK2DATA[task]) for t
|
|
15
15
|
MODELS = [WEIGHTS_DIR / TASK2MODEL[task] for task in TASKS]
|
16
16
|
|
17
17
|
|
18
|
-
def run(cmd):
|
18
|
+
def run(cmd: str) -> None:
|
19
19
|
"""Execute a shell command using subprocess."""
|
20
20
|
subprocess.run(cmd.split(), check=True)
|
21
21
|
|
22
22
|
|
23
|
-
def test_special_modes():
|
23
|
+
def test_special_modes() -> None:
|
24
24
|
"""Test various special command-line modes for YOLO functionality."""
|
25
25
|
run("yolo help")
|
26
26
|
run("yolo checks")
|
@@ -30,33 +30,33 @@ def test_special_modes():
|
|
30
30
|
|
31
31
|
|
32
32
|
@pytest.mark.parametrize("task,model,data", TASK_MODEL_DATA)
|
33
|
-
def test_train(task, model, data):
|
33
|
+
def test_train(task: str, model: str, data: str) -> None:
|
34
34
|
"""Test YOLO training for different tasks, models, and datasets."""
|
35
35
|
run(f"yolo train {task} model={model} data={data} imgsz=32 epochs=1 cache=disk")
|
36
36
|
|
37
37
|
|
38
38
|
@pytest.mark.parametrize("task,model,data", TASK_MODEL_DATA)
|
39
|
-
def test_val(task, model, data):
|
39
|
+
def test_val(task: str, model: str, data: str) -> None:
|
40
40
|
"""Test YOLO validation process for specified task, model, and data using a shell command."""
|
41
41
|
run(f"yolo val {task} model={model} data={data} imgsz=32 save_txt save_json")
|
42
42
|
|
43
43
|
|
44
44
|
@pytest.mark.parametrize("task,model,data", TASK_MODEL_DATA)
|
45
|
-
def test_predict(task, model, data):
|
45
|
+
def test_predict(task: str, model: str, data: str) -> None:
|
46
46
|
"""Test YOLO prediction on provided sample assets for specified task and model."""
|
47
47
|
run(f"yolo predict model={model} source={ASSETS} imgsz=32 save save_crop save_txt")
|
48
48
|
|
49
49
|
|
50
50
|
@pytest.mark.parametrize("model", MODELS)
|
51
|
-
def test_export(model):
|
51
|
+
def test_export(model: str) -> None:
|
52
52
|
"""Test exporting a YOLO model to TorchScript format."""
|
53
53
|
run(f"yolo export model={model} format=torchscript imgsz=32")
|
54
54
|
|
55
55
|
|
56
|
-
def test_rtdetr(task="detect", model="yolov8n-rtdetr.yaml", data="coco8.yaml"):
|
56
|
+
def test_rtdetr(task: str = "detect", model: str = "yolov8n-rtdetr.yaml", data: str = "coco8.yaml") -> None:
|
57
57
|
"""Test the RTDETR functionality within Ultralytics for detection tasks using specified model and data."""
|
58
58
|
# Warning: must use imgsz=640 (note also add coma, spaces, fraction=0.25 args to test single-image training)
|
59
|
-
run(f"yolo train {task} model={model} data={data} --imgsz= 160 epochs =1, cache = disk fraction=0.25")
|
59
|
+
run(f"yolo train {task} model={model} data={data} --imgsz= 160 epochs =1, cache = disk fraction=0.25") # spaces
|
60
60
|
run(f"yolo predict {task} model={model} source={ASSETS / 'bus.jpg'} imgsz=160 save save_crop save_txt")
|
61
61
|
if TORCH_1_9:
|
62
62
|
weights = WEIGHTS_DIR / "rtdetr-l.pt"
|
@@ -64,7 +64,9 @@ def test_rtdetr(task="detect", model="yolov8n-rtdetr.yaml", data="coco8.yaml"):
|
|
64
64
|
|
65
65
|
|
66
66
|
@pytest.mark.skipif(checks.IS_PYTHON_3_12, reason="MobileSAM with CLIP is not supported in Python 3.12")
|
67
|
-
def test_fastsam(
|
67
|
+
def test_fastsam(
|
68
|
+
task: str = "segment", model: str = WEIGHTS_DIR / "FastSAM-s.pt", data: str = "coco8-seg.yaml"
|
69
|
+
) -> None:
|
68
70
|
"""Test FastSAM model for segmenting objects in images using various prompts within Ultralytics."""
|
69
71
|
source = ASSETS / "bus.jpg"
|
70
72
|
|
@@ -88,7 +90,7 @@ def test_fastsam(task="segment", model=WEIGHTS_DIR / "FastSAM-s.pt", data="coco8
|
|
88
90
|
sam_model(source, bboxes=[439, 437, 524, 709], points=[[200, 200]], labels=[1], texts="a photo of a dog")
|
89
91
|
|
90
92
|
|
91
|
-
def test_mobilesam():
|
93
|
+
def test_mobilesam() -> None:
|
92
94
|
"""Test MobileSAM segmentation with point prompts using Ultralytics."""
|
93
95
|
from ultralytics import SAM
|
94
96
|
|
@@ -116,7 +118,7 @@ def test_mobilesam():
|
|
116
118
|
@pytest.mark.parametrize("task,model,data", TASK_MODEL_DATA)
|
117
119
|
@pytest.mark.skipif(not CUDA_IS_AVAILABLE, reason="CUDA is not available")
|
118
120
|
@pytest.mark.skipif(CUDA_DEVICE_COUNT < 2, reason="DDP is not available")
|
119
|
-
def test_train_gpu(task, model, data):
|
121
|
+
def test_train_gpu(task: str, model: str, data: str) -> None:
|
120
122
|
"""Test YOLO training on GPU(s) for various tasks and models."""
|
121
123
|
run(f"yolo train {task} model={model} data={data} imgsz=32 epochs=1 device=0") # single GPU
|
122
124
|
run(f"yolo train {task} model={model} data={data} imgsz=32 epochs=1 device=0,1") # multi GPU
|
tests/test_cuda.py
CHANGED
@@ -40,7 +40,16 @@ def test_amp():
|
|
40
40
|
],
|
41
41
|
)
|
42
42
|
def test_export_engine_matrix(task, dynamic, int8, half, batch):
|
43
|
-
"""
|
43
|
+
"""
|
44
|
+
Test YOLO model export to TensorRT format for various configurations and run inference.
|
45
|
+
|
46
|
+
Args:
|
47
|
+
task (str): Task type like 'detect', 'segment', etc.
|
48
|
+
dynamic (bool): Whether to use dynamic input size.
|
49
|
+
int8 (bool): Whether to use INT8 precision.
|
50
|
+
half (bool): Whether to use FP16 precision.
|
51
|
+
batch (int): Batch size for export.
|
52
|
+
"""
|
44
53
|
file = YOLO(TASK2MODEL[task]).export(
|
45
54
|
format="engine",
|
46
55
|
imgsz=32,
|
tests/test_integrations.py
CHANGED
@@ -64,11 +64,7 @@ def test_mlflow_keep_run_active():
|
|
64
64
|
|
65
65
|
@pytest.mark.skipif(not check_requirements("tritonclient", install=False), reason="tritonclient[all] not installed")
|
66
66
|
def test_triton():
|
67
|
-
"""
|
68
|
-
Test NVIDIA Triton Server functionalities with YOLO model.
|
69
|
-
|
70
|
-
See https://catalog.ngc.nvidia.com/orgs/nvidia/containers/tritonserver.
|
71
|
-
"""
|
67
|
+
"""Test NVIDIA Triton Server functionalities with YOLO model."""
|
72
68
|
check_requirements("tritonclient[all]")
|
73
69
|
from tritonclient.http import InferenceServerClient # noqa
|
74
70
|
|
tests/test_python.py
CHANGED
@@ -73,7 +73,7 @@ def test_model_profile():
|
|
73
73
|
|
74
74
|
@pytest.mark.skipif(not IS_TMP_WRITEABLE, reason="directory is not writeable")
|
75
75
|
def test_predict_txt():
|
76
|
-
"""
|
76
|
+
"""Test YOLO predictions with file, directory, and pattern sources listed in a text file."""
|
77
77
|
file = TMP / "sources_multi_row.txt"
|
78
78
|
with open(file, "w") as f:
|
79
79
|
for src in SOURCES_LIST:
|
@@ -85,7 +85,7 @@ def test_predict_txt():
|
|
85
85
|
@pytest.mark.skipif(True, reason="disabled for testing")
|
86
86
|
@pytest.mark.skipif(not IS_TMP_WRITEABLE, reason="directory is not writeable")
|
87
87
|
def test_predict_csv_multi_row():
|
88
|
-
"""
|
88
|
+
"""Test YOLO predictions with sources listed in multiple rows of a CSV file."""
|
89
89
|
file = TMP / "sources_multi_row.csv"
|
90
90
|
with open(file, "w", newline="") as f:
|
91
91
|
writer = csv.writer(f)
|
@@ -98,7 +98,7 @@ def test_predict_csv_multi_row():
|
|
98
98
|
@pytest.mark.skipif(True, reason="disabled for testing")
|
99
99
|
@pytest.mark.skipif(not IS_TMP_WRITEABLE, reason="directory is not writeable")
|
100
100
|
def test_predict_csv_single_row():
|
101
|
-
"""
|
101
|
+
"""Test YOLO predictions with sources listed in a single row of a CSV file."""
|
102
102
|
file = TMP / "sources_single_row.csv"
|
103
103
|
with open(file, "w", newline="") as f:
|
104
104
|
writer = csv.writer(f)
|
@@ -177,7 +177,7 @@ def test_youtube():
|
|
177
177
|
@pytest.mark.skipif(not IS_TMP_WRITEABLE, reason="directory is not writeable")
|
178
178
|
def test_track_stream():
|
179
179
|
"""
|
180
|
-
|
180
|
+
Test streaming tracking on a short 10 frame video using ByteTrack tracker and different GMC methods.
|
181
181
|
|
182
182
|
Note imgsz=160 required for tracking for higher confidence and better matches.
|
183
183
|
"""
|
@@ -261,7 +261,7 @@ def test_predict_callback_and_setup():
|
|
261
261
|
|
262
262
|
@pytest.mark.parametrize("model", MODELS)
|
263
263
|
def test_results(model):
|
264
|
-
"""
|
264
|
+
"""Test YOLO model results processing and output in various formats."""
|
265
265
|
results = YOLO(WEIGHTS_DIR / model)([SOURCE, SOURCE], imgsz=160)
|
266
266
|
for r in results:
|
267
267
|
r = r.cpu().numpy()
|
@@ -279,7 +279,7 @@ def test_results(model):
|
|
279
279
|
|
280
280
|
|
281
281
|
def test_labels_and_crops():
|
282
|
-
"""Test output from prediction args for saving YOLO detection labels and crops
|
282
|
+
"""Test output from prediction args for saving YOLO detection labels and crops."""
|
283
283
|
imgs = [SOURCE, ASSETS / "zidane.jpg"]
|
284
284
|
results = YOLO(WEIGHTS_DIR / "yolo11n.pt")(imgs, imgsz=160, save_txt=True, save_crop=True)
|
285
285
|
save_path = Path(results[0].save_dir)
|
@@ -334,7 +334,7 @@ def test_data_converter():
|
|
334
334
|
|
335
335
|
|
336
336
|
def test_data_annotator():
|
337
|
-
"""
|
337
|
+
"""Test automatic annotation of data using detection and segmentation models."""
|
338
338
|
from ultralytics.data.annotator import auto_annotate
|
339
339
|
|
340
340
|
auto_annotate(
|
@@ -410,7 +410,7 @@ def test_utils_torchutils():
|
|
410
410
|
|
411
411
|
|
412
412
|
def test_utils_ops():
|
413
|
-
"""Test utility operations
|
413
|
+
"""Test utility operations for coordinate transformations and normalizations."""
|
414
414
|
from ultralytics.utils.ops import (
|
415
415
|
ltwh2xywh,
|
416
416
|
ltwh2xyxy,
|
@@ -454,7 +454,7 @@ def test_utils_files():
|
|
454
454
|
|
455
455
|
@pytest.mark.slow
|
456
456
|
def test_utils_patches_torch_save():
|
457
|
-
"""Test torch_save backoff when _torch_save raises RuntimeError
|
457
|
+
"""Test torch_save backoff when _torch_save raises RuntimeError."""
|
458
458
|
from unittest.mock import MagicMock, patch
|
459
459
|
|
460
460
|
from ultralytics.utils.patches import torch_save
|
@@ -488,7 +488,7 @@ def test_nn_modules_conv():
|
|
488
488
|
|
489
489
|
|
490
490
|
def test_nn_modules_block():
|
491
|
-
"""Test various
|
491
|
+
"""Test various neural network block modules."""
|
492
492
|
from ultralytics.nn.modules.block import C1, C3TR, BottleneckCSP, C3Ghost, C3x
|
493
493
|
|
494
494
|
c1, c2 = 8, 16 # input and output channels
|
@@ -504,7 +504,7 @@ def test_nn_modules_block():
|
|
504
504
|
|
505
505
|
@pytest.mark.skipif(not ONLINE, reason="environment is offline")
|
506
506
|
def test_hub():
|
507
|
-
"""Test Ultralytics HUB functionalities
|
507
|
+
"""Test Ultralytics HUB functionalities."""
|
508
508
|
from ultralytics.hub import export_fmts_hub, logout
|
509
509
|
from ultralytics.hub.utils import smart_request
|
510
510
|
|
@@ -515,7 +515,7 @@ def test_hub():
|
|
515
515
|
|
516
516
|
@pytest.fixture
|
517
517
|
def image():
|
518
|
-
"""Load and return an image from a predefined source
|
518
|
+
"""Load and return an image from a predefined source."""
|
519
519
|
return cv2.imread(str(SOURCE))
|
520
520
|
|
521
521
|
|
@@ -529,7 +529,7 @@ def image():
|
|
529
529
|
],
|
530
530
|
)
|
531
531
|
def test_classify_transforms_train(image, auto_augment, erasing, force_color_jitter):
|
532
|
-
"""
|
532
|
+
"""Test classification transforms during training with various augmentations."""
|
533
533
|
from ultralytics.data.augment import classify_augmentations
|
534
534
|
|
535
535
|
transform = classify_augmentations(
|
@@ -564,7 +564,7 @@ def test_model_tune():
|
|
564
564
|
|
565
565
|
|
566
566
|
def test_model_embeddings():
|
567
|
-
"""Test YOLO model embeddings."""
|
567
|
+
"""Test YOLO model embeddings extraction functionality."""
|
568
568
|
model_detect = YOLO(MODEL)
|
569
569
|
model_segment = YOLO(WEIGHTS_DIR / "yolo11n-seg.pt")
|
570
570
|
|
@@ -575,7 +575,7 @@ def test_model_embeddings():
|
|
575
575
|
|
576
576
|
@pytest.mark.skipif(checks.IS_PYTHON_3_12, reason="YOLOWorld with CLIP is not supported in Python 3.12")
|
577
577
|
def test_yolo_world():
|
578
|
-
"""
|
578
|
+
"""Test YOLO world models with CLIP support."""
|
579
579
|
model = YOLO(WEIGHTS_DIR / "yolov8s-world.pt") # no YOLO11n-world model yet
|
580
580
|
model.set_classes(["tree", "window"])
|
581
581
|
model(SOURCE, conf=0.01)
|
@@ -606,7 +606,7 @@ def test_yolo_world():
|
|
606
606
|
|
607
607
|
|
608
608
|
def test_yolov10():
|
609
|
-
"""Test YOLOv10 model training, validation, and prediction
|
609
|
+
"""Test YOLOv10 model training, validation, and prediction functionality."""
|
610
610
|
model = YOLO("yolov10n.yaml")
|
611
611
|
# train/val/predict
|
612
612
|
model.train(data="coco8.yaml", epochs=1, imgsz=32, close_mosaic=1, cache="disk")
|
tests/test_solutions.py
CHANGED
@@ -29,19 +29,19 @@ def test_major_solutions():
|
|
29
29
|
heatmapcounter = solutions.Heatmap(
|
30
30
|
colormap=cv2.COLORMAP_PARULA, model="yolo11n.pt", show=False, region=region_points
|
31
31
|
) # Test heatmaps with object counting
|
32
|
-
speed = solutions.SpeedEstimator(region=region_points, model="yolo11n.pt", show=False) # Test
|
33
|
-
queue = solutions.QueueManager(region=region_points, model="yolo11n.pt", show=False) # Test
|
34
|
-
lineanalytics = solutions.Analytics(analytics_type="line", model="yolo11n.pt", show=False) #
|
35
|
-
pieanalytics = solutions.Analytics(analytics_type="pie", model="yolo11n.pt", show=False) #
|
36
|
-
baranalytics = solutions.Analytics(analytics_type="bar", model="yolo11n.pt", show=False) #
|
37
|
-
areaanalytics = solutions.Analytics(analytics_type="area", model="yolo11n.pt", show=False) #
|
38
|
-
trackzone = solutions.TrackZone(region=region_points, model="yolo11n.pt", show=False) #
|
32
|
+
speed = solutions.SpeedEstimator(region=region_points, model="yolo11n.pt", show=False) # Test speed estimation
|
33
|
+
queue = solutions.QueueManager(region=region_points, model="yolo11n.pt", show=False) # Test queue management
|
34
|
+
lineanalytics = solutions.Analytics(analytics_type="line", model="yolo11n.pt", show=False) # Line analytics
|
35
|
+
pieanalytics = solutions.Analytics(analytics_type="pie", model="yolo11n.pt", show=False) # Pie analytics
|
36
|
+
baranalytics = solutions.Analytics(analytics_type="bar", model="yolo11n.pt", show=False) # Bar analytics
|
37
|
+
areaanalytics = solutions.Analytics(analytics_type="area", model="yolo11n.pt", show=False) # Area analytics
|
38
|
+
trackzone = solutions.TrackZone(region=region_points, model="yolo11n.pt", show=False) # Track zone monitoring
|
39
39
|
objectcropper = solutions.ObjectCropper(
|
40
40
|
model="yolo11n.pt", show=False, crop_dir=str(TMP / "cropped-detections")
|
41
|
-
) #
|
41
|
+
) # Object cropping
|
42
42
|
objectblurrer = solutions.ObjectBlurrer(blur_ratio=0.5, model="yolo11n.pt", show=False) # Object blurring
|
43
43
|
isegment = solutions.InstanceSegmentation(model="yolo11n-seg.pt", show=False) # Instance segmentation
|
44
|
-
visioneye = solutions.VisionEye(model="yolo11n.pt", show=False) #
|
44
|
+
visioneye = solutions.VisionEye(model="yolo11n.pt", show=False) # Vision Eye solution
|
45
45
|
regioncounter = solutions.RegionCounter(region=region_points, model="yolo11n.pt", show=False) # Region counter
|
46
46
|
frame_count = 0 # Required for analytics
|
47
47
|
while cap.isOpened():
|
ultralytics/__init__.py
CHANGED
ultralytics/cfg/__init__.py
CHANGED
@@ -684,6 +684,9 @@ def handle_yolo_solutions(args: List[str]) -> None:
|
|
684
684
|
check_dict_alignment(full_args_dict, overrides) # dict alignment
|
685
685
|
|
686
686
|
# Get solution name
|
687
|
+
if not args:
|
688
|
+
LOGGER.warning("⚠️ No solution name provided. i.e `yolo solutions count`. Defaulting to 'count'.")
|
689
|
+
args = ["count"]
|
687
690
|
if args[0] == "help":
|
688
691
|
LOGGER.info(SOLUTIONS_HELP_MSG)
|
689
692
|
return # Early return for 'help' case
|
@@ -733,7 +736,6 @@ def handle_yolo_solutions(args: List[str]) -> None:
|
|
733
736
|
if not success:
|
734
737
|
break
|
735
738
|
results = solution(frame, f_n := f_n + 1) if solution_name == "analytics" else solution(frame)
|
736
|
-
LOGGER.info(f"🚀 Results: {results}")
|
737
739
|
if solution_name != "crop":
|
738
740
|
vw.write(results.plot_im)
|
739
741
|
if cv2.waitKey(1) & 0xFF == ord("q"):
|
@@ -8,11 +8,11 @@
|
|
8
8
|
nc: 1000 # number of classes
|
9
9
|
scales: # model compound scaling constants, i.e. 'model=yolo11n-cls.yaml' will call yolo11-cls.yaml with scale 'n'
|
10
10
|
# [depth, width, max_channels]
|
11
|
-
n: [0.50, 0.25, 1024] # summary:
|
12
|
-
s: [0.50, 0.50, 1024] # summary:
|
13
|
-
m: [0.50, 1.00, 512] # summary:
|
14
|
-
l: [1.00, 1.00, 512] # summary:
|
15
|
-
x: [1.00, 1.50, 512] # summary:
|
11
|
+
n: [0.50, 0.25, 1024] # summary: 86 layers, 1633584 parameters, 1633584 gradients, 0.5 GFLOPs
|
12
|
+
s: [0.50, 0.50, 1024] # summary: 86 layers, 5545488 parameters, 5545488 gradients, 1.6 GFLOPs
|
13
|
+
m: [0.50, 1.00, 512] # summary: 106 layers, 10455696 parameters, 10455696 gradients, 5.0 GFLOPs
|
14
|
+
l: [1.00, 1.00, 512] # summary: 176 layers, 12937104 parameters, 12937104 gradients, 6.2 GFLOPs
|
15
|
+
x: [1.00, 1.50, 512] # summary: 176 layers, 28458544 parameters, 28458544 gradients, 13.7 GFLOPs
|
16
16
|
|
17
17
|
# YOLO11n backbone
|
18
18
|
backbone:
|
@@ -8,11 +8,11 @@
|
|
8
8
|
nc: 80 # number of classes
|
9
9
|
scales: # model compound scaling constants, i.e. 'model=yolo11n-obb.yaml' will call yolo11-obb.yaml with scale 'n'
|
10
10
|
# [depth, width, max_channels]
|
11
|
-
n: [0.50, 0.25, 1024] # summary:
|
12
|
-
s: [0.50, 0.50, 1024] # summary:
|
13
|
-
m: [0.50, 1.00, 512] # summary:
|
14
|
-
l: [1.00, 1.00, 512] # summary:
|
15
|
-
x: [1.00, 1.50, 512] # summary:
|
11
|
+
n: [0.50, 0.25, 1024] # summary: 196 layers, 2695747 parameters, 2695731 gradients, 6.9 GFLOPs
|
12
|
+
s: [0.50, 0.50, 1024] # summary: 196 layers, 9744931 parameters, 9744915 gradients, 22.7 GFLOPs
|
13
|
+
m: [0.50, 1.00, 512] # summary: 246 layers, 20963523 parameters, 20963507 gradients, 72.2 GFLOPs
|
14
|
+
l: [1.00, 1.00, 512] # summary: 372 layers, 26220995 parameters, 26220979 gradients, 91.3 GFLOPs
|
15
|
+
x: [1.00, 1.50, 512] # summary: 372 layers, 58875331 parameters, 58875315 gradients, 204.3 GFLOPs
|
16
16
|
|
17
17
|
# YOLO11n backbone
|
18
18
|
backbone:
|
@@ -9,11 +9,11 @@ nc: 80 # number of classes
|
|
9
9
|
kpt_shape: [17, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
|
10
10
|
scales: # model compound scaling constants, i.e. 'model=yolo11n-pose.yaml' will call yolo11.yaml with scale 'n'
|
11
11
|
# [depth, width, max_channels]
|
12
|
-
n: [0.50, 0.25, 1024] # summary:
|
13
|
-
s: [0.50, 0.50, 1024] # summary:
|
14
|
-
m: [0.50, 1.00, 512] # summary:
|
15
|
-
l: [1.00, 1.00, 512] # summary:
|
16
|
-
x: [1.00, 1.50, 512] # summary:
|
12
|
+
n: [0.50, 0.25, 1024] # summary: 196 layers, 2908507 parameters, 2908491 gradients, 7.7 GFLOPs
|
13
|
+
s: [0.50, 0.50, 1024] # summary: 196 layers, 9948811 parameters, 9948795 gradients, 23.5 GFLOPs
|
14
|
+
m: [0.50, 1.00, 512] # summary: 246 layers, 20973273 parameters, 20973257 gradients, 72.3 GFLOPs
|
15
|
+
l: [1.00, 1.00, 512] # summary: 372 layers, 26230745 parameters, 26230729 gradients, 91.4 GFLOPs
|
16
|
+
x: [1.00, 1.50, 512] # summary: 372 layers, 58889881 parameters, 58889865 gradients, 204.3 GFLOPs
|
17
17
|
|
18
18
|
# YOLO11n backbone
|
19
19
|
backbone:
|
@@ -8,11 +8,11 @@
|
|
8
8
|
nc: 80 # number of classes
|
9
9
|
scales: # model compound scaling constants, i.e. 'model=yolo11n-seg.yaml' will call yolo11-seg.yaml with scale 'n'
|
10
10
|
# [depth, width, max_channels]
|
11
|
-
n: [0.50, 0.25, 1024] # summary:
|
12
|
-
s: [0.50, 0.50, 1024] # summary:
|
13
|
-
m: [0.50, 1.00, 512] # summary:
|
14
|
-
l: [1.00, 1.00, 512] # summary:
|
15
|
-
x: [1.00, 1.50, 512] # summary:
|
11
|
+
n: [0.50, 0.25, 1024] # summary: 203 layers, 2876848 parameters, 2876832 gradients, 10.5 GFLOPs
|
12
|
+
s: [0.50, 0.50, 1024] # summary: 203 layers, 10113248 parameters, 10113232 gradients, 35.8 GFLOPs
|
13
|
+
m: [0.50, 1.00, 512] # summary: 253 layers, 22420896 parameters, 22420880 gradients, 123.9 GFLOPs
|
14
|
+
l: [1.00, 1.00, 512] # summary: 379 layers, 27678368 parameters, 27678352 gradients, 143.0 GFLOPs
|
15
|
+
x: [1.00, 1.50, 512] # summary: 379 layers, 62142656 parameters, 62142640 gradients, 320.2 GFLOPs
|
16
16
|
|
17
17
|
# YOLO11n backbone
|
18
18
|
backbone:
|
@@ -8,11 +8,11 @@
|
|
8
8
|
nc: 80 # number of classes
|
9
9
|
scales: # model compound scaling constants, i.e. 'model=yolo11n.yaml' will call yolo11.yaml with scale 'n'
|
10
10
|
# [depth, width, max_channels]
|
11
|
-
n: [0.50, 0.25, 1024] # summary:
|
12
|
-
s: [0.50, 0.50, 1024] # summary:
|
13
|
-
m: [0.50, 1.00, 512] # summary:
|
14
|
-
l: [1.00, 1.00, 512] # summary:
|
15
|
-
x: [1.00, 1.50, 512] # summary:
|
11
|
+
n: [0.50, 0.25, 1024] # summary: 181 layers, 2624080 parameters, 2624064 gradients, 6.6 GFLOPs
|
12
|
+
s: [0.50, 0.50, 1024] # summary: 181 layers, 9458752 parameters, 9458736 gradients, 21.7 GFLOPs
|
13
|
+
m: [0.50, 1.00, 512] # summary: 231 layers, 20114688 parameters, 20114672 gradients, 68.5 GFLOPs
|
14
|
+
l: [1.00, 1.00, 512] # summary: 357 layers, 25372160 parameters, 25372144 gradients, 87.6 GFLOPs
|
15
|
+
x: [1.00, 1.50, 512] # summary: 357 layers, 56966176 parameters, 56966160 gradients, 196.0 GFLOPs
|
16
16
|
|
17
17
|
# YOLO11n backbone
|
18
18
|
backbone:
|
@@ -9,11 +9,11 @@
|
|
9
9
|
nc: 80 # number of classes
|
10
10
|
scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n'
|
11
11
|
# [depth, width, max_channels]
|
12
|
-
n: [0.33, 0.25, 1024] # YOLOv8n-ghost-p2 summary:
|
13
|
-
s: [0.33, 0.50, 1024] # YOLOv8s-ghost-p2 summary:
|
14
|
-
m: [0.67, 0.75, 768] # YOLOv8m-ghost-p2 summary:
|
15
|
-
l: [1.00, 1.00, 512] # YOLOv8l-ghost-p2 summary:
|
16
|
-
x: [1.00, 1.25, 512] # YOLOv8x-ghost-p2 summary:
|
12
|
+
n: [0.33, 0.25, 1024] # YOLOv8n-ghost-p2 summary: 290 layers, 2033944 parameters, 2033928 gradients, 13.8 GFLOPs
|
13
|
+
s: [0.33, 0.50, 1024] # YOLOv8s-ghost-p2 summary: 290 layers, 5562080 parameters, 5562064 gradients, 25.1 GFLOPs
|
14
|
+
m: [0.67, 0.75, 768] # YOLOv8m-ghost-p2 summary: 434 layers, 9031728 parameters, 9031712 gradients, 42.8 GFLOPs
|
15
|
+
l: [1.00, 1.00, 512] # YOLOv8l-ghost-p2 summary: 578 layers, 12214448 parameters, 12214432 gradients, 69.1 GFLOPs
|
16
|
+
x: [1.00, 1.25, 512] # YOLOv8x-ghost-p2 summary: 578 layers, 18664776 parameters, 18664760 gradients, 103.3 GFLOPs
|
17
17
|
|
18
18
|
# YOLOv8.0-ghost backbone
|
19
19
|
backbone:
|
@@ -9,11 +9,11 @@
|
|
9
9
|
nc: 80 # number of classes
|
10
10
|
scales: # model compound scaling constants, i.e. 'model=yolov8n-p6.yaml' will call yolov8-p6.yaml with scale 'n'
|
11
11
|
# [depth, width, max_channels]
|
12
|
-
n: [0.33, 0.25, 1024] # YOLOv8n-ghost-p6 summary:
|
13
|
-
s: [0.33, 0.50, 1024] # YOLOv8s-ghost-p6 summary:
|
14
|
-
m: [0.67, 0.75, 768] # YOLOv8m-ghost-p6 summary:
|
15
|
-
l: [1.00, 1.00, 512] # YOLOv8l-ghost-p6 summary:
|
16
|
-
x: [1.00, 1.25, 512] # YOLOv8x-ghost-p6 summary:
|
12
|
+
n: [0.33, 0.25, 1024] # YOLOv8n-ghost-p6 summary: 312 layers, 2901100 parameters, 2901084 gradients, 5.8 GFLOPs
|
13
|
+
s: [0.33, 0.50, 1024] # YOLOv8s-ghost-p6 summary: 312 layers, 9520008 parameters, 9519992 gradients, 16.4 GFLOPs
|
14
|
+
m: [0.67, 0.75, 768] # YOLOv8m-ghost-p6 summary: 468 layers, 18002904 parameters, 18002888 gradients, 34.4 GFLOPs
|
15
|
+
l: [1.00, 1.00, 512] # YOLOv8l-ghost-p6 summary: 624 layers, 21227584 parameters, 21227568 gradients, 55.3 GFLOPs
|
16
|
+
x: [1.00, 1.25, 512] # YOLOv8x-ghost-p6 summary: 624 layers, 33057852 parameters, 33057836 gradients, 85.7 GFLOPs
|
17
17
|
|
18
18
|
# YOLOv8.0-ghost backbone
|
19
19
|
backbone:
|
@@ -9,11 +9,11 @@
|
|
9
9
|
nc: 80 # number of classes
|
10
10
|
scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n'
|
11
11
|
# [depth, width, max_channels]
|
12
|
-
n: [0.33, 0.25, 1024] # YOLOv8n-ghost summary:
|
13
|
-
s: [0.33, 0.50, 1024] # YOLOv8s-ghost summary:
|
14
|
-
m: [0.67, 0.75, 768] # YOLOv8m-ghost summary:
|
15
|
-
l: [1.00, 1.00, 512] # YOLOv8l-ghost summary:
|
16
|
-
x: [1.00, 1.25, 512] # YOLOv8x-ghost summary:
|
12
|
+
n: [0.33, 0.25, 1024] # YOLOv8n-ghost summary: 237 layers, 1865316 parameters, 1865300 gradients, 5.8 GFLOPs
|
13
|
+
s: [0.33, 0.50, 1024] # YOLOv8s-ghost summary: 237 layers, 5960072 parameters, 5960056 gradients, 16.4 GFLOPs
|
14
|
+
m: [0.67, 0.75, 768] # YOLOv8m-ghost summary: 357 layers, 10336312 parameters, 10336296 gradients, 32.7 GFLOPs
|
15
|
+
l: [1.00, 1.00, 512] # YOLOv8l-ghost summary: 477 layers, 14277872 parameters, 14277856 gradients, 53.7 GFLOPs
|
16
|
+
x: [1.00, 1.25, 512] # YOLOv8x-ghost summary: 477 layers, 22229308 parameters, 22229292 gradients, 83.3 GFLOPs
|
17
17
|
|
18
18
|
# YOLOv8.0n-ghost backbone
|
19
19
|
backbone:
|
@@ -8,11 +8,11 @@
|
|
8
8
|
nc: 80 # number of classes
|
9
9
|
scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n'
|
10
10
|
# [depth, width, max_channels]
|
11
|
-
n: [0.33, 0.25, 1024] # YOLOv8n summary:
|
12
|
-
s: [0.33, 0.50, 1024] # YOLOv8s summary:
|
13
|
-
m: [0.67, 0.75, 768] # YOLOv8m summary:
|
14
|
-
l: [1.00, 1.00, 512] # YOLOv8l summary:
|
15
|
-
x: [1.00, 1.25, 512] # YOLOv8x summary:
|
11
|
+
n: [0.33, 0.25, 1024] # YOLOv8n-obb summary: 144 layers, 3228867 parameters, 3228851 gradients, 9.1 GFLOPs
|
12
|
+
s: [0.33, 0.50, 1024] # YOLOv8s-obb summary: 144 layers, 11452739 parameters, 11452723 gradients, 29.8 GFLOPs
|
13
|
+
m: [0.67, 0.75, 768] # YOLOv8m-obb summary: 184 layers, 26463235 parameters, 26463219 gradients, 81.5 GFLOPs
|
14
|
+
l: [1.00, 1.00, 512] # YOLOv8l-obb summary: 224 layers, 44540355 parameters, 44540339 gradients, 169.4 GFLOPs
|
15
|
+
x: [1.00, 1.25, 512] # YOLOv8x-obb summary: 224 layers, 69555651 parameters, 69555635 gradients, 264.3 GFLOPs
|
16
16
|
|
17
17
|
# YOLOv8.0n backbone
|
18
18
|
backbone:
|
@@ -8,11 +8,11 @@
|
|
8
8
|
nc: 80 # number of classes
|
9
9
|
scales: # model compound scaling constants, i.e. 'model=yolov8n-p6.yaml' will call yolov8-p6.yaml with scale 'n'
|
10
10
|
# [depth, width, max_channels]
|
11
|
-
n: [0.33, 0.25, 1024] # YOLOv8n-p6 summary
|
12
|
-
s: [0.33, 0.50, 1024] # YOLOv8s-p6 summary
|
13
|
-
m: [0.67, 0.75, 768] # YOLOv8m-p6 summary
|
14
|
-
l: [1.00, 1.00, 512] # YOLOv8l-p6 summary
|
15
|
-
x: [1.00, 1.25, 512] # YOLOv8x-p6 summary
|
11
|
+
n: [0.33, 0.25, 1024] # YOLOv8n-p6 summary: 170 layers, 4984352 parameters, 4984336 gradients, 8.8 GFLOPs
|
12
|
+
s: [0.33, 0.50, 1024] # YOLOv8s-p6 summary: 170 layers, 17911792 parameters, 17911776 gradients, 28.7 GFLOPs
|
13
|
+
m: [0.67, 0.75, 768] # YOLOv8m-p6 summary: 222 layers, 44887488 parameters, 44887472 gradients, 83.5 GFLOPs
|
14
|
+
l: [1.00, 1.00, 512] # YOLOv8l-p6 summary: 274 layers, 62384016 parameters, 62384000 gradients, 167.9 GFLOPs
|
15
|
+
x: [1.00, 1.25, 512] # YOLOv8x-p6 summary: 274 layers, 97423072 parameters, 97423056 gradients, 261.8 GFLOPs
|
16
16
|
|
17
17
|
# YOLOv8.0x6 backbone
|
18
18
|
backbone:
|
@@ -8,11 +8,11 @@
|
|
8
8
|
nc: 80 # number of classes
|
9
9
|
scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n'
|
10
10
|
# [depth, width, max_channels]
|
11
|
-
n: [0.33, 0.25, 1024] # YOLOv8n summary:
|
12
|
-
s: [0.33, 0.50, 1024] # YOLOv8s summary:
|
13
|
-
m: [0.67, 0.75, 768] # YOLOv8m summary:
|
14
|
-
l: [1.00, 1.00, 512] # YOLOv8l summary:
|
15
|
-
x: [1.00, 1.25, 512] # YOLOv8x summary:
|
11
|
+
n: [0.33, 0.25, 1024] # YOLOv8n-rtdetr summary: 235 layers, 9643868 parameters, 9643868 gradients, 17.1 GFLOPs
|
12
|
+
s: [0.33, 0.50, 1024] # YOLOv8s-rtdetr summary: 235 layers, 16518572 parameters, 16518572 gradients, 32.8 GFLOPs
|
13
|
+
m: [0.67, 0.75, 768] # YOLOv8m-rtdetr summary: 275 layers, 29645180 parameters, 29645180 gradients, 75.8 GFLOPs
|
14
|
+
l: [1.00, 1.00, 512] # YOLOv8l-rtdetr summary: 315 layers, 45644364 parameters, 45644364 gradients, 152.3 GFLOPs
|
15
|
+
x: [1.00, 1.25, 512] # YOLOv8x-rtdetr summary: 315 layers, 67113884 parameters, 67113884 gradients, 230.8 GFLOPs
|
16
16
|
|
17
17
|
# YOLOv8.0n backbone
|
18
18
|
backbone:
|
@@ -8,11 +8,11 @@
|
|
8
8
|
nc: 80 # number of classes
|
9
9
|
scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n'
|
10
10
|
# [depth, width, max_channels]
|
11
|
-
n: [0.33, 0.25, 1024] # YOLOv8n summary:
|
12
|
-
s: [0.33, 0.50, 1024] # YOLOv8s summary:
|
13
|
-
m: [0.67, 0.75, 768] # YOLOv8m summary:
|
14
|
-
l: [1.00, 1.00, 512] # YOLOv8l summary:
|
15
|
-
x: [1.00, 1.25, 512] # YOLOv8x summary:
|
11
|
+
n: [0.33, 0.25, 1024] # YOLOv8n-world summary: 161 layers, 4204111 parameters, 4204095 gradients, 39.6 GFLOPs
|
12
|
+
s: [0.33, 0.50, 1024] # YOLOv8s-world summary: 161 layers, 13383496 parameters, 13383480 gradients, 71.5 GFLOPs
|
13
|
+
m: [0.67, 0.75, 768] # YOLOv8m-world summary: 201 layers, 29065310 parameters, 29065294 gradients, 131.4 GFLOPs
|
14
|
+
l: [1.00, 1.00, 512] # YOLOv8l-world summary: 241 layers, 47553970 parameters, 47553954 gradients, 225.6 GFLOPs
|
15
|
+
x: [1.00, 1.25, 512] # YOLOv8x-world summary: 241 layers, 73690217 parameters, 73690201 gradients, 330.8 GFLOPs
|
16
16
|
|
17
17
|
# YOLOv8.0n backbone
|
18
18
|
backbone:
|
@@ -8,11 +8,11 @@
|
|
8
8
|
nc: 80 # number of classes
|
9
9
|
scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n'
|
10
10
|
# [depth, width, max_channels]
|
11
|
-
n: [0.33, 0.25, 1024] # YOLOv8n summary:
|
12
|
-
s: [0.33, 0.50, 1024] # YOLOv8s summary:
|
13
|
-
m: [0.67, 0.75, 768] # YOLOv8m summary:
|
14
|
-
l: [1.00, 1.00, 512] # YOLOv8l summary:
|
15
|
-
x: [1.00, 1.25, 512] # YOLOv8x summary:
|
11
|
+
n: [0.33, 0.25, 1024] # YOLOv8n-worldv2 summary: 148 layers, 3695183 parameters, 3695167 gradients, 19.5 GFLOPS
|
12
|
+
s: [0.33, 0.50, 1024] # YOLOv8s-worldv2 summary: 148 layers, 12759880 parameters, 12759864 gradients, 51.0 GFLOPS
|
13
|
+
m: [0.67, 0.75, 768] # YOLOv8m-worldv2 summary: 188 layers, 28376158 parameters, 28376142 gradients, 110.5 GFLOPS
|
14
|
+
l: [1.00, 1.00, 512] # YOLOv8l-worldv2 summary: 228 layers, 46832050 parameters, 46832034 gradients, 204.5 GFLOPS
|
15
|
+
x: [1.00, 1.25, 512] # YOLOv8x-worldv2 summary: 228 layers, 72886377 parameters, 72886361 gradients, 309.3 GFLOPS
|
16
16
|
|
17
17
|
# YOLOv8.0n backbone
|
18
18
|
backbone:
|
@@ -8,11 +8,11 @@
|
|
8
8
|
nc: 80 # number of classes
|
9
9
|
scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n'
|
10
10
|
# [depth, width, max_channels]
|
11
|
-
n: [0.33, 0.25, 1024] # YOLOv8n summary:
|
12
|
-
s: [0.33, 0.50, 1024] # YOLOv8s summary:
|
13
|
-
m: [0.67, 0.75, 768] # YOLOv8m summary:
|
14
|
-
l: [1.00, 1.00, 512] # YOLOv8l summary:
|
15
|
-
x: [1.00, 1.25, 512] # YOLOv8x summary:
|
11
|
+
n: [0.33, 0.25, 1024] # YOLOv8n summary: 129 layers, 3157200 parameters, 3157184 gradients, 8.9 GFLOPS
|
12
|
+
s: [0.33, 0.50, 1024] # YOLOv8s summary: 129 layers, 11166560 parameters, 11166544 gradients, 28.8 GFLOPS
|
13
|
+
m: [0.67, 0.75, 768] # YOLOv8m summary: 169 layers, 25902640 parameters, 25902624 gradients, 79.3 GFLOPS
|
14
|
+
l: [1.00, 1.00, 512] # YOLOv8l summary: 209 layers, 43691520 parameters, 43691504 gradients, 165.7 GFLOPS
|
15
|
+
x: [1.00, 1.25, 512] # YOLOv8x summary: 209 layers, 68229648 parameters, 68229632 gradients, 258.5 GFLOPS
|
16
16
|
|
17
17
|
# YOLOv8.0n backbone
|
18
18
|
backbone:
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# YOLOv9c-seg instance segmentation model with P3/8 - P5/32 outputs
|
4
4
|
# Model docs: https://docs.ultralytics.com/models/yolov9
|
5
5
|
# Task docs: https://docs.ultralytics.com/tasks/segment
|
6
|
-
#
|
6
|
+
# 380 layers, 27897120 parameters, 159.4 GFLOPs
|
7
7
|
|
8
8
|
# Parameters
|
9
9
|
nc: 80 # number of classes
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# YOLOv9c object detection model with P3/8 - P5/32 outputs
|
4
4
|
# Model docs: https://docs.ultralytics.com/models/yolov9
|
5
5
|
# Task docs: https://docs.ultralytics.com/tasks/detect
|
6
|
-
#
|
6
|
+
# 358 layers, 25590912 parameters, 104.0 GFLOPs
|
7
7
|
|
8
8
|
# Parameters
|
9
9
|
nc: 80 # number of classes
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# YOLOv9e-seg instance segmentation model with P3/8 - P5/32 outputs
|
4
4
|
# Model docs: https://docs.ultralytics.com/models/yolov9
|
5
5
|
# Task docs: https://docs.ultralytics.com/tasks/segment
|
6
|
-
#
|
6
|
+
# 743 layers, 60512800 parameters, 248.4 GFLOPs
|
7
7
|
|
8
8
|
# Parameters
|
9
9
|
nc: 80 # number of classes
|