fix(dpbench): normalize coordinates for upstream breaking change#215
Merged
Conversation
Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
Contributor
|
✅ DCO Check Passed Thanks @samiuc, all your commits are properly signed off. 🎉 |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
Contributor
|
@PeterStaar-IBM @cau-git could we get eyes on this? |
PeterStaar-IBM
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
upstage/dp-benchdataset was updated on ~April 22 2026 (commit24702c6, "Sync evaluation codes and leaderboard with the latest version")commit: https://huggingface.co/datasets/upstage/dp-bench/commit/24702c61a2fb13325534be664653bc6e60250d13#d2h-687070
raw diff: https://huggingface.co/datasets/upstage/dp-bench/commit/24702c61a2fb13325534be664653bc6e60250d13.diff?file=dataset%2Freference.json
and silently changed reference.json coordinate format from normalized [0–1] to absolute image pixel values.
This causes
_update_gt_docto multiply pixel coordinates by page_width (~595 pts), and crop_bounding_box to multiply again by scale_x, producing bounding boxes of ~760 billion pixels and a PIL.Image.DecompressionBombError.The fix added in the PR is to detect absolute pixel coordinates (max_x > 1.0 or max_y > 1.0) and normalize by page_image.width / height before the existing scaling logic. The fix is backward-compatible, datasets using normalized coords pass through unchanged.