ThreeDLLM<T>

Models & Types · AiDotNet.VisionLanguage.ThreeD

3D-LLM: injects 3D spatial features into large language models.

Inheritance: NeuralNetworkBase<T> → VisionLanguageModelBase<T> → ThreeDLLM<T>

Implements: IThreeDVisionLanguageModel<T>

For Beginners

3D-LLM is a vision-language model that enables language understanding of 3D environments and scenes. Default values follow the original paper settings.

How It Works

3D-LLM (UCLA, 2023) injects 3D spatial features into large language models by rendering multi-view images from 3D scenes and projecting 2D features back into 3D space. This enables the LLM to understand spatial layouts, answer questions about 3D environments, and follow language-guided navigation instructions within reconstructed 3D scenes.

References:

  • Paper: “3D-LLM: Injecting the 3D World into Large Language Models (UCLA, 2023)”

Example

// Create a 3D-LLM model for injecting 3D spatial features into LLMs
// enabling language-guided 3D scene navigation and understanding
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 ThreeDLLM<double>(architecture, "threedllm.onnx");
            
// Training mode with native layers
var trainModel = new ThreeDLLM<double>(architecture, new ThreeDLLMOptions());

Constructors

Constructor Summary
ThreeDLLM(NeuralNetworkArchitecture<T> architecture, ThreeDLLMOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer)
ThreeDLLM(NeuralNetworkArchitecture<T> architecture, string modelPath, ThreeDLLMOptions options)

Properties

Property Summary
int DecoderEmbeddingDim { get; }
int EmbeddingDimension { get; }
int MaxGenerationLength { get; }
int MaxPoints { get; }
int PointChannels { get; }

Methods

Method Summary
ModelMetadata<T> GetModelMetadata()
Tensor<T> EncodeImage(Tensor<T> image)
Tensor<T> GenerateFrom3D(Tensor<T> pointCloud, string prompt) Processes 3D point cloud using 3D-LLM’s multi-view feature lifting approach.
Tensor<T> GenerateFromImage(Tensor<T> image, string prompt) Generates from 2D image using 3D-LLM’s multi-view feature lifting approach.