auto-exp-2 / README.md
yourusername's picture
commit files to HF hub
99a546c
metadata
task_categories:
  - other
task_ids:
  - other-image-classification
  - image-classification
tags:
  - auto-generated
  - image-classification

nateraw/auto-exp-2

Image Classification Dataset

Usage

from PIL import Image
from datasets import load_dataset

def pil_loader(path: str):
    with open(path, 'rb') as f:
        im = Image.open(f)
        return im.convert('RGB')

def image_loader(example_batch):
    example_batch['image'] = [
        pil_loader(f) for f in example_batch['file']
    ]
    return example_batch


ds = load_dataset('nateraw/auto-exp-2')
ds = ds.with_transform(image_loader)