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 processingdomain- Domain types like orientation helpers and prediction modelsmodels- Model adapters for different OCR tasksprocessors- Image processing utilitiesutils- Utility functions for images and tensorspredictors- 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 Builderblock. Use this insideimpl YourBuilder { ... }and pass the field name that holdsModelInferenceConfig(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
ModelInferenceConfigfield. - impl_
complete_ builder - Comprehensive builder macro for generating common builder method patterns.
- impl_
config_ new_ and_ with_ common - Macro to implement
new()andwith_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§
- Config
Validator - Derive macro for implementing ConfigValidator trait.
- Task
Predictor Builder - Derive macro for implementing TaskPredictorBuilder trait.