SlimSAMOptions

Options & Configuration · AiDotNet.ComputerVision.Segmentation.Efficient

Configuration options for SlimSAM (pruned SAM with 1.4% params).

Inheritance: ModelOptions → NeuralNetworkOptions → ModelHyperparameterOptions → SegmentationModelOptions → SlimSAMOptions

For Beginners

These options configure the SlimSAM model. Default values follow the original paper settings.

Constructors

Constructor Summary
SlimSAMOptions() Initializes a new instance with default values.
SlimSAMOptions(SlimSAMOptions other) Initializes a new instance by copying from another instance.

Properties

Property Summary
double LearningRate { get; set; } Gets or sets the learning rate of the default AdamW optimizer, used when no optimizer is supplied to the model.
double WeightDecay { get; set; } Gets or sets the decoupled weight decay of the default AdamW optimizer, used when no optimizer is supplied to the model.
int DecoderDimension { get; set; } Gets or sets the channel width of the mask decoder.
int[] ChannelDimensions { get; set; } Gets or sets the channel width of each of the image encoder’s four stages, from the highest-resolution stage to the lowest.
int[] StageDepths { get; set; } Gets or sets the number of blocks in each of the image encoder’s four stages, in the same order as ChannelDimensions.

Methods

Method Summary
void Validate() Throws when a value on this instance cannot produce a working model.