add warning log for rec_font_path

This commit is contained in:
David Morady
2025-09-15 11:54:03 +02:00
parent 0a65eed28a
commit ac96f1483f
2 changed files with 5 additions and 1 deletions

View File

@@ -114,7 +114,7 @@ class RapidOcrOptions(OcrOptions):
cls_model_path: Optional[str] = None # same default as rapidocr
rec_model_path: Optional[str] = None # same default as rapidocr
rec_keys_path: Optional[str] = None # same default as rapidocr
rec_font_path: Optional[str] = None # Deprecated with new RapidOCR Version please use font_path instead
rec_font_path: Optional[str] = None # Deprecated, please use font_path instead
font_path: Optional[str] = None # same default as rapidocr
# Dictionary to overwrite or pass-through additional parameters

View File

@@ -89,6 +89,10 @@ class RapidOcrModel(BaseOcrModel):
"Rec.engine_type": backend_enum,
}
if self.options.rec_font_path is not None:
_log.warning(
"The 'rec_font_path' option for RapidOCR is deprecated. Please use 'font_path' instead."
)
user_params = self.options.rapidocr_params
if user_params:
_log.debug("Overwriting RapidOCR params with user-provided values.")