pub trait OcrModel: ModelInfo {
// Required method
fn recognize<'life0, 'async_trait>(
&'life0 self,
images: Vec<ImageInput>,
) -> Pin<Box<dyn Future<Output = Result<Vec<OcrResult>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn warmup<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}Expand description
A model that recognizes text in images (optical character recognition).
OCR is the document-blind counterpart to
DocumentExtractionModel — read text out of an image without
interpreting layout. Suited to EasyOCR, PaddleOCR, Tesseract-style models.