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

添加PaddleOCR功能 #120

Merged
merged 1 commit into from Aug 7, 2023
Merged

Conversation

TonyJiangWJ
Copy link
Contributor

增加PaddleOCR功能。
我对Kotlin不太熟悉,本次新增代码均为Java版本和目前仓库里面的Kotlin风格可能有点格格不入,作者可以后期进行转换。
首次编译需要下载OpenCV的源代码包用于编译 libs:paddleocr 这个模块,执行gradle任务 downloadAndExtractArchives 即可自动下载。
另外PaddleOCR只支持 arm64-v8aarmeabi-v7a 两个平台,不支持 x86 平台,因此如果打包成 x86x86_64 是无法使用它的。
文档的话可以直接参照MlKitOCR的,API为 paddle_ocr ,风格是统一的,即 detectrecognizeText 两个方法,之前没注意到MlKitOCR已经迁移进来了,哈哈。
options增加:

  • useSlim 指定是否使用移动端优化版精简模型(默认为true)
  • cpuThreadNum 指定模型使用CPU线程数(默认4),实际使用下来没啥区别,保持了PaddleOCR本身的参数,目前感觉意义不大。

@TonyJiangWJ
Copy link
Contributor Author

这个 CodeFactor 的代码校验,不知道可以跳过不。CPP中的代码不建议去变更,因为要考虑后期升级版本,和PaddleOCR官方代码最好保持统一,方便后续比对差异。另外自己去修改C++代码也容易改出新的问题。

@SuperMonster003 SuperMonster003 merged commit e5c9c89 into SuperMonster003:master Aug 7, 2023
1 check failed
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.

None yet

2 participants