docling-project / docling-project/docling

First row of table is treated as text with "label": "section_header"

Open
#2,129 2 comments 0 reactions 0 assignees View on GitHub
bug triage/close-stale
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

### Bug
Hello
I have tried to extract tables from document: ["Czyste powietrze"](https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://www.gov.pl/attachment/84cc97e4-2c14-4732-a99e-8857e89e81fb&ved=2ahUKEwibz7vp8aGPAxVMIBAIHVYlGmIQFnoECBYQAQ&usg=AOvVaw1917J7cS3Ygv4d39wo8F0l)
There are similar tables on pages: 11 and 32

On page 11 the first row (e.g.: "KRYTERIA FORMALNE") of table doesn't belong to object of type table but on page 32 it works properly. Pages 11 and 32 with detected table objects are presented below:

**Page 11:**
Image

**Page 32:**
Image

### Steps to reproduce
pipeline_options = PdfPipelineOptions()
pipeline_options.do_ocr = False
pipeline_options.do_table_structure = True
pipeline_options.table_structure_options.do_cell_matching = False
pipeline_options.table_structure_options.mode = TableFormerMode.ACCURATE
pipeline_options.accelerator_options = AcceleratorOptions(
num_threads=4, device=AcceleratorDevice.AUTO
)

doc_converter = DocumentConverter(
format_options={
InputFormat.PDF: PdfFormatOption(
pipeline_options=pipeline_options
)
}
)
conv_result = doc_converter.convert(input_doc_path)

### Docling version
Docling version: 2.47.0
Docling Core version: 2.45.0
Docling IBM Models version: 3.9.0
Docling Parse version: 4.2.3

### Python version
Python: cpython-312 (3.12.10)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.