The Oxford-IIIT Pet Dataset is a 37 category pet dataset with roughly 200 images for each class. The images have a large variations in scale, pose and lighting. All images have an associated ground truth annotation of species (cat or dog), breed, and pixel-level trimap segmentation.

oxford_pet_dataset(
  root,
  split = "train",
  target_type = c("trimap", "species", "breed"),
  download = FALSE,
  ...,
  transform = NULL,
  target_transform = NULL
)

Arguments

root

path to the data location

split

train, test or valid

target_type

The type of the target:

  • 'trimap': returns a mask array with one class per pixel.

  • 'species': returns the species id. 1 for cat and 2 for dog.

  • 'breed': returns the breed id. see dataset$breed_classes.

download

wether to download or not

...

Currently unused.

transform

A function/transform that takes in an PIL image and returns a transformed version. E.g, transform_random_crop().

target_transform

A function/transform that takes in the target and transforms it.