diff --git a/paddleocr.py b/paddleocr.py index 03c9ba189a8ce0edba39f5fcb72c7ddc0611241a..61b5c536f7c9c827038c0ce34c8f6b01a2c3c535 100644 --- a/paddleocr.py +++ b/paddleocr.py @@ -47,7 +47,7 @@ __all__ = [ ] SUPPORT_DET_MODEL = ['DB'] -VERSION = '2.6.0.1' +VERSION = '2.6.0.3' SUPPORT_REC_MODEL = ['CRNN', 'SVTR_LCNet'] BASE_DIR = os.path.expanduser("~/.paddleocr/") @@ -681,7 +681,7 @@ def main(): "error in layout recovery image:{}, err msg: {}".format( img_name, ex)) continue - + for item in all_res: item.pop('img') item.pop('res') diff --git a/ppstructure/docs/quickstart.md b/ppstructure/docs/quickstart.md index f1f9cb8b09cd87b35fec0e7f09ff1d813e3d44db..ad45c95ab60ee356b4f1a29e7bd11c4af05f6aec 100644 --- a/ppstructure/docs/quickstart.md +++ b/ppstructure/docs/quickstart.md @@ -49,12 +49,6 @@ pip3 install "paddleocr>=2.6" # 安装 图像方向分类依赖包paddleclas(如不需要图像方向分类功能,可跳过) pip3 install paddleclas>=2.4.3 - -# 安装 关键信息抽取 依赖包(如不需要KIE功能,可跳过) -pip3 install -r ppstructure/kie/requirements.txt - -# 安装 版面恢复 依赖包(如不需要版面恢复功能,可跳过) -pip3 install -r ppstructure/recovery/requirements.txt ``` diff --git a/ppstructure/docs/quickstart_en.md b/ppstructure/docs/quickstart_en.md index e0eec4b38ba57b1bebd0e711093e5dfd4773fdd9..47a481f3ab480a46f70d1fb52e517aa92e17e346 100644 --- a/ppstructure/docs/quickstart_en.md +++ b/ppstructure/docs/quickstart_en.md @@ -51,12 +51,6 @@ pip3 install "paddleocr>=2.6" # Install the image direction classification dependency package paddleclas (if you do not use the image direction classification, you can skip it) pip3 install paddleclas>=2.4.3 - -# Install the KIE dependency packages (if you do not use the KIE, you can skip it) -pip3 install -r kie/requirements.txt - -# Install the layout recovery dependency packages (if you do not use the layout recovery, you can skip it) -pip3 install -r recovery/requirements.txt ``` diff --git a/setup.py b/setup.py index 7d4d871d89defcf832910c60f18b094f10ba11db..54affbcf004a4f5410c0eb072b1978b6a94af53d 100644 --- a/setup.py +++ b/setup.py @@ -16,9 +16,17 @@ from setuptools import setup from io import open from paddleocr import VERSION -with open('requirements.txt', encoding="utf-8-sig") as f: - requirements = f.readlines() - requirements.append('tqdm') + +def load_requirements(file_list=None): + if file_list is None: + file_list = ['requirements.txt'] + if isinstance(file_list, str): + file_list = [file_list] + requirements = [] + for file in file_list: + with open(file, encoding="utf-8-sig") as f: + requirements.extend(f.readlines()) + return requirements def readme(): @@ -34,7 +42,8 @@ setup( include_package_data=True, entry_points={"console_scripts": ["paddleocr= paddleocr.paddleocr:main"]}, version=VERSION, - install_requires=requirements, + install_requires=load_requirements( + ['requirements.txt', 'ppstructure/recovery/requirements.txt']), license='Apache License 2.0', description='Awesome OCR toolkits based on PaddlePaddle (8.6M ultra-lightweight pre-trained model, support training and deployment among server, mobile, embeded and IoT devices', long_description=readme(),