PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
44.15k stars 7.81k forks source link

【ppstructure】 FatalError: `Segmentation fault` is detected by the operating system. #4775

Closed sucre111 closed 2 years ago

sucre111 commented 2 years ago

在运行 ppstructure 的 表格识别 table/predict_table.py 时报错如下

`--- Fused 0 subgraphs into layer_norm op. --- Fused 0 subgraphs into layer_norm op. --- Fused 0 subgraphs into layer_norm op. [2021/11/26 14:49:23] root INFO: [0/1] /home/aistudio/data/data118022/taihe2021-004.jpg [2021/11/26 14:49:45] root DEBUG: dt_boxes num : 130, elapse : 7.971612453460693 [2021/11/26 14:50:13] root DEBUG: rec_res num : 130, elapse : 27.330198287963867


C++ Traceback (most recent call last):

0 paddle::framework::SignalHandle(char const*, int) 1 paddle::platform::GetCurrentTraceBackString[abi:cxx11]()


Error Message Summary:

FatalError: Segmentation fault is detected by the operating system. [TimeInfo: Aborted at 1637909414 (unix time) try "date -d @1637909414" if you are using GNU date ] [SignalInfo: SIGSEGV (@0x7faee2f95622) received by PID 387 (TID 0x7faeec353700) from PID 18446744073222575650 ]`

平台:aistudio.baidu.com 环境: CPU: 2核 总内存: 8 GB Python: 3.7.4 框架版本: PaddlePaddle 2.1.2 命令: !python3 table/predict_table.py --use_gpu=False --det_model_dir=inference/en_ppocr_mobile_v2.0_table_det_infer --rec_model_dir=inference/en_ppocr_mobile_v2.0_table_rec_infer --table_model_dir=inference/en_ppocr_mobile_v2.0_table_structure_infer --image_dir=/home/aistudio/data/data118022/taihe2021-004.jpg --rec_char_dict_path=../ppocr/utils/dict/table_dict.txt --table_char_dict_path=../ppocr/utils/dict/table_structure_dict.txt --rec_char_type=EN --det_limit_side_len=736 --det_limit_type=min --output ../output/table

sucre111 commented 2 years ago

环境包如下: absl-py==0.8.1 alembic==1.7.4 anyio==3.3.4 argcomplete==1.12.3 argon2-cffi==21.1.0 aspy.yaml==1.3.0 astor==0.8.1 astroid==2.4.1 async-generator==1.10 attrs==19.2.0 audioread==2.1.8 autopep8==1.5.3 Babel==2.8.0 backcall==0.1.0 bce-python-sdk==0.8.53 blackhole==1.0.1 bleach==3.1.0 cachetools==4.0.0 certifi==2019.9.11 certipy==0.1.3 cffi==1.14.0 cfgv==2.0.1 chardet==3.0.4 Click==7.0 cloudpickle==1.6.0 cma==2.7.0 colorama==0.4.4 colorlog==4.1.0 cryptography==35.0.0 cssselect==1.1.0 cssutils==2.3.0 cycler==0.10.0 Cython==0.29 debugpy==1.5.1 decorator==4.4.2 dill==0.3.3 easydict==1.9 entrypoints==0.3 et-xmlfile==1.0.1 fasttext==0.9.1 filelock==3.0.12 flake8==3.8.2 Flask==1.1.1 Flask-Babel==1.0.0 Flask-Cors==3.0.8 forbiddenfruit==0.1.3 funcsigs==1.0.2 future==0.18.0 gast==0.3.3 gitdb==4.0.5 GitPython==3.1.14 google-auth==1.10.0 google-auth-oauthlib==0.4.1 graphviz==0.13 greenlet==1.1.2 grpcio==1.35.0 gunicorn==20.0.4 gym==0.12.1 h5py==2.9.0 identify==1.4.10 idna==2.8 imageio==2.6.1 imageio-ffmpeg==0.3.0 imgaug==0.4.0 importlib-metadata==0.23 importlib-resources==5.3.0 iopath==0.1.9 ipykernel==6.4.2 ipython==7.28.0 ipython-genutils==0.2.0 isort==4.3.21 itsdangerous==1.1.0 jdcal==1.4.1 jedi==0.17.2 jieba==0.42.1 Jinja2==2.11.0 joblib==0.14.1 JPype1==0.7.2 json5==0.9.5 jsonschema==3.1.1 jupyter-archive==3.2.0 jupyter-client==7.0.6 jupyter-core==4.9.1 jupyter-lsp==1.2.0 jupyter-server==1.8.0 jupyter-telemetry==0.1.0 jupyterhub==1.3.0 jupyterlab==3.1.11 jupyterlab-server==2.8.2 kiwisolver==1.1.0 layoutparser @ https://paddleocr.bj.bcebos.com/whl/layoutparser-0.0.0-py3-none-any.whl lazy-object-proxy==1.4.3 librosa==0.7.2 lightgbm==3.1.1 llvmlite==0.31.0 lmdb==1.2.1 lxml==4.6.4 Mako==1.1.5 Markdown==3.1.1 MarkupSafe==1.1.1 matplotlib==2.2.3 matplotlib-inline==0.1.3 mccabe==0.6.1 mistune==0.8.4 more-itertools==7.2.0 moviepy==1.0.1 multiprocess==0.70.11.1 nbclassic==0.3.1 nbconvert==5.3.1 nbformat==4.4.0 nest-asyncio==1.5.1 netifaces==0.10.9 networkx==2.4 nltk==3.4.5 nodeenv==1.3.4 notebook==5.7.8 numba==0.48.0 numpy==1.21.4 oauthlib==3.1.0 objgraph==3.4.1 opencv-contrib-python==4.4.0.46 opencv-python==4.1.1.26 openpyxl==3.0.5 packaging==20.9 paddlefsl==1.0.0 paddlehub==2.0.4 paddlenlp==2.1.1 paddleocr==2.3.0.2 paddlepaddle==2.2.0 pamela==1.0.0 pandas==1.1.5 pandocfilters==1.4.2 parl==1.4.1 parso==0.7.0 pathlib==1.0.1 pexpect==4.7.0 pickleshare==0.7.5 Pillow==7.1.2 pluggy==0.13.1 portalocker==2.3.2 pre-commit==1.21.0 premailer==3.10.0 prettytable==0.7.2 proglog==0.1.9 prometheus-client==0.5.0 prompt-toolkit==2.0.10 protobuf==3.14.0 psutil==5.7.2 ptyprocess==0.7.0 py4j==0.10.9.2 pyarrow==2.0.0 pyasn1==0.4.8 pyasn1-modules==0.2.7 pybind11==2.8.1 pyclipper==1.3.0 pycodestyle==2.6.0 pycparser==2.19 pycryptodome==3.9.9 pydocstyle==5.0.2 pyflakes==2.2.0 pyglet==1.4.5 Pygments==2.4.2 pylint==2.5.2 pynvml==8.0.4 pyOpenSSL==21.0.0 pyparsing==2.4.2 pypmml==0.9.11 pyrsistent==0.15.4 python-dateutil==2.8.0 python-json-logger==2.0.2 python-jsonrpc-server==0.4.0 python-language-server==0.36.2 python-Levenshtein==0.12.2 python-lsp-jsonrpc==1.0.0 python-lsp-server==1.2.4 pytz==2019.3 PyWavelets==1.2.0 PyYAML==5.1.2 pyzmq==18.1.1 rarfile==3.1 recordio==0.1.7 requests==2.22.0 requests-oauthlib==1.3.0 resampy==0.2.2 rope==0.17.0 rsa==4.0 ruamel.yaml==0.17.16 ruamel.yaml.clib==0.2.6 scikit-image==0.18.3 scikit-learn==0.22.1 scipy==1.3.0 seaborn==0.10.0 Send2Trash==1.5.0 sentencepiece==0.1.85 seqeval==1.2.2 Shapely==1.8.0 shellcheck-py==0.7.1.1 six==1.15.0 sklearn==0.0 smmap==3.0.5 sniffio==1.2.0 snowballstemmer==2.0.0 SoundFile==0.10.3.post1 SQLAlchemy==1.4.26 tabulate==0.8.3 tb-nightly==1.15.0a20190801 tb-paddle==0.3.6 tensorboard==2.1.0 tensorboardX==1.8 termcolor==1.1.0 terminado==0.12.1 testpath==0.4.2 tifffile==2021.11.2 toml==0.10.0 tornado==6.1 tqdm==4.27.0 traitlets==4.3.3 typed-ast==1.4.1 typing-extensions==3.10.0.2 ujson==4.2.0 urllib3==1.25.6 virtualenv==16.7.9 visualdl==2.2.0 wcwidth==0.1.7 webencodings==0.5.1 websocket-client==1.2.1 Werkzeug==0.16.0 wrapt==1.12.1 xarray==0.16.2 xgboost==1.3.3 xlrd==1.2.0 yapf==0.26.0 zipp==3.6.0

DongLZY commented 2 years ago

我遇到了同样的问题。

WenmuZhou commented 2 years ago

你好,这边正在排查问题中

Amanda-Barbara commented 2 years ago

@WenmuZhou 我也遇到了这样的问题,gpu模式下会有这样的问题,cpu模式下模型推理正常执行。

Amanda-Barbara commented 2 years ago

@WenmuZhou 上面的这个问题我已经解决了,是cuda版本的问题,我系统安装的是cuda11.3版本,python虚拟环境安装的paddlepaddle-gpu版本如下: python -m pip install paddlepaddle-gpu==2.2.0.post112 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html 模型在gpu模式下就可以正常执行了,

ir=None, total_process_num=1, type='ocr', use_angle_cls=True, use_dilation=False, use_gpu=True, use_mp=False, use_onnx=False, use_pdserving=False, use_space_char=True, use_tensorrt=False, vis_font_path='./doc/fonts/simfang.ttf', warmup=True)
[2021/12/03 14:31:54] root INFO: **********./imgs_en/img_12.jpg**********
[2021/12/03 14:31:56] root DEBUG: dt_boxes num : 11, elapse : 1.941330909729004
[2021/12/03 14:31:56] root DEBUG: cls num  : 11, elapse : 0.04993081092834473
[2021/12/03 14:31:57] root DEBUG: rec_res num  : 11, elapse : 0.32021641731262207
[2021/12/03 14:31:57] root INFO: [[[443.0, 176.0], [1164.0, 176.0], [1164.0, 222.0], [443.0, 222.0]], ('ACKNOWLEDGEMENTS', 0.9988512)]
[2021/12/03 14:31:57] root INFO: [[[397.0, 345.0], [1204.0, 346.0], [1204.0, 386.0], [397.0, 384.0]], ('We would like to thank all the designers and', 0.99851286)]
[2021/12/03 14:31:57] root INFO: [[[402.0, 398.0], [1204.0, 398.0], [1204.0, 433.0], [402.0, 433.0]], ('contributors who have been involved in the', 0.97925395)]
[2021/12/03 14:31:57] root INFO: [[[399.0, 446.0], [1207.0, 445.0], [1208.0, 486.0], [399.0, 488.0]], ('production of this book; their contributions', 0.9992903)]
[2021/12/03 14:31:57] root INFO: [[[402.0, 500.0], [1206.0, 500.0], [1206.0, 534.0], [402.0, 534.0]], ('havebeen indispensable to its creation.We', 0.97777313)]
[2021/12/03 14:31:57] root INFO: [[[401.0, 552.0], [1206.0, 548.0], [1206.0, 583.0], [401.0, 586.0]], ('would also like to express our gratitude to all', 0.9800184)]
[2021/12/03 14:31:57] root INFO: [[[401.0, 600.0], [1207.0, 596.0], [1208.0, 633.0], [401.0, 636.0]], ('the producers for their invaluable opinions', 0.9858033)]
[2021/12/03 14:31:57] root INFO: [[[402.0, 650.0], [1206.0, 650.0], [1206.0, 684.0], [402.0, 684.0]], ('and assistance throughout this project.And to', 0.9927481)]
[2021/12/03 14:31:57] root INFO: [[[401.0, 703.0], [1207.0, 700.0], [1208.0, 734.0], [401.0, 738.0]], ('themany others whose names are notcredited', 0.9775389)]
sucre111 commented 2 years ago

@WenmuZhou 我CPU、GPU都有这个问题,是在AI Studio上运行的

WenmuZhou commented 2 years ago

@WenmuZhou 我CPU、GPU都有这个问题,是在AI Studio上运行的

这个应该是aistudio的环境问题,这边正在看哈

WenmuZhou commented 2 years ago

新的aistudio好像没问题了,你再看看 @sucre111

HimanLGe commented 2 years ago

我还是有问题 同样的 2.2.0也不行

paddle-bot-old[bot] commented 2 years ago

Since you haven\'t replied for more than 3 months, we have closed this issue/pr. If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. It is recommended to pull and try the latest code first. 由于您超过三个月未回复,我们将关闭这个issue/pr。 若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。