Skip to content

update text detection model from DB to PPOCRv3DB #180

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

Merged
merged 1 commit into from
Dec 23, 2023

Conversation

WanliZhong
Copy link
Member

@WanliZhong WanliZhong commented Jun 19, 2023

This PR is follow #158
This PR should be merged after 4.8.0 released

TODO list:

  • update model
  • quantize model (Accuracy drop because the models are sensitive to quantization)
  • update cpp demo after Text recognition crnn #176
  • update benchmark data

@WanliZhong WanliZhong added the update model request to update existing models label Jun 19, 2023
@fengyuentau
Copy link
Member

Friendly reminder.

@WanliZhong WanliZhong marked this pull request as ready for review August 15, 2023 07:08
Comment on lines 283 to 294
254.78 256.13 245.60 [640, 480] DB with ['text_detection_DB_IC15_resnet18_2021sep.onnx']
254.98 255.20 245.60 [640, 480] DB with ['text_detection_DB_TD500_resnet18_2021sep.onnx']
427.53 428.67 425.63 [640, 480] PPOCRv3DB with ['text_detection_ch_ppocrv3_2023may.onnx']
427.79 429.28 425.63 [640, 480] PPOCRv3DB with ['text_detection_en_ppocrv3_2023may.onnx']
414.07 429.46 387.26 [640, 480] PPOCRv3DB with ['text_detection_ch_ppocrv3_2023may_int8.onnx']
406.10 407.83 383.41 [640, 480] PPOCRv3DB with ['text_detection_en_ppocrv3_2023may_int8.onnx']
Copy link
Member Author

@WanliZhong WanliZhong Aug 15, 2023

Choose a reason for hiding this comment

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

All the backends are faster with the new model, only FP16 is slower than before on CUDA.

@fengyuentau fengyuentau self-requested a review November 7, 2023 14:22
@fengyuentau fengyuentau self-assigned this Nov 7, 2023
@fengyuentau
Copy link
Member

I propose to:

  1. resolve conflicts,
  2. add this model to models/text_detection_ppocrv3,
  3. delete text_detection_db in antoher pr.

@fengyuentau
Copy link
Member

Hardswish has been supported for CANN backend. Could you update benchmark results on Ascend NPUs?

@WanliZhong
Copy link
Member Author

WanliZhong commented Dec 20, 2023

HardSigmoid is not supported

[ WARN:0@0.397] global net_cann.cpp:120 initBackend DNN/CANN: layer (name=onnx_node!p2o.HardSigmoid.0, type=HardSigmoid) is not supported by CANN backend. Going back to default backend on CPU target

PPOCR detection v4 has not release English version and slim version. So still use PPOCRv3

Copy link
Member

@fengyuentau fengyuentau left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@fengyuentau fengyuentau merged commit b32d27c into opencv:main Dec 23, 2023
@WanliZhong WanliZhong added this to the 4.9.0 (first release) milestone Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
update model request to update existing models
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants