介绍
近期遇到需要从电子文档中进行内容提取的需求,突然想到 Paddle 的 ERNIE-Layout 模型,对其进行分析和测试。
采用此方法,避免了很笨的 OCR + 正则匹配 的思路。
应用场景
- 电子文档
- 对表格类的文档进行内容提取
- 对文档进行问答
使用方法
- 安装:
- 应用
- 可以外面包一层 django 框架进行服务化;
- https://github.com/PaddlePaddle/FastDeploy 当前未看到关于 ERNIE-Layout 部分的介绍;
问题解决
-
ImportError: cannot import name '_registerMatType' from 'cv2.cv2'
```shell pip install --upgrade opencv-python pip install --upgrade opencv-contrib-python pip install --upgrade opencv-python-headless ```
-
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts. We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
- 本文在安装和测试的过程中,忽略了此问题;
- 根据官方介绍,可以在 pip install 命令后添加 --use-feature=2020-resolver 去解决;