{"id":26024773,"url":"https://github.com/neuromorphs/tonic","last_synced_at":"2025-05-15T08:05:11.918Z","repository":{"id":38616181,"uuid":"196472582","full_name":"neuromorphs/tonic","owner":"neuromorphs","description":"Event datasets and transforms.","archived":false,"fork":false,"pushed_at":"2025-04-24T19:54:28.000Z","size":5342,"stargazers_count":237,"open_issues_count":15,"forks_count":48,"subscribers_count":15,"default_branch":"develop","last_synced_at":"2025-04-24T20:42:47.477Z","etag":null,"topics":["augmentation","datasets","event-based","neuromorphic","spikes","transformations"],"latest_commit_sha":null,"homepage":"https://tonic.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neuromorphs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-11T22:28:33.000Z","updated_at":"2025-04-24T19:54:32.000Z","dependencies_parsed_at":"2023-09-23T08:00:11.062Z","dependency_job_id":"45c54baa-b572-407f-8c29-8d31ce3a2d3b","html_url":"https://github.com/neuromorphs/tonic","commit_stats":{"total_commits":884,"total_committers":32,"mean_commits":27.625,"dds":0.420814479638009,"last_synced_commit":"8be3a91d99c7506d43579453e712a1ba6dede288"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuromorphs%2Ftonic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuromorphs%2Ftonic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuromorphs%2Ftonic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuromorphs%2Ftonic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neuromorphs","download_url":"https://codeload.github.com/neuromorphs/tonic/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301426,"owners_count":22047902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["augmentation","datasets","event-based","neuromorphic","spikes","transformations"],"created_at":"2025-03-06T12:37:15.751Z","updated_at":"2025-05-15T08:05:11.910Z","avatar_url":"https://github.com/neuromorphs.png","language":"Python","readme":"![tonic](tonic-logo-padded.png)\n[![PyPI](https://img.shields.io/pypi/v/tonic)](https://pypi.org/project/tonic/)\n[![codecov](https://codecov.io/gh/neuromorphs/tonic/branch/develop/graph/badge.svg?token=Q0BMYGUSZQ)](https://codecov.io/gh/neuromorphs/tonic)\n[![Documentation Status](https://readthedocs.org/projects/tonic/badge/?version=latest)](https://tonic.readthedocs.io/en/latest/?badge=latest)\n[![contributors](https://img.shields.io/github/contributors-anon/neuromorphs/tonic)](https://github.com/neuromorphs/tonic/pulse)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/neuromorphs/tonic/main?labpath=docs%2Ftutorials)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5079802.svg)](https://doi.org/10.5281/zenodo.5079802)\n[![Discord](https://img.shields.io/discord/1044548629622439977)](https://discord.gg/qubbM4uPuA)\n\n**This project is looking for a new maintainer. Reach out to Gregor if you're interested!**\n\n**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!\n\n## Documentation\nYou can find the full documentation on Tonic [on this site](https://tonic.readthedocs.io/en/latest/index.html).\n\n* [A first example](https://tonic.readthedocs.io/en/latest/getting_started/nmnist.html) to get a feeling for how Tonic works.\n* [Run tutorials in your browser](https://mybinder.org/v2/gh/neuromorphs/tonic/main?labpath=docs%2Ftutorials) quick and easy.\n* [List of datasets](https://tonic.readthedocs.io/en/main/datasets.html).\n* [List of transformations](https://tonic.readthedocs.io/en/main/auto_examples/index.html).\n* [About](https://tonic.readthedocs.io/en/latest/about/info.html) this project.\n* [Release notes](https://tonic.readthedocs.io/en/latest/about/release_notes.html) on version changes.\n\n## Install\n```bash\npip install tonic\n```\nor (thanks to [@Tobias-Fischer](https://github.com/Tobias-Fischer))\n```\nconda install -c conda-forge tonic\n```\nFor the latest pre-release on the develop branch that passed the tests:\n```\npip install tonic --pre\n```\nThis package has been tested on:\n\n| Linux    | [![](http://github-actions.40ants.com/neuromorphs/tonic/matrix.svg?only=ci.multitest.ubuntu-latest)](https://github.com/neuromorphs/tonic)|\n|----------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| **Windows**  | [![](http://github-actions.40ants.com/neuromorphs/tonic/matrix.svg?only=ci.multitest.windows-2022)](https://github.com/neuromorphs/tonic) |\n\n## Quickstart\nIf you're looking for a minimal example to run, this is it!\n\n```python\nimport tonic\nimport tonic.transforms as transforms\n\nsensor_size = tonic.datasets.NMNIST.sensor_size\ntransform = transforms.Compose(\n    [\n        transforms.Denoise(filter_time=10000),\n        transforms.ToFrame(sensor_size=sensor_size, time_window=3000),\n    ]\n)\n\ntestset = tonic.datasets.NMNIST(save_to=\"./data\", train=False, transform=transform)\n\nfrom torch.utils.data import DataLoader\n\ntestloader = DataLoader(\n    testset,\n    batch_size=10,\n    collate_fn=tonic.collation.PadTensors(batch_first=True),\n)\n\nframes, targets = next(iter(testloader))\n```\n\n## Discussion and questions\nHave a question about how something works? Ideas for improvement? Feature request? Please get in touch on the #tonic [Discord channel](https://discord.gg/V6FHBZURkg)\n or alternatively here on GitHub via the [Discussions](https://github.com/neuromorphs/tonic/discussions) page!\n\n## Contributing\nPlease check out the [contributions](https://tonic.readthedocs.io/en/latest/about/contribute.html) page for details.\n\n## Sponsoring\nThe development of this library is supported by\n\n\u003ctr\u003e\u003ctd\u003e\u003ca href=\"https://synsense.ai\"\u003e\u003cimg src=\"https://www.synsense.ai/wp-content/uploads/2022/03/logo-synsense-blue.svg\" alt=\"SynSense\" width=\"200px\"/\u003e\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\n\n\n## Citation\nIf you find this package helpful, please consider citing it:\n\n```BibTex\n@software{lenz_gregor_2021_5079802,\n  author       = {Lenz, Gregor and\n                  Chaney, Kenneth and\n                  Shrestha, Sumit Bam and\n                  Oubari, Omar and\n                  Picaud, Serge and\n                  Zarrella, Guido},\n  title        = {Tonic: event-based datasets and transformations.},\n  month        = jul,\n  year         = 2021,\n  note         = {{Documentation available under \n                   https://tonic.readthedocs.io}},\n  publisher    = {Zenodo},\n  version      = {0.4.0},\n  doi          = {10.5281/zenodo.5079802},\n  url          = {https://doi.org/10.5281/zenodo.5079802}\n}\n```\n","funding_links":[],"categories":["Python"],"sub_categories":["General-Purpose Machine Learning"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneuromorphs%2Ftonic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneuromorphs%2Ftonic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneuromorphs%2Ftonic/lists"}