Publicly available event datasets and transforms.

neuromorphs, updated 🕥 2023-03-16 21:48:14

tonic PyPI codecov Documentation Status contributors Binder DOI Discord

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.

Install

bash 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!

```python 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

SynSense ## Citation If you find this package helpful, please consider citing it: ```BibTex @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} } ```

Issues

The selection of subdataset of tonic.dataset

opened on 2023-03-15 07:44:47 by mosfe

I have used 'tonic.dataset.SSC(download_dir, split='train',transform=transform)' to get the full dataset of SSC dataset, and it contains 35 classes. However. I only want to train some classes, such as [0,1,2,3,4,5,6]. How could I get the subdataset qucikly, I have tried it using the for loop method, but it seems a little stupid. What should I do? Hope for your reply

ToFrame silently merges polarities when sensor_size indicates single polarity (e.g. [128,128,1])

opened on 2023-02-17 11:23:14 by biphasic

this line is the culprit https://github.com/neuromorphs/tonic/blob/develop/tonic/functional/to_frame.py#L61

This was introduced to make sure that in the case of audio samples all polarities have values 0 instead of 1. We need to introduce a check that raises a warning if there are more than 1 polarities present in the data

CachedDataset should have the option to cache pngs instead of hdf5

opened on 2023-01-21 22:03:38 by biphasic

Images can be loaded super fast. When training CNNs on binned frames, this could speed up things even more. This obviously won't work with rasters

Add Gen1 automotive dataset from Prophesee

opened on 2022-12-27 09:28:11 by fabrizio-ottati

The dataset is available here. expelliarmus has to be used to read the binary data and the TorchData API (see #201) to create the dataset class.

Porting datasets to new TorchData API

opened on 2022-12-27 09:25:15 by fabrizio-ottati

See #201.

List of datasets to be ported: - [x] NMNIST. - [x] STMNIST. - [x] NCARS. - [ ] ASLDVS. - [ ] CIFAR10-DVS. - [ ] DVGGesture. - [ ] NCALTECH101. - [ ] POKERDVS. - [ ] SMNIST. - [ ] DVSLip. - [ ] SHD. - [ ] SSC. - [ ] DAVISDATA. - [ ] DSEC. - [ ] MVSEC. - [ ] TUMVIE. - [ ] VPR.

add Vector benchmark

opened on 2022-03-17 08:00:04 by biphasic

https://star-datasets.github.io/vector/

Releases

v1.2.6 2023-03-08 08:08:34

v1.2.4 2023-01-12 09:55:10

v1.2.3 2022-12-30 16:13:45

v1.2.1 2022-08-26 14:27:17

  • Major rewrite of DSEC dataset. It's now possible to choose from any combination of recordings, train/test split, data and targets.
  • Support for target slicing in SlicedDataset. Previously we could only slice data, now we can do slicing based on data and targets.
  • transforms parameter for most datasets, in addition to transform and target_transform. This allows a user to pass a transform that will be called on data and targets at the same time.
  • CenterCrop transform for events, similar to what the frame-based equivalent does.
  • Improvements under the hood: slicers consolidation in one file, bug fixes, documentation updates
  • Exploration for the new Torch Data API under tonic/prototype. Thanks to @fabhertz95
Institute of Neuromorphic Engineering
GitHub Repository Homepage

event-based datasets neuromorphic augmentation spikes transformations