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

[Hackathon 182 Model] Update PPOCRV3 For RKNPU2 #1402

Closed
wants to merge 18 commits into from
Closed

[Hackathon 182 Model] Update PPOCRV3 For RKNPU2 #1402

wants to merge 18 commits into from

Conversation

Zheng-Bicheng
Copy link
Collaborator

PR types(PR类型)

Model

Description

更新PPOCRV3

@Zheng-Bicheng
Copy link
Collaborator Author

Zheng-Bicheng commented Feb 21, 2023

@Zheng-Bicheng Zheng-Bicheng changed the title [Model] Update PPOCRV3 For RKNPU2 [Hackathon 182 Model] Update PPOCRV3 For RKNPU2 Feb 21, 2023
@Zheng-Bicheng
Copy link
Collaborator Author

Zheng-Bicheng commented Feb 21, 2023

PPOCRV3更新细节

FastDeploy cmake部分

  • 更新RKNPU2驱动版本至1.4.2b0
  • 更新RKNPU2 cmake 现在RKNPU2驱动将分为RK3588和RK356X进行下载,不再混合
  • FastDeploy不在依赖rknnlib_api

Det部分

  • RKNPU2不支持Normalzie 和 Permute因此添加了DisableNormalize 和DisablePermute
  • RKNPU2 不支持动态shape,因此参考Rec部分新增了固定shape推理。

Cls部分

  • RKNPU2不支持Normalzie 和 Permute因此添加了DisableNormalize 和DisablePermute

Rec部分

  • RKNPU2不支持Normalzie 和 Permute因此添加了DisableNormalize 和DisablePermute

OCR Result部分

  • 在显示result时会出现rec_score为0但是仍然被框出来的情况,这里对VisOcr函数新增了参数score_threshold

导出模型部分

  • 新增三个模型的配置文件
  • 对导出模型的代码进行了优化

@Zheng-Bicheng
Copy link
Collaborator Author

结果展示

vis_result

det boxes: [[276,174],[285,173],[285,178],[276,179]]rec text:  rec score:0.000000 cls label: 1 cls score: 0.766602
det boxes: [[43,408],[483,390],[483,431],[44,449]]rec text: 上海斯格威铂尔曼大酒店 rec score:0.888450 cls label: 0 cls score: 1.000000
det boxes: [[186,456],[399,448],[399,480],[186,488]]rec text: 打浦路15号 rec score:0.988769 cls label: 0 cls score: 1.000000
det boxes: [[18,501],[513,485],[514,537],[18,554]]rec text: 绿洲仕格维花园公寓 rec score:0.992730 cls label: 0 cls score: 1.000000
det boxes: [[78,553],[404,541],[404,573],[78,585]]rec text: 打浦路252935号 rec score:0.983545 cls label: 0 cls score: 1.000000
Visualized result saved in ./vis_result.jpg

@Zheng-Bicheng
Copy link
Collaborator Author

目前未实现要求

经过实测,使用RK静态量化工具,PPOCRV3的精度会大幅度下降,这一点可能要和RK的工程师讨论下。 @leiqing1

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.

1 participant