Skip main navigation

New offer! Get 30% off one whole year of Unlimited learning. Subscribe for just £249.99 £174.99. New subscribers only. T&Cs apply

Find out more

Practical: Custom datasets

A link to a Colab article demonstrating how to make custom datasets in PyTorch.
A screenshot from Colab showing some code, and two versions of the same image of a Daisy, one the original, the other flipped, reshaped and cropped.
© The University of Nottingham
To use new image data we will need to make a custom dataset.

In the linked Colab notebook we will make a custom dataset in PyTorch based on the Oxford flower dataset.

In the notebook we will cover the following:

  • downloading the dataset
  • making a custom dataset class
  • splitting into training and validation data
  • image transformations – data augmentation.

Follow the link below and work through the Colab notebook step by step.

Custom datasets

You may wish to open the link in a new browser tab so you can refer back here quickly.

Please leave any questions or comments below.

This article is from the free online

Deep Learning for Bioscientists

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now