dgenerate-ultralytics-headless 8.3.248__py3-none-any.whl → 8.4.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. {dgenerate_ultralytics_headless-8.3.248.dist-info → dgenerate_ultralytics_headless-8.4.7.dist-info}/METADATA +52 -61
  2. {dgenerate_ultralytics_headless-8.3.248.dist-info → dgenerate_ultralytics_headless-8.4.7.dist-info}/RECORD +97 -84
  3. {dgenerate_ultralytics_headless-8.3.248.dist-info → dgenerate_ultralytics_headless-8.4.7.dist-info}/WHEEL +1 -1
  4. tests/__init__.py +2 -2
  5. tests/conftest.py +1 -1
  6. tests/test_cuda.py +8 -2
  7. tests/test_engine.py +8 -8
  8. tests/test_exports.py +11 -4
  9. tests/test_integrations.py +9 -9
  10. tests/test_python.py +41 -16
  11. tests/test_solutions.py +3 -3
  12. ultralytics/__init__.py +1 -1
  13. ultralytics/cfg/__init__.py +31 -31
  14. ultralytics/cfg/datasets/TT100K.yaml +346 -0
  15. ultralytics/cfg/datasets/coco12-formats.yaml +101 -0
  16. ultralytics/cfg/default.yaml +3 -1
  17. ultralytics/cfg/models/26/yolo26-cls.yaml +33 -0
  18. ultralytics/cfg/models/26/yolo26-obb.yaml +52 -0
  19. ultralytics/cfg/models/26/yolo26-p2.yaml +60 -0
  20. ultralytics/cfg/models/26/yolo26-p6.yaml +62 -0
  21. ultralytics/cfg/models/26/yolo26-pose.yaml +53 -0
  22. ultralytics/cfg/models/26/yolo26-seg.yaml +52 -0
  23. ultralytics/cfg/models/26/yolo26.yaml +52 -0
  24. ultralytics/cfg/models/26/yoloe-26-seg.yaml +53 -0
  25. ultralytics/cfg/models/26/yoloe-26.yaml +53 -0
  26. ultralytics/data/annotator.py +2 -2
  27. ultralytics/data/augment.py +15 -0
  28. ultralytics/data/converter.py +76 -45
  29. ultralytics/data/dataset.py +1 -1
  30. ultralytics/data/utils.py +2 -2
  31. ultralytics/engine/exporter.py +34 -28
  32. ultralytics/engine/model.py +38 -37
  33. ultralytics/engine/predictor.py +17 -17
  34. ultralytics/engine/results.py +22 -15
  35. ultralytics/engine/trainer.py +83 -48
  36. ultralytics/engine/tuner.py +20 -11
  37. ultralytics/engine/validator.py +16 -16
  38. ultralytics/models/fastsam/predict.py +1 -1
  39. ultralytics/models/yolo/classify/predict.py +1 -1
  40. ultralytics/models/yolo/classify/train.py +1 -1
  41. ultralytics/models/yolo/classify/val.py +1 -1
  42. ultralytics/models/yolo/detect/predict.py +2 -2
  43. ultralytics/models/yolo/detect/train.py +6 -3
  44. ultralytics/models/yolo/detect/val.py +7 -1
  45. ultralytics/models/yolo/model.py +8 -8
  46. ultralytics/models/yolo/obb/predict.py +2 -2
  47. ultralytics/models/yolo/obb/train.py +3 -3
  48. ultralytics/models/yolo/obb/val.py +1 -1
  49. ultralytics/models/yolo/pose/predict.py +1 -1
  50. ultralytics/models/yolo/pose/train.py +3 -1
  51. ultralytics/models/yolo/pose/val.py +1 -1
  52. ultralytics/models/yolo/segment/predict.py +3 -3
  53. ultralytics/models/yolo/segment/train.py +4 -4
  54. ultralytics/models/yolo/segment/val.py +2 -2
  55. ultralytics/models/yolo/yoloe/train.py +6 -1
  56. ultralytics/models/yolo/yoloe/train_seg.py +6 -1
  57. ultralytics/nn/autobackend.py +14 -8
  58. ultralytics/nn/modules/__init__.py +8 -0
  59. ultralytics/nn/modules/block.py +128 -8
  60. ultralytics/nn/modules/head.py +788 -203
  61. ultralytics/nn/tasks.py +86 -41
  62. ultralytics/nn/text_model.py +5 -2
  63. ultralytics/optim/__init__.py +5 -0
  64. ultralytics/optim/muon.py +338 -0
  65. ultralytics/solutions/ai_gym.py +3 -3
  66. ultralytics/solutions/config.py +1 -1
  67. ultralytics/solutions/heatmap.py +1 -1
  68. ultralytics/solutions/instance_segmentation.py +2 -2
  69. ultralytics/solutions/object_counter.py +1 -1
  70. ultralytics/solutions/parking_management.py +1 -1
  71. ultralytics/solutions/solutions.py +2 -2
  72. ultralytics/trackers/byte_tracker.py +7 -7
  73. ultralytics/trackers/track.py +1 -1
  74. ultralytics/utils/__init__.py +8 -8
  75. ultralytics/utils/benchmarks.py +26 -26
  76. ultralytics/utils/callbacks/platform.py +173 -64
  77. ultralytics/utils/callbacks/tensorboard.py +2 -0
  78. ultralytics/utils/callbacks/wb.py +6 -1
  79. ultralytics/utils/checks.py +28 -9
  80. ultralytics/utils/dist.py +1 -0
  81. ultralytics/utils/downloads.py +5 -3
  82. ultralytics/utils/export/engine.py +19 -10
  83. ultralytics/utils/export/imx.py +38 -20
  84. ultralytics/utils/export/tensorflow.py +21 -21
  85. ultralytics/utils/files.py +2 -2
  86. ultralytics/utils/loss.py +597 -203
  87. ultralytics/utils/metrics.py +2 -1
  88. ultralytics/utils/ops.py +11 -2
  89. ultralytics/utils/patches.py +42 -0
  90. ultralytics/utils/plotting.py +3 -0
  91. ultralytics/utils/tal.py +100 -20
  92. ultralytics/utils/torch_utils.py +1 -1
  93. ultralytics/utils/tqdm.py +4 -1
  94. ultralytics/utils/tuner.py +2 -5
  95. {dgenerate_ultralytics_headless-8.3.248.dist-info → dgenerate_ultralytics_headless-8.4.7.dist-info}/entry_points.txt +0 -0
  96. {dgenerate_ultralytics_headless-8.3.248.dist-info → dgenerate_ultralytics_headless-8.4.7.dist-info}/licenses/LICENSE +0 -0
  97. {dgenerate_ultralytics_headless-8.3.248.dist-info → dgenerate_ultralytics_headless-8.4.7.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,346 @@
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Tsinghua-Tencent 100K (TT100K) dataset https://cg.cs.tsinghua.edu.cn/traffic-sign/ by Tsinghua University
4
+ # Documentation: https://cg.cs.tsinghua.edu.cn/traffic-sign/tutorial.html
5
+ # Paper: Traffic-Sign Detection and Classification in the Wild (CVPR 2016)
6
+ # License: CC BY-NC 2.0 license for non-commercial use only
7
+ # Example usage: yolo train data=TT100K.yaml
8
+ # parent
9
+ # ├── ultralytics
10
+ # └── datasets
11
+ # └── TT100K ← downloads here (~18 GB)
12
+
13
+ # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
14
+ path: TT100K # dataset root dir
15
+ train: images/train # train images (relative to 'path') 6105 images
16
+ val: images/val # val images (relative to 'path') 7641 images (original 'other' split)
17
+ test: images/test # test images (relative to 'path') 3071 images
18
+
19
+ # Classes (221 traffic sign categories, 45 with sufficient training instances)
20
+ names:
21
+ 0: pl5
22
+ 1: pl10
23
+ 2: pl15
24
+ 3: pl20
25
+ 4: pl25
26
+ 5: pl30
27
+ 6: pl40
28
+ 7: pl50
29
+ 8: pl60
30
+ 9: pl70
31
+ 10: pl80
32
+ 11: pl90
33
+ 12: pl100
34
+ 13: pl110
35
+ 14: pl120
36
+ 15: pm5
37
+ 16: pm10
38
+ 17: pm13
39
+ 18: pm15
40
+ 19: pm20
41
+ 20: pm25
42
+ 21: pm30
43
+ 22: pm35
44
+ 23: pm40
45
+ 24: pm46
46
+ 25: pm50
47
+ 26: pm55
48
+ 27: pm8
49
+ 28: pn
50
+ 29: pne
51
+ 30: ph4
52
+ 31: ph4.5
53
+ 32: ph5
54
+ 33: ps
55
+ 34: pg
56
+ 35: ph1.5
57
+ 36: ph2
58
+ 37: ph2.1
59
+ 38: ph2.2
60
+ 39: ph2.4
61
+ 40: ph2.5
62
+ 41: ph2.8
63
+ 42: ph2.9
64
+ 43: ph3
65
+ 44: ph3.2
66
+ 45: ph3.5
67
+ 46: ph3.8
68
+ 47: ph4.2
69
+ 48: ph4.3
70
+ 49: ph4.8
71
+ 50: ph5.3
72
+ 51: ph5.5
73
+ 52: pb
74
+ 53: pr10
75
+ 54: pr100
76
+ 55: pr20
77
+ 56: pr30
78
+ 57: pr40
79
+ 58: pr45
80
+ 59: pr50
81
+ 60: pr60
82
+ 61: pr70
83
+ 62: pr80
84
+ 63: pr90
85
+ 64: p1
86
+ 65: p2
87
+ 66: p3
88
+ 67: p4
89
+ 68: p5
90
+ 69: p6
91
+ 70: p7
92
+ 71: p8
93
+ 72: p9
94
+ 73: p10
95
+ 74: p11
96
+ 75: p12
97
+ 76: p13
98
+ 77: p14
99
+ 78: p15
100
+ 79: p16
101
+ 80: p17
102
+ 81: p18
103
+ 82: p19
104
+ 83: p20
105
+ 84: p21
106
+ 85: p22
107
+ 86: p23
108
+ 87: p24
109
+ 88: p25
110
+ 89: p26
111
+ 90: p27
112
+ 91: p28
113
+ 92: pa8
114
+ 93: pa10
115
+ 94: pa12
116
+ 95: pa13
117
+ 96: pa14
118
+ 97: pb5
119
+ 98: pc
120
+ 99: pg
121
+ 100: ph1
122
+ 101: ph1.3
123
+ 102: ph1.5
124
+ 103: ph2
125
+ 104: ph3
126
+ 105: ph4
127
+ 106: ph5
128
+ 107: pi
129
+ 108: pl0
130
+ 109: pl4
131
+ 110: pl5
132
+ 111: pl8
133
+ 112: pl10
134
+ 113: pl15
135
+ 114: pl20
136
+ 115: pl25
137
+ 116: pl30
138
+ 117: pl35
139
+ 118: pl40
140
+ 119: pl50
141
+ 120: pl60
142
+ 121: pl65
143
+ 122: pl70
144
+ 123: pl80
145
+ 124: pl90
146
+ 125: pl100
147
+ 126: pl110
148
+ 127: pl120
149
+ 128: pm2
150
+ 129: pm8
151
+ 130: pm10
152
+ 131: pm13
153
+ 132: pm15
154
+ 133: pm20
155
+ 134: pm25
156
+ 135: pm30
157
+ 136: pm35
158
+ 137: pm40
159
+ 138: pm46
160
+ 139: pm50
161
+ 140: pm55
162
+ 141: pn
163
+ 142: pne
164
+ 143: po
165
+ 144: pr10
166
+ 145: pr100
167
+ 146: pr20
168
+ 147: pr30
169
+ 148: pr40
170
+ 149: pr45
171
+ 150: pr50
172
+ 151: pr60
173
+ 152: pr70
174
+ 153: pr80
175
+ 154: ps
176
+ 155: w1
177
+ 156: w2
178
+ 157: w3
179
+ 158: w5
180
+ 159: w8
181
+ 160: w10
182
+ 161: w12
183
+ 162: w13
184
+ 163: w16
185
+ 164: w18
186
+ 165: w20
187
+ 166: w21
188
+ 167: w22
189
+ 168: w24
190
+ 169: w28
191
+ 170: w30
192
+ 171: w31
193
+ 172: w32
194
+ 173: w34
195
+ 174: w35
196
+ 175: w37
197
+ 176: w38
198
+ 177: w41
199
+ 178: w42
200
+ 179: w43
201
+ 180: w44
202
+ 181: w45
203
+ 182: w46
204
+ 183: w47
205
+ 184: w48
206
+ 185: w49
207
+ 186: w50
208
+ 187: w51
209
+ 188: w52
210
+ 189: w53
211
+ 190: w54
212
+ 191: w55
213
+ 192: w56
214
+ 193: w57
215
+ 194: w58
216
+ 195: w59
217
+ 196: w60
218
+ 197: w62
219
+ 198: w63
220
+ 199: w66
221
+ 200: i1
222
+ 201: i2
223
+ 202: i3
224
+ 203: i4
225
+ 204: i5
226
+ 205: i6
227
+ 206: i7
228
+ 207: i8
229
+ 208: i9
230
+ 209: i10
231
+ 210: i11
232
+ 211: i12
233
+ 212: i13
234
+ 213: i14
235
+ 214: i15
236
+ 215: il60
237
+ 216: il80
238
+ 217: il100
239
+ 218: il110
240
+ 219: io
241
+ 220: ip
242
+
243
+ # Download script/URL (optional) ---------------------------------------------------------------------------------------
244
+ download: |
245
+ import json
246
+ import shutil
247
+ from pathlib import Path
248
+
249
+ from PIL import Image
250
+
251
+ from ultralytics.utils import TQDM
252
+ from ultralytics.utils.downloads import download
253
+
254
+
255
+ def tt100k2yolo(dir):
256
+ """Convert TT100K annotations to YOLO format with images/{split} and labels/{split} structure."""
257
+ data_dir = dir / "data"
258
+ anno_file = data_dir / "annotations.json"
259
+
260
+ print("Loading annotations...")
261
+ with open(anno_file, encoding="utf-8") as f:
262
+ data = json.load(f)
263
+
264
+ # Build class name to index mapping from yaml
265
+ names = yaml["names"]
266
+ class_to_idx = {v: k for k, v in names.items()}
267
+
268
+ # Create directories
269
+ for split in ["train", "val", "test"]:
270
+ (dir / "images" / split).mkdir(parents=True, exist_ok=True)
271
+ (dir / "labels" / split).mkdir(parents=True, exist_ok=True)
272
+
273
+ print("Converting annotations to YOLO format...")
274
+ skipped = 0
275
+ for img_id, img_data in TQDM(data["imgs"].items(), desc="Processing"):
276
+ img_path_str = img_data["path"]
277
+ if "train" in img_path_str:
278
+ split = "train"
279
+ elif "test" in img_path_str:
280
+ split = "test"
281
+ else:
282
+ split = "val"
283
+
284
+ # Source and destination paths
285
+ src_img = data_dir / img_path_str
286
+ if not src_img.exists():
287
+ continue
288
+
289
+ dst_img = dir / "images" / split / src_img.name
290
+
291
+ # Get image dimensions
292
+ try:
293
+ with Image.open(src_img) as img:
294
+ img_width, img_height = img.size
295
+ except Exception as e:
296
+ print(f"Error reading {src_img}: {e}")
297
+ continue
298
+
299
+ # Copy image to destination
300
+ shutil.copy2(src_img, dst_img)
301
+
302
+ # Convert annotations
303
+ label_file = dir / "labels" / split / f"{src_img.stem}.txt"
304
+ lines = []
305
+
306
+ for obj in img_data.get("objects", []):
307
+ category = obj["category"]
308
+ if category not in class_to_idx:
309
+ skipped += 1
310
+ continue
311
+
312
+ bbox = obj["bbox"]
313
+ xmin, ymin = bbox["xmin"], bbox["ymin"]
314
+ xmax, ymax = bbox["xmax"], bbox["ymax"]
315
+
316
+ # Convert to YOLO format (normalized center coordinates and dimensions)
317
+ x_center = ((xmin + xmax) / 2.0) / img_width
318
+ y_center = ((ymin + ymax) / 2.0) / img_height
319
+ width = (xmax - xmin) / img_width
320
+ height = (ymax - ymin) / img_height
321
+
322
+ # Clip to valid range
323
+ x_center = max(0, min(1, x_center))
324
+ y_center = max(0, min(1, y_center))
325
+ width = max(0, min(1, width))
326
+ height = max(0, min(1, height))
327
+
328
+ cls_idx = class_to_idx[category]
329
+ lines.append(f"{cls_idx} {x_center:.6f} {y_center:.6f} {width:.6f} {height:.6f}\n")
330
+
331
+ # Write label file
332
+ if lines:
333
+ label_file.write_text("".join(lines), encoding="utf-8")
334
+
335
+ if skipped:
336
+ print(f"Skipped {skipped} annotations with unknown categories")
337
+ print("Conversion complete!")
338
+
339
+
340
+ # Download
341
+ dir = Path(yaml["path"]) # dataset root dir
342
+ urls = ["https://cg.cs.tsinghua.edu.cn/traffic-sign/data_model_code/data.zip"]
343
+ download(urls, dir=dir, curl=True, threads=1)
344
+
345
+ # Convert
346
+ tt100k2yolo(dir)
@@ -0,0 +1,101 @@
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # COCO12-Formats dataset (12 images testing all supported image formats) by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/coco12-formats/
5
+ # Example usage: yolo train data=coco12-formats.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── coco12-formats ← downloads here (1 MB)
10
+
11
+ # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
12
+ path: coco12-formats # dataset root dir
13
+ train: images/train # train images (relative to 'path') 6 images
14
+ val: images/val # val images (relative to 'path') 6 images
15
+ test: # test images (optional)
16
+
17
+ # Classes
18
+ names:
19
+ 0: person
20
+ 1: bicycle
21
+ 2: car
22
+ 3: motorcycle
23
+ 4: airplane
24
+ 5: bus
25
+ 6: train
26
+ 7: truck
27
+ 8: boat
28
+ 9: traffic light
29
+ 10: fire hydrant
30
+ 11: stop sign
31
+ 12: parking meter
32
+ 13: bench
33
+ 14: bird
34
+ 15: cat
35
+ 16: dog
36
+ 17: horse
37
+ 18: sheep
38
+ 19: cow
39
+ 20: elephant
40
+ 21: bear
41
+ 22: zebra
42
+ 23: giraffe
43
+ 24: backpack
44
+ 25: umbrella
45
+ 26: handbag
46
+ 27: tie
47
+ 28: suitcase
48
+ 29: frisbee
49
+ 30: skis
50
+ 31: snowboard
51
+ 32: sports ball
52
+ 33: kite
53
+ 34: baseball bat
54
+ 35: baseball glove
55
+ 36: skateboard
56
+ 37: surfboard
57
+ 38: tennis racket
58
+ 39: bottle
59
+ 40: wine glass
60
+ 41: cup
61
+ 42: fork
62
+ 43: knife
63
+ 44: spoon
64
+ 45: bowl
65
+ 46: banana
66
+ 47: apple
67
+ 48: sandwich
68
+ 49: orange
69
+ 50: broccoli
70
+ 51: carrot
71
+ 52: hot dog
72
+ 53: pizza
73
+ 54: donut
74
+ 55: cake
75
+ 56: chair
76
+ 57: couch
77
+ 58: potted plant
78
+ 59: bed
79
+ 60: dining table
80
+ 61: toilet
81
+ 62: tv
82
+ 63: laptop
83
+ 64: mouse
84
+ 65: remote
85
+ 66: keyboard
86
+ 67: cell phone
87
+ 68: microwave
88
+ 69: oven
89
+ 70: toaster
90
+ 71: sink
91
+ 72: refrigerator
92
+ 73: book
93
+ 74: clock
94
+ 75: vase
95
+ 76: scissors
96
+ 77: teddy bear
97
+ 78: hair drier
98
+ 79: toothbrush
99
+
100
+ # Download script/URL (optional)
101
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/coco12-formats.zip
@@ -36,7 +36,7 @@ amp: True # (bool) Automatic Mixed Precision (AMP) training; True runs AMP capab
36
36
  fraction: 1.0 # (float) fraction of training dataset to use (1.0 = all)
37
37
  profile: False # (bool) profile ONNX/TensorRT speeds during training for loggers
38
38
  freeze: # (int | list, optional) freeze first N layers (int) or specific layer indices (list)
39
- multi_scale: False # (bool) multiscale training by varying image size
39
+ multi_scale: 0.0 # (float) multi-scale range as a fraction of imgsz; sizes are rounded to stride multiples
40
40
  compile: False # (bool | str) enable torch.compile() backend='inductor'; True="default", False=off, or "default|reduce-overhead|max-autotune-no-cudagraphs"
41
41
 
42
42
  # Segmentation
@@ -103,6 +103,8 @@ cls: 0.5 # (float) classification loss gain
103
103
  dfl: 1.5 # (float) distribution focal loss gain
104
104
  pose: 12.0 # (float) pose loss gain (pose tasks)
105
105
  kobj: 1.0 # (float) keypoint objectness loss gain (pose tasks)
106
+ rle: 1.0 # (float) rle loss gain (pose tasks)
107
+ angle: 1.0 # (float) oriented angle loss gain (obb tasks)
106
108
  nbs: 64 # (int) nominal batch size used for loss normalization
107
109
  hsv_h: 0.015 # (float) HSV hue augmentation fraction
108
110
  hsv_s: 0.7 # (float) HSV saturation augmentation fraction
@@ -0,0 +1,33 @@
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Ultralytics YOLO26-cls image classification model
4
+ # Model docs: https://docs.ultralytics.com/models/yolo26
5
+ # Task docs: https://docs.ultralytics.com/tasks/classify
6
+
7
+ # Parameters
8
+ nc: 1000 # number of classes
9
+ scales: # model compound scaling constants, i.e. 'model=yolo26n-cls.yaml' will call yolo26-cls.yaml with scale 'n'
10
+ # [depth, width, max_channels]
11
+ n: [0.50, 0.25, 1024] # summary: 86 layers, 2,812,104 parameters, 2,812,104 gradients, 0.5 GFLOPs
12
+ s: [0.50, 0.50, 1024] # summary: 86 layers, 6,724,008 parameters, 6,724,008 gradients, 1.6 GFLOPs
13
+ m: [0.50, 1.00, 512] # summary: 106 layers, 11,634,216 parameters, 11,634,216 gradients, 5.0 GFLOPs
14
+ l: [1.00, 1.00, 512] # summary: 176 layers, 14,115,624 parameters, 14,115,624 gradients, 6.2 GFLOPs
15
+ x: [1.00, 1.50, 512] # summary: 176 layers, 29,637,064 parameters, 29,637,064 gradients, 13.7 GFLOPs
16
+
17
+ # YOLO26n backbone
18
+ backbone:
19
+ # [from, repeats, module, args]
20
+ - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2
21
+ - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
22
+ - [-1, 2, C3k2, [256, False, 0.25]]
23
+ - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
24
+ - [-1, 2, C3k2, [512, False, 0.25]]
25
+ - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
26
+ - [-1, 2, C3k2, [512, True]]
27
+ - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
28
+ - [-1, 2, C3k2, [1024, True]]
29
+ - [-1, 2, C2PSA, [1024]] # 9
30
+
31
+ # YOLO26n head
32
+ head:
33
+ - [-1, 1, Classify, [nc]] # Classify
@@ -0,0 +1,52 @@
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Ultralytics YOLO26-obb Oriented Bounding Boxes (OBB) model with P3/8 - P5/32 outputs
4
+ # Model docs: https://docs.ultralytics.com/models/yolo26
5
+ # Task docs: https://docs.ultralytics.com/tasks/obb
6
+
7
+ # Parameters
8
+ nc: 80 # number of classes
9
+ end2end: True # whether to use end-to-end mode
10
+ reg_max: 1 # DFL bins
11
+ scales: # model compound scaling constants, i.e. 'model=yolo26n-obb.yaml' will call yolo26-obb.yaml with scale 'n'
12
+ # [depth, width, max_channels]
13
+ n: [0.50, 0.25, 1024] # summary: 291 layers, 2,715,614 parameters, 2,715,614 gradients, 16.9 GFLOPs
14
+ s: [0.50, 0.50, 1024] # summary: 291 layers, 10,582,142 parameters, 10,582,142 gradients, 63.5 GFLOPs
15
+ m: [0.50, 1.00, 512] # summary: 311 layers, 23,593,918 parameters, 23,593,918 gradients, 211.9 GFLOPs
16
+ l: [1.00, 1.00, 512] # summary: 423 layers, 27,997,374 parameters, 27,997,374 gradients, 259.0 GFLOPs
17
+ x: [1.00, 1.50, 512] # summary: 423 layers, 62,811,678 parameters, 62,811,678 gradients, 578.9 GFLOPs
18
+
19
+ # YOLO26n backbone
20
+ backbone:
21
+ # [from, repeats, module, args]
22
+ - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2
23
+ - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
24
+ - [-1, 2, C3k2, [256, False, 0.25]]
25
+ - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
26
+ - [-1, 2, C3k2, [512, False, 0.25]]
27
+ - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
28
+ - [-1, 2, C3k2, [512, True]]
29
+ - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
30
+ - [-1, 2, C3k2, [1024, True]]
31
+ - [-1, 1, SPPF, [1024, 5, 3, True]] # 9
32
+ - [-1, 2, C2PSA, [1024]] # 10
33
+
34
+ # YOLO26n head
35
+ head:
36
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
37
+ - [[-1, 6], 1, Concat, [1]] # cat backbone P4
38
+ - [-1, 2, C3k2, [512, True]] # 13
39
+
40
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
41
+ - [[-1, 4], 1, Concat, [1]] # cat backbone P3
42
+ - [-1, 2, C3k2, [256, True]] # 16 (P3/8-small)
43
+
44
+ - [-1, 1, Conv, [256, 3, 2]]
45
+ - [[-1, 13], 1, Concat, [1]] # cat head P4
46
+ - [-1, 2, C3k2, [512, True]] # 19 (P4/16-medium)
47
+
48
+ - [-1, 1, Conv, [512, 3, 2]]
49
+ - [[-1, 10], 1, Concat, [1]] # cat head P5
50
+ - [-1, 1, C3k2, [1024, True, 0.5, True]] # 22 (P5/32-large)
51
+
52
+ - [[16, 19, 22], 1, OBB26, [nc, 1]] # Detect(P3, P4, P5)
@@ -0,0 +1,60 @@
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Ultralytics YOLO26 object detection model with P2/4 - P5/32 outputs
4
+ # Model docs: https://docs.ultralytics.com/models/yolo26
5
+ # Task docs: https://docs.ultralytics.com/tasks/detect
6
+
7
+ # Parameters
8
+ nc: 80 # number of classes
9
+ end2end: True # whether to use end-to-end mode
10
+ reg_max: 1 # DFL bins
11
+ scales: # model compound scaling constants, i.e. 'model=yolo26n-p2.yaml' will call yolo26-p2.yaml with scale 'n'
12
+ # [depth, width, max_channels]
13
+ n: [0.50, 0.25, 1024] # summary: 329 layers, 2,662,400 parameters, 2,662,400 gradients, 9.5 GFLOPs
14
+ s: [0.50, 0.50, 1024] # summary: 329 layers, 9,765,856 parameters, 9,765,856 gradients, 27.8 GFLOPs
15
+ m: [0.50, 1.00, 512] # summary: 349 layers, 21,144,288 parameters, 21,144,288 gradients, 91.4 GFLOPs
16
+ l: [1.00, 1.00, 512] # summary: 489 layers, 25,815,520 parameters, 25,815,520 gradients, 115.3 GFLOPs
17
+ x: [1.00, 1.50, 512] # summary: 489 layers, 57,935,232 parameters, 57,935,232 gradients, 256.9 GFLOPs
18
+
19
+ # YOLO26n backbone
20
+ backbone:
21
+ # [from, repeats, module, args]
22
+ - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2
23
+ - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
24
+ - [-1, 2, C3k2, [256, False, 0.25]]
25
+ - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
26
+ - [-1, 2, C3k2, [512, False, 0.25]]
27
+ - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
28
+ - [-1, 2, C3k2, [512, True]]
29
+ - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
30
+ - [-1, 2, C3k2, [1024, True]]
31
+ - [-1, 1, SPPF, [1024, 5, 3, True]] # 9
32
+ - [-1, 2, C2PSA, [1024]] # 10
33
+
34
+ # YOLO26n head
35
+ head:
36
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
37
+ - [[-1, 6], 1, Concat, [1]] # cat backbone P4
38
+ - [-1, 2, C3k2, [512, True]] # 13
39
+
40
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
41
+ - [[-1, 4], 1, Concat, [1]] # cat backbone P3
42
+ - [-1, 2, C3k2, [256, True]] # 16 (P3/8-small)
43
+
44
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
45
+ - [[-1, 2], 1, Concat, [1]] # cat backbone P2
46
+ - [-1, 2, C3k2, [128, True]] # 19 (P2/4-xsmall)
47
+
48
+ - [-1, 1, Conv, [128, 3, 2]]
49
+ - [[-1, 16], 1, Concat, [1]] # cat head P3
50
+ - [-1, 2, C3k2, [256, True]] # 22 (P3/8-small)
51
+
52
+ - [-1, 1, Conv, [256, 3, 2]]
53
+ - [[-1, 13], 1, Concat, [1]] # cat head P4
54
+ - [-1, 2, C3k2, [512, True]] # 25 (P4/16-medium)
55
+
56
+ - [-1, 1, Conv, [512, 3, 2]]
57
+ - [[-1, 10], 1, Concat, [1]] # cat head P5
58
+ - [-1, 1, C3k2, [1024, True, 0.5, True]] # 28 (P5/32-large)
59
+
60
+ - [[19, 22, 25, 28], 1, Detect, [nc]] # Detect(P2, P3, P4, P5)
@@ -0,0 +1,62 @@
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Ultralytics YOLO26 object detection model with P3/8 - P6/64 outputs
4
+ # Model docs: https://docs.ultralytics.com/models/yolo26
5
+ # Task docs: https://docs.ultralytics.com/tasks/detect
6
+
7
+ # Parameters
8
+ nc: 80 # number of classes
9
+ end2end: True # whether to use end-to-end mode
10
+ reg_max: 1 # DFL bins
11
+ scales: # model compound scaling constants, i.e. 'model=yolo26n-p6.yaml' will call yolo26-p6.yaml with scale 'n'
12
+ # [depth, width, max_channels]
13
+ n: [0.50, 0.25, 1024] # summary: 349 layers, 4,063,872 parameters, 4,063,872 gradients, 6.0 GFLOPs
14
+ s: [0.50, 0.50, 1024] # summary: 349 layers, 15,876,448 parameters, 15,876,448 gradients, 22.3 GFLOPs
15
+ m: [0.50, 1.00, 512] # summary: 369 layers, 32,400,096 parameters, 32,400,096 gradients, 77.3 GFLOPs
16
+ l: [1.00, 1.00, 512] # summary: 523 layers, 39,365,600 parameters, 39,365,600 gradients, 97.0 GFLOPs
17
+ x: [1.00, 1.50, 512] # summary: 523 layers, 88,330,368 parameters, 88,330,368 gradients, 216.6 GFLOPs
18
+
19
+ # YOLO26n backbone
20
+ backbone:
21
+ # [from, repeats, module, args]
22
+ - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2
23
+ - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
24
+ - [-1, 2, C3k2, [256, False, 0.25]]
25
+ - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
26
+ - [-1, 2, C3k2, [512, False, 0.25]]
27
+ - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
28
+ - [-1, 2, C3k2, [512, True]]
29
+ - [-1, 1, Conv, [768, 3, 2]] # 7-P5/32
30
+ - [-1, 2, C3k2, [768, True]]
31
+ - [-1, 1, Conv, [1024, 3, 2]] # 9-P6/64
32
+ - [-1, 2, C3k2, [1024, True]]
33
+ - [-1, 1, SPPF, [1024, 5]] # 11
34
+ - [-1, 2, C2PSA, [1024]] # 12
35
+
36
+ # YOLO26n head
37
+ head:
38
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
39
+ - [[-1, 8], 1, Concat, [1]] # cat backbone P5
40
+ - [-1, 2, C3k2, [768, True]] # 15
41
+
42
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
43
+ - [[-1, 6], 1, Concat, [1]] # cat backbone P4
44
+ - [-1, 2, C3k2, [512, True]] # 18
45
+
46
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
47
+ - [[-1, 4], 1, Concat, [1]] # cat backbone P3
48
+ - [-1, 2, C3k2, [256, True]] # 21 (P3/8-small)
49
+
50
+ - [-1, 1, Conv, [256, 3, 2]]
51
+ - [[-1, 18], 1, Concat, [1]] # cat head P4
52
+ - [-1, 2, C3k2, [512, True]] # 24 (P4/16-medium)
53
+
54
+ - [-1, 1, Conv, [512, 3, 2]]
55
+ - [[-1, 15], 1, Concat, [1]] # cat head P5
56
+ - [-1, 2, C3k2, [768, True]] # 27 (P5/32-large)
57
+
58
+ - [-1, 1, Conv, [768, 3, 2]]
59
+ - [[-1, 12], 1, Concat, [1]] # cat head P6
60
+ - [-1, 1, C3k2, [1024, True, 0.5, True]] # 30 (P6/64-large)
61
+
62
+ - [[21, 24, 27, 30], 1, Detect, [nc]] # Detect(P3, P4, P5, P6)