Battling with all the different file formats of publicly available neuromorphic datasets? No more! Tonic is a tool to facilitate the download, manipulation and loading of event-based/spike-based data. Have a look at the list of supported datasets and transformations! It's based on PyTorch Vision for an intuitive interface, so that you spend less time worrying about how to read files and more time on things that matter.
pip install tonic
If you prefer conda, please check out the forge repository.
Have a look at our introduction page to see how some of the moving parts work. There are some more short examples available here.
If you're looking for a minimal example to run, this is it!
import tonic
import tonic.transforms as transforms
transform = transforms.Compose([transforms.Denoise(filter_time=10000),
transforms.TimeJitter(std=10),])
testset = tonic.datasets.NMNIST(save_to='./data',
train=False,
transform=transform)
testloader = tonic.datasets.DataLoader(testset, shuffle=True)
events, target = next(iter(testloader))
Have a question about how something works? Ideas for improvement? Feature request? Please get in touch here on GitHub via the Discussions page!
You can find the full documentation on Tonic on this site.