mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
use rapidocr
This commit is contained in:
parent
08e54ec5c1
commit
c59f932bf0
10 changed files with 292 additions and 284 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue