Implement OCR engine architecture with base, factory, and specific engines

This commit is contained in:
2026-05-08 07:08:48 +02:00
parent d117be5eec
commit 061ebf9978
7 changed files with 460 additions and 0 deletions

15
app/ocr/none.py Normal file
View File

@@ -0,0 +1,15 @@
from __future__ import annotations
import numpy as np
from app.ocr.base import OcrResult
class NoOcrEngine:
name = "none"
def __init__(self, config: dict) -> None:
self.config = config
def read_label(self, frame_bgr: np.ndarray, bbox: tuple[int, int, int, int]) -> OcrResult:
return OcrResult(engine=self.name)