Tonic is a tool to facilitate the download, manipulation and loading of event-based/spike-based data. It's like PyTorch Vision but for neuromorphic data!
Documentation
You can find the full documentation on Tonic on this site.
- A first example to get a feeling for how Tonic works.
- Run tutorials in your browser quick and easy.
- List of datasets.
- List of transformations.
- About this project.
- Release notes on version changes.
Install
pip install tonic
or (thanks to @Tobias-Fischer)
conda install -c conda-forge tonic
For the latest pre-release on the develop branch that passed the tests:
pip install tonic --pre
This package has been tested on:
| Linux | |
|---|---|
| Windows |
Quickstart
If you're looking for a minimal example to run, this is it!
import tonic
import tonic.transforms as transforms
sensor_size = tonic.datasets.NMNIST.sensor_size
transform = transforms.Compose(
[
transforms.Denoise(filter_time=10000),
transforms.ToFrame(sensor_size=sensor_size, time_window=3000),
]
)
testset = tonic.datasets.NMNIST(save_to="./data", train=False, transform=transform)
from torch.utils.data import DataLoader
testloader = DataLoader(
testset,
batch_size=10,
collate_fn=tonic.collation.PadTensors(batch_first=True),
)
frames, targets = next(iter(testloader))
Discussion and questions
Have a question about how something works? Ideas for improvement? Feature request? Please get in touch on the #tonic Discord channel or alternatively here on GitHub via the Discussions page!
Contributing
Please check out the contributions page for details.
Sponsoring
The development of this library is supported by
Citation
If you find this package helpful, please consider citing it:
@software{lenz_gregor_2021_5079802,
author = {Lenz, Gregor and
Chaney, Kenneth and
Shrestha, Sumit Bam and
Oubari, Omar and
Picaud, Serge and
Zarrella, Guido},
title = {Tonic: event-based datasets and transformations.},
month = jul,
year = 2021,
note = {{Documentation available under
https://tonic.readthedocs.io}},
publisher = {Zenodo},
version = {0.4.0},
doi = {10.5281/zenodo.5079802},
url = {https://doi.org/10.5281/zenodo.5079802}
}
Release files for tonic 1.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tonic-1.6.0.tar.gz | 3.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tonic-1.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.8 MB
Release files / tonic-1.6.0.tar.gz
| Download URL | tonic-1.6.0.tar.gz |
|---|---|
| Size | 3.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b266b8407c445f9ab12f85b47d40cba2925b4d8b9678ac716334dab7e4189c9
|
|
BLAKE2b-256 checksum How to use checksums |
0125542bd12c5dbbd7ac128e26f359e2847558fc7b8cc2f18d6ebaf9b4abbfe3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / tonic-1.6.0-py3-none-any.whl
| Download URL | tonic-1.6.0-py3-none-any.whl |
|---|---|
| Size | 106.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e483223362c306c293336b76d054bdc7771a3e710644f644d29ffc4302a2c8a
|
|
BLAKE2b-256 checksum How to use checksums |
d637371314f0646d9daa4c9e741b60bd655ad06ff68c87b2c929fe5fd955ea91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|