IOCRModel<T>
Interfaces · AiDotNet.Document.Interfaces
Interface for OCR (Optical Character Recognition) models.
Implements: IDocumentModel<T>
Known implementations: Donut<T>
For Beginners
OCR is like teaching a computer to read. Given an image of text, the model outputs the actual text content and where each word/character is located.
Example usage:
How It Works
OCR models convert images containing text into machine-readable text strings, along with position information for each text element.
Properties
| Property | Summary |
|---|---|
IReadOnlyList<string> SupportedLanguages { get; } |
Gets the languages supported by this OCR model. |
bool IsOCRFree { get; } |
Gets whether this is an OCR-free model (end-to-end pixel-to-text). |
Methods
| Method | Summary |
|---|---|
OCRResult<T> RecognizeText(Tensor<T> documentImage) |
Performs full OCR on a document image. |
OCRResult<T> RecognizeTextInRegion(Tensor<T> documentImage, Vector<T> region) |
Performs OCR on a specific region of the document. |