SED<T>
Models & Types · AiDotNet.ComputerVision.Segmentation.OpenVocabulary
SED: A Simple Encoder-Decoder for open-vocabulary semantic segmentation.
Inheritance: NeuralNetworkBase<T> → SegmentationModelBase<T> → OpenVocabSegmentationBase<T> → SED<T>
For Beginners
Simple and efficient open-vocabulary segmentation. Category-adaptive prompting.
Common use cases:
- Simple and efficient open-vocabulary segmentation
- Category-adaptive prompting
- Cross-dataset generalization
- Balanced accuracy-efficiency open-vocab segmentation
How It Works
Technical Details:
- Simple encoder-decoder with hierarchical CLIP features
- Category-adaptive prompt generation
- Lightweight decoder head for open-vocabulary prediction
- Competitive accuracy with minimal architectural overhead
Reference: Xie et al., “SED: A Simple Encoder-Decoder for Open-Vocabulary Semantic Segmentation”, arXiv 2024.
Example
// Create a SED model for simple open-vocabulary segmentation
// Any CLIP-style ITextEncoder supplies the text embeddings, e.g. a CLIP model from VisionLanguage.Encoders.
ITextEncoder<double> textEncoder = clipModel;
var architecture = new NeuralNetworkArchitecture<double>(
inputType: InputType.ThreeDimensional,
taskType: NeuralNetworkTaskType.MultiClassClassification,
inputHeight: 512, inputWidth: 512, inputDepth: 3, outputSize: 150);
var model = new SED<double>(architecture, textEncoder);
// Every tunable is now set through the options object; these are the defaults:
var custom = new SED<double>(architecture, textEncoder,
options: new SEDOptions { NumClasses = 150, DropRate = 0.1 });
// Or load a pre-trained ONNX model for category-adaptive segmentation
var onnxModel = new SED<double>(architecture, "sed.onnx", textEncoder, options: null);
Constructors
| Constructor | Summary |
|---|---|
SED(NeuralNetworkArchitecture<T> architecture, ITextEncoder<T> textEncoder, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction, SEDOptions options) |
Initializes SED in native (trainable) mode. |
SED(NeuralNetworkArchitecture<T> architecture, string onnxModelPath, ITextEncoder<T> textEncoder, SEDOptions options) |
Initializes SED in ONNX (inference-only) mode. |
Methods
| Method | Summary |
|---|---|
ModelMetadata<T> GetModelMetadata() |
Collects metadata describing this model’s configuration. |