-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Derive the model names from directory names if provided #15708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Derive the model names from directory names if provided #15708
Conversation
Thanks for your contribution! |
3d73f35
to
dc38ef6
Compare
dc38ef6
to
e86450a
Compare
text_recognition_model_name = os.path.basename( | ||
text_recognition_model_dir | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately the code style check/linter requires this ugly line break, so there is nothing I can do about it. :-/
Although the model directory name and the model name may be the same in some cases, they essentially refer to different things. Therefore, I don't think it's appropriate to use either the model directory name as the model name. Nevertheless, thank you for your contribution! If you have other ideas, feel free to share them with us. |
But I checked the official models in PaddleX beforehand - when im not mistaken the model name and directory name matched in every instance. |
Yes, for official PaddleX models, the model name usually matches the directory name. However, users are free to rename the directory, so we can’t guarantee consistency there. To be more accurate, I recommend checking the |
PaddleOCR 3.0.0/3.0.1 requires specifying the name in addition to the model directory which is not really necessary because they can be derived from the directory name. This improves the user experience by making it easier to use.
If this gets approved, I would appreciate it to be also cherry-picked for the 3.0.2 release.
Fixes #15707