Skip to content

Commit

Permalink
docs: remove Python 3.7 related expressions (#14818)
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatV authored Mar 7, 2025
1 parent 2832f02 commit 22d3531
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 18 deletions.
4 changes: 2 additions & 2 deletions deploy/paddle2onnx/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ After execution, the ONNX model will be saved in `./inference/det_onnx/`, `./inf
Take the English OCR model as an example, use **ONNXRuntime** to predict and execute the following commands:

```
python3.7 tools/infer/predict_system.py --use_gpu=False --use_onnx=True \
python3 tools/infer/predict_system.py --use_gpu=False --use_onnx=True \
--det_model_dir=./inference/det_onnx/model.onnx \
--rec_model_dir=./inference/rec_onnx/model.onnx \
--cls_model_dir=./inference/cls_onnx/model.onnx \
Expand All @@ -108,7 +108,7 @@ python3.7 tools/infer/predict_system.py --use_gpu=False --use_onnx=True \
Taking the English OCR model as an example, use **Paddle Inference** to predict and execute the following commands:

```
python3.7 tools/infer/predict_system.py --use_gpu=False \
python3 tools/infer/predict_system.py --use_gpu=False \
--cls_model_dir=./inference/ch_ppocr_mobile_v2.0_cls_infer \
--rec_model_dir=./inference/en_PP-OCRv3_rec_infer \
--det_model_dir=./inference/en_PP-OCRv3_det_infer \
Expand Down
4 changes: 2 additions & 2 deletions deploy/slim/prune/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ sen.pickle(Dict){

进入PaddleOCR根目录,通过以下命令对模型进行敏感度分析训练:
```bash
python3.7 deploy/slim/prune/sensitivity_anal.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model="your trained model" Global.save_model_dir=./output/prune_model/
python3 deploy/slim/prune/sensitivity_anal.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model="your trained model" Global.save_model_dir=./output/prune_model/
```

### 4. 导出模型、预测部署

在得到裁剪训练保存的模型后,我们可以将其导出为inference_model:
```bash
pytho3.7 deploy/slim/prune/export_prune_model.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model=./output/det_db/best_accuracy Global.save_inference_dir=./prune/prune_inference_model
pytho3 deploy/slim/prune/export_prune_model.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model=./output/det_db/best_accuracy Global.save_inference_dir=./prune/prune_inference_model
```

inference model的预测和部署参考:
Expand Down
2 changes: 1 addition & 1 deletion deploy/slim/prune/README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ example:
Enter the PaddleOCR root directory,perform sensitivity analysis on the model with the following command:

```bash
python3.7 deploy/slim/prune/sensitivity_anal.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model="your trained model" Global.save_model_dir=./output/prune_model/
python3 deploy/slim/prune/sensitivity_anal.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model="your trained model" Global.save_model_dir=./output/prune_model/
```


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Execute the following command for model inference:
```bash linenums="1"
cd ppstructure/
# When predicting all images in a folder, you can modify image_dir to a folder, such as --image_dir='docs/table'.
python3.7 table/predict_structure.py --table_model_dir=../output/table_master/table_structure_tablemaster_infer/ --table_algorithm=TableMaster --table_char_dict_path=../ppocr/utils/dict/table_master_structure_dict.txt --table_max_len=480 --image_dir=docs/table/table.jpg
python3 table/predict_structure.py --table_model_dir=../output/table_master/table_structure_tablemaster_infer/ --table_algorithm=TableMaster --table_char_dict_path=../ppocr/utils/dict/table_master_structure_dict.txt --table_max_len=480 --image_dir=docs/table/table.jpg
```

After executing the command, the prediction results of the above image (structural information and the coordinates of each cell in the table) are printed to the screen, and the visualization of the cell coordinates is also saved. An example is as follows:
Expand Down
2 changes: 1 addition & 1 deletion docs/algorithm/table_recognition/algorithm_table_master.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ python3 tools/export_model.py -c configs/table/table_master.yml -o Global.pretra

```bash linenums="1"
cd ppstructure/
python3.7 table/predict_structure.py --table_model_dir=../output/table_master/table_structure_tablemaster_infer/ --table_algorithm=TableMaster --table_char_dict_path=../ppocr/utils/dict/table_master_structure_dict.txt --table_max_len=480 --image_dir=docs/table/table.jpg
python3 table/predict_structure.py --table_model_dir=../output/table_master/table_structure_tablemaster_infer/ --table_algorithm=TableMaster --table_char_dict_path=../ppocr/utils/dict/table_master_structure_dict.txt --table_max_len=480 --image_dir=docs/table/table.jpg
# 预测文件夹下所有图像时,可修改image_dir为文件夹,如 --image_dir='docs/table'。
```

Expand Down
4 changes: 2 additions & 2 deletions docs/applications/轻量级车牌识别.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ python tools/eval.py -c configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml -o \
量化训练可通过如下命令启动:

```bash linenums="1"
python3.7 deploy/slim/quantization/quant.py -c configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml -o \
python3 deploy/slim/quantization/quant.py -c configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml -o \
Global.pretrained_model=output/CCPD/det/best_accuracy.pdparams \
Global.save_model_dir=output/CCPD/det_quant \
Global.eval_batch_step="[0, 772]" \
Expand Down Expand Up @@ -538,7 +538,7 @@ python tools/eval.py -c configs/rec/PP-OCRv3/ch_PP-OCRv3_rec.yml -o \
量化训练可通过如下命令启动:

```bash linenums="1"
python3.7 deploy/slim/quantization/quant.py -c configs/rec/PP-OCRv3/ch_PP-OCRv3_rec.yml -o \
python3 deploy/slim/quantization/quant.py -c configs/rec/PP-OCRv3/ch_PP-OCRv3_rec.yml -o \
Global.pretrained_model=output/CCPD/rec/best_accuracy.pdparams \
Global.save_model_dir=output/CCPD/rec_quant/ \
Global.eval_batch_step="[0, 90]" \
Expand Down
2 changes: 1 addition & 1 deletion docs/ppocr/environment.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Windows and Mac users are recommended to use Anaconda to build a Python environm
Recommended working environment:

- PaddlePaddle >= 2.1.2
- Python 3.7
- Python 3
- CUDA 10.1 / CUDA 10.2
- cuDNN 7.6

Expand Down
2 changes: 1 addition & 1 deletion docs/ppocr/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Windows和Mac用户推荐使用Anaconda搭建Python环境,Linux用户建议使
推荐环境:

- PaddlePaddle >= 2.1.2
- Python 3.7
- Python 3
- CUDA10.1 / CUDA10.2
- CUDNN 7.6

Expand Down
4 changes: 2 additions & 2 deletions docs/ppocr/installation.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ After testing, PaddleOCR can run on glibc 2.23. You can also test other glibc ve

PaddleOCR working environment:

- PaddlePaddle 2.0.0
- Python 3.7
- PaddlePaddle > 2.0.0
- Python 3
- glibc 2.23

It is recommended to use the docker provided by us to run PaddleOCR. Please refer to the docker tutorial [link](https://www.runoob.com/docker/docker-tutorial.html/).
Expand Down
2 changes: 1 addition & 1 deletion docs/ppocr/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ comments: true
PaddleOCR 工作环境

- PaddlePaddle 2.0.0
- python3.7
- python3
- glibc 2.23
- cuDNN 7.6+ (GPU)

Expand Down
2 changes: 1 addition & 1 deletion docs/ppocr/model_compress/prune.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The function would return a dict after loading the sensitivity file. The keys of
Enter the PaddleOCR root directory,perform sensitivity analysis on the model with the following command:

```bash linenums="1"
python3.7 deploy/slim/prune/sensitivity_anal.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model="your trained model" Global.save_model_dir=./output/prune_model/
python3 deploy/slim/prune/sensitivity_anal.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model="your trained model" Global.save_model_dir=./output/prune_model/
```

### 5. Export inference model and deploy it
Expand Down
2 changes: 1 addition & 1 deletion docs/ppocr/model_compress/prune.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ sen.pickle(Dict){
进入PaddleOCR根目录,通过以下命令对模型进行敏感度分析训练:

```bash linenums="1"
python3.7 deploy/slim/prune/sensitivity_anal.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model="your trained model" Global.save_model_dir=./output/prune_model/
python3 deploy/slim/prune/sensitivity_anal.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model="your trained model" Global.save_model_dir=./output/prune_model/
```

### 4.导出模型、预测部署
Expand Down
2 changes: 1 addition & 1 deletion docs/ppstructure/model_train/train_table.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ wget https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar
wget https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/ch_ppstructure_mobile_v2.0_SLANet_infer.tar && tar xf ch_ppstructure_mobile_v2.0_SLANet_infer.tar
cd ..
# run
python3.7 table/predict_table.py \
python3 table/predict_table.py \
--det_model_dir=inference/ch_PP-OCRv3_det_infer \
--rec_model_dir=inference/ch_PP-OCRv3_rec_infer \
--table_model_dir=inference/ch_ppstructure_mobile_v2.0_SLANet_infer \
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ plugins:
branch: main
token: !!python/object/apply:os.getenv ["MKDOCS_GIT_COMMITTERS_APIKEY"]
- git-revision-date-localized:
fallback_to_build_date: false
enable_creation_date: true

markdown_extensions:
Expand Down
2 changes: 1 addition & 1 deletion ppstructure/table/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ wget https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar
wget https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/ch_ppstructure_mobile_v2.0_SLANet_infer.tar && tar xf ch_ppstructure_mobile_v2.0_SLANet_infer.tar
cd ..
# run
python3.7 table/predict_table.py \
python3 table/predict_table.py \
--det_model_dir=inference/ch_PP-OCRv3_det_infer \
--rec_model_dir=inference/ch_PP-OCRv3_rec_infer \
--table_model_dir=inference/ch_ppstructure_mobile_v2.0_SLANet_infer \
Expand Down

0 comments on commit 22d3531

Please sign in to comment.