WillowObject

class pygmtools.dataset.WillowObject(sets, obj_resize, **ds_dict)[source]

Download and preprocess Willow Object Class dataset.

Parameters
  • sets – str, problem set, 'train' for training set and 'test' for testing set

  • obj_resize – tuple, resized image size

  • ds_dict

    settings of dataset, containing at most 6 params(keys) for WillowObject:

    • ROOT_DIR: str, directory of data

    • CLASSES: list, data classes

    • TRAIN_NUM: int, number of images for train in each class

    • SPLIT_OFFSET: int, offset when split train and testing set

    • TRAIN_SAME_AS_TEST: bool, whether to use same images for training and test

    • RAND_OUTLIER: int, number of added outliers in one image

download(url=None, retries=5)[source]

Automatically download WillowObject dataset.

Parameters

url – str, web url of WillowObject

process()[source]

Process the dataset and generate data-(size, size).json for preprocessed dataset, train.json for training set, and test.json for testing set.