Expand description
§Pure ONNX OCR
A Pure Rust OCR pipeline that mirrors the PaddleOCR DBNet + SVTR stack. The crate exposes ergonomic builders and processing stages that let you load ONNX models, prepare image batches, and decode recognition logits without any C/C++ dependencies.
Most consumers interact with OcrEngineBuilder to construct an
OcrEngine, then call OcrEngine::run_from_path or
OcrEngine::run_from_image. Lower-level modules remain available
when you need to plug specific stages into an existing pipeline.
Re-exports§
pub use ctc::CtcGreedyDecoder;pub use ctc::CtcGreedyDecoderConfig;pub use ctc::CtcGreedyDecoderError;pub use ctc::DecodedSequence;pub use detection::DetInferenceOutput;pub use detection::DetInferenceSession;pub use dictionary::DictionaryError;pub use dictionary::RecDictionary;pub use engine::OcrEngine;pub use engine::OcrEngineBuilder;pub use engine::OcrEngineConfig;pub use engine::OcrError;pub use engine::OcrResult;pub use engine::OcrRunWithMetrics;pub use engine::OcrTimings;pub use engine::StageTimings;pub use postprocessing::DetPolygonScaler;pub use postprocessing::DetPolygonScalerConfig;pub use postprocessing::DetPolygonUnclipper;pub use postprocessing::DetPolygonUnclipperConfig;pub use postprocessing::DetPostProcessor;pub use postprocessing::DetPostProcessorConfig;pub use postprocessing::DetPostProcessorError;pub use postprocessing::DetScaleRounding;pub use postprocessing::DetUnclipLineJoin;pub use preprocessing::DetPreProcessor;pub use preprocessing::DetPreProcessorConfig;pub use preprocessing::DetPreProcessorError;pub use preprocessing::PreprocessedDetInput;pub use preprocessing::PreprocessedRecBatch;pub use preprocessing::RecPreProcessor;pub use preprocessing::RecPreProcessorConfig;pub use preprocessing::RecPreProcessorError;pub use preprocessing::RecTextRegion;pub use recognition::RecInferenceOutput;pub use recognition::RecInferenceSession;pub use recognition::RecPostProcessor;pub use recognition::RecPostProcessorConfig;pub use recognition::RecPostProcessorError;
Modules§
Structs§
- Point
- Geometry primitives surfaced at the crate root for convenience. A single point in 2D space.
- Polygon
- Geometry primitives surfaced at the crate root for convenience. A bounded two-dimensional area.
Functions§
- run_
dbnet_ dummy_ inference - Run a
tract-onnxdummy inference against a DBNet detection model. - run_
svtr_ dummy_ inference - Run a
tract-onnxdummy inference against an SVTR recognition model.