You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the PaddleOCR Docs and found no similar bug report.
I have searched the PaddleOCR Issues and found no similar bug report.
I have searched the PaddleOCR Discussions and found no similar bug report.
🐛 Bug (问题描述)
当PaddleOCR的构造函数里同时设置了
text_detection_model_name
text_recognition_model_name
lang
需要查看最终调用的模型是否正确,测试显示,会打印
Creating model: ('PP-OCRv5_mobile_det', None)
Using official model (PP-OCRv5_mobile_det), the model files will be automatically downloaded and saved in /home//.paddlex/official_models.
Creating model: ('PP-OCRv5_mobile_rec', None)
Using official model (PP-OCRv5_mobile_rec), the model files will be automatically downloaded and saved in /home//.paddlex/official_models.
原因为https://github.com/PaddlePaddle/PaddleOCR/tree/main/paddleocr/_pipelines/ocr.py
代码里有这样一段
if text_detection_model_dir is None and text_recognition_model_dir is None:
if lang is not None or ocr_version is not None:
det_model_name, rec_model_name = self._get_ocr_model_names(
lang, ocr_version
)
if det_model_name is None or rec_model_name is None:
raise ValueError(
f"No models are available for the language {repr(lang)} and OCR version {repr(ocr_version)}."
)
text_detection_model_name = det_model_name
text_recognition_model_name = rec_model_name
直接把模型给改了。
🏃♂️ Environment (运行环境)
代码层面的问题,与环境无关
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
代码层面的问题,与环境无关,直接看代码即可发现问题
The text was updated successfully, but these errors were encountered:
🔎 Search before asking
🐛 Bug (问题描述)
当PaddleOCR的构造函数里同时设置了
text_detection_model_name
text_recognition_model_name
lang
需要查看最终调用的模型是否正确,测试显示,会打印
Creating model: ('PP-OCRv5_mobile_det', None)
Using official model (PP-OCRv5_mobile_det), the model files will be automatically downloaded and saved in /home//.paddlex/official_models.
Creating model: ('PP-OCRv5_mobile_rec', None)
Using official model (PP-OCRv5_mobile_rec), the model files will be automatically downloaded and saved in /home//.paddlex/official_models.
原因为https://github.com/PaddlePaddle/PaddleOCR/tree/main/paddleocr/_pipelines/ocr.py
代码里有这样一段
if text_detection_model_dir is None and text_recognition_model_dir is None:
if lang is not None or ocr_version is not None:
det_model_name, rec_model_name = self._get_ocr_model_names(
lang, ocr_version
)
if det_model_name is None or rec_model_name is None:
raise ValueError(
f"No models are available for the language {repr(lang)} and OCR version {repr(ocr_version)}."
)
text_detection_model_name = det_model_name
text_recognition_model_name = rec_model_name
直接把模型给改了。
🏃♂️ Environment (运行环境)
代码层面的问题,与环境无关
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
代码层面的问题,与环境无关,直接看代码即可发现问题
The text was updated successfully, but these errors were encountered: