Skip to content

Instantly share code, notes, and snippets.

@tkshnkmr
Created November 5, 2019 13:51
Show Gist options
  • Save tkshnkmr/653a6ab701157ddd75069935f946c474 to your computer and use it in GitHub Desktop.
Save tkshnkmr/653a6ab701157ddd75069935f946c474 to your computer and use it in GitHub Desktop.
# data directory
root = "my_data"
# assume we have 3 jpg images
filenames = ['img1.jpg', 'img2.jpg', 'img3.jpg']
# the class of image might be ['black cat', 'tabby cat', 'tabby cat']
labels = [0, 1, 1]
# create own Dataset
my_dataset = simpleDataset(root=root,
filenames=filenames,
labels=labels
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment