jingsongliujing / OnnxOCR

基于PaddleOCR重构,并且脱离PaddlePaddle深度学习训练框架的轻量级OCR,推理速度超快
Apache License 2.0
641 stars 61 forks source link

Weirdly long inference time using cuda? Much much slower #14

Closed Jasonzhangzzf closed 1 month ago

Jasonzhangzzf commented 1 month ago

Environment: python=3.11 Ubuntu 22.04 cuda = 11.8 cudnn = 8.7 onnxruntime-gpu = 1.17 tensor rt = 8.6

  1. use_gpu=False Screenshot 2024-07-17 at 3 48 52 PM
  2. use_gpu=True Screenshot 2024-07-17 at 4 06 29 PM

Is it due to warnings and probably onnxruntime-gpu library version differences?

Jasonzhangzzf commented 1 month ago

The corresponding environment matches what is recommended by the onnxruntime-gpu page.

Screenshot 2024-07-17 at 4 02 34 PM
jingsongliujing commented 1 month ago

Regarding ppocrv4, I have only tested it on CPU. ONNX Runtime may not implement certain operators for CUDA or other reasons.

Jasonzhangzzf commented 1 month ago

Ok then. So CPU inference only. Thanks for the reply!