[Python] PaddleOCR keeps trying to download en_PP-OCRv3_rec_infer.tar even after manual...

Discussão em 'Python' iniciado por Stack, Junho 19, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to set up PaddleOCR with GPU support on my local Ubuntu 22.04 machine for a custom OCR pipeline to extract voter data from scanned PDFs. My objective is to run OCR with GPU acceleration using manually downloaded models because auto-downloads often fail or are slow. System Details:

    OS: Ubuntu 22.04 LTS

    Python: 3.8 (Conda environment ocr38)

    PaddleOCR installed via pip install paddleocr

    GPU: NVIDIA RTX 3050

    GPU is enabled (use_gpu=True)


    What I’m Trying To Do: Use PP-

    • OCRv3 English models to extract text from images.
    • Manually download and use models to avoid repeated auto-download issues.

    What I Have Tried:

    My minimal test script (test_ocr.py):

    from paddleocr import PaddleOCR

    ocr = PaddleOCR(use_angle_cls=True, lang='en', use_gpu=True)
    ocr.ocr('test.jpg', cls=True)


    On first run, it tries to download: https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar

    So I manually downloaded the model:

    wget https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar


    Extracted it to the expected folder:

    mkdir -p ~/.paddleocr/whl/rec/en/en_PP-OCRv3_rec_infer/
    tar -xvf en_PP-OCRv3_rec_infer.tar -C ~/.paddleocr/whl/rec/en/en_PP-OCRv3_rec_infer/


    Moved the contents up one level (since the archive adds a nested folder):

    mv ~/.paddleocr/whl/rec/en/en_PP-OCRv3_rec_infer/en_PP-OCRv3_rec_infer/* ~/.paddleocr/whl/rec/en/en_PP-OCRv3_rec_infer/
    rmdir ~/.paddleocr/whl/rec/en/en_PP-OCRv3_rec_infer/en_PP-OCRv3_rec_infer


    Still Facing This Issue:

    Even after placing all model files correctly, I get this error:

    [ppocr ERROR]: Something went wrong while downloading models


    And it again tries to download the same en_PP-OCRv3_rec_infer.tar model file — which is already there. What I Need Help With:

    • How to make PaddleOCR recognize already downloaded models instead of downloading again?
    • Is there a way to manually set the model path in code or config?
    • How can I confirm that all required models are present and in the correct structure?

    Note:

    My goal is to run PaddleOCR in a GPU-accelerated setup, and I’ve already configured CUDA and verified that PaddlePaddle is using the GPU.

    Any help would be deeply appreciated Thanks in advance! Regards, Ravi Verma

    Continue reading...

Compartilhe esta Página