Skip to content
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

[Other] Add detection, segmentation and OCR examples for Ascend deploy. #983

Merged
merged 65 commits into from
Jan 4, 2023

Conversation

yunyaoXYY
Copy link
Collaborator

@yunyaoXYY yunyaoXYY commented Dec 27, 2022

1.添加能够在昇腾上完成正确推理的 检测和分割模型examples
2.修改PPOCR代码,成员变量通过Set/Get读写.
3.提供PP-OCR的昇腾部署demo
4.完善PaddleLite编译

@yunyaoXYY yunyaoXYY changed the title [Other] Add detection and segmentation examples for Ascend deploy. [Other] Add detection, segmentation and OCR examples for Ascend deploy. Dec 28, 2022
@@ -55,6 +55,10 @@ void InitAndInfer(const std::string& det_model_dir, const std::string& cls_model
auto cls_model = fastdeploy::vision::ocr::Classifier(cls_model_file, cls_params_file, cls_option);
auto rec_model = fastdeploy::vision::ocr::Recognizer(rec_model_file, rec_params_file, rec_label_file, rec_option);

// Users could enable static shape infer for rec model when deploy PP-OCR on hardware
// which can not support dynamic shape infer well, like Huawei Ascend series.
// rec_model.GetPreprocessor().SetStaticShapeInfer(true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里在跑Ascend时,需要打开这个注释是吗?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,目前就昇腾需要

// of the cls and rec models will be the same as the number of boxes detected by the det model.
// When users enable static shape infer for rec model, the batch size of cls and rec model needs to be set to 1.
// ppocr_v2.SetClsBatchSize(1);
// ppocr_v2.SetRecBatchSize(1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同时还要打开这里的注释?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,就这两个地方

@jiangjiajun jiangjiajun merged commit 58d63f3 into PaddlePaddle:develop Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants