bird_species_dataset: Bird species dataset

Description Usage Arguments Details Value Examples

Description

Prepares the bird species dataset available in Kaggle here

Usage

1
2
3
4
5
6
7
bird_species_dataset(
  root,
  token = NULL,
  split = "train",
  download = FALSE,
  ...
)

Arguments

root

path to the data location

token

a path to the json file obtained in Kaggle. See here for additional info.

split

train, test or valid

download

wether to download or not

...

other arguments passed to torchvision::image_folder_dataset().

Details

We use pins for downloading and managing authetication. If you want to download the dataset you need to register the Kaggle board as described in this link. or pass the token argument.

Value

A torch::dataset() ready to be used with dataloaders.

Examples

1
2
3
4
5
if (torch::torch_is_installed() && FALSE) {
birds <- bird_species_dataset("./data", token = "path/to/kaggle.json",
                              download = TRUE)
length(birds)
}

torchdatasets documentation built on Oct. 7, 2021, 5:09 p.m.