Skip to content

Handle recoverable truncated image payloads#1554

Open
rajantripathi wants to merge 1 commit into
open-compass:mainfrom
rajantripathi:fix-truncated-image-loading
Open

Handle recoverable truncated image payloads#1554
rajantripathi wants to merge 1 commit into
open-compass:mainfrom
rajantripathi:fix-truncated-image-loading

Conversation

@rajantripathi
Copy link
Copy Markdown

Summary

  • Allow PIL to load recoverable truncated image payloads in the central VLM image utilities.
  • Add a regression test covering base64 TSV image decoding to a local file.

Why

Some benchmark TSVs can contain recoverable truncated PNG/JPEG payloads. In those cases, a whole evaluation combination should not fail when PIL can still decode and re-save the image.

Fixes #1400.

Tests

  • python -m pytest tests/test_smp_vlm.py -q
  • python -m py_compile vlmeval/smp/vlm.py tests/test_smp_vlm.py
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MMSIBench] OSError: image file is truncated

1 participant