Skip to content

Commit

Permalink
Merge pull request #60 from FreeStyleFreeLunch/main
Browse files Browse the repository at this point in the history
add fer2013.py
  • Loading branch information
tanganke authored Jan 4, 2025
2 parents 9c026f2 + 7f3c168 commit 7316283
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions fusion_bench/dataset/fer2013.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from datasets import load_dataset


def load_fer2013(path: str = "clip-benchmark/wds_fer2013", split: str = "train"):
dataset = load_dataset(path, split=split)
dataset = dataset.remove_columns(["__key__", "__url__"])
dataset = dataset.rename_columns({"jpg": "image", "cls": "label"})
return dataset

if __name__ == "__main__":
dataset = load_fer2013(split="test")
print(dataset)

0 comments on commit 7316283

Please sign in to comment.