Skip to main content

GitHub repo stars GitHub Issues PyPI version Documentation StatusLicense

📖 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.2 code, which supports more methods, provide more usages like training your method from scratch.
  • 24-07-19: Release the Spike-Zoo v0.1 code 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.5 from PyPI:
pip install spikezoo
  • Install the latest developing version 0.2.3.6 from 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}},
}

Metadata

Release files for spikezoo 0.2.3.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spikezoo 0.2.3.7
File Size Uploaded Provenance Actions
spikezoo-0.2.3.7.tar.gz 16.2 MB Without provenance Details for spikezoo-0.2.3.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spikezoo 0.2.3.7
File Interpreter ABI Platform Actions
spikezoo-0.2.3.7-py3-none-any.whl Python 3 none any Details for spikezoo-0.2.3.7-py3-none-any.whl

Total release size: 32.6 MB

Release files / spikezoo-0.2.3.7.tar.gz

Download URL spikezoo-0.2.3.7.tar.gz
Size 16.2 MB
Tags Source
SHA-256 checksum
How to use checksums
2229c795934f4ae54ddb0f9cbe070aa833a074a160ecb598235829f560a6cf0d
BLAKE2b-256 checksum
How to use checksums
e85504be12802862d66856d294f4560a92c7022e716e4e071967bf6a40dafe49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release files / spikezoo-0.2.3.7-py3-none-any.whl

Download URL spikezoo-0.2.3.7-py3-none-any.whl
Size 16.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4dc7cb47e09f061e8023a3092de3b1bf937a72be32700547d9ed27089551e855
BLAKE2b-256 checksum
How to use checksums
438813809cfeeddb98d7b0dbedee8fdbd39bff248efbec5963309fe4cb064258
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Security for spikezoo 0.2.3.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page