transformers
d38514c6 - Apply EXIF orientation in load_image_as_tensor with torchvision (#49794)

Commit
30 days ago
Apply EXIF orientation in load_image_as_tensor with torchvision (#49794) * Apply EXIF orientation in load_image_as_tensor with torchvision torchvision's decode_image ignores the EXIF Orientation tag unless asked, so path, URL and base64 inputs reached the torchvision image processors sideways while load_image and the PIL backend rotated them upright. Pass apply_exif_orientation=True on the torchvision branch; torchcodec already applies the orientation. A regression test checks that every input type gives the same upright tensor as load_image. * Address review: EXIF comment placement, docstring, torchvision test helper, hub fixture image, decode with both backends * Load the EXIF test fixture from the dataset main branch --------- Co-authored-by: Raushan Turganbay <raushan@huggingface.co>
Author
Parents
Loading