Load existing datasets

mira.datasets.load_voc2012(subset='train')[source]

PASCAL VOC 2012

Parameters

subset – One of train, val, or trainval. If trainval, the scene collection contains both the train and validation sets. If train, only the training set. If val only the validation set.

Return type

SceneCollection

Returns

A scene collection containing the PASCAL VOC 2012 dataset.

mira.datasets.load_oxfordiiitpets(breed=True)[source]

Load the Oxford-IIIT pets dataset. It is not divided into train, validation, and test because it appeared some files were missing from the trainval and test set documents (e.g., english_cocker_spaniel_164).

Parameters

breed – Whether to use the breeds as the class labels. If False, the class labels are limited to dog or cat.

Return type

SceneCollection

Returns

A scene collection containing the dataset

mira.datasets.load_shapes(n_scenes=100, classification=False, **kwargs)[source]

A simple dataset for testing.

Parameters
  • width – The width of each image

  • height – The height of each image

  • object_count_bounds – A tuple indicating the minimum and maximum number of objects in each image

  • object_width_bounds – A tuple indicating the minimum and maximum widths of the objects in each image

  • n_scenes – The number of scenes to generate

  • polygons – Whether to use polygons instead of axis-aligned bounding boxes.

Return type

SceneCollection

Returns

A scene collection of images with circles and rectangles in it.