one_piece_dataset / README.md
pawlo2013's picture
Update README.md
0af454a
|
raw
history blame
1.35 kB
metadata
dataset_info:
  features:
    - name: full_colour
      dtype: image
    - name: sketch
      dtype: image
  splits:
    - name: train
      num_bytes: 170204480
      num_examples: 922
  download_size: 170225532
  dataset_size: 170204480

Dataset Card for "one_piece_dataset"

This dataset contains 922 images taken from the one piece anime, with each row containing the coloured image and the sketch one.

example images

Example Setup (the images are not normalized)

transform = Compose([
            transforms.Resize((128, 128)),
            transforms.ToTensor(),
            transforms.Lambda(lambda t: (t * 2) - 1)
])

def train():

def transforms(examples):
    examples["sketch_pixel_values"] = [transform(image.convert("RGB"))  for image in examples["sketch"]]
    examples["full_colour_pixel_values"] = [ transform(image.convert("RGB")) for image in  examples["full_colour"]]
    del examples["sketch"]
    del examples["full_colour"]

    return examples


dataset = load_dataset("pawlo2013/one_piece_dataset", split="train")

transformed_full_colour_dataset = dataset.with_transform(transforms)

dataloader = DataLoader(transformed_full_colour_dataset, batch_size=16, shuffle=True, num_workers=0)