A deep learning toolbox for spike-to-image models.
Project description
📖 About
⚡Spike-Zoo is the go-to library for state-of-the-art pretrained spike-to-image models designed to reconstruct images from spike streams. Whether you're looking for a simple inference solution or aiming to train your own spike-to-image models, ⚡Spike-Zoo is a modular toolbox that supports both, with key features including:
- Fast inference with pre-trained models.
- Training support for custom-designed spike-to-image models.
- Specialized functions for processing spike data.
We are highly looking forward to your advice on our project. We welcome any issues or code contributions and will respond within one day.
🚩 Updates/Changelog
- 25-02-02: Release the
Spike-Zoo v0.2code, which supports more methods, provide more usages like training your method from scratch. - 24-07-19: Release the
Spike-Zoo v0.1code for base evaluation of SOTA methods.
🍾 Quick Start
1. Installation
For users focused on utilizing pretrained models for spike-to-image conversion, we recommend installing SpikeZoo using one of the following methods:
- Install the last stable version
0.2.3.5from PyPI:
pip install spikezoo
- Install the latest developing version
0.2.3.6from the source code (recommended):
git clone https://github.com/chenkang455/Spike-Zoo
cd Spike-Zoo
python setup.py install
For users interested in training their own spike-to-image model based on our framework, we recommend cloning the repository and modifying the related code directly.
git clone https://github.com/chenkang455/Spike-Zoo
cd Spike-Zoo
python setup.py develop
2. Inference
Reconstructing images from the spike is super easy with Spike-Zoo. Try the following code of the single model:
from spikezoo.pipeline import Pipeline, PipelineConfig
import spikezoo as sz
pipeline = Pipeline(
cfg=PipelineConfig(save_folder="results",version="v023"),
model_cfg=sz.METHOD.BASE,
dataset_cfg=sz.DATASET.BASE
)
pipeline.infer_from_dataset(idx = 0)
3. Training
We provide a user-friendly code for training our provided BASE model (modified from the SpikeCLIP) for the classic REDS dataset introduced in Spk2ImgNet:
from spikezoo.pipeline import TrainPipelineConfig, TrainPipeline
from spikezoo.datasets.reds_base_dataset import REDS_BASEConfig
from spikezoo.models.base_model import BaseModelConfig
pipeline = TrainPipeline(
cfg=TrainPipelineConfig(save_folder="results", epochs = 10),
dataset_cfg=REDS_BASEConfig(root_dir = "spikezoo/data/reds_base"),
model_cfg=BaseModelConfig(),
)
pipeline.train()
We finish the training with one 4090 GPU in 2 minutes, achieving 32.8dB in PSNR and 0.92 in SSIM.
🌟 We encourage users to develop their models with simple modifications to our framework.
📚 How to navigate the documentation
| Link | Description |
|---|---|
| Quick Start | Learn how to quickly get started with the Spike-Zoo repository for inference and training. |
| Dataset | Learn the parameter configuration of datasets and how to construct them. |
| Model | Learn the parameter configuration of models and how to construct them. |
| Pipeline | Learn how to configure and construct the processing pipeline for models. |
| Released Version | Introduces the differences between different release versions of pre-trained weights. |
| Examples | Complete code examples for using Spike-Zoo. |
| Supports | Learn about the datasets and models supported by Spike-Zoo. |
📅 TODO
- Support the overall pipeline for spike simulation.
- Provide the tutorials.
- Support more training settings.
- Support more spike-based image reconstruction methods and datasets.
✨ Acknowledgment
Our code is built on the open-source projects of SpikeCV, IQA-Pytorch, BasicSR and NeRFStudio.We appreciate the effort of the contributors to these repositories. Thanks for @zhiwen_huang, @ruizhao26, @shiyan_chen and @Leozhangjiyuan for their help in building this project.
📑 Citation
If you find our codes helpful to your research, please consider to use the following citation:
@misc{spikezoo,
title={{Spike-Zoo}: A Toolbox for Spike-to-Image Reconstruction},
author={Kang Chen and Zhiyuan Ye and Tiejun Huang and Zhaofei Yu},
year={2025},
howpublished = {\url{https://github.com/chenkang455/Spike-Zoo}},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spikezoo-0.2.3.7.tar.gz.
File metadata
- Download URL: spikezoo-0.2.3.7.tar.gz
- Upload date:
- Size: 16.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2229c795934f4ae54ddb0f9cbe070aa833a074a160ecb598235829f560a6cf0d
|
|
| MD5 |
4bed44b8c2a038b4785bc671094472fa
|
|
| BLAKE2b-256 |
e85504be12802862d66856d294f4560a92c7022e716e4e071967bf6a40dafe49
|
File details
Details for the file spikezoo-0.2.3.7-py3-none-any.whl.
File metadata
- Download URL: spikezoo-0.2.3.7-py3-none-any.whl
- Upload date:
- Size: 16.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4dc7cb47e09f061e8023a3092de3b1bf937a72be32700547d9ed27089551e855
|
|
| MD5 |
f8171ff414ed73871dc03f499f8f534c
|
|
| BLAKE2b-256 |
438813809cfeeddb98d7b0dbedee8fdbd39bff248efbec5963309fe4cb064258
|