YOLO26Seg<T>

Models & Types · AiDotNet.ComputerVision.Segmentation.InstanceSegmentation

YOLO26-Seg: Latest YOLO family instance segmentation with advanced CSP design.

Inheritance: NeuralNetworkBase<T> → SegmentationModelBase<T> → InstanceSegmentationBase<T> → YOLO26Seg<T>

For Beginners

State-of-the-art real-time segmentation. Production deployment on GPU and edge.

Common use cases:

  • State-of-the-art real-time segmentation
  • Production deployment on GPU and edge
  • Video stream processing
  • Multi-object tracking with masks

How It Works

Technical Details:

  • Advanced Cross-Stage Partial design
  • Improved feature pyramid network
  • Anchor-free detection with mask prediction
  • Optimized for TensorRT and ONNX export

Reference: Ultralytics, “YOLO26”, 2025.

Example

// Create a YOLO26-Seg model for state-of-the-art real-time segmentation
var architecture = new NeuralNetworkArchitecture<double>(
    inputType: InputType.ThreeDimensional,
    taskType: NeuralNetworkTaskType.MultiClassClassification,
    inputHeight: 640, inputWidth: 640, inputDepth: 3, outputSize: 80);
var model = new YOLO26Seg<double>(architecture);
// Every tunable is now set through the options object; these are the defaults:
var custom = new YOLO26Seg<double>(architecture,
    options: new YOLO26SegOptions { NumClasses = 80, DropRate = 0, ModelSize = YOLO26SegModelSize.N });
            
// Or load a pre-trained ONNX model optimized for TensorRT
var onnxModel = new YOLO26Seg<double>(architecture, "yolo26n-seg.onnx");

Constructors

Constructor Summary
YOLO26Seg(NeuralNetworkArchitecture<T> architecture, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction, YOLO26SegOptions options) Initializes YOLO26Seg in native (trainable) mode.
YOLO26Seg(NeuralNetworkArchitecture<T> architecture, string onnxModelPath, YOLO26SegOptions options) Initializes YOLO26Seg in ONNX (inference-only) mode.

Methods

Method Summary
InstanceSegmentationResult<T> DetectInstances(Tensor<T> image)
ModelMetadata<T> GetModelMetadata() Collects metadata describing this model’s configuration.