-
Notifications
You must be signed in to change notification settings - Fork 86
PaddleOCR #1036
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?
PaddleOCR #1036
Conversation
|
Thanks for adding PaddleOCR! |
| std::unique_ptr<ML::PaddleOCRPipeline> paddle_ocr; | ||
| if (use_paddle_ocr) { | ||
| // Initialize only if the setting is enabled | ||
| paddle_ocr = std::make_unique<ML::PaddleOCRPipeline>(language); |
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.
How expensive is this constructor? Is it okay to reinitialize it on every OCR call? Or should we cache like Tesseract?
| PaddleOCRPipeline::PaddleOCRPipeline(Language language, std::string rec_path, std::string dict_path) | ||
| : m_env{create_ORT_env()} | ||
| // , det_session(env, std::wstring(det_path.begin(), det_path.end()).c_str(), Ort::SessionOptions{}) | ||
| , m_rec_session(create_session(m_env, Ort::SessionOptions{}, rec_path, ML_MODEL_CACHE_PATH() + "PaddleOCRPipeline/")) |
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.
Oh this definitely looks expensive.
No description provided.