Plug-and-play python wrapper around the small NORB dataset.
Since I saw no plug-and-play python wrappers around the small NORB dataset (which is distributed in binary matrix file format) I made this simple class to encapsule the binary data parsing.
To install requirements: pip install -r requirements.txt
The small NORB dataset contains images of 50 toys belonging to 5 generic categories: four-legged animals, human figures, airplanes, trucks, and cars. The objects were imaged by two cameras under 6 lighting conditions, 9 elevations (30 to 70 degrees every 5 degrees), and 18 azimuths (0 to 340 every 20 degrees). The training set is composed of 5 instances of each category (instances 4, 6, 7, 8 and 9), and the test set of the remaining 5 instances (instances 0, 1, 2, 3, and 5). The dataset features 24300 train and 24300 test examples.
The dataset is distributed in the form of compressed binary matrices, downloadable through the following links:
- Train Set: (data, categories, info)
- Test Set: (data, categories, info)
Once downloaded data have been uncompressed in a small_norb_root
directory, usage is as simple as:
dataset = SmallNORBDataset(dataset_root='small_norb_root')
once initialized, small NORB data will be available in dataset.data['train']
and dataset.data['test']
respectively.
To check that the dataset has been correctly initialized, the method explore_random_examples
can be used as follows:
dataset.explore_random_examples(dataset_split='train')
If everything went well, the output should look like the following: