Code for preprocessing and loading data from neuromorphic datasets. Part of this code has been used for the following works:
H. Jang, N. Skatchkovsky, and O. Simeone, VOWEL: A Local Online Learning Rule for Recurrent Networks of Probabilistic Spiking Winner-Take-All Circuits, to be presented at ICPR 2020 https://arxiv.org/abs/2004.09416
H. Jang, N. Skatchkovsky, and O. Simeone, BiSNN: Training Spiking Neural Networks with Binary Weights via Bayesian Learning, submitted for conference publication, https://arxiv.org/abs/2012.08300
This code can now be installed as a package and is meant to be eventually shared in pip. To clone and install locally the package, run
git clone https://github.com/kclip/neurodata
cd neurodata/
python -m pip install -e .
Scripts to preprocess the MNIST-DVS and DVSGestures dataset are given in the preprocessing
module.
Make sure to first download and then preprocess the dataset using the script in preprocessing
.
To add your own datasets, save them as an .hdf5 file respecting the current structure:
/ root (Group)
/stats (Group)
/stats/test_data (Array) [n_examples_test, n_pixels_per_dim]
/stats/test_label (Array) [n_examples_test, n_classes]
/stats/train_data (Array) [n_examples_train, n_pixels_per_dim]
/stats/train_label (Array) [n_examples_train, n_classes]
/train (Group)
/train/labels (Array) [n_examples_train, 1]
# indicates labels for each train example
/train/1 (Array) [example_length, 4]
# indicates event time, x axis position, y axis position, polarity
...
/train/n_examples_train (Array) [example_length, 4]
# one array per train example
/test (Group)
/test/labels (Array) [n_examples_test, 1]
# indicates labels for each test example
/test/1 (Array) [example_length, 4]
# indicates event time, x axis position, y axis position, polarity
...
/test/n_examples_test (Array) [example_length, 4]
# one array per test example
Author: Nicolas Skatchkovsky