oh… looks like this is functioning:
thats kind of neat ![]()
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com
# Ultralytics YOLO26-seg instance segmentation model with P2/4 - P5/32 outputs
# Model docs: https://docs.ultralytics.com
# Task docs: https://docs.ultralytics.com
# Parameters
nc: 80 # number of classes
end2end: True # whether to use end-to-end mode
reg_max: 1 # DFL bins
scales:
# [depth, width, max_channels]
n: [0.50, 0.25, 1024]
s: [0.50, 0.50, 1024]
m: [0.50, 1.00, 512]
l: [1.00, 1.00, 512]
x: [1.00, 1.50, 512]
# YOLO26n backbone
backbone:
# [from, repeats, module, args]
- [-1, 1, Conv, [64, 3, 2]] # 0-P1/2
- [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
- [-1, 2, C3k2, [256, False, 0.25]] # 2
- [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
- [-1, 2, C3k2, [512, False, 0.25]] # 4
- [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
- [-1, 2, C3k2, [512, True]] # 6
- [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
- [-1, 2, C3k2, [1024, True]] # 8
- [-1, 1, SPPF, [1024, 5, 3, True]] # 9
- [-1, 2, C2PSA, [1024]] # 10
# YOLO26n head
head:
- [-1, 1, nn.Upsample, [None, 2, "nearest"]] # 11
- [[-1, 6], 1, Concat, [1]] # 12 cat backbone P4
- [-1, 2, C3k2, [512, True]] # 13
- [-1, 1, nn.Upsample, [None, 2, "nearest"]] # 14
- [[-1, 4], 1, Concat, [1]] # 15 cat backbone P3
- [-1, 2, C3k2, [256, True]] # 16 (P3/8-small)
# P2 addition
- [-1, 1, nn.Upsample, [None, 2, "nearest"]] # 17
- [[-1, 2], 1, Concat, [1]] # 18 cat backbone P2
- [-1, 2, C3k2, [128, True]] # 19 (P2/4-xsmall)
- [-1, 1, Conv, [128, 3, 2]] # 20
- [[-1, 16], 1, Concat, [1]] # 21 cat head P3
- [-1, 2, C3k2, [256, True]] # 22 (P3/8-small)
- [-1, 1, Conv, [256, 3, 2]] # 23
- [[-1, 13], 1, Concat, [1]] # 24 cat head P4
- [-1, 2, C3k2, [512, True]] # 25 (P4/16-medium)
- [-1, 1, Conv, [512, 3, 2]] # 26
- [[-1, 10], 1, Concat, [1]] # 27 cat head P5
- [-1, 1, C3k2, [1024, True, 0.5, True]] # 28 (P5/32-large)
# Segment26 layer with required index ordering: P3, P2, P4, P5
- [[22, 19, 25, 28], 1, Segment26, [nc, 32, 256]]