Sparser Spiking Activity can be Better: Feature Refine-and-Mask Spiking Neural Network for Event-based Visual Recognition
- Python 3.7.4
- PyTorch 1.7.1
- numpy 1.19.2
- spikingjelly 0.0.0.0.12
- nni 2.5
Please see requirements.txt for more requirements.
- Download DVS128 Gesture and put the downloaded dataset to
/DVS128_Gesture/data, then run/DVS128_Gesture/data/DVS_Gesture.py.
/DVS128_Gesture/
│ ├── /data/
│ │ ├── DVS_Gesture.py
│ │ └── DvsGesture.tar.gz
- Change the values of T and dt in
/DVS128_Gesture/RM/Config.py,/DVS128_Gesture/CRM/Config.pyor/DVS128_Gesture/TRM/Config.pythen run the tasks in/DVS128Gesture.
eg:
python RM_main.py
- View the results in
/DVS128_Gesture/RM/Result/、/DVS128_Gesture/TRM/Result/or/DVS128_Gesture/CRM/Result/.
/module/RM.pydefines RM,TRM,CRM layer and/module/LIF.py,LIF_Module.pydefines LIF module.- Explain again if the parameters in the
Config.pyare different from the paper name
conifg.c_sparsity_ratio = 1 - beat_c
config.t_sparsity_ratio = 1 - beat_t
- If it produces an error like
RuntimeError: cuDNN error: CUDNN_STATUS_NOT_SUPPORTED. This error may appear if you passed in a non-contiguous input.
, please reduce the batch-size selected for this experimence.
see pytorch/pytorch#32564 (comment) for more info.
@article{yao2023sparser,
title={Sparser spiking activity can be better: Feature Refine-and-Mask spiking neural network for event-based visual recognition},
author={Yao, Man and Zhang, Hengyu and Zhao, Guangshe and Zhang, Xiyu and Wang, Dingheng and Cao, Gang and Li, Guoqi},
journal={Neural Networks},
volume={166},
pages={410--423},
year={2023},
publisher={Elsevier}
}