bug/PDF elements out of order
Describe the bug There is a discrepancy in the element order when partitioning a PDF. From the screenshots, the blue and red circles intended to highlight text are switched in position in the output image, compared to their correct placement in the original PDF.
To Reproduce
Run PDF partition using Python SDK with auto, fast, and hi_res strategy.
Expected behavior The expected behavior is that the element order in the output image should match the placement and color coding (blue and red circles) as they are in the original PDF document.
Screenshots
Environment Info OS version: macOS-14.2.1-arm64-arm-64bit Python version: 3.10.12 unstructured version: 0.12.1.dev11 unstructured-inference version: 0.7.18 pytesseract version: 0.3.10 Torch version: 2.1.1 Detectron2 is not installed PaddleOCR is not installed Libmagic version: ==> libmagic: stable 5.45 (bottled) LibreOffice version: ==> libreoffice: 7.6.4
Additional context similar issue: https://github.com/Unstructured-IO/unstructured/issues/2208
CC @christinestraub
@christinestraub - Would your recent reading order updates have fixed this?
@ron-unstructured Can you please share the PDF document used to reproduce this bug?
Software_Engineering_for_ML.pdf
Hi @christinestraub please see the attachment for the PDF file source: https://www.researchgate.net/publication/335361817_Software_Engineering_for_Machine_Learning_A_Case_Study
Hi @christinestraub do you have any updates on this? I am still seeing this bug on version 0.15.12. This pdf produces this output (note the wrong order of the titles):
model_y_manual_de.pdf
<=> T
Mittelkonsole
Kleiderbügel
Neben einem RFID-Transmitter, der Schlüssel und Schlüsselkarten liest (siehe Schlüsselkarte), beinhaltet die Mittelkonsole Getränkehalter, zwei Staufächer und ein drahtloses Telefonladegerät (siehe Aufbewahrung im Innenraum).
Model Y verfügt über einen Kleiderbügel auf jeder Fahrzeugseite in der zweiten Reihe neben der Leseleuchte. Drücken Sie gegen den Kleiderbügel, um ihn zu lösen. Drücken Sie erneut dagegen, um ihn einzufahren.
Um das Hauptfach zu öffnen, ziehen Sie die Abdeckung nach oben. Öffnen Sie das vordere Staufach, indem Sie die Abdeckung nach vorne schieben.
Hintere Konsole
Handschuhfach
Model Y verfügt über eine hintere Konsole, die in die Mitte der Rückenlehne in der zweiten Reihe integriert ist. Ziehen Sie die Konsole nach unten, um Zugang zu den hinteren Getränkehaltern zu erhalten, oder verwenden Sie sie als Armlehne.
Um das Handschuhfach zu öffnen, berühren Sie Fahrzeug > Handschuhfach. Das Handschuhfach öffnet sich automatisch, und die zugehörige Beleuchtung schaltet sich ein.
Um das Handschuhfach zu schließen, drücken Sie es nach oben, bis es in seine geschlossene Position einrastet.
Staufächer
37```
Closing as inactive.