Skip to main content

Module detect

Module detect 

Source
Expand description

Detection head block(s). YOLO26 Detect head.

Implements ultralytics.nn.modules.head.Detect(nc, ch) with reg_max=1.

Architecture per scale: cv2[i]: Conv(c_in,c2,3,1) → Conv(c2,c2,3,1) → Conv2d(c2,4*reg_max,1,bias=True) cv3[i]: DWConv(c_in,3,1) → Conv(c_in,c3,1,1) → DWConv(c3,3,1) → Conv(c3,c3,1,1) → Conv2d(c3,nc,1,bias=True)

Structs§

DetectOutput
Output of the YOLO26 Detect head (training mode).
DualDetectOutput
Combined output of both YOLO26 detect heads for dual-assignment training.

Enums§

DetectHead
Which weight namespace the detect head should bind to.

Functions§

detect
YOLO26 Detect head: 3 FPN feature maps → raw boxes + class logits.