Some checks failed
Deploy to Staging / Build Images (pull_request) Failing after 4m14s
Deploy to Staging / Deploy to Staging (pull_request) Has been skipped
Deploy to Staging / Verify Staging (pull_request) Has been skipped
Deploy to Staging / Notify Staging Ready (pull_request) Has been skipped
Deploy to Staging / Notify Staging Failure (pull_request) Successful in 8s
33 lines
768 B
Python
33 lines
768 B
Python
"""OCR engine abstraction layer.
|
|
|
|
Provides a pluggable engine interface for OCR processing,
|
|
decoupling extractors from specific OCR libraries.
|
|
|
|
Engines:
|
|
- PaddleOcrEngine: PaddleOCR PP-OCRv4 (primary, CPU-only)
|
|
- CloudEngine: Google Vision TEXT_DETECTION (optional cloud fallback)
|
|
- HybridEngine: Primary + fallback with confidence threshold
|
|
"""
|
|
|
|
from app.engines.base_engine import (
|
|
EngineError,
|
|
EngineProcessingError,
|
|
EngineUnavailableError,
|
|
OcrConfig,
|
|
OcrEngine,
|
|
OcrEngineResult,
|
|
WordBox,
|
|
)
|
|
from app.engines.engine_factory import create_engine
|
|
|
|
__all__ = [
|
|
"OcrEngine",
|
|
"OcrConfig",
|
|
"OcrEngineResult",
|
|
"WordBox",
|
|
"EngineError",
|
|
"EngineUnavailableError",
|
|
"EngineProcessingError",
|
|
"create_engine",
|
|
]
|