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

添加whl包的构建方式 #594

Merged
merged 9 commits into from
Aug 24, 2020
Merged

添加whl包的构建方式 #594

merged 9 commits into from
Aug 24, 2020

Conversation

WenmuZhou
Copy link
Collaborator

whl包主要用于支持paddleocr的python预测,特点如下

  1. 一键安装
  2. 支持python使用和命令行使用
  3. 支持使用自己的db和crnn模型

@CLAassistant
Copy link

CLAassistant commented Aug 22, 2020

CLA assistant check
All committers have signed the CLA.

package_dir={'paddleocr': ''},
include_package_data=True,
entry_points={"console_scripts": ["paddleocr= paddleocr.paddleocr:main"]},
version='0.0.3',
Copy link
Collaborator

Choose a reason for hiding this comment

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

上面pip install写的是0.0.1,这块是0.0.3,这个是typo吗还是?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这个我改一下,pypi上是已经提交到0.0.3了,本地也需要改为0.0.3

setup.py Outdated
'Programming Language :: Python', 'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
Copy link
Collaborator

Choose a reason for hiding this comment

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

这块确定都是支持的吗?py2的中文是否会有问题呢?要不测试一下?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

要不去掉py2?

@littletomatodonkey
Copy link
Collaborator

littletomatodonkey commented Aug 23, 2020 via email

@WenmuZhou
Copy link
Collaborator Author

已完成修改

long_description_content_type='text/markdown',
url='https://github.com/PaddlePaddle/PaddleOCR',
download_url='https://github.com/PaddlePaddle/PaddleOCR.git',
keywords=[
Copy link
Collaborator

Choose a reason for hiding this comment

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

keywords这里需要和repo的一致吗?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

应该需要的,毕竟whl包也属于repo的一部分,多加点相关的关键词被搜索到的几率大,可以导流

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK,之前在repo增加的太多,在github上搜索ocr排名太靠后

paddleocr.py Outdated
}

SUPPORT_DET_MODEL = ['DB']
SUPPORT_REC_MODEL = ['Rosetta', 'CRNN', 'STARNet', 'RARE']
Copy link
Collaborator

Choose a reason for hiding this comment

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

SUPPORT_REC_MODEL只支持CRNN,其他先不支持

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok

paddleocr.py Outdated

class PaddleOCR(predict_system.TextSystem):
def __init__(self,
det_model_name='ch_det_mv3_db',
Copy link
Collaborator

Choose a reason for hiding this comment

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

是否改成模型路径最好呢?这样通过路径配置,可以同时支持超轻量模型和通用模型


pip安装
```bash
pip install paddleocr
Copy link
Collaborator

Choose a reason for hiding this comment

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

如果PaddleOCR有更新,whl包是自动更新,还是需要手动更新呢?

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.

如果PaddleOCR有更新,whl包是自动更新,还是需要手动更新呢?

pypi上的需要我们自己构建了传上去,都是手动更新

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这块和下面的本地构建并安装的区别?

本地构建,用户可以自己打包自己的后处理进来。pip install paddleocr安装的是我们提前构建好传到pypi上的

* 检测+识别全流程
```python
from paddleocr import PaddleOCR, draw_ocr
ocr = PaddleOCR(model_storage_directory='./model') # need to run only once to load model into memory
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

@WenmuZhou WenmuZhou Aug 24, 2020

Choose a reason for hiding this comment

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

也就是改成PaddleOCR(det_model_dir,rec_model_dir)这种形式吗

......
```

* 单独执行检测
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.

已添加

@dyning dyning merged commit 0791714 into PaddlePaddle:develop Aug 24, 2020
@WenmuZhou WenmuZhou deleted the whl1 branch August 27, 2020 06:43
an1018 pushed a commit to an1018/PaddleOCR that referenced this pull request Aug 17, 2022
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

4 participants