SAMOptions
Options & Configuration · AiDotNet.VisionLanguage.Encoders
Configuration options for the Segment Anything Model (SAM) vision encoder.
Inheritance: ModelOptions → VisionEncoderOptions → SAMOptions
How It Works
SAM (Kirillov et al., 2023) consists of a ViT-based image encoder that produces image embeddings, which can be combined with prompt embeddings (points, boxes, masks) via a lightweight mask decoder for promptable segmentation of any object.
Constructors
| Constructor | Summary |
|---|---|
SAMOptions() |
Initializes a new instance with default values. |
SAMOptions(SAMOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
bool UseRelativePositionalEncoding { get; set; } |
Gets or sets whether to use relative positional encoding (window attention). |
int MaskDecoderDim { get; set; } |
Gets or sets the mask decoder embedding dimension. |
int NumMaskDecoderLayers { get; set; } |
Gets or sets the number of mask decoder layers. |
int NumMultimaskOutputs { get; set; } |
Gets or sets the number of multimask outputs. |
int WindowSize { get; set; } |
Gets or sets the window size for windowed attention in the encoder. |