docling-project / docling-project/docling
Image Orientation Issues Lead to Incorrect Text Extraction and Irrelevant Output from Transformer Model
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 84
Description
### Bug
If the image orientation is rotated, then everything breaks. If the image is not oriented to read text left to right, the text extraction is poor, and the transformer model keeps generating non-related text. I've attached an image to reproduce the issue. You can upload the image and convert the page to Docling [here](https://huggingface.co/spaces/ds4sd/SmolDocling-256M-Demo).
### Steps to reproduce
1. Upload the image to the Hugging Face demo: https://huggingface.co/spaces/ds4sd/SmolDocling-256M-Demo
2. Observe that if the image orientation is not correctly aligned (text is not left to right), the text extraction becomes inaccurate.
3. Notice that the transformer model generates irrelevant text after processing the rotated image.
### Docling version
Docling version: 2.28.4
Docling Core version: 2.25.0
Docling IBM Models version: 3.4.1
Docling Parse version: 4.0.0
Python: cpython-311 (3.11.11)
Platform: macOS-15.3.2-arm64-arm-64bit
### Python version
Python 3.11.11

Contributor guide
Assessment
This issue has not been assessed yet.