GroundingDINOOptions
Options & Configuration · AiDotNet.VisionLanguage.Grounding
Configuration options for Grounding DINO (Liu et al. 2023): open-set detection combining DINO with grounded pre-training.
Inheritance: ModelOptions → GenerativeVLMOptions → GroundingVLMOptions → GroundingDINOOptions
For Beginners
These options configure the GroundingDINO model. Default values follow the released model.
How It Works
The defaults are Grounding DINO-T as released (the official GroundingDINO_SwinT_OGC configuration): a Swin-T image
backbone, a BERT-base-uncased text backbone, a 256-wide feature enhancer and decoder of six layers each with eight
heads, four feature levels, four sampling points, 900 queries and a 256-token text head. The shared vision-language
options map as follows: VisionDim is the Swin embedding width,
DecoderDim the model width, NumVisionLayers the
feature-enhancer layers, NumHeads the encoder and decoder heads,
MaxSequenceLength the scored text tokens, VocabSize
the BERT vocabulary and ConfidenceThreshold the box threshold.
Constructors
| Constructor | Summary |
|---|---|
GroundingDINOOptions() |
Initializes a new instance with default values. |
GroundingDINOOptions(GroundingDINOOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
double FusionDropPathRate { get; set; } |
Gets or sets the stochastic depth rate of the vision-text fusion layers (0.1). |
double SwinDropPathRate { get; set; } |
Gets or sets the Swin stochastic depth rate (0.2, the official backbone’s). |
double TextThreshold { get; set; } |
Gets or sets the token probability above which a token joins a detection’s phrase (0.25, the official demo’s text threshold). |
int FeedForwardDim { get; set; } |
Gets or sets the feed-forward width of the feature enhancer and decoder layers (2048). |
int NumFeatureLevels { get; set; } |
Gets or sets the feature levels: the backbone’s three plus one stride-2 convolution of the last (4). |
int NumQueryPositions { get; set; } |
Gets or sets the number of object queries the decoder refines (900). |
int NumSamplingPoints { get; set; } |
Gets or sets the deformable-attention sampling points per head and level (4). |
int SwinWindowSize { get; set; } |
Gets or sets the Swin attention window (7). |
int TextHeads { get; set; } |
Gets or sets the BERT attention heads (12). |
int TextHiddenSize { get; set; } |
Gets or sets the BERT width (768). |
int TextIntermediateSize { get; set; } |
Gets or sets the BERT feed-forward width (3072). |
int TextLayers { get; set; } |
Gets or sets the BERT layers (12). |
int[] SwinDepths { get; set; } |
Gets or sets the Swin blocks per stage (Swin-T: 2, 2, 6, 2). |
int[] SwinHeads { get; set; } |
Gets or sets the Swin attention heads per stage (Swin-T: 3, 6, 12, 24). |