diff --git a/README.md b/README.md index 4bb69766e5d1bdb9fa845efed90f43c2645ec95c..1ba1cd14f3ba68fd599aa50cfd5a19298006a284 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ For more model downloads (including multiple languages), please refer to [PP-OCR For a new language request, please refer to [Guideline for new language_requests](#language_requests). ## Tutorials +- [Environment Preparation](./doc/doc_en/environment_en.md) - [Quick Start](./doc/doc_en/quickstart_en.md) - [PaddleOCR Overview and Installation](./doc/doc_en/paddleOCR_overview_en.md) - PP-OCR Industry Landing: from Training to Deployment diff --git a/README_ch.md b/README_ch.md index 8e9f8efc089889ce1e7c069e2dd960cd3a4cdd4d..11e1097250dff6d7384845f5d48fa073a6adf298 100755 --- a/README_ch.md +++ b/README_ch.md @@ -92,6 +92,7 @@ PaddleOCR同时支持动态图与静态图两种编程范式 更多模型下载(包括多语言),可以参考[PP-OCR v2.0 系列模型下载](./doc/doc_ch/models_list.md) ## 文档教程 +- [运行环境准备](./doc/doc_ch/environment.md) - [快速开始](./doc/doc_ch/quickstart.md) - [PaddleOCR全景图与安装](./doc/doc_ch/paddleOCR_overview.md) - PP-OCR产业落地:从训练到部署 @@ -120,7 +121,6 @@ PaddleOCR同时支持动态图与静态图两种编程范式 - OCR学术圈 - [两阶段模型介绍与下载](./doc/doc_ch/algorithm_overview.md) - [端到端PGNet算法](./doc/doc_ch/pgnet.md) - - 模型训练 - 数据集 - [通用中英文OCR数据集](./doc/doc_ch/datasets.md) - [手写中文OCR数据集](./doc/doc_ch/handwritten_datasets.md) diff --git a/doc/doc_ch/environment.md b/doc/doc_ch/environment.md index b53f5542d5d8670d557f15e297ff3b57f273203c..4f2acc29d9f70e75a0ed18ea358b747f77cd4a9e 100644 --- a/doc/doc_ch/environment.md +++ b/doc/doc_ch/environment.md @@ -1,8 +1,22 @@ -# 零基础Python环境搭建 +# 运行环境准备 -## Windows +[运行环境准备](#运行环境准备) -### 第1步:安装Anaconda +* [1. Python环境搭建](#1) + + [1.1 Windows](#1.1) + + [1.2 Mac](#1.2) + + [1.3 Linux](#1.3) +* [2. 安装PaddlePaddle](#2) + + + +## 1. Python环境搭建 + + + +### 1.1 Windows + +#### 1.1.1 安装Anaconda - 说明:使用paddlepaddle需要先安装python环境,这里我们选择python集成环境Anaconda工具包 - Anaconda是1个常用的python包管理程序 @@ -11,20 +25,20 @@ - 地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=M&O=D - 大部分win10电脑均为64位操作系统,选择x86_64版本;若电脑为32位操作系统,则选择x86.exe - anaconda download + anaconda download - 下载完成后,双击安装程序进入图形界面 - 默认安装位置为C盘,建议将安装位置更改到D盘: - install config + install config - 勾选conda加入环境变量,忽略警告: - add conda to path + add conda to path -### 第2步:打开终端并创建conda环境 +#### 1.1.2 打开终端并创建conda环境 - 打开Anaconda Prompt终端:左下角Windows Start Menu -> Anaconda3 -> Anaconda Prompt启动控制台 - anaconda download + anaconda download - 创建新的conda环境 @@ -39,7 +53,7 @@ 之后命令行中会输出提示信息,输入y并回车继续安装 - conda create + conda create - 激活刚创建的conda环境,在命令行中输入以下命令: @@ -50,21 +64,18 @@ where python ``` - create environment - - - + create environment 以上anaconda环境和python环境安装完毕 + +### 1.2 Mac -## Mac - -### 第1步:安装Anaconda +#### 1.2.1 安装Anaconda - 说明:使用paddlepaddle需要先安装python环境,这里我们选择python集成环境Anaconda工具包 - Anaconda是1个常用的python包管理程序 @@ -72,14 +83,14 @@ - Anaconda下载: - 地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=M&O=D - anaconda download + anaconda download - 选择最下方的`Anaconda3-2021.05-MacOSX-x86_64.pkg`下载 - 下载完成后,双击.pkg文件进入图形界面 - 按默认设置即可,安装需要花费一段时间 - 建议安装vscode或pycharm等代码编辑器 -### 第2步:打开终端并创建conda环境 +#### 1.2.2 打开终端并创建conda环境 - 打开终端 @@ -142,7 +153,7 @@ - 之后命令行中会输出提示信息,输入y并回车继续安装 - - conda_create + - conda_create - 激活刚创建的conda环境,在命令行中输入以下命令: @@ -153,15 +164,17 @@ where python ``` - conda_actviate + conda_actviate 以上anaconda环境和python环境安装完毕 + +### 1.3 Linux -## Linux +Linux用户可选择Anaconda或Docker两种方式运行。如果你熟悉Docker且需要训练PaddleOCR模型,推荐使用Docker环境,PaddleOCR的开发流程均在Docker环境下运行。如果你不熟悉Docker,也可以使用Anaconda来运行项目。 -### 第1步:安装Anaconda +#### 1.3.1 Anaconda环境配置 - 说明:使用paddlepaddle需要先安装python环境,这里我们选择python集成环境Anaconda工具包 - Anaconda是1个常用的python包管理程序 @@ -170,43 +183,27 @@ - **下载Anaconda**: - 下载地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=M&O=D - - - - - - - - - - - - - - - - - + - 选择适合您操作系统的版本 - - 可在终端输入`uname -m`查询系统所用的指令集 - - - 下载法1:本地下载,再将安装包传到linux服务器上 - - - 下载法2:直接使用linux命令行下载 - - ```shell + - 可在终端输入`uname -m`查询系统所用的指令集 + +- 下载法1:本地下载,再将安装包传到linux服务器上 + +- 下载法2:直接使用linux命令行下载 + + ```shell # 首先安装wget - sudo apt-get install wget # Ubuntu + sudo apt-get install wget # Ubuntu sudo yum install wget # CentOS - ``` - - ```shell + ``` + + ```shell # 然后使用wget从清华源上下载 - # 如要下载Anaconda3-2021.05-Linux-x86_64.sh,则下载命令如下: + # 如要下载Anaconda3-2021.05-Linux-x86_64.sh,则下载命令如下: wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2021.05-Linux-x86_64.sh - # 若您要下载其他版本,需要将最后1个/后的文件名改成您希望下载的版本 + # 若您要下载其他版本,需要将最后1个/后的文件名改成您希望下载的版本 ``` - 安装Anaconda: @@ -262,28 +259,71 @@ - 在终端中输入`source ~/.bash_profile`以更新环境变量 - 再在终端输入`conda info --envs`,若能显示当前有base环境,则conda已加入环境变量 -### 第2步:创建conda环境 - - 创建新的conda环境 ```shell - # 在命令行输入以下命令,创建名为paddle_env的环境 - # 此处为加速下载,使用清华源 - conda create --name paddle_env python=3.8 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ + # 在命令行输入以下命令,创建名为paddle_env的环境 + # 此处为加速下载,使用清华源 + conda create --name paddle_env python=3.8 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ ``` - 该命令会创建1个名为paddle_env、python版本为3.8的可执行环境,根据网络状态,需要花费一段时间 - 之后命令行中会输出提示信息,输入y并回车继续安装 - conda_create + conda_create - 激活刚创建的conda环境,在命令行中输入以下命令: ```shell - # 激活paddle_env环境 - conda activate paddle_env + # 激活paddle_env环境 + conda activate paddle_env ``` -以上anaconda环境和python环境安装完毕 \ No newline at end of file +以上anaconda环境和python环境安装完毕 + +#### 1.3.2 Docker环境配置 + +**注意:第一次使用这个镜像,会自动下载该镜像,请耐心等待。** + +```bash +# 切换到工作目录下 +cd /home/Projects +# 首次运行需创建一个docker容器,再次运行时不需要运行当前命令 +# 创建一个名字为ppocr的docker容器,并将当前目录映射到容器的/paddle目录下 + +如果您希望在CPU环境下使用docker,使用docker而不是nvidia-docker创建docker +sudo docker run --name ppocr -v $PWD:/paddle --network=host -it paddlepaddle/paddle:latest-dev-cuda10.1-cudnn7-gcc82 /bin/bash + +如果使用CUDA10,请运行以下命令创建容器,设置docker容器共享内存shm-size为64G,建议设置32G以上 +sudo nvidia-docker run --name ppocr -v $PWD:/paddle --shm-size=64G --network=host -it paddlepaddle/paddle:latest-dev-cuda10.1-cudnn7-gcc82 /bin/bash + +您也可以访问[DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/)获取与您机器适配的镜像。 + +# ctrl+P+Q可退出docker 容器,重新进入docker 容器使用如下命令 +sudo docker container exec -it ppocr /bin/bash +``` + + + +## 2. 安装PaddlePaddle + +- 如果您的机器安装的是CUDA9或CUDA10,请运行以下命令安装 + +```bash +python3 -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple +``` + +- 如果您的机器是CPU,请运行以下命令安装 + +```bash +python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple +``` + +更多的版本需求,请参照[飞桨官网安装文档](https://www.paddlepaddle.org.cn/install/quick)中的说明进行操作。 + + + + + diff --git a/doc/doc_ch/paddleOCR_overview.md b/doc/doc_ch/paddleOCR_overview.md index 9c16f8f62b87240d111dd13f05ef06f81bb58a92..f49c1ae302607ff6629da2462f91a36793b4db3a 100644 --- a/doc/doc_ch/paddleOCR_overview.md +++ b/doc/doc_ch/paddleOCR_overview.md @@ -1,2 +1,33 @@ # PaddleOCR全景图与项目克隆 +## 1. PaddleOCR全景图 + +PaddleOCR包含丰富的文本检测、文本识别以及端到端算法。结合实际测试与产业经验,PaddleOCR选择DB和CRNN作为基础的检测和识别模型,经过一系列优化策略提出面向产业应用的PP-OCR模型。PP-OCR模型针对通用场景,根据不同语种形成了PP-OCR模型库。基于PP-OCR的能力,PaddleOCR针对文档场景任务发布PP-Structure工具库,包含版面分析和表格识别两大任务。为了打通产业落地的全流程,PaddleOCR提供了规模化的数据生产工具和多种预测部署工具,助力开发者快速落地。 + +
+ +
+ +## 2. 项目克隆 + +### **2.1 克隆PaddleOCR repo代码** + +``` +【推荐】git clone https://github.com/PaddlePaddle/PaddleOCR +``` + +如果因为网络问题无法pull成功,也可选择使用码云上的托管: + +``` +git clone https://gitee.com/paddlepaddle/PaddleOCR +``` + +注:码云托管代码可能无法实时同步本github项目更新,存在3~5天延时,请优先使用推荐方式。 + +### **2.2 安装第三方库** + +``` +cd PaddleOCR +pip3 install -r requirements.txt +``` + diff --git a/doc/doc_ch/quickstart.md b/doc/doc_ch/quickstart.md index a524c38b6eb23c5e846f244d56bfc0edafac67b3..9df686501de48234dbc1821d7d645d7f12bda21a 100644 --- a/doc/doc_ch/quickstart.md +++ b/doc/doc_ch/quickstart.md @@ -1,9 +1,6 @@ # PaddleOCR快速开始 - [PaddleOCR快速开始](#paddleocr) - * [1. 轻量安装](#1) - + [1.0 运行环境准备](#10) - + [1.1 安装PaddlePaddle2.0](#11) - + [1.2 安装PaddleOCR whl包](#12) + + [1. 安装PaddleOCR whl包](#1) * [2. 便捷使用](#2) + [2.1 命令行使用](#21) - [2.1.1 中英文模型](#211) @@ -13,31 +10,9 @@ - [2.2.1 中英文与多语言使用](#221) - [2.2.2 版面分析使用](#222) - -## 1. 轻量安装 - -### 1.0 运行环境准备 - -如果您未搭建过Python环境,可以通过[零基础Python环境搭建文档](./environment.)进行环境搭建 - -### 1.1 安装PaddlePaddle2.0 - -- 如果您的机器安装的是CUDA9或CUDA10,请运行以下命令安装 - -```bash -python3 -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple -``` -- 如果您的机器是CPU,请运行以下命令安装 - -```bash -python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple -``` - -更多的版本需求,请参照[飞桨官网安装文档](https://www.paddlepaddle.org.cn/install/quick)中的说明进行操作。 - -### 1.2 安装PaddleOCR whl包 +## 1. 安装PaddleOCR whl包 ```bash pip install "paddleocr>=2.0.1" # 推荐使用2.0.1+版本 @@ -59,7 +34,7 @@ pip install "paddleocr>=2.0.1" # 推荐使用2.0.1+版本 ### 2.1 命令行使用 -PaddleOCR提供了一系列测试图片,点击xx下载,然后在终端中切换到相应目录 +PaddleOCR提供了一系列测试图片,点击[这里](https://paddleocr.bj.bcebos.com/dygraph_v2.1/ppocr_img.zip)下载并解压,然后在终端中切换到相应目录 ``` cd /path/to/ppocr_img @@ -203,6 +178,7 @@ paddleocr --image_dir=./table/1.png --type=structure 大部分参数和paddleocr whl包保持一致,见 [whl包文档](../doc/doc_ch/whl.md) + ### 2.2 Python脚本使用 diff --git a/doc/doc_en/environment_en.md b/doc/doc_en/environment_en.md index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..96a46cce3010934689e8d95985ca434f49d18886 100644 --- a/doc/doc_en/environment_en.md +++ b/doc/doc_en/environment_en.md @@ -0,0 +1,332 @@ +# Environment Preparation + +* [1. Python Environment Setup](#1) + + [1.1 Windows](#1.1) + + [1.2 Mac](#1.2) + + [1.3 Linux](#1.3) +* [2. Install PaddlePaddle 2.0](#2) + + + +## 1. Python Environment Setup + + + +### 1.1 Windows + +#### 1.1.1 Install Anaconda + +- Note: To use paddlepaddle you need to install python environment first, here we choose python integrated environment Anaconda toolkit + + - Anaconda is a common python package manager + - After installing Anaconda, you can install the python environment, as well as numpy and other required toolkit environment. + +- Anaconda download. + + - Address: https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=M&O=D + + - Most Win10 computers are 64-bit operating systems, choose x86_64 version; if the computer is a 32-bit operating system, choose x86.exe + + anaconda download + + - After the download is complete, double-click the installer to enter the graphical interface + + - The default installation location is C drive, it is recommended to change the installation location to D drive. + + install config + + - Check conda to add environment variables and ignore the warning that + + add conda to path + + +#### 1.1.2 Opening the terminal and creating the conda environment + +- Open Anaconda Prompt terminal: bottom left Windows Start Menu -> Anaconda3 -> Anaconda Prompt start console + + anaconda download + + +- Create a new conda environment + + ```shell + # Enter the following command at the command line to create an environment named paddle_env + # Here to speed up the download, use the Tsinghua source + conda create --name paddle_env python=3.8 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ # This is a one line command + ``` + + This command will create an executable environment named paddle_env with python version 3.8, which will take a while depending on the network status + + The command line will then output a prompt, type y and enter to continue the installation + + conda create + +- To activate the conda environment you just created, enter the following command at the command line. + + ```shell + # Activate the paddle_env environment + conda activate paddle_env + # View the current location of python + where python + ``` + + create environment + +The above anaconda environment and python environment are installed + + + + + +### 1.2 Mac + +#### 1.2.1 Installing Anaconda + +- Note: To use paddlepaddle you need to install the python environment first, here we choose the python integrated environment Anaconda toolkit + + - Anaconda is a common python package manager + - After installing Anaconda, you can install the python environment, as well as numpy and other required toolkit environment + +- Anaconda download:. + + - Address: https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=M&O=D + + anaconda download + + - Select `Anaconda3-2021.05-MacOSX-x86_64.pkg` at the bottom to download + +- After downloading, double click on the .pkg file to enter the graphical interface + + - Just follow the default settings, it will take a while to install + +- It is recommended to install a code editor such as vscode or pycharm + +#### 1.2.2 Open a terminal and create a conda environment + +- Open the terminal + + - Press command and spacebar at the same time, type "terminal" in the focus search, double click to enter terminal + +- **Add conda to the environment variables** + + - Environment variables are added so that the system can recognize the conda command + + - Open `~/.bash_profile` in the terminal by typing the following command. + + ```shell + vim ~/.bash_profile + ``` + + - Add conda as an environment variable in `~/.bash_profile`. + + ```shell + # Press i first to enter edit mode + # In the first line type. + export PATH="~/opt/anaconda3/bin:$PATH" + # If you customized the installation location during installation, change ~/opt/anaconda3/bin to the bin folder in the customized installation directory + ``` + + ```shell + # The modified ~/.bash_profile file should look like this (where xxx is the username) + export PATH="~/opt/anaconda3/bin:$PATH" + # >>> conda initialize >>> + # !!! Contents within this block are managed by 'conda init' !!! + __conda_setup="$('/Users/xxx/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" + if [ $? -eq 0 ]; then + eval "$__conda_setup" + else + if [ -f "/Users/xxx/opt/anaconda3/etc/profile.d/conda.sh" ]; then + . "/Users/xxx/opt/anaconda3/etc/profile.d/conda.sh" + else + export PATH="/Users/xxx/opt/anaconda3/bin:$PATH" + fi + fi + unset __conda_setup + # <<< conda initialize <<< + ``` + + - When you are done, press `esc` to exit edit mode, then type `:wq!` and enter to save and exit + + - Verify that the conda command is recognized. + + - Enter `source ~/.bash_profile` in the terminal to update the environment variables + - Enter `conda info --envs` in the terminal again, if it shows that there is a base environment, then conda has been added to the environment variables + +- Create a new conda environment + + ```shell + # Enter the following command at the command line to create an environment called paddle_env + # Here to speed up the download, use Tsinghua source + conda create --name paddle_env python=3.8 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ + ``` + + - This command will create an executable environment named paddle_env with python version 3.8, which will take a while depending on the network status + + - The command line will then output a prompt, type y and enter to continue the installation + + - conda_create + +- To activate the conda environment you just created, enter the following command at the command line. + + ```shell + # Activate the paddle_env environment + conda activate paddle_env + # View the current location of python + where python + ``` + + conda_actviate + +The above anaconda environment and python environment are installed + + + + + +### 1.3 Linux + +Linux users can choose to run either Anaconda or Docker. If you are familiar with Docker and need to train the PaddleOCR model, it is recommended to use the Docker environment, where the development process of PaddleOCR is run. If you are not familiar with Docker, you can also use Anaconda to run the project. + +#### 1.3.1 Anaconda environment configuration + +- Note: To use paddlepaddle you need to install the python environment first, here we choose the python integrated environment Anaconda toolkit + + - Anaconda is a common python package manager + - After installing Anaconda, you can install the python environment, as well as numpy and other required toolkit environment + +- **Download Anaconda**. + + - Download at: https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=M&O=D + + + + + + + - Select the appropriate version for your operating system + - Type `uname -m` in the terminal to check the command set used by your system + + - Download method 1: Download locally, then transfer the installation package to the linux server + + - Download method 2: Directly use linux command line to download + + ```shell + # First install wget + sudo apt-get install wget # Ubuntu + sudo yum install wget # CentOS + ``` + ```bash + # Then use wget to download from Tsinghua source + # If you want to download Anaconda3-2021.05-Linux-x86_64.sh, the download command is as follows + wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2021.05-Linux-x86_64.sh + # If you want to download another version, you need to change the file name after the last 1 / to the version you want to download + ``` + +- To install Anaconda. + + - Type `sh Anaconda3-2021.05-Linux-x86_64.sh` at the command line + - If you downloaded a different version, replace the file name of the command with the name of the file you downloaded + - Just follow the installation instructions + - You can exit by typing q when viewing the license + +- **Add conda to the environment variables** + + - If you have already added conda to the environment variable path during the installation, you can skip this step + + - Open `~/.bashrc` in a terminal. + + ```shell + # Enter the following command in the terminal. + vim ~/.bashrc + ``` + + - Add conda as an environment variable in `~/.bashrc`. + + ```shell + # Press i first to enter edit mode # In the first line enter. + export PATH="~/anaconda3/bin:$PATH" + # If you customized the installation location during installation, change ~/anaconda3/bin to the bin folder in the customized installation directory + ``` + + ```shell + # The modified ~/.bash_profile file should look like this (where xxx is the username) + export PATH="~/opt/anaconda3/bin:$PATH" + # >>> conda initialize >>> + # !!! Contents within this block are managed by 'conda init' !!! + __conda_setup="$('/Users/xxx/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" + if [ $? -eq 0 ]; then + eval "$__conda_setup" + else + if [ -f "/Users/xxx/opt/anaconda3/etc/profile.d/conda.sh" ]; then + . "/Users/xxx/opt/anaconda3/etc/profile.d/conda.sh" + else + export PATH="/Users/xxx/opt/anaconda3/bin:$PATH" + fi + fi + unset __conda_setup + # <<< conda initialize <<< + ``` + + - When you are done, press `esc` to exit edit mode, then type `:wq!` and enter to save and exit + + - Verify that the conda command is recognized. + + - Enter `source ~/.bash_profile` in the terminal to update the environment variables + - Enter `conda info --envs` in the terminal again, if it shows that there is a base environment, then conda has been added to the environment variables + +- Create a new conda environment + + ```shell + # Enter the following command at the command line to create an environment called paddle_env + # Here to speed up the download, use Tsinghua source + conda create --name paddle_env python=3.8 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ + ``` + + - This command will create an executable environment named paddle_env with python version 3.8, which will take a while depending on the network status + + - The command line will then output a prompt, type y and enter to continue the installation + + conda_create + +- To activate the conda environment you just created, enter the following command at the command line. + + ```shell + # Activate the paddle_env environment + conda activate paddle_env + ``` + +The above anaconda environment and python environment are installed + + +#### 1.3.2 Docker environment preparation + +**The first time you use this docker image, it will be downloaded automatically. Please be patient.** + +```bash +# Switch to the working directory +cd /home/Projects +# You need to create a docker container for the first run, and do not need to run the current command when you run it again +# Create a docker container named ppocr and map the current directory to the /paddle directory of the container + +# If using CPU, use docker instead of nvidia-docker to create docker +sudo docker run --name ppocr -v $PWD:/paddle --network=host -it paddlepaddle/paddle:latest-dev-cuda10.1-cudnn7-gcc82 /bin/bash +``` + + + +## 2. Install PaddlePaddle 2.0 + +- If you have cuda9 or cuda10 installed on your machine, please run the following command to install + +```bash +python3 -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple +``` + +- If you only have cpu on your machine, please run the following command to install + +```bash +python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple +``` + +For more software version requirements, please refer to the instructions in [Installation Document](https://www.paddlepaddle.org.cn/install/quick) for operation. + diff --git a/doc/doc_en/paddleOCR_overview_en.md b/doc/doc_en/paddleOCR_overview_en.md index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..403cd99415e08de198270fb5bfe1a43f297c5156 100644 --- a/doc/doc_en/paddleOCR_overview_en.md +++ b/doc/doc_en/paddleOCR_overview_en.md @@ -0,0 +1,39 @@ +# PaddleOCR Overview and Project Clone + +## 1. PaddleOCR Overview + +PaddleOCR contains rich text detection, text recognition and end-to-end algorithms. Combining actual testing and industrial experience, PaddleOCR chooses DB and CRNN as the basic detection and recognition models, and proposes a series of models, named PP-OCR, for industrial applications after a series of optimization strategies. The PP-OCR model is aimed at general scenarios and forms a model library according to different languages. Based on the capabilities of PP-OCR, PaddleOCR releases the PP-Structure tool library for document scene tasks, including two major tasks: layout analysis and table recognition. In order to get through the entire process of industrial landing, PaddleOCR provides large-scale data production tools and a variety of prediction deployment tools to help developers quickly turn ideas into reality. + +
+ +
+ + + +## 2. Project Clone + +### **2.1 Clone PaddleOCR repo** + +``` +# Recommend +git clone https://github.com/PaddlePaddle/PaddleOCR + +# If you cannot pull successfully due to network problems, you can also choose to use the code hosting on the cloud: + +git clone https://gitee.com/paddlepaddle/PaddleOCR + +# Note: The cloud-hosting code may not be able to synchronize the update with this GitHub project in real time. There might be a delay of 3-5 days. Please give priority to the recommended method. +``` + +### **2.2 Install third-party libraries** + +``` +cd PaddleOCR +pip3 install -r requirements.txt +``` + +If you getting this error `OSError: [WinError 126] The specified module could not be found` when you install shapely on windows. + +Please try to download Shapely whl file using [http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely](http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely). + +Reference: [Solve shapely installation on windows]( \ No newline at end of file diff --git a/doc/doc_en/quickstart_en.md b/doc/doc_en/quickstart_en.md index 4aad3f1f7bad9baba1048691698d389279345c47..637e9407ccddfbc27b941a99ec5404ba5173e7e8 100644 --- a/doc/doc_en/quickstart_en.md +++ b/doc/doc_en/quickstart_en.md @@ -3,9 +3,7 @@ [PaddleOCR Quick Start](#paddleocr-quick-start) -* [1. Light Installation](#1-light-installation) - + [1.1 Install PaddlePaddle2.0](#11-install-paddlepaddle20) - + [1.2 Install PaddleOCR Whl Package](#12-install-paddleocr-whl-package) ++ [1. Install PaddleOCR Whl Package](#1-install-paddleocr-whl-package) * [2. Easy-to-Use](#2-easy-to-use) + [2.1 Use by command line](#21-use-by-command-line) - [2.1.1 English and Chinese Model](#211-english-and-chinese-model) @@ -15,27 +13,11 @@ - [2.2.1 Chinese & English Model and Multilingual Model](#221-chinese---english-model-and-multilingual-model) - [2.2.2 LayoutParser](#222-layoutparser) - -## 1. Light Installation - + -### 1.1 Install PaddlePaddle2.0 - -```bash -# If you have cuda9 or cuda10 installed on your machine, please run the following command to install -python3 -m pip install paddlepaddle-gpu==2.0.0 -i https://mirror.baidu.com/pypi/simple - -# If you only have cpu on your machine, please run the following command to install -python3 -m pip install paddlepaddle==2.0.0 -i https://mirror.baidu.com/pypi/simple -``` - -For more software version requirements, please refer to the instructions in [Installation Document](https://www.paddlepaddle.org.cn/install/quick) for operation. - - - -### 1.2 Install PaddleOCR Whl Package +## 1. Install PaddleOCR Whl Package ```bash pip install "paddleocr>=2.0.1" # Recommend to use version 2.0.1+ @@ -59,7 +41,7 @@ pip install "paddleocr>=2.0.1" # Recommend to use version 2.0.1+ ### 2.1 Use by command line -PaddleOCR provides a series of test images, click xx to download, and then switch to the corresponding directory in the terminal +PaddleOCR provides a series of test images, click [here](https://paddleocr.bj.bcebos.com/dygraph_v2.1/ppocr_img.zip) to download, and then switch to the corresponding directory in the terminal ```bash cd /path/to/ppocr_img diff --git a/doc/overview.png b/doc/overview.png new file mode 100644 index 0000000000000000000000000000000000000000..c5c4e09d6730bb0b1ca2c0b5442079ceb41ecdfa Binary files /dev/null and b/doc/overview.png differ diff --git a/doc/overview_en.png b/doc/overview_en.png new file mode 100644 index 0000000000000000000000000000000000000000..b44da4e9874d6a2162a8bb05ff1b479875bd65f3 Binary files /dev/null and b/doc/overview_en.png differ