MPLUGDocOwl15<T>
Models & Types · AiDotNet.VisionLanguage.Document
mPLUG-DocOwl 1.5: unified structure learning achieving SOTA on 10 document benchmarks.
Inheritance: NeuralNetworkBase<T> → VisionLanguageModelBase<T> → MPLUGDocOwl15<T>
Implements: IDocumentUnderstandingModel<T>
For Beginners
mPLUG-DocOwl 1.5 is an improved document understanding model with unified structure learning for OCR-free processing. Default values follow the original paper settings.
How It Works
mPLUG-DocOwl 1.5 (Alibaba, 2024) achieves state-of-the-art on 10 document understanding benchmarks through unified structure learning. It learns document layout structure alongside text content in an OCR-free manner, using structure-aware pre-training objectives that teach the model to understand tables, lists, headers, and hierarchical document organization.
References:
- Paper: “mPLUG-DocOwl 1.5: Unified Structure Learning for OCR-free Document Understanding” (Alibaba, 2024)
Example
// Create an mPLUG-DocOwl 1.5 model for structure-aware document understanding
// with unified structure learning achieving SOTA on 10 benchmarks
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 MPLUGDocOwl15<double>(architecture, "mplugdocowl15.onnx");
// Training mode with native layers
var trainModel = new MPLUGDocOwl15<double>(architecture, new MPLUGDocOwl15Options());
Constructors
| Constructor | Summary |
|---|---|
MPLUGDocOwl15(NeuralNetworkArchitecture<T> architecture, MPLUGDocOwl15Options options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) |
|
MPLUGDocOwl15(NeuralNetworkArchitecture<T> architecture, string modelPath, MPLUGDocOwl15Options options) |
Properties
| Property | Summary |
|---|---|
bool IsOcrFree { get; } |
|
int DecoderEmbeddingDim { get; } |
|
int EmbeddingDimension { get; } |
|
int MaxGenerationLength { get; } |
Methods
| Method | Summary |
|---|---|
ModelMetadata<T> GetModelMetadata() |
|
Tensor<T> AnswerDocumentQuestion(Tensor<T> documentImage, string question) |
|
Tensor<T> EncodeImage(Tensor<T> image) |
|
Tensor<T> ExtractText(Tensor<T> documentImage) |
|
Tensor<T> GenerateFromImage(Tensor<T> image, string prompt) |
Generates text from a document image using mPLUG-DocOwl 1.5’s unified structure learning. |