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.56k stars 7.85k forks source link

已安装paddlepaddle-gpu,但是提示没有GPU #13890

Closed sunyclj closed 2 months ago

sunyclj commented 2 months ago

🔎 Search before asking

🐛 Bug (问题描述)

import paddle paddle.is_compiled_with_cuda() False

🏃‍♂️ Environment (运行环境)

Package Version


albucore 0.0.16 albumentations 1.4.15 annotated-types 0.7.0 anyio 4.4.0 astor 0.8.1 beautifulsoup4 4.12.3 certifi 2024.8.30 charset-normalizer 3.3.2 coloredlogs 15.0.1 contourpy 1.3.0 cycler 0.12.1 Cython 3.0.11 decorator 5.1.1 eval_type_backport 0.2.0 exceptiongroup 1.2.2 fire 0.6.0 flatbuffers 24.3.25 fonttools 4.53.1 h11 0.14.0 httpcore 1.0.5 httpx 0.27.2 humanfriendly 10.0 idna 3.10 imageio 2.35.1 imgaug 0.4.0 importlib_resources 6.4.5 kiwisolver 1.4.7 lazy_loader 0.4 lmdb 1.5.1 lxml 5.3.0 matplotlib 3.9.2 mpmath 1.3.0 networkx 3.2.1 numpy 1.26.4 nvidia-cublas-cu11 11.11.3.6 nvidia-cuda-cupti-cu11 11.8.87 nvidia-cuda-nvrtc-cu11 11.8.89 nvidia-cuda-runtime-cu11 11.8.89 nvidia-cudnn-cu11 8.7.0.84 nvidia-cufft-cu11 10.9.0.58 nvidia-curand-cu11 10.3.0.86 nvidia-cusolver-cu11 11.4.1.48 nvidia-cusparse-cu11 11.7.5.86 nvidia-nccl-cu11 2.19.3 nvidia-nvtx-cu11 11.8.86 onnxruntime 1.19.2 opencv-contrib-python 4.10.0.84 opencv-python 4.10.0.84 opencv-python-headless 4.10.0.84 opt-einsum 3.3.0 packaging 24.1 paddle2onnx 1.2.8 paddleocr 2.8.1 paddlepaddle 3.0.0b1 paddlepaddle-gpu 3.0.0b1 pillow 10.4.0 pip 24.2 protobuf 5.28.1 pyclipper 1.3.0.post5 pydantic 2.9.2 pydantic_core 2.23.4 pyparsing 3.1.4 python-dateutil 2.9.0.post0 python-docx 1.1.2 PyYAML 6.0.2 rapidfuzz 3.9.7 requests 2.32.3 scikit-image 0.24.0 scipy 1.13.1 setuptools 73.0.1 shapely 2.0.6 six 1.16.0 sniffio 1.3.1 soupsieve 2.6 sympy 1.13.2 termcolor 2.4.0 tifffile 2024.8.30 tqdm 4.66.5 typing_extensions 4.12.2 urllib3 2.2.3 wheel 0.44.0 zipp 3.20.2

🌰 Minimal Reproducible Example (最小可复现问题的Demo)

python tools/infer/predict_system.py --image_dir="./5645.jpg" --det_model_dir='./pre_model/ch_PP-OCRv4_det_infer' --cls_model_dir='./pre_model/ch_ppocr_mobile_v2.0_cls_infer' --rec_model_dir='./pre_model/ch_PP-OCRv4_rec_infer' --use_angle_cls=true

python 版本3.9

jingsongliujing commented 2 months ago

--use_gpu=True ,没有开启

Gmgge commented 2 months ago

GPU设备的调用涉及比较多,请确认如下细节: 1.是否使用的是Nvidia GPU,具体型号 2.是否正确安装驱动?nvidia-smi是否正常输出?机器是否安装对应版本的cuda,cudnn 3.为何安装paddlepaddle、paddlepaddle-gpu两个版本,请卸载这两个版本,重新取其一安装,如果你前面已经确认,请安装paddlepaddle-gpu

进一步细节请参考paddlepaddle的官方文档

sunyclj commented 2 months ago

GPU设备的调用涉及比较多,请确认如下细节: 1.是否使用的是Nvidia GPU,具体型号 2.是否正确安装驱动?nvidia-smi是否正常输出?机器是否安装对应版本的cuda,cudnn 3.为何安装paddlepaddle、paddlepaddle-gpu两个版本,请卸载这两个版本,重新取其一安装,如果你前面已经确认,请安装paddlepaddle-gpu

进一步细节请参考paddlepaddle的官方文档

卸载paddlepaddle-gpu,再安装相同的版本,就可以调用GPU了;如果只安装paddlepaddle-gpu,import paddle报错;

sunyclj commented 2 months ago

--use_gpu=True ,没有开启

默认开启