Skip to main content

Crate oar_ocr_core

Crate oar_ocr_core 

Source
Expand description

§OAR OCR Core

Core types, models, and predictors for the OAR OCR library.

This crate provides:

  • Error handling types
  • Domain types (layout elements, structure results, etc.)
  • Model implementations
  • Image processors
  • Task predictors

§Modules

  • core - Core traits, error handling, and batch processing
  • domain - Domain types like orientation helpers and prediction models
  • models - Model adapters for different OCR tasks
  • processors - Image processing utilities
  • utils - Utility functions for images and tensors
  • predictors - Task-specific predictor interfaces

Modules§

core
The core module of the OCR pipeline.
domain
Domain-level structures shared across the OCR pipeline.
models
Model implementations.
predictors
Predictors module
prelude
Prelude module for convenient imports.
processors
Image processing utilities for OCR systems.
utils
Utility functions for the OCR pipeline.

Macros§

apply_ort_config
Macro to conditionally apply OrtSessionConfig to any builder that has with_ort_config.
common_builder_methods
Macro to inject common builder methods into an existing impl Builder block. Use this inside impl YourBuilder { ... } and pass the field name that holds ModelInferenceConfig (e.g., common).
impl_adapter_builder
Macro to implement common adapter builder boilerplate.
impl_common_builder_methods
Macro to implement common builder methods for structs with a ModelInferenceConfig field.
impl_complete_builder
Comprehensive builder macro for generating common builder method patterns.
impl_config_new_and_with_common
Macro to implement new() and with_common() for config structs with per-module defaults.
impl_task_type_enum
Generates the TaskType enum from the task registry.
metrics
Macro to create pre-populated StageMetrics with common patterns.
with_nested
Macro to handle optional nested config initialization in builders.
with_task_registry
Central task registry macro that defines all tasks in a single location.

Derive Macros§

ConfigValidator
Derive macro for implementing ConfigValidator trait.
TaskPredictorBuilder
Derive macro for implementing TaskPredictorBuilder trait.