High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(ml): ocr failing with rootless docker (#23402)
Mert4abaad548a1b
diff --git a/machine-learning/immich_ml/models/ocr/recognition.py b/machine-learning/immich_ml/models/ocr/recognition.pyindex 0138ff9bdb..c3d39b0d70 100644--- a/machine-learning/immich_ml/models/ocr/recognition.py+++ b/machine-learning/immich_ml/models/ocr/recognition.py@@ -10,6 +10,7 @@ from rapidocr.inference_engine.base import FileInfo, InferSessionfrom rapidocr.utils import DownloadFile, DownloadFileInputfrom rapidocr.utils.typings import EngineType, LangRec, OCRVersion, TaskTypefrom rapidocr.utils.typings import ModelType as RapidModelType+from rapidocr.utils.vis_res import VisResfrom immich_ml.config import log, settingsfrom immich_ml.models.base import InferenceModel@@ -31,6 +32,7 @@ class TextRecognizer(InferenceModel):"text": [],"textScore": np.empty(0, dtype=np.float32),}+ VisRes.__init__ = lambda self, **kwargs: None # pyright: ignore[reportAttributeAccessIssue]super().__init__(model_name, **model_kwargs, model_format=ModelFormat.ONNX)def _download(self) -> None: