🐛 Describe the bug
CelebA bounding boxes were calculated on the so called "in-the-wild" images, prior to cropping and resizing. But torchvision.datasets returns the version that is cropped to 178x218. So for example, on the ninth image, the bbox is outside the image size.
CODE TO REPRO
from torchvision import datasets
celeba = datasets.CelebA(root="./celeba", target_type="bbox", download=True, split="train")
print(celeba[8])
(<PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=178x218>,
tensor([600, 274, 343, 475]))
Versions
collect_env.py crashed on me but here's the version:
Using Python 3.12.8 environment at: XXX
Name: torchvision
Version: 0.21.0
Location: XXX
Requires: numpy, pillow, torch
Required-by: