{"id":18109359,"url":"https://github.com/AmazingDD/EC-SNN","last_synced_at":"2025-03-29T15:30:51.453Z","repository":{"id":233675522,"uuid":"731033095","full_name":"AmazingDD/EC-SNN","owner":"AmazingDD","description":"Official code for \"EC-SNN: Splitting Deep Spiking Neural Networks on Edge Devices\" (IJCAI2024)","archived":false,"fork":false,"pushed_at":"2024-09-06T01:43:09.000Z","size":2261,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-01T00:04:55.364Z","etag":null,"topics":["distributed-computing","edge","edge-computing","pruning-algorithms","spiking-neural-networks","split-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AmazingDD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-12-13T08:03:43.000Z","updated_at":"2024-09-07T05:55:25.000Z","dependencies_parsed_at":"2024-05-07T06:46:08.557Z","dependency_job_id":null,"html_url":"https://github.com/AmazingDD/EC-SNN","commit_stats":null,"previous_names":["amazingdd/ec-snn"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmazingDD%2FEC-SNN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmazingDD%2FEC-SNN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmazingDD%2FEC-SNN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmazingDD%2FEC-SNN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AmazingDD","download_url":"https://codeload.github.com/AmazingDD/EC-SNN/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246204538,"owners_count":20740331,"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":["distributed-computing","edge","edge-computing","pruning-algorithms","spiking-neural-networks","split-learning"],"created_at":"2024-11-01T00:01:45.176Z","updated_at":"2025-03-29T15:30:50.049Z","avatar_url":"https://github.com/AmazingDD.png","language":"Python","readme":"# EC-SNN\nThis is the repository of our article published in IJCAI 2024 \"EC-SNN: Splitting Deep Spiking Neural Networks on Edge Devices\".\n\n## Overview\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./infer_data/overview.png\" align=\"center\" width=\"100%\" style=\"margin: 0 auto\"\u003e\n\u003c/p\u003e\n\n## Requirements\n\n```\ntorch==2.0.1\ntorchvision==0.15.2\nlibrosa==0.10.1\nspikingjelly==0.0.0.0.14\nnumpy==1.23.5\npandas==1.5.3\nscikit-learn==1.2.1\nopencv-python==4.8.1.78\n```\n\n## How to run\n\nExamples of running commands for different purposes are listed below, please modify the corresponding parts to implement your expected task. (All running commands in shell scripts will be attached to Github Pages later.)\n\nThis repository is a simulation toolkit for researchers to learn the logistics of EC-SNN. To get the results listed in our paper, please deploy the corresponding models to edge devices like Raspberry PI!\n\n### model training\n\n```\npython ecsnn.py -train -arch=vgg9 -act=snn -device=cuda -data_dir=. -dataset=cifar10 -b=128\n```\n\n### model pruning for one edge device with all classes selected\n\nmake sure the class tokens are integers starting from 0.\n\n```\npython ecsnn.py -prune -arch=vgg9 -act=snn -data_dir=. -dataset=cifar10 -b=128 -split_dir=./splitted/ -device=cuda -apoz=95 -c 0 1 2 3 4 5 6 7 8 9\n```\n\n### energy consumption\n\n```\npython ecsnn.py -split -energy -arch=vgg9 -act=snn -device=cuda -split_dir=./splitted/ -data_dir=. -dataset=cifar10 -b=128\n```\n\n### latency\n\nmake sure `./infer_data/` contains the specific frame you want before making an inference\n\n```\npython ecsnn.py -split -infer -arch=vgg9 -act=snn -device=cpu -split_dir=./splitted/ -dataset=cifar10\n```\n\n_For more details about each argument, try reaching our Github pages later._\n\n### cifarnet quick start\n\nImplement the following commands step by step to get quick results. We provide this part for quick access to the whole workflow of EC-SNN.\n\n```\n# training\npython ecsnn.py -arch=cifarnet -act=snn -device=cuda -train \npython ecsnn.py -arch=cifarnet -act=ann -device=cuda -train \npython ecsnn.py -arch=cifarnet -act=snn -prune -b=128 -split_dir=./splitted/ -device=cuda -apoz=95 -c 0 1 2 3 4 5 6 7 8 9\npython ecsnn.py -arch=cifarnet -act=ann -prune -b=128 -split_dir=./splitted/ -device=cuda -apoz=56 -c 0 1 2 3 4 5 6 7 8 9\npython ecsnn.py -arch=cifarnet -act=snn -fusion -split_dir=./splitted/ -device=cuda -b=128\npython ecsnn.py -arch=cifarnet -act=ann -fusion -split_dir=./splitted/ -device=cuda -b=128\n\n# latency\npython ecsnn.py -arch=cifarnet -act=snn -device=cuda -infer \npython ecsnn.py -arch=cifarnet -act=ann -device=cuda -infer \npython ecsnn.py -arch=cifarnet -act=snn -device=cuda -infer -split -split_dir=./splitted/\npython ecsnn.py -arch=cifarnet -act=ann -device=cuda -infer -split -split_dir=./splitted/\n\n# energy consumption\npython ecsnn.py -arch=cifarnet -act=snn -device=cuda -energy -b=128\npython ecsnn.py -arch=cifarnet -act=ann -device=cuda -energy -b=128\npython ecsnn.py -arch=cifarnet -act=snn -device=cuda -energy -split -split_dir=./splitted/ -b=128\npython ecsnn.py -arch=cifarnet -act=ann -device=cuda -energy -split -split_dir=./splitted/ -b=128\n```\n\n## Datasets\n\nYou can download experiment data and put them into the data folder. All data are available in the links below:\n\n - [CIFAR10](https://www.cs.toronto.edu/~kriz/cifar.html)\n - [Caltech 101](https://data.caltech.edu/records/mzrjq-6wc02)\n - [CIFAR10-DVS](https://figshare.com/articles/dataset/CIFAR10-DVS_New/4724671)\n - [N-Caltech101](https://www.garrickorchard.com/datasets/n-caltech101) (Recommend One Drive)\n - [GTZAN](https://www.kaggle.com/datasets/andradaolteanu/gtzan-dataset-music-genre-classification)\n - [UrbanSound8K](https://www.kaggle.com/datasets/chrisfilo/urbansound8k)\n\n## Cite\n\nPlease cite the following paper if you find our work contributes to yours in any way:\n\n```\n@inproceedings{ijcai2024p596,\n  title     = {EC-SNN: Splitting Deep Spiking Neural Networks for Edge Devices},\n  author    = {Yu, Di and Du, Xin and Jiang, Linshan and Tong, Wentao and Deng, Shuiguang},\n  booktitle = {Proceedings of the Thirty-Third International Joint Conference on\n               Artificial Intelligence, {IJCAI-24}},\n  pages     = {5389--5397},\n  year      = {2024} \n}\n```\n","funding_links":[],"categories":["Papers"],"sub_categories":["2024"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAmazingDD%2FEC-SNN","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAmazingDD%2FEC-SNN","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAmazingDD%2FEC-SNN/lists"}