docling-project / docling-project/docling
Docling seems to have difficulty accurately recognizing tables that are rotated in documents.
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 84
Description
### Bug
I've observed that the intelligent preprocessor has difficulty accurately recognizing tables that are rotated in documents. While this might not be a common scenario, such rotated tables are sometimes found in financial statements and certain academic papers (e.g., surveys, meta-analyses). When these tables are manually rotated to their correct orientation, the preprocessor recognizes them properly.
I've tested this with a few documents:
Samsung Electronics Financial Statement (Images 1 & 2): Both the original rotated table and the corrected version are identified as tables. However, the rotated version is parsed incorrectly, omitting all but the top column.
Alzheimer's Disease Meta-Analysis Paper (Images 3 & 4): In the original document with the rotated table, the table is not recognized at all; only the text is extracted.
Deep Learning Survey Paper (Images 5 & 6): Similar to the previous example, the rotated table is not identified, and only the text is extracted.
### Steps to reproduce
Process a document containing a rotated table using the intelligent preprocessor. For example:
Image 1 (rotated financial statement)
Image 3 (rotated table in a meta-analysis paper)
Image 5 (rotated table in a survey paper)
Observe the output. The preprocessor either fails to detect the table entirely or parses its contents incorrectly.
Manually rotate the images so that the tables are in the correct, upright orientation (e.g., Image 2, Image 4, Image 6).
Process these corrected images with the intelligent preprocessor.
Observe the output again. The preprocessor now correctly identifies and extracts the data from the tables.
[Samsung Electronics Financial Statement .pdf](https://github.com/user-attachments/files/21474354/Samsung.Electronics.Financial.Statement.pdf)
[Alzheimer's Dementia(2009) - Disease progression meta‐analysis model in Alzheimer s disease.pdf](https://github.com/user-attachments/files/21474360/Alzheimer.s.Dementia.2009.-.Disease.progression.meta.analysis.model.in.Alzheimer.s.disease.pdf)
[deeplearning_survey.pdf](https://github.com/user-attachments/files/21474359/deeplearning_survey.pdf)
### Docling version
2.41
### Python version
3.12
### 1, 2 case - Samsung
------
### 3, 4 case - Alzheimer meta analysis
### 5,6 case - deep learning survey
Contributor guide
Assessment
This issue has not been assessed yet.