[Python] How to improve word separation detection in scanned PDFs using PP-Structure V3?...

Discussão em 'Python' iniciado por Stack, Julho 4, 2025.

  1. Stack

    Stack Membro Participativo

    I am using PP-Structure V3 from the PaddleOCR library on a PDF file that contains scanned images of documents. The tool is able to extract some text, but it fails to detect spaces between words properly—the output merges multiple words into one.

    What I’ve tried:

    1. Enhanced the image using pillow (ImageEnhance) and cv2(filter2D with kernel=[[0, -1, 0], [-1, 5, -1], [0, -1, 0]])
    2. Adjusted the threshold value in ocr.predict() function to a lower value
    3. Verified DPI and resized the image to 300 DPI

    But the output still remains the same. How can I improve this improve word-level text detection and separation?

    Continue reading...

Compartilhe esta Página