YOLO11Seg<T>
Models & Types · AiDotNet.ComputerVision.Segmentation.InstanceSegmentation
YOLO11-Seg: Ultralytics next-generation real-time instance segmentation.
Inheritance: NeuralNetworkBase<T> → SegmentationModelBase<T> → InstanceSegmentationBase<T> → YOLO11Seg<T>
For Beginners
Real-time instance segmentation. Edge deployment with INT8 quantization.
Common use cases:
- Real-time instance segmentation
- Edge deployment with INT8 quantization
- Video analytics pipelines
- Mobile and embedded applications
How It Works
Technical Details:
- C2PSA (Cross-Stage Partial with Spatial Attention) blocks
- Improved feature pyramid for multi-scale detection
- Anchor-free decoupled head with mask branch
- YOLACT-style prototype mask generation
Reference: Ultralytics, “YOLO11”, 2024.
Example
// Create a YOLO11-Seg model for real-time instance segmentation
var architecture = new NeuralNetworkArchitecture<double>(
inputType: InputType.ThreeDimensional,
taskType: NeuralNetworkTaskType.MultiClassClassification,
inputHeight: 640, inputWidth: 640, inputDepth: 3, outputSize: 80);
var model = new YOLO11Seg<double>(architecture);
// Every tunable is now set through the options object; these are the defaults:
var custom = new YOLO11Seg<double>(architecture,
options: new YOLO11SegOptions { NumClasses = 80, DropRate = 0, ModelSize = YOLO11SegModelSize.N });
// Or load a pre-trained ONNX model for edge deployment
var onnxModel = new YOLO11Seg<double>(architecture, "yolo11n-seg.onnx");
Constructors
| Constructor | Summary |
|---|---|
YOLO11Seg(NeuralNetworkArchitecture<T> architecture, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction, YOLO11SegOptions options) |
Initializes YOLO11Seg in native (trainable) mode. |
YOLO11Seg(NeuralNetworkArchitecture<T> architecture, string onnxModelPath, YOLO11SegOptions options) |
Initializes YOLO11Seg in ONNX (inference-only) mode. |
Methods
| Method | Summary |
|---|---|
InstanceSegmentationResult<T> DetectInstances(Tensor<T> image) |
|
ModelMetadata<T> GetModelMetadata() |
Collects metadata describing this model’s configuration. |