Implement OCR engine architecture with base, factory, and specific engines
This commit is contained in:
15
app/ocr/none.py
Normal file
15
app/ocr/none.py
Normal 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)
|
||||
Reference in New Issue
Block a user