You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the Hugging Face datasets library to load images in batch and would like to apply a torchvision transform to solve the inconsistent image sizes in the dataset and apply some on the fly image augmentation. I can just think about using the collate_fn, but seems quite inefficient.
I'm new to the Hugging Face datasets library, I didn't find nothing in the documentation or the issues here on github.
Is there an existing way to add image transformations directly to the dataset loading pipeline?
Steps to reproduce the bug
from datasets import load_dataset
from torch.utils.data import DataLoader
I'm looking for a way to resize images on-the-fly when loading the dataset, similar to PyTorch's Dataset.getitem functionality. This would be more efficient than handling resizing in the collate_fn.
Describe the bug
I'm using the Hugging Face datasets library to load images in batch and would like to apply a torchvision transform to solve the inconsistent image sizes in the dataset and apply some on the fly image augmentation. I can just think about using the collate_fn, but seems quite inefficient.
I'm new to the Hugging Face datasets library, I didn't find nothing in the documentation or the issues here on github.
Is there an existing way to add image transformations directly to the dataset loading pipeline?
Steps to reproduce the bug
from datasets import load_dataset
from torch.utils.data import DataLoader
Expected behavior
I'm looking for a way to resize images on-the-fly when loading the dataset, similar to PyTorch's Dataset.getitem functionality. This would be more efficient than handling resizing in the collate_fn.
Environment info
datasets
version: 3.1.0huggingface_hub
version: 0.26.2fsspec
version: 2024.9.0The text was updated successfully, but these errors were encountered: