Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ You can do MindSpore Lite inference in MindOCR using **MindOCR models** or **Thi
- [x] [MASTER](configs/rec/master/README.md) (PR'2019)
- [x] [VISIONLAN](configs/rec/visionlan/README.md) (ICCV'2021)
- [x] [RobustScanner](configs/rec/robustscanner/README.md) (ECCV'2020)
- [x] [ABINet](configs/rec/abinet/README.md) (CVPR'2021)

</details>

Expand Down Expand Up @@ -382,7 +381,7 @@ Frequently asked questions about configuring environment and mindocr, please ref
- [PP-OCRv3 DBNet](configs/det/dbnet/db_mobilenetv3_ppocrv3.yaml) for text detection and [PP-OCRv3 SVTR](configs/rec/svtr/svtr_ppocrv3_ch.yaml) for recognition, supporting online inferece and finetuning
2. Add more benchmark datasets and their results
- [XFUND](configs/kie/vi_layoutxlm/README_CN.md)
3. Multiple specifications support for Ascend 910: DBNet ResNet-50, DBNet++ ResNet-50, CRNN VGG7, SVTR-Tiny, FCENet, ABINet
3. Multiple specifications support for Ascend 910: DBNet ResNet-50, DBNet++ ResNet-50, CRNN VGG7, SVTR-Tiny, FCENet
- 2023/11/28
1. Add offline inference support for PP-OCRv4
- [PP-OCRv4 DBNet](deploy/py_infer/src/configs/det/ppocr/ch_PP-OCRv4_det_cml.yaml) for text detection and [PP-OCRv4 CRNN](deploy/py_infer/src/configs/rec/ppocr/ch_PP-OCRv4_rec_distillation.yaml) for text recognition, supporting offline inferece
Expand Down
3 changes: 1 addition & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ python tools/infer/text/predict_system.py --image_dir {path_to_img or dir_to_img
- [x] [MASTER](configs/rec/master/README_CN.md) (PR'2019)
- [x] [VISIONLAN](configs/rec/visionlan/README_CN.md) (ICCV'2021)
- [x] [RobustScanner](configs/rec/robustscanner/README_CN.md) (ECCV'2020)
- [x] [ABINet](configs/rec/abinet/README_CN.md) (CVPR'2021)
</details>

<details open markdown>
Expand Down Expand Up @@ -385,7 +384,7 @@ MindOCR提供了[数据格式转换工具](https://github.com/mindspore-lab/mind
- 文本检测[PP-OCRv3 DBNet](configs/det/dbnet/db_mobilenetv3_ppocrv3.yaml)和文本识别[PP-OCRv3 SVTR](configs/rec/svtr/svtr_ppocrv3_ch.yaml),支持在线推理和微调训练
2. 添加更多基准数据集及其结果
- [XFUND](configs/kie/vi_layoutxlm/README_CN.md)
3. 昇腾910硬件多规格支持:DBNet ResNet-50、DBNet++ ResNet-50、CRNN VGG7、SVTR-Tiny、FCENet、ABINet
3. 昇腾910硬件多规格支持:DBNet ResNet-50、DBNet++ ResNet-50、CRNN VGG7、SVTR-Tiny、FCENet
- 2023/11/28
1. 增加支持PP-OCRv4模型离线推理
- 文本检测 [PP-OCRv4 DBNet](deploy/py_infer/src/configs/det/ppocr/ch_PP-OCRv4_det_cml.yaml)和文本识别 [PP-OCRv4 CRNN](deploy/py_infer/src/configs/rec/ppocr/ch_PP-OCRv4_rec_distillation.yaml),支持离线推理
Expand Down
299 changes: 0 additions & 299 deletions configs/rec/abinet/README.md

This file was deleted.

322 changes: 0 additions & 322 deletions configs/rec/abinet/README_CN.md

This file was deleted.

119 changes: 0 additions & 119 deletions configs/rec/abinet/abinet_resnet45_en.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/en/mkdocs/modelzoo_training.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
| visionlan_resnet45| IC03,13,15,IIIT,etc | 192| 4 | 90.61 | 417 | 1840 | O2 | [mindocr_visionlan](https://github.com/mindspore-lab/mindocr/blob/main/configs/rec/visionlan) |
| master_resnet31 | IC03,13,15,IIIT,etc | 512 | 4 | 90.37 | 747 | 2741 | O2 | [mindocr_master](https://github.com/mindspore-lab/mindocr/tree/main/configs/rec/master) |
| robustscanner_resnet31 | IC13,15,IIIT,SVT,etc | 256 | 4 | 87.86 | 825 | 310 | O0 | [mindocr_robustscanner](https://github.com/mindspore-lab/mindocr/blob/main/configs/rec/robustscanner) |
| abinet_resnet45 | IC03,13,15,IIIT,etc | 768 | 8 | 91.35 | 718 | 628.11 | O0 | [mindocr_abinet](https://github.com/mindspore-lab/mindocr/tree/main/configs/rec/abinet) |


### Text Direction Classification

Expand Down
63 changes: 6 additions & 57 deletions docs/en/tutorials/frequently_asked_questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
- [Problems related to inference](#q8-problems-related-to-inference)
- [Training speed of DBNet not as fast as expexted](#q9-training-speed-of-dbnet-not-as-fast-as-expexted)
- [Error about libgomp-d22c30c5.so.1.0.0](#q10-error-about-libgomp-d22c30c5so100)
- [Dataset Pipeline Error when training abinet on lmdb dataset](#q11-dataset-pipeline-error-when-training-abinet-on-lmdb-dataset)
- [Runtime Error when training dbnet on synthtext dataset](#q12-runtime-error-when-training-dbnet-on-synthtext-dataset)
- [Failed to install seqeval](#q13-failed-to-install-seqeval)
- [Failed to install lanms](#q14-failed-to-install-lanms)
- [Runtime Error when training dbnet on synthtext dataset](#q11-runtime-error-when-training-dbnet-on-synthtext-dataset)
- [Failed to install seqeval](#q12-failed-to-install-seqeval)
- [Failed to install lanms](#q13-failed-to-install-lanms)


### Q1 Undefined symbol
Expand Down Expand Up @@ -748,58 +747,8 @@ You can try the following steps to fix it:
export LD_PRELOAD=/root/mindocr_env/lib/python3.8/site-packages/scikit_learn.libs/libgomp-d22c30c5.so.1.0.0:$LD_PRELOAD
```

### Q11 Dataset Pipeline Error when training abinet on lmdb dataset
The following error may occur when training abinet on lmdb dataset
```bash
mindocr.data.rec_lmdb_dataset WARNING - Error occurred during preprocess.
Exception thrown from dataset pipeline. Refer to 'Dataset Pipeline Error Message'.

------------------------------------------------------------------
- Dataset Pipeline Error Message:
------------------------------------------------------------------
[ERROR] No cast for the specified DataType was found.

------------------------------------------------------------------
- C++ Call Stack: (For framework developers)
------------------------------------------------------------------
mindspore/ccsrc/minddata/dataset/kernels/py_func_op.cc(143).
```
You can try the following steps to fix it:

- find the folder of mindspore package
- open file: `mindspore/dataset/transforms/transform.py`
- switch to line 93:
```bash
93 if key in EXECUTORS_LIST:
94 # get the executor by process id and thread id
95 executor = EXECUTORS_LIST[key]
96 # remove the old transform which in executor and update the new transform
97 executor.UpdateOperation(self.parse())
98 else:
99 # create a new executor by process id and thread_id
100 executor = cde.Execute(self.parse())
101 # add the executor the global EXECUTORS_LIST
102 EXECUTORS_LIST[key] = executor
```

- replace line 97 with `executor = cde.Execute(self.parse())`, and get
```bash
93 if key in EXECUTORS_LIST:
94 # get the executor by process id and thread id
95 executor = EXECUTORS_LIST[key]
96 # remove the old transform which in executor and update the new transform
97 executor = cde.Execute(self.parse())
98 else:
99 # create a new executor by process id and thread_id
100 executor = cde.Execute(self.parse())
101 # add the executor the global EXECUTORS_LIST
102 EXECUTORS_LIST[key] = executor
```

- save the file, and try to train the model.


### Q12 Runtime Error when training dbnet on synthtext dataset
### Q11 Runtime Error when training dbnet on synthtext dataset
Runtime Error occur as following when training dbnet on synthtext dataset:
```bash
Traceback (most recent call last):
Expand All @@ -811,7 +760,7 @@ RuntimeError: Run task for graph:kernel_graph_1 error! The details reger to 'Asc
Please update CANN to 7.1 version.


### Q13 Failed to install seqeval
### Q12 Failed to install seqeval
The following error occur when run `pip install -r requirements.txt`
```bash
Collecting seqeval>=1.2.2 (from -r requirements.txt (line 19))
Expand Down Expand Up @@ -889,7 +838,7 @@ Please try the following steps to fix this problem:
- Install `seqeval`: `pip3 install seqeval -i https://pypi.tuna.tsinghua.edu.cn/simple`


### Q14 Failed to install lanms
### Q13 Failed to install lanms
The following error occur when installing lanms
```bash
ImportError: Python version mismatch: module was compiled for version 3.8, while the interpreter is running version 3.7.
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/mkdocs/modelzoo_training.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
| visionlan_resnet45| IC03,13,15,IIIT,etc | 192| 4 | 90.61 | 417 | 1840 | O2 | [mindocr_visionlan](https://github.com/mindspore-lab/mindocr/blob/main/configs/rec/visionlan) |
| master_resnet31 | IC03,13,15,IIIT,etc | 512 | 4 | 90.37 | 747 | 2741 | O2 | [mindocr_master](https://github.com/mindspore-lab/mindocr/tree/main/configs/rec/master) |
| robustscanner_resnet31 | IC13,15,IIIT,SVT,etc | 256 | 4 | 87.86 | 825 | 310 | O0 | [mindocr_robustscanner](https://github.com/mindspore-lab/mindocr/blob/main/configs/rec/robustscanner) |
| abinet_resnet45 | IC03,13,15,IIIT,etc | 768 | 8 | 91.35 | 718 | 628.11 | O0 | [mindocr_abinet](https://github.com/mindspore-lab/mindocr/tree/main/configs/rec/abinet) |


### 文本方向分类

Expand Down
62 changes: 6 additions & 56 deletions docs/zh/tutorials/frequently_asked_questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
- [推理相关问题](#q8)
- [DBNet训练速率不及预期](#q9)
- [libgomp-d22c30c5.so.1.0.0 相关错误](#q10)
- [当在lmdb dataset上训练abinet报数据管道错误](#q11)
- [当在synthtext数据集上训练dbnet报运行时错误](#q12)
- [安装seqeval相关错误](#q13)
- [安装lanms相关错误](#q14)
- [当在synthtext数据集上训练dbnet报运行时错误](#q11)
- [安装seqeval相关错误](#q12)
- [安装lanms相关错误](#q13)

### <span id="q1">Q1 未定义符号</span>

Expand Down Expand Up @@ -756,57 +755,8 @@ ImportError: /root/mindocr_env/lib/python3.8/site-packages/sklearn/__check_build
export LD_PRELOAD=/root/mindocr_env/lib/python3.8/site-packages/scikit_learn.libs/libgomp-d22c30c5.so.1.0.0:$LD_PRELOAD
```

### <span id="q11">Q11 当在lmdb dataset上训练abinet报数据管道错误</span>
当在lmdb dataset上训练abinet报以下数据管道错误
```bash
mindocr.data.rec_lmdb_dataset WARNING - Error occurred during preprocess.
Exception thrown from dataset pipeline. Refer to 'Dataset Pipeline Error Message'.

------------------------------------------------------------------
- Dataset Pipeline Error Message:
------------------------------------------------------------------
[ERROR] No cast for the specified DataType was found.

------------------------------------------------------------------
- C++ Call Stack: (For framework developers)
------------------------------------------------------------------
mindspore/ccsrc/minddata/dataset/kernels/py_func_op.cc(143).
```
可以尝试用如下步骤修复:

- 找到mindspore的包路径
- 打开文件: `mindspore/dataset/transforms/transform.py`
- 跳转到93行,可以得到如下内容:
```bash
93 if key in EXECUTORS_LIST:
94 # get the executor by process id and thread id
95 executor = EXECUTORS_LIST[key]
96 # remove the old transform which in executor and update the new transform
97 executor.UpdateOperation(self.parse())
98 else:
99 # create a new executor by process id and thread_id
100 executor = cde.Execute(self.parse())
101 # add the executor the global EXECUTORS_LIST
102 EXECUTORS_LIST[key] = executor
```

- 使用`executor = cde.Execute(self.parse())`替换97行, 得到如下内容:
```bash
93 if key in EXECUTORS_LIST:
94 # get the executor by process id and thread id
95 executor = EXECUTORS_LIST[key]
96 # remove the old transform which in executor and update the new transform
97 executor = cde.Execute(self.parse())
98 else:
99 # create a new executor by process id and thread_id
100 executor = cde.Execute(self.parse())
101 # add the executor the global EXECUTORS_LIST
102 EXECUTORS_LIST[key] = executor
```

- 保存后再次尝试训练即可

### <span id="q12">Q12 当在synthtext数据集上训练dbnet报运行时错误</span>
### <span id="q11">Q11 当在synthtext数据集上训练dbnet报运行时错误</span>
当在synthtext数据集上训练dbnet报以下数据管道错误
```bash
Traceback (most recent call last):
Expand All @@ -819,7 +769,7 @@ RuntimeError: Run task for graph:kernel_graph_1 error! The details reger to 'Asc
请尝试将CANN更新到7.1。


### <span id="q13">Q13 安装seqeval相关错误</span>
### <span id="q12">Q12 安装seqeval相关错误</span>
当运行`pip install -r requirements.txt`时,报以下错误
```bash
Collecting seqeval>=1.2.2 (from -r requirements.txt (line 19))
Expand Down Expand Up @@ -897,7 +847,7 @@ note: This is an issue with the package mentioned above, not pip.
- 安装`seqeval`:`pip3 install seqeval -i https://pypi.tuna.tsinghua.edu.cn/simple`


### <span id="q14">Q14 安装lanms相关错误</span>
### <span id="q13">Q13 安装lanms相关错误</span>
当安装lanms时,报
```bash
ImportError: Python version mismatch: module was compiled for version 3.8, while the interpreter is running version 3.7.
Expand Down
Loading