DocumentReader<T>

Models & Types ยท AiDotNet.ComputerVision.OCR.EndToEnd

Document reader for OCR with layout analysis.

Inheritance: ModelBase<T, Tensor<T>, Tensor<T>> โ†’ DocumentReader<T>

Implements: IGeneratedParameterRegistrar<T>

For Beginners

DocumentReader is optimized for reading structured documents like scanned papers, forms, and PDFs. Unlike scene text, documents have regular layouts with clear reading order. This reader analyzes the document structure and extracts text in logical reading order.

How It Works

Key features:

  • Layout analysis for document structure understanding
  • Reading order detection
  • Paragraph and line grouping
  • Handles multi-column layouts
  • Optimized for clean text on uniform backgrounds

Constructors

Constructor Summary
DocumentReader(OCROptions<T> options) Creates a new document reader.

Properties

Property Summary
ILossFunction<T> DefaultLossFunction { get; }
string Name { get; } Name of this document reader.

Methods

Method Summary
DocumentOCRResult<T> ReadDocument(Tensor<T> image) Reads a document image and returns structured text.
IFullModel<T, Tensor<T>, Tensor<T>> WithParameters(Vector<T> parameters)
Tensor<T> Predict(Tensor<T> input)
long GetParameterCount() Gets the total parameter count.
void Train(Tensor<T> input, Tensor<T> expectedOutput)