use rapidocr

This commit is contained in:
mertalev 2025-06-10 17:34:52 -04:00
parent 08e54ec5c1
commit c59f932bf0
No known key found for this signature in database
GPG key ID: DF6ABC77AAD98C95
10 changed files with 292 additions and 284 deletions

View file

@ -25,6 +25,7 @@ class ModelTask(StrEnum):
SEARCH = "clip"
OCR = "ocr"
class ModelType(StrEnum):
DETECTION = "detection"
RECOGNITION = "recognition"
@ -32,6 +33,7 @@ class ModelType(StrEnum):
VISUAL = "visual"
OCR = "ocr"
class ModelFormat(StrEnum):
ARMNN = "armnn"
ONNX = "onnx"
@ -44,6 +46,7 @@ class ModelSource(StrEnum):
OPENCLIP = "openclip"
PADDLE = "paddle"
ModelIdentity = tuple[ModelType, ModelTask]
@ -87,19 +90,6 @@ class DetectedFace(TypedDict):
FacialRecognitionOutput = list[DetectedFace]
class OCROutput(TypedDict):
text: str
confidence: float
x1: int
y1: int
x2: int
y2: int
x3: int
y3: int
x4: int
y4: int
class PipelineEntry(TypedDict):
modelName: str
options: dict[str, Any]