littletomatodonkey/Augment-XY-CUT ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Python tool that takes bounding boxes from a document image and reorders them using the augment XY cut idea from XYLayoutLM. I want to see the reading order before and after the algorithm, so please include a simple way to visualize the box order on an example image like the ones in the repo.
Make it easy to run from one main script, and keep the code clear enough that I can swap in my own document boxes later. If anything about the exact XY cut behavior is unclear, look up the current paper or docs online and follow the intended approach as closely as you can.
Please also include a couple of example inputs or a demo mode so I can quickly test it end to end without having to wire up a lot of extra code.
Are you gonna build this?
make sure you review the code using coderabbit