Table of Contents

Constructor VlmOcr

Namespace
LMKit.Extraction.Ocr
Assembly
LM-Kit.NET.dll

VlmOcr(LM)

Initializes a new instance of the VlmOcr class using the specified model.

public VlmOcr(LM model)

Parameters

model LM

The LM instance that will perform OCR. The model must support text generation, accept visual inputs, and be loaded with tensor weights.

Remarks

The instance binds to the provided LM and validates that it has the capabilities required for OCR scenarios. When Instruction is left empty, the actual transcription behavior may vary depending on the model family and configuration, and additional model families can be supported over time without changing this public API.

Exceptions

ArgumentNullException

Thrown if model is null.

InvalidModelException

Thrown if model does not support text generation, does not support vision, or has been loaded without tensor weights.