GeminiVision<T>
Models & Types · AiDotNet.VisionLanguage.Proprietary
Gemini Vision: reference implementation of Google’s native multimodal Mixture of Experts model.
Inheritance: NeuralNetworkBase<T> → VisionLanguageModelBase<T> → GeminiVision<T>
Implements: IProprietaryVLM<T>
For Beginners
Gemini Vision is a proprietary multimodal model from Google that natively handles images, text, audio, and video. Default values follow the model’s recommended settings.
How It Works
Gemini Vision is a reference implementation of Google’s natively multimodal Mixture of Experts model. The Gemini family processes interleaved text, image, audio, and video tokens natively with 1M+ token context windows, using a sparse MoE architecture for efficient scaling across multiple modalities.
References:
- Gemini: Google’s natively multimodal model family with 1M+ token context (Google, 2024-2026)
Example
// Create a Gemini Vision model for natively multimodal understanding
// with Mixture of Experts architecture and 1M+ token context
var architecture = new NeuralNetworkArchitecture<double>(
inputType: InputType.TwoDimensional,
taskType: NeuralNetworkTaskType.ImageClassification,
inputHeight: 224, inputWidth: 224, inputDepth: 3, outputSize: 512);
// ONNX inference mode with pre-trained model
var model = new GeminiVision<double>(architecture, "geminivision.onnx");
// Training mode with native layers
var trainModel = new GeminiVision<double>(architecture, new GeminiVisionOptions());
Constructors
| Constructor | Summary |
|---|---|
GeminiVision(NeuralNetworkArchitecture<T> architecture, GeminiVisionOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) |
|
GeminiVision(NeuralNetworkArchitecture<T> architecture, string modelPath, GeminiVisionOptions options) |
Properties
| Property | Summary |
|---|---|
int DecoderEmbeddingDim { get; } |
|
int EmbeddingDimension { get; } |
|
int MaxGenerationLength { get; } |
|
string LanguageModelName { get; } |
|
string Provider { get; } |
Methods
| Method | Summary |
|---|---|
ModelMetadata<T> GetModelMetadata() |
|
Tensor<T> Chat(Tensor<T> image, string prompt) |
|
Tensor<T> EncodeImage(Tensor<T> image) |
|
Tensor<T> GenerateFromImage(Tensor<T> image, string prompt) |
Generates text from an image using Gemini’s native multimodal MoE architecture. |