spikezoo 0.2.3.5__py3-none-any.whl → 0.2.3.6__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- spikezoo/archs/bsf/models/bsf/__pycache__/align.cpython-39.pyc +0 -0
- spikezoo/archs/bsf/models/bsf/__pycache__/bsf.cpython-39.pyc +0 -0
- spikezoo/archs/bsf/models/bsf/__pycache__/rep.cpython-39.pyc +0 -0
- spikezoo/archs/spikeclip/__pycache__/nets.cpython-39.pyc +0 -0
- spikezoo/archs/ssir/models/__pycache__/layers.cpython-39.pyc +0 -0
- spikezoo/archs/ssir/models/__pycache__/networks.cpython-39.pyc +0 -0
- spikezoo/archs/ssml/__pycache__/cbam.cpython-39.pyc +0 -0
- spikezoo/archs/ssml/__pycache__/model.cpython-39.pyc +0 -0
- spikezoo/archs/stir/metrics/__pycache__/losses.cpython-39.pyc +0 -0
- spikezoo/archs/stir/models/__pycache__/Vgg19.cpython-39.pyc +0 -0
- spikezoo/archs/stir/models/__pycache__/networks_STIR.cpython-39.pyc +0 -0
- spikezoo/archs/stir/models/__pycache__/submodules.cpython-39.pyc +0 -0
- spikezoo/archs/stir/models/__pycache__/transformer_new.cpython-39.pyc +0 -0
- spikezoo/archs/stir/package_core/package_core/__pycache__/__init__.cpython-39.pyc +0 -0
- spikezoo/archs/stir/package_core/package_core/__pycache__/geometry.cpython-39.pyc +0 -0
- spikezoo/archs/stir/package_core/package_core/__pycache__/image_proc.cpython-39.pyc +0 -0
- spikezoo/archs/stir/package_core/package_core/__pycache__/losses.cpython-39.pyc +0 -0
- spikezoo/archs/stir/package_core/package_core/__pycache__/net_basics.cpython-39.pyc +0 -0
- spikezoo/archs/tfi/__pycache__/nets.cpython-39.pyc +0 -0
- spikezoo/archs/tfp/__pycache__/nets.cpython-39.pyc +0 -0
- spikezoo/archs/wgse/__pycache__/dwtnets.cpython-39.pyc +0 -0
- spikezoo/archs/wgse/__pycache__/submodules.cpython-39.pyc +0 -0
- spikezoo/archs/yourmodel/arch/__pycache__/net.cpython-39.pyc +0 -0
- spikezoo/archs/yourmodel/arch/net.py +35 -0
- spikezoo/datasets/__init__.py +20 -21
- spikezoo/datasets/base_dataset.py +25 -19
- spikezoo/datasets/{realworld_dataset.py → realdata_dataset.py} +5 -7
- spikezoo/datasets/reds_base_dataset.py +1 -1
- spikezoo/datasets/szdata_dataset.py +1 -1
- spikezoo/datasets/uhsr_dataset.py +1 -1
- spikezoo/datasets/yourdataset_dataset.py +23 -0
- spikezoo/models/__init__.py +11 -18
- spikezoo/models/base_model.py +10 -4
- spikezoo/models/yourmodel_model.py +22 -0
- spikezoo/pipeline/base_pipeline.py +17 -10
- spikezoo/pipeline/ensemble_pipeline.py +2 -1
- spikezoo/pipeline/train_cfgs.py +3 -1
- spikezoo/pipeline/train_pipeline.py +12 -12
- spikezoo/utils/spike_utils.py +1 -1
- spikezoo-0.2.3.6.dist-info/METADATA +151 -0
- {spikezoo-0.2.3.5.dist-info → spikezoo-0.2.3.6.dist-info}/RECORD +44 -41
- spikezoo/data/base/train/spike/203_part4_key_id151.dat +0 -0
- spikezoo-0.2.3.5.dist-info/METADATA +0 -258
- {spikezoo-0.2.3.5.dist-info → spikezoo-0.2.3.6.dist-info}/LICENSE.txt +0 -0
- {spikezoo-0.2.3.5.dist-info → spikezoo-0.2.3.6.dist-info}/WHEEL +0 -0
- {spikezoo-0.2.3.5.dist-info → spikezoo-0.2.3.6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,151 @@
|
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: spikezoo
|
3
|
+
Version: 0.2.3.6
|
4
|
+
Summary: A deep learning toolbox for spike-to-image models.
|
5
|
+
Home-page: https://github.com/chenkang455/Spike-Zoo
|
6
|
+
Author: Kang Chen
|
7
|
+
Author-email: mrchenkang@stu.pku.edu.cn
|
8
|
+
Requires-Python: >=3.7
|
9
|
+
Description-Content-Type: text/markdown
|
10
|
+
License-File: LICENSE.txt
|
11
|
+
Requires-Dist: torch
|
12
|
+
Requires-Dist: requests
|
13
|
+
Requires-Dist: numpy
|
14
|
+
Requires-Dist: tqdm
|
15
|
+
Requires-Dist: scikit-image
|
16
|
+
Requires-Dist: lpips
|
17
|
+
Requires-Dist: pyiqa
|
18
|
+
Requires-Dist: opencv-python
|
19
|
+
Requires-Dist: thop
|
20
|
+
Requires-Dist: pytorch-wavelets
|
21
|
+
Requires-Dist: pytz
|
22
|
+
Requires-Dist: PyWavelets
|
23
|
+
Requires-Dist: pandas
|
24
|
+
Requires-Dist: pillow
|
25
|
+
Requires-Dist: scikit-learn
|
26
|
+
Requires-Dist: scipy
|
27
|
+
Requires-Dist: spikingjelly
|
28
|
+
Requires-Dist: setuptools
|
29
|
+
Dynamic: author
|
30
|
+
Dynamic: author-email
|
31
|
+
Dynamic: description
|
32
|
+
Dynamic: description-content-type
|
33
|
+
Dynamic: home-page
|
34
|
+
Dynamic: requires-dist
|
35
|
+
Dynamic: requires-python
|
36
|
+
Dynamic: summary
|
37
|
+
|
38
|
+
<p align="center">
|
39
|
+
<img src="imgs/spike-zoo.png" width="300"/>
|
40
|
+
<p>
|
41
|
+
|
42
|
+
<h5 align="center">
|
43
|
+
|
44
|
+
[](https://github.com/chenkang455/Spike-Zoo/stargazers) [](https://github.com/chenkang455/Spike-Zoo/issues) <a href="https://badge.fury.io/py/spikezoo"><img src="https://badge.fury.io/py/spikezoo.svg" alt="PyPI version"></a> <a href='https://spike-zoo.readthedocs.io/zh-cn/latest/index.html'><img src='https://readthedocs.com/projects/plenoptix-nerfstudio/badge/?version=latest' alt='Documentation Status' /></a>[](https://github.com/chenkang455/Spike-Zoo)
|
45
|
+
<p>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<!-- <h2 align="center">
|
50
|
+
<a href="">⚡Spike-Zoo:
|
51
|
+
</a>
|
52
|
+
</h2> -->
|
53
|
+
|
54
|
+
## 📖 About
|
55
|
+
⚡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:
|
56
|
+
|
57
|
+
- Fast inference with pre-trained models.
|
58
|
+
- Training support for custom-designed spike-to-image models.
|
59
|
+
- Specialized functions for processing spike data.
|
60
|
+
|
61
|
+
> We are highly looking forward to your advice on our project. We welcome any issues or code contributions and will respond within one day.
|
62
|
+
|
63
|
+
## 🚩 Updates/Changelog
|
64
|
+
* **25-02-02:** Release the `Spike-Zoo v0.2` code, which supports more methods, provide more usages like training your method from scratch.
|
65
|
+
* **24-07-19:** Release the `Spike-Zoo v0.1` code for base evaluation of SOTA methods.
|
66
|
+
|
67
|
+
## 🍾 Quick Start
|
68
|
+
### 1. Installation
|
69
|
+
For users focused on **utilizing pretrained models for spike-to-image conversion**, we recommend installing SpikeZoo using one of the following methods:
|
70
|
+
|
71
|
+
* Install the last stable version `0.2.3.5` from PyPI:
|
72
|
+
```
|
73
|
+
pip install spikezoo
|
74
|
+
```
|
75
|
+
* Install the latest developing version `0.2.3.6` from the source code **(recommended)**:
|
76
|
+
```
|
77
|
+
git clone https://github.com/chenkang455/Spike-Zoo
|
78
|
+
cd Spike-Zoo
|
79
|
+
python setup.py install
|
80
|
+
```
|
81
|
+
|
82
|
+
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.
|
83
|
+
```
|
84
|
+
git clone https://github.com/chenkang455/Spike-Zoo
|
85
|
+
cd Spike-Zoo
|
86
|
+
python setup.py develop
|
87
|
+
```
|
88
|
+
|
89
|
+
### 2. Inference
|
90
|
+
Reconstructing images from the spike is super easy with Spike-Zoo. Try the following code of the single model:
|
91
|
+
``` python
|
92
|
+
from spikezoo.pipeline import Pipeline, PipelineConfig
|
93
|
+
import spikezoo as sz
|
94
|
+
pipeline = Pipeline(
|
95
|
+
cfg=PipelineConfig(save_folder="results",version="v023"),
|
96
|
+
model_cfg=sz.METHOD.BASE,
|
97
|
+
dataset_cfg=sz.DATASET.BASE
|
98
|
+
)
|
99
|
+
pipeline.infer_from_dataset(idx = 0)
|
100
|
+
```
|
101
|
+
|
102
|
+
|
103
|
+
### 3. Training
|
104
|
+
We provide a user-friendly code for training our provided `BASE` model (modified from the `SpikeCLIP`) for the classic `REDS` dataset introduced in `Spk2ImgNet`:
|
105
|
+
``` python
|
106
|
+
from spikezoo.pipeline import TrainPipelineConfig, TrainPipeline
|
107
|
+
from spikezoo.datasets.reds_base_dataset import REDS_BASEConfig
|
108
|
+
from spikezoo.models.base_model import BaseModelConfig
|
109
|
+
pipeline = TrainPipeline(
|
110
|
+
cfg=TrainPipelineConfig(save_folder="results", epochs = 10),
|
111
|
+
dataset_cfg=REDS_BASEConfig(root_dir = "spikezoo/data/reds_base"),
|
112
|
+
model_cfg=BaseModelConfig(),
|
113
|
+
)
|
114
|
+
pipeline.train()
|
115
|
+
```
|
116
|
+
We finish the training with one 4090 GPU in `2 minutes`, achieving `32.8dB` in PSNR and `0.92` in SSIM.
|
117
|
+
|
118
|
+
> 🌟 We encourage users to develop their models with simple modifications to our framework.
|
119
|
+
|
120
|
+
## 📚 How to navigate the documentation
|
121
|
+
|
122
|
+
| **Link** | **Description** |
|
123
|
+
| --- | --- |
|
124
|
+
| [Quick Start](https://spike-zoo.readthedocs.io/zh-cn/latest/%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B.html) | Learn how to quickly get started with the Spike-Zoo repository for inference and training. |
|
125
|
+
| [Dataset](https://spike-zoo.readthedocs.io/zh-cn/latest/%E6%95%B0%E6%8D%AE%E9%9B%86.html) | Learn the parameter configuration of datasets and how to construct them. |
|
126
|
+
| [Model](https://spike-zoo.readthedocs.io/zh-cn/latest/%E6%A8%A1%E5%9E%8B.html) | Learn the parameter configuration of models and how to construct them. |
|
127
|
+
| [Pipeline](https://spike-zoo.readthedocs.io/zh-cn/latest/%E5%A4%84%E7%90%86%E7%AE%A1%E7%BA%BF.html) | Learn how to configure and construct the processing pipeline for models. |
|
128
|
+
| [Released Version](https://spike-zoo.readthedocs.io/zh-cn/latest/%E5%8F%91%E8%A1%8C%E7%89%88%E6%9C%AC%E4%BB%8B%E7%BB%8D.html) | Introduces the differences between different release versions of pre-trained weights. |
|
129
|
+
| [Examples](https://spike-zoo.readthedocs.io/zh-cn/latest/%E4%BD%BF%E7%94%A8%E4%BE%8B%E5%AD%90.html) | Complete code examples for using Spike-Zoo. |
|
130
|
+
| [Supports](https://spike-zoo.readthedocs.io/zh-cn/latest/%E6%94%AF%E6%8C%81%E8%8C%83%E5%9B%B4.html) | Learn about the datasets and models supported by Spike-Zoo. |
|
131
|
+
|
132
|
+
|
133
|
+
## 📅 TODO
|
134
|
+
- [x] Support the overall pipeline for spike simulation.
|
135
|
+
- [x] Provide the tutorials.
|
136
|
+
- [ ] Support more training settings.
|
137
|
+
- [ ] Support more spike-based image reconstruction methods and datasets.
|
138
|
+
|
139
|
+
## ✨ Acknowledgment
|
140
|
+
Our code is built on the open-source projects of [SpikeCV](https://spikecv.github.io/), [IQA-Pytorch](https://github.com/chaofengc/IQA-PyTorch), [BasicSR](https://github.com/XPixelGroup/BasicSR) and [NeRFStudio](https://github.com/nerfstudio-project/nerfstudio).We appreciate the effort of the contributors to these repositories. Thanks for [@zhiwen_huang](https://github.com/hzw-abc), [@ruizhao26](https://github.com/ruizhao26), [@shiyan_chen](https://github.com/hnmizuho) and [@Leozhangjiyuan](https://github.com/Leozhangjiyuan) for their help in building this project.
|
141
|
+
|
142
|
+
## 📑 Citation
|
143
|
+
If you find our codes helpful to your research, please consider to use the following citation:
|
144
|
+
```
|
145
|
+
@misc{spikezoo,
|
146
|
+
title={{Spike-Zoo}: A Toolbox for Spike-to-Image Reconstruction},
|
147
|
+
author={Kang Chen and Zhiyuan Ye and Tiejun Huang and Zhaofei Yu},
|
148
|
+
year={2025},
|
149
|
+
howpublished = {\url{https://github.com/chenkang455/Spike-Zoo}},
|
150
|
+
}
|
151
|
+
```
|
@@ -17,9 +17,9 @@ spikezoo/archs/bsf/models/bsf/align.py,sha256=X_Ud0oCZSYGFQ8DWvOG4yozUaDOJi4X44v
|
|
17
17
|
spikezoo/archs/bsf/models/bsf/bsf.py,sha256=W3xwHXcKODJqfSRc_Kn-7C_YjVGpse_mZ2tbrDJ6w0Q,4060
|
18
18
|
spikezoo/archs/bsf/models/bsf/dsft_convert.py,sha256=xpFwWFl1ms9LxaA96xdDOf-h_S6foScc3oh-nGjSG-o,3110
|
19
19
|
spikezoo/archs/bsf/models/bsf/rep.py,sha256=Y3YPADL6ndu4u7RwYUFqmGVUqzW0HbgXKu4Z7x52Alg,1660
|
20
|
-
spikezoo/archs/bsf/models/bsf/__pycache__/align.cpython-39.pyc,sha256=
|
21
|
-
spikezoo/archs/bsf/models/bsf/__pycache__/bsf.cpython-39.pyc,sha256=
|
22
|
-
spikezoo/archs/bsf/models/bsf/__pycache__/rep.cpython-39.pyc,sha256=
|
20
|
+
spikezoo/archs/bsf/models/bsf/__pycache__/align.cpython-39.pyc,sha256=pbkUwOtCPxn4PW4_BFAbNWLmRyRNSWFJdmvTXJWQUCg,7052
|
21
|
+
spikezoo/archs/bsf/models/bsf/__pycache__/bsf.cpython-39.pyc,sha256=apb2ppGeRQxEFysJkIzP_DmoFw5lqL3PyHPb26MYD8M,4597
|
22
|
+
spikezoo/archs/bsf/models/bsf/__pycache__/rep.cpython-39.pyc,sha256=s1I48hRhY2TCOpkQcJfZ7IWDxgA6YdJ9zqrZDfoRyRY,1840
|
23
23
|
spikezoo/archs/bsf/prepare_data/DSFT.py,sha256=RDFREQc-pAGxpETgb1umjQNnLAmpqsRpEmsrjrG4hEU,2203
|
24
24
|
spikezoo/archs/bsf/prepare_data/crop_dataset_train.py,sha256=CpKIhI8kc5TzWMGSHY33IlROBTrXrY0kVGxKLvwjcvo,6050
|
25
25
|
spikezoo/archs/bsf/prepare_data/crop_dataset_val.py,sha256=Zrfe2rsnHXB-TikO9J6s0SL_u0jg492NgXSCebgvK5A,6009
|
@@ -27,7 +27,7 @@ spikezoo/archs/bsf/prepare_data/crop_train.sh,sha256=VoIqvQ1TWSj5uvkcp6EZIo28egI
|
|
27
27
|
spikezoo/archs/bsf/prepare_data/crop_val.sh,sha256=PY45EGOvdn89hAUWmeIwHrzzMWmwBbqGYgh0y5oYzP4,185
|
28
28
|
spikezoo/archs/bsf/prepare_data/io_utils.py,sha256=GUs7ocNekOKMSfMNjHAWbZFSOWXiLRtboQLl5NiY-CI,1850
|
29
29
|
spikezoo/archs/spikeclip/nets.py,sha256=j2rPD3AFWLl142XxmQL4PxWw06f4gHi8zjBUjndJ8pQ,1433
|
30
|
-
spikezoo/archs/spikeclip/__pycache__/nets.cpython-39.pyc,sha256=
|
30
|
+
spikezoo/archs/spikeclip/__pycache__/nets.cpython-39.pyc,sha256=BR8bGBf3nJ1fQbTpNZV1xelHOxrg5D5XEu731h0WYI0,1540
|
31
31
|
spikezoo/archs/spk2imgnet/.gitignore,sha256=LvYh4-uHW8ZL6P5S7I6f35ZaKULvuVoBQ06ia6r1llM,2148
|
32
32
|
spikezoo/archs/spk2imgnet/DCNv2.py,sha256=KqAWzoOQFX1eEqaIP90Ahhj88qvk2K-J21WyzOMQwt4,4715
|
33
33
|
spikezoo/archs/spk2imgnet/align_arch.py,sha256=NpEDZy4YX2JD6mNrw1FOfyPpMqQ866ylYktl-kRzwIU,6264
|
@@ -56,16 +56,16 @@ spikezoo/archs/ssir/metrics/ssim.py,sha256=RxVoEMJPgu370DWfDRE01UnTOorh-Xy0DldXQ
|
|
56
56
|
spikezoo/archs/ssir/models/Vgg19.py,sha256=BKYf51YqQantkuxGM5S3yD2a5Pf2nYBzEfmA0XqTjGU,1435
|
57
57
|
spikezoo/archs/ssir/models/layers.py,sha256=gYShN5cp3B1GaNmQD5_6CpYSt6k6h0cZ5IJNtrt0dCw,3450
|
58
58
|
spikezoo/archs/ssir/models/networks.py,sha256=-qwwwC9SWcOzf_TcswnudoOVSjZNvRMiAg5-NRDl14I,1946
|
59
|
-
spikezoo/archs/ssir/models/__pycache__/layers.cpython-39.pyc,sha256
|
60
|
-
spikezoo/archs/ssir/models/__pycache__/networks.cpython-39.pyc,sha256=
|
59
|
+
spikezoo/archs/ssir/models/__pycache__/layers.cpython-39.pyc,sha256=-6VcAI1eOjeS2fEX8QdKaZWUtjz3uIn_72UdjjLaYZQ,3723
|
60
|
+
spikezoo/archs/ssir/models/__pycache__/networks.cpython-39.pyc,sha256=d-gjTkm_9niMtVqqxAx4V-sZ-ryH6he0c9nqEfmuimY,2767
|
61
61
|
spikezoo/archs/ssir/shells/eval_SREDS.sh,sha256=byjDfNb_NAO8z28L7Laktlc3qYZjfeY5qn0pkMmql9E,112
|
62
62
|
spikezoo/archs/ssir/shells/train_SSIR.sh,sha256=y-LlaWNqOKwGUXKm2NodCgM3LYOIans25kN7CgDJ9z4,256
|
63
63
|
spikezoo/archs/ssml/cbam.py,sha256=hfVI1vYpboEPRBMKWqWjVlqX41XQi7A4Pwou5PJlPXo,8869
|
64
64
|
spikezoo/archs/ssml/model.py,sha256=DqTwDbwS7diZPxjVz580lAarPeZZ43EtaNjMJWN2Ujo,10354
|
65
65
|
spikezoo/archs/ssml/res.png,sha256=o8VLsy8-znCM9ZoSbsBmV3dTd8O0R48JWyNtuIekQIY,37233
|
66
66
|
spikezoo/archs/ssml/test.py,sha256=3yrMAWDBdhpyVjqNeuDtz1s2XemrR9ZXZDo8yTUAfac,2036
|
67
|
-
spikezoo/archs/ssml/__pycache__/cbam.cpython-39.pyc,sha256=
|
68
|
-
spikezoo/archs/ssml/__pycache__/model.cpython-39.pyc,sha256=
|
67
|
+
spikezoo/archs/ssml/__pycache__/cbam.cpython-39.pyc,sha256=MKRjeqcCxFjOCPycMLxVevG2L2iGHyRDUc7qtbyxxpM,8648
|
68
|
+
spikezoo/archs/ssml/__pycache__/model.cpython-39.pyc,sha256=nR7-aDdNCSMY4zl5bn9PgG3-cd35utWDA6d7N16okxM,10245
|
69
69
|
spikezoo/archs/stir/.git-credentials,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
70
70
|
spikezoo/archs/stir/README.md,sha256=WA0QvTGiH8kDQ4mNwj4lnZHypKSDVf_UWXckXnXltJc,3223
|
71
71
|
spikezoo/archs/stir/eval_SREDS.sh,sha256=dihTfrrr0jbkXEbpEStKgsk-t5L_4ehu9mpeMliJbME,144
|
@@ -81,15 +81,15 @@ spikezoo/archs/stir/datasets/ds_utils.py,sha256=RfQyC_8Y50-R-xnxlGooNwAoaTvviIlS
|
|
81
81
|
spikezoo/archs/stir/metrics/losses.py,sha256=pOs0XYZuKPIjppWwEmx8CXpDPqhq5QcR0NMMUZUR01o,7768
|
82
82
|
spikezoo/archs/stir/metrics/psnr.py,sha256=OntyhZtYIKEbdy5w-qwkl6mBt767W5pitDEjMmnqjRo,707
|
83
83
|
spikezoo/archs/stir/metrics/ssim.py,sha256=RxVoEMJPgu370DWfDRE01UnTOorh-Xy0DldXQFhAi4o,1818
|
84
|
-
spikezoo/archs/stir/metrics/__pycache__/losses.cpython-39.pyc,sha256=
|
84
|
+
spikezoo/archs/stir/metrics/__pycache__/losses.cpython-39.pyc,sha256=c9hI_0Cdlx1UlLrD01DH5KnSxwtHHPxYD4IQRQWHEn0,8128
|
85
85
|
spikezoo/archs/stir/models/Vgg19.py,sha256=BKYf51YqQantkuxGM5S3yD2a5Pf2nYBzEfmA0XqTjGU,1435
|
86
86
|
spikezoo/archs/stir/models/networks_STIR.py,sha256=dU19BT2sAZMa-avJPdQvC48orMFUYsE05ZzWPIZA9Sg,15746
|
87
87
|
spikezoo/archs/stir/models/submodules.py,sha256=gr0W8_ghP6pF5E5M1Ii58XYXOzR5ox8n0Xoh0vDAv6c,3360
|
88
88
|
spikezoo/archs/stir/models/transformer_new.py,sha256=INZFO156bD4A0t5agChPT87uPDJXiu9gibXMORZgzxk,6343
|
89
|
-
spikezoo/archs/stir/models/__pycache__/Vgg19.cpython-39.pyc,sha256=
|
90
|
-
spikezoo/archs/stir/models/__pycache__/networks_STIR.cpython-39.pyc,sha256=
|
91
|
-
spikezoo/archs/stir/models/__pycache__/submodules.cpython-39.pyc,sha256=
|
92
|
-
spikezoo/archs/stir/models/__pycache__/transformer_new.cpython-39.pyc,sha256=
|
89
|
+
spikezoo/archs/stir/models/__pycache__/Vgg19.cpython-39.pyc,sha256=VDE9mgcVkIL7K_WdmvkDK_kao2UsbRQE4RkEzvrMe1A,1785
|
90
|
+
spikezoo/archs/stir/models/__pycache__/networks_STIR.cpython-39.pyc,sha256=EbnGqo_fIvKUQTCiCbCSbWbejAt3UIGJeCp-ayzSW8Q,13500
|
91
|
+
spikezoo/archs/stir/models/__pycache__/submodules.cpython-39.pyc,sha256=L8EXiJOsmli__ISh-qNM6aP4Dft1JESMCIPkUTy07dU,3610
|
92
|
+
spikezoo/archs/stir/models/__pycache__/transformer_new.cpython-39.pyc,sha256=55PLJlsRGLtbQNqasfmTD184U-1vuVoHNG0VKWO3p3M,5909
|
93
93
|
spikezoo/archs/stir/package_core/setup.py,sha256=l0ZAYjzpqI6IvNFm5pHOmf5jmapFXqJSdOk8SBNupc0,112
|
94
94
|
spikezoo/archs/stir/package_core/build/lib/package_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
95
95
|
spikezoo/archs/stir/package_core/build/lib/package_core/convertions.py,sha256=aKnq_wJ8sddEI2T0ITxukpDdiKsdt-zf3nzM2CHFxGs,26159
|
@@ -122,19 +122,19 @@ spikezoo/archs/stir/package_core/package_core/net_basics.py,sha256=QX_5zlC5-_ITT
|
|
122
122
|
spikezoo/archs/stir/package_core/package_core/resnet.py,sha256=l93GwsKVBl75tUMYLZWkzZjNhO3B_Yoissb3oUdq3zE,13627
|
123
123
|
spikezoo/archs/stir/package_core/package_core/transforms.py,sha256=_hE5Y6EWsxacwcfdI1jS-wCvwGkA32-k-4XLPVhquDY,3779
|
124
124
|
spikezoo/archs/stir/package_core/package_core/utils.py,sha256=icSibxXKqEZyHL8GU1J0PMahCfxwVSwBtLGW_kHV25g,2316
|
125
|
-
spikezoo/archs/stir/package_core/package_core/__pycache__/__init__.cpython-39.pyc,sha256=
|
126
|
-
spikezoo/archs/stir/package_core/package_core/__pycache__/geometry.cpython-39.pyc,sha256=
|
127
|
-
spikezoo/archs/stir/package_core/package_core/__pycache__/image_proc.cpython-39.pyc,sha256=
|
128
|
-
spikezoo/archs/stir/package_core/package_core/__pycache__/losses.cpython-39.pyc,sha256
|
129
|
-
spikezoo/archs/stir/package_core/package_core/__pycache__/net_basics.cpython-39.pyc,sha256=
|
125
|
+
spikezoo/archs/stir/package_core/package_core/__pycache__/__init__.cpython-39.pyc,sha256=nL5bQDd5cKPCL-NbX6qizVTANK4wBBIfvin5XgZOVFU,176
|
126
|
+
spikezoo/archs/stir/package_core/package_core/__pycache__/geometry.cpython-39.pyc,sha256=L5BcfIHTOSPBCFx3intGQ7z8wUSvRPHdJdditkcKU9Y,16083
|
127
|
+
spikezoo/archs/stir/package_core/package_core/__pycache__/image_proc.cpython-39.pyc,sha256=QdvlUz4W7OtHVm61YKEfVuViVWYJ2B76JSSLvYMcPOc,5905
|
128
|
+
spikezoo/archs/stir/package_core/package_core/__pycache__/losses.cpython-39.pyc,sha256=-Kme3mAnjTyDQHv-M-84OGJy0NQiavWq6WVnCO2BQgE,7313
|
129
|
+
spikezoo/archs/stir/package_core/package_core/__pycache__/net_basics.cpython-39.pyc,sha256=fg_-TnR3RNrW1r57kMehuYtqRTvDXXI3Ld2XXVhJJ2Y,3592
|
130
130
|
spikezoo/archs/stir/package_core/package_core.egg-info/PKG-INFO,sha256=2njov-JTXZp2Sgwyx7KSL0fIPNyOR-lUYSSxIiDQH_Q,56
|
131
131
|
spikezoo/archs/stir/package_core/package_core.egg-info/SOURCES.txt,sha256=rTCDnAkAo4JuMaJgXeumnUODeQBpefgwT-dqrIUXoRc,541
|
132
132
|
spikezoo/archs/stir/package_core/package_core.egg-info/dependency_links.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
133
133
|
spikezoo/archs/stir/package_core/package_core.egg-info/top_level.txt,sha256=ezjGZVvZhOw8f-HRDngFtMvGh0NfvyT3sKcG4sSOSoc,13
|
134
134
|
spikezoo/archs/tfi/nets.py,sha256=IpXGoemHjan6FpFZjt2VU-pWE6AptsTlCFf20ha86zo,1382
|
135
|
-
spikezoo/archs/tfi/__pycache__/nets.cpython-39.pyc,sha256
|
135
|
+
spikezoo/archs/tfi/__pycache__/nets.cpython-39.pyc,sha256=-B9-u_KmQUYeNYjMEsWyb6zRLDXnkyNf_jDuZqTR7E4,1377
|
136
136
|
spikezoo/archs/tfp/nets.py,sha256=mNngiPBEXcNH4yP6PiwOgsTS8dOhHvdnXq-UNuhfpxY,388
|
137
|
-
spikezoo/archs/tfp/__pycache__/nets.cpython-39.pyc,sha256=
|
137
|
+
spikezoo/archs/tfp/__pycache__/nets.cpython-39.pyc,sha256=vtVl1aBfY0Qm2NvObODNEcuuTxksmet7Y00Kt9l_9fw,831
|
138
138
|
spikezoo/archs/wgse/README.md,sha256=vUKBdCOV1MMr3ZqfXgiim99dYTERinrkzejhY-uwoiQ,3151
|
139
139
|
spikezoo/archs/wgse/dataset.py,sha256=pCvOrFRHn7tCku1bAi9vLL_tPIZQnwj57mfvSjnwFgc,1822
|
140
140
|
spikezoo/archs/wgse/demo.png,sha256=6SdZmRf6WYd6OHa1ll0F8msbnR_gsHiuqR3OLmYi1fU,64157
|
@@ -145,10 +145,12 @@ spikezoo/archs/wgse/submodules.py,sha256=qFsOnAFx7uwvIo9ymUPm3Yo6JvYnZYhrnnJyqFo
|
|
145
145
|
spikezoo/archs/wgse/train.py,sha256=8y8rjTuTFiSnYR6wWibk_mTszsINV995BoO8nxR_u18,9361
|
146
146
|
spikezoo/archs/wgse/transform.py,sha256=bX3jPacCJdOo1FZmDgIZgS5DWrkUs3kw8njJeHh0NLQ,4532
|
147
147
|
spikezoo/archs/wgse/utils.py,sha256=UXTo8HoeB4BwSLXSbi3AyM1tokPnJ--Giz9ln2Yr0nQ,3892
|
148
|
-
spikezoo/archs/wgse/__pycache__/dwtnets.cpython-39.pyc,sha256=
|
149
|
-
spikezoo/archs/wgse/__pycache__/submodules.cpython-39.pyc,sha256=
|
148
|
+
spikezoo/archs/wgse/__pycache__/dwtnets.cpython-39.pyc,sha256=9BVPES7bGhvlvFNM1RKtVXHN6BM0dKgKKrQIrZbgG-8,3772
|
149
|
+
spikezoo/archs/wgse/__pycache__/submodules.cpython-39.pyc,sha256=ASBTP9PgidG0Urujsjip3Tm8djwhv_aNfUReojomNPE,2149
|
150
150
|
spikezoo/archs/wgse/logs/WGSE-Dwt1dNet-db8-5-ks3/log.txt,sha256=99XvHRXAhKc8E6JwP8fFBBjjFFEvrtOL2y17ibYXiZc,990
|
151
151
|
spikezoo/archs/wgse/weights/demo.png,sha256=jy3xM3Fe_A4b79wbxHoiPGHzMmfK_LMcMs3Y9nT1i3o,69728
|
152
|
+
spikezoo/archs/yourmodel/arch/net.py,sha256=fmE845mJeZe063FZVdrYWLg8HxNy9sRiyRqFu6B0ly4,1328
|
153
|
+
spikezoo/archs/yourmodel/arch/__pycache__/net.cpython-39.pyc,sha256=JQNXJGFl_t66Uar2ncx6Ge0GgIxkBpdDvhGjMUvCc8w,1563
|
152
154
|
spikezoo/data/base/test/gt/200_part1_key_id151.png,sha256=hkKTqpvv1Ms_xjcP3lQ2pyTswiCM1I7YLKR_ANqD5Bk,52637
|
153
155
|
spikezoo/data/base/test/gt/200_part3_key_id151.png,sha256=e4IpWztmpQ6WDDpfzorLo3Uo17ZECQX7fImLXRJHwcc,58482
|
154
156
|
spikezoo/data/base/test/gt/203_part1_key_id151.png,sha256=x5hItKgaMmpk3yejx5gy2DE2ewQVCphs7gZeqRHhsWQ,65368
|
@@ -160,16 +162,16 @@ spikezoo/data/base/train/gt/203_part3_key_id151.png,sha256=HqUeySlLeuJyjRj3NKjy0
|
|
160
162
|
spikezoo/data/base/train/gt/203_part4_key_id151.png,sha256=xUfdlXNWdPlRshLOaEF6ug1lIbx_gGphTxzDOnf6f5Y,56719
|
161
163
|
spikezoo/data/base/train/spike/203_part2_key_id151.dat,sha256=YEenLmbPvcxnKkVn3O7yDVYb-UwpM5OPlRhxVWLYy3Q,3762500
|
162
164
|
spikezoo/data/base/train/spike/203_part3_key_id151.dat,sha256=MY9nM6XzKj-P-tRQ33WZ3G5xulNTpAXKP0y8ZQo7AIQ,3762500
|
163
|
-
spikezoo/
|
164
|
-
spikezoo/datasets/
|
165
|
-
spikezoo/datasets/
|
166
|
-
spikezoo/datasets/
|
167
|
-
spikezoo/datasets/
|
168
|
-
spikezoo/datasets/
|
169
|
-
spikezoo/datasets/
|
165
|
+
spikezoo/datasets/__init__.py,sha256=Og7DF0_cRP3DfsxHaletOyJrNoNB3rbIoCAYsgdQ2fA,3089
|
166
|
+
spikezoo/datasets/base_dataset.py,sha256=qUdIPZHO72vtP6IvIZplWn5oSSpzA_mAmQW9RJje7fY,6196
|
167
|
+
spikezoo/datasets/realdata_dataset.py,sha256=zx9_2U5a97Giqcx13WcGjB4Ra1qdNxO1r0fHauU3v3w,708
|
168
|
+
spikezoo/datasets/reds_base_dataset.py,sha256=1OpawE_RkpuB94O8eRNRb9LafGWJC01KgVlqB-r-3SE,859
|
169
|
+
spikezoo/datasets/szdata_dataset.py,sha256=CMQjhE_pkymhy-v-HHudrMm2tpIXk6-uSvoy9S4UX0U,702
|
170
|
+
spikezoo/datasets/uhsr_dataset.py,sha256=q9HYME5jE4uFpk5rbDVc1D4HYltqnRpRqLkcKyGoWj0,1186
|
171
|
+
spikezoo/datasets/yourdataset_dataset.py,sha256=ZusR3BhI5OzvVQGvyxAzb7OQ_sT_dCX0Oo7SiaLVHvw,774
|
170
172
|
spikezoo/metrics/__init__.py,sha256=LIKeWNeEMZLANITQD68XJBOhDq7iHiKC7ExtdrXMyQs,3273
|
171
|
-
spikezoo/models/__init__.py,sha256=
|
172
|
-
spikezoo/models/base_model.py,sha256=
|
173
|
+
spikezoo/models/__init__.py,sha256=EQIbmYz8p1u1ukHR-f52GYCSc0sMNo-SgJ9082nuJHo,1852
|
174
|
+
spikezoo/models/base_model.py,sha256=DBQYNORkLBpLhwMzivizFckHkDrYNmwWeM7a3mIVmYU,9521
|
173
175
|
spikezoo/models/bsf_model.py,sha256=yfVin-vctA2w9HoaivVWMMVGpGrH_LnbVc0DeSY9pTk,3922
|
174
176
|
spikezoo/models/spcsnet_model.py,sha256=kLzv-ASXZGnqEFx0jUBONBeRCrsnQ_omkQUYEnr6uJc,540
|
175
177
|
spikezoo/models/spikeclip_model.py,sha256=Ej84RuYbkFRthtBMV1JtmTkUshAqINlrrJ7yiKIsC9s,1125
|
@@ -180,21 +182,22 @@ spikezoo/models/stir_model.py,sha256=GvVrsuQmElxKsRgsvPmq-tygOEauUYYbvMbYPSKV_Mo
|
|
180
182
|
spikezoo/models/tfi_model.py,sha256=tgD_HsiXk9jGuh5f_Bh6c3BqJi1p5DWCVo4N1tp5fgs,663
|
181
183
|
spikezoo/models/tfp_model.py,sha256=ihl1H__bWIbE9oair_t8rNJ5qnPJPKl-r_DpaO-0Sdk,663
|
182
184
|
spikezoo/models/wgse_model.py,sha256=DyKcteSRbu5qPs38g_G9WpxNbVW7RXTe3DYq-ZiBoEc,755
|
185
|
+
spikezoo/models/yourmodel_model.py,sha256=mQ3hRsDbHovxL6NhsxAKO-W3tvx5WwAHRZDyyGqFtfA,765
|
183
186
|
spikezoo/pipeline/__init__.py,sha256=WPsukNR4cannwsghiukqNsWbWGH5DVPapR_Ly-WOU4Q,188
|
184
|
-
spikezoo/pipeline/base_pipeline.py,sha256=
|
185
|
-
spikezoo/pipeline/ensemble_pipeline.py,sha256=
|
186
|
-
spikezoo/pipeline/train_cfgs.py,sha256=
|
187
|
-
spikezoo/pipeline/train_pipeline.py,sha256=
|
187
|
+
spikezoo/pipeline/base_pipeline.py,sha256=9-0vt70x2oftLlNvzRmmLIhnJZ9MtenFiZjQEZn3x58,13625
|
188
|
+
spikezoo/pipeline/ensemble_pipeline.py,sha256=cn-QzK-j7T9B43ONsRTr-lJQkquRyDSJfU9gutEO6nk,2614
|
189
|
+
spikezoo/pipeline/train_cfgs.py,sha256=OGFEZPVv1oncLVZTKgavgPyhKhGkWWfsJbggtwEnU8E,3027
|
190
|
+
spikezoo/pipeline/train_pipeline.py,sha256=bc33cvHA4LQPZVMWc6jN2alX-VtrhqLw4q9skL9xXeo,8407
|
188
191
|
spikezoo/utils/__init__.py,sha256=bYLlusAXwLCoY4s6nhVgviax9ioRA9aea8qgRmj2HpI,152
|
189
192
|
spikezoo/utils/data_utils.py,sha256=mk1xeyIb7o_E1J7Z6-gtPq-rpKiMTxAWSTcvvPvVku8,2033
|
190
193
|
spikezoo/utils/img_utils.py,sha256=0O9z58VzLxQEAuz-GGWCbpeHuHPOCpgBVjCBV9kf6sI,2257
|
191
194
|
spikezoo/utils/optimizer_utils.py,sha256=jvcd4zTY2LCJH6wCwOZ0lsAuJQm6LIVzbprLO3ojYCY,744
|
192
195
|
spikezoo/utils/other_utils.py,sha256=uWNWaII9Jv7fkWNfkAD9wD-4ID-GAzbR-gGYT-1FF_c,3360
|
193
196
|
spikezoo/utils/scheduler_utils.py,sha256=5RBh-hl3-2y-IomxMs47T1p3JsbicZNYLza6q1uAKHo,828
|
194
|
-
spikezoo/utils/spike_utils.py,sha256=
|
197
|
+
spikezoo/utils/spike_utils.py,sha256=XBFo3JOiNeyAQhsdgd_e6v9vVSViHx8DzN0hO3SbxnE,4300
|
195
198
|
spikezoo/utils/vidar_loader.cpython-39-x86_64-linux-gnu.so,sha256=uXqu7ME---cZRRU5LUcLiNrjjtlOjxNwWHyTIQ10BGg,199088
|
196
|
-
spikezoo-0.2.3.
|
197
|
-
spikezoo-0.2.3.
|
198
|
-
spikezoo-0.2.3.
|
199
|
-
spikezoo-0.2.3.
|
200
|
-
spikezoo-0.2.3.
|
199
|
+
spikezoo-0.2.3.6.dist-info/LICENSE.txt,sha256=ukEi8E0PKq1dQGTXHUflg3rppLymwAhr7il9x-0nPgg,1062
|
200
|
+
spikezoo-0.2.3.6.dist-info/METADATA,sha256=cIUeNrBfmQ6UFJ9KEsw1Vrgdsamd_3ZFvnx_E_WhFRM,7204
|
201
|
+
spikezoo-0.2.3.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
202
|
+
spikezoo-0.2.3.6.dist-info/top_level.txt,sha256=xF2iuOstrACJh43NW4dsTwIdgKfXPXAb_Xzl3M1ricM,9
|
203
|
+
spikezoo-0.2.3.6.dist-info/RECORD,,
|
Binary file
|
@@ -1,258 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.2
|
2
|
-
Name: spikezoo
|
3
|
-
Version: 0.2.3.5
|
4
|
-
Summary: A deep learning toolbox for spike-to-image models.
|
5
|
-
Home-page: https://github.com/chenkang455/Spike-Zoo
|
6
|
-
Author: Kang Chen
|
7
|
-
Author-email: mrchenkang@stu.pku.edu.cn
|
8
|
-
Requires-Python: >=3.7
|
9
|
-
Description-Content-Type: text/markdown
|
10
|
-
License-File: LICENSE.txt
|
11
|
-
Requires-Dist: torch
|
12
|
-
Requires-Dist: requests
|
13
|
-
Requires-Dist: numpy
|
14
|
-
Requires-Dist: tqdm
|
15
|
-
Requires-Dist: scikit-image
|
16
|
-
Requires-Dist: lpips
|
17
|
-
Requires-Dist: pyiqa
|
18
|
-
Requires-Dist: opencv-python
|
19
|
-
Requires-Dist: thop
|
20
|
-
Requires-Dist: pytorch-wavelets
|
21
|
-
Requires-Dist: pytz
|
22
|
-
Requires-Dist: PyWavelets
|
23
|
-
Requires-Dist: pandas
|
24
|
-
Requires-Dist: pillow
|
25
|
-
Requires-Dist: scikit-learn
|
26
|
-
Requires-Dist: scipy
|
27
|
-
Requires-Dist: spikingjelly
|
28
|
-
Requires-Dist: setuptools
|
29
|
-
Dynamic: author
|
30
|
-
Dynamic: author-email
|
31
|
-
Dynamic: description
|
32
|
-
Dynamic: description-content-type
|
33
|
-
Dynamic: home-page
|
34
|
-
Dynamic: requires-dist
|
35
|
-
Dynamic: requires-python
|
36
|
-
Dynamic: summary
|
37
|
-
|
38
|
-
<p align="center">
|
39
|
-
<img src="imgs/spike-zoo.png" width="350"/>
|
40
|
-
<p>
|
41
|
-
<h5 align="center">
|
42
|
-
|
43
|
-
[](https://github.com/chenkang455/Spike-Zoo/stargazers) [](https://github.com/chenkang455/Spike-Zoo/issues) <a href="https://badge.fury.io/py/spikezoo"><img src="https://badge.fury.io/py/spikezoo.svg" alt="PyPI version"></a> [](https://github.com/chenkang455/Spike-Zoo)
|
44
|
-
<p>
|
45
|
-
|
46
|
-
<!-- <h2 align="center">
|
47
|
-
<a href="">⚡Spike-Zoo: A Toolbox for Spike-to-Image Reconstruction
|
48
|
-
</a>
|
49
|
-
</h2> -->
|
50
|
-
|
51
|
-
## 📖 About
|
52
|
-
⚡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:
|
53
|
-
|
54
|
-
- Fast inference with pre-trained models.
|
55
|
-
- Training support for custom-designed spike-to-image models.
|
56
|
-
- Specialized functions for processing spike data.
|
57
|
-
|
58
|
-
> 📚Tutorials: https://spike-zoo.readthedocs.io/zh-cn/latest/#
|
59
|
-
|
60
|
-
## 🚩 Updates/Changelog
|
61
|
-
* **25-02-02:** Release the `Spike-Zoo v0.2` code, which supports more methods, provide more usages like training your method from scratch.
|
62
|
-
* **24-07-19:** Release the `Spike-Zoo v0.1` code for base evaluation of SOTA methods.
|
63
|
-
|
64
|
-
## 🍾 Quick Start
|
65
|
-
### 1. Installation
|
66
|
-
For users focused on **utilizing pretrained models for spike-to-image conversion**, we recommend installing SpikeZoo using one of the following methods:
|
67
|
-
|
68
|
-
* Install the last stable version `0.2.3` from PyPI:
|
69
|
-
```
|
70
|
-
pip install spikezoo
|
71
|
-
```
|
72
|
-
* Install the latest developing version `0.2.3` from the source code :
|
73
|
-
```
|
74
|
-
git clone https://github.com/chenkang455/Spike-Zoo
|
75
|
-
cd Spike-Zoo
|
76
|
-
python setup.py install
|
77
|
-
```
|
78
|
-
|
79
|
-
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.
|
80
|
-
```
|
81
|
-
git clone https://github.com/chenkang455/Spike-Zoo
|
82
|
-
cd Spike-Zoo
|
83
|
-
python setup.py develop
|
84
|
-
```
|
85
|
-
|
86
|
-
### 2. Inference
|
87
|
-
Reconstructing images from the spike is super easy with Spike-Zoo. Try the following code of the single model:
|
88
|
-
``` python
|
89
|
-
from spikezoo.pipeline import Pipeline, PipelineConfig
|
90
|
-
import spikezoo as sz
|
91
|
-
pipeline = Pipeline(
|
92
|
-
cfg=PipelineConfig(save_folder="results",version="v023"),
|
93
|
-
model_cfg=sz.METHOD.BASE,
|
94
|
-
dataset_cfg=sz.DATASET.BASE
|
95
|
-
)
|
96
|
-
```
|
97
|
-
You can also run multiple models at once by changing the pipeline (version parameter corresponds to our released different versions in [Releases](https://github.com/chenkang455/Spike-Zoo/releases)):
|
98
|
-
``` python
|
99
|
-
import spikezoo as sz
|
100
|
-
from spikezoo.pipeline import EnsemblePipeline, EnsemblePipelineConfig
|
101
|
-
pipeline = EnsemblePipeline(
|
102
|
-
cfg=EnsemblePipelineConfig(save_folder="results",version="v023"),
|
103
|
-
model_cfg_list=[
|
104
|
-
sz.METHOD.BASE,sz.METHOD.TFP,sz.METHOD.TFI,sz.METHOD.SPK2IMGNET,sz.METHOD.WGSE,
|
105
|
-
sz.METHOD.SSML,sz.METHOD.BSF,sz.METHOD.STIR,sz.METHOD.SPIKECLIP,sz.METHOD.SSIR],
|
106
|
-
dataset_cfg=sz.DATASET.BASE,
|
107
|
-
)
|
108
|
-
```
|
109
|
-
Having established our pipelines, we provide following functions to enjoy these spike-to-image models.
|
110
|
-
|
111
|
-
* I. Obtain the restoration metric and save the recovered image from the given spike:
|
112
|
-
``` python
|
113
|
-
# 1. spike-to-image from the given dataset
|
114
|
-
pipeline.infer_from_dataset(idx = 0)
|
115
|
-
|
116
|
-
# 2. spike-to-image from the given .dat file
|
117
|
-
pipeline.infer_from_file(file_path = 'data/scissor.dat',width = 400,height=250)
|
118
|
-
|
119
|
-
# 3. spike-to-image from the given spike
|
120
|
-
spike = sz.load_vidar_dat("data/scissor.dat",width = 400,height = 250)
|
121
|
-
pipeline.infer_from_spk(spike)
|
122
|
-
```
|
123
|
-
|
124
|
-
|
125
|
-
* II. Save all images from the given dataset.
|
126
|
-
``` python
|
127
|
-
pipeline.save_imgs_from_dataset()
|
128
|
-
```
|
129
|
-
|
130
|
-
* III. Calculate the metrics for the specified dataset.
|
131
|
-
``` python
|
132
|
-
pipeline.cal_metrics()
|
133
|
-
```
|
134
|
-
|
135
|
-
* IV. Calculate the parameters (params,flops,latency) based on the established pipeline.
|
136
|
-
``` python
|
137
|
-
pipeline.cal_params()
|
138
|
-
```
|
139
|
-
|
140
|
-
For detailed usage, welcome check [test_single.ipynb](examples/test/test_single.ipynb) and [test_ensemble.ipynb](examples/test/test_ensemble.ipynb).
|
141
|
-
|
142
|
-
### 3. Training
|
143
|
-
We provide a user-friendly code for training our provided `base` model (modified from the `SpikeCLIP`) for the classic `REDS` dataset introduced in `Spk2ImgNet`:
|
144
|
-
``` python
|
145
|
-
from spikezoo.pipeline import TrainPipelineConfig, TrainPipeline
|
146
|
-
from spikezoo.datasets.reds_base_dataset import REDS_BASEConfig
|
147
|
-
from spikezoo.models.base_model import BaseModelConfig
|
148
|
-
pipeline = TrainPipeline(
|
149
|
-
cfg=TrainPipelineConfig(save_folder="results", epochs = 10),
|
150
|
-
dataset_cfg=REDS_BASEConfig(root_dir = "spikezoo/data/REDS_BASE"),
|
151
|
-
model_cfg=BaseModelConfig(),
|
152
|
-
)
|
153
|
-
pipeline.train()
|
154
|
-
```
|
155
|
-
We finish the training with one 4090 GPU in `2 minutes`, achieving `32.8dB` in PSNR and `0.92` in SSIM.
|
156
|
-
|
157
|
-
> 🌟 We encourage users to develop their models with simple modifications to our framework, and the tutorial will be released soon.
|
158
|
-
|
159
|
-
We retrain all supported methods except `SPIKECLIP` on this REDS dataset (training scripts are placed on [examples/train_reds_base](examples/train_reds_base) and evaluation script is placed on [test_REDS_base.py](examples/test/test_REDS_base.py)), with our reported metrics as follows:
|
160
|
-
|
161
|
-
| Method | PSNR | SSIM | LPIPS | NIQE | BRISQUE | PIQE | Params (M) | FLOPs (G) | Latency (ms) |
|
162
|
-
|----------------------|:-------:|:--------:|:---------:|:---------:|:----------:|:-------:|:------------:|:-----------:|:--------------:|
|
163
|
-
| `tfi` | 16.503 | 0.454 | 0.382 | 7.289 | 43.17 | 49.12 | 0.00 | 0.00 | 3.60 |
|
164
|
-
| `tfp` | 24.287 | 0.644 | 0.274 | 8.197 | 48.48 | 38.38 | 0.00 | 0.00 | 0.03 |
|
165
|
-
| `spikeclip` | 21.873 | 0.578 | 0.333 | 7.802 | 42.08 | 54.01 | 0.19 | 23.69 | 1.27 |
|
166
|
-
| `ssir` | 26.544 | 0.718 | 0.325 | 4.769 | 28.45 | 21.59 | 0.38 | 25.92 | 4.52 |
|
167
|
-
| `ssml` | 33.697 | 0.943 | 0.088 | 4.669 | 32.48 | 37.30 | 2.38 | 386.02 | 244.18 |
|
168
|
-
| `base` | 36.589 | 0.965 | 0.034 | 4.393 | 26.16 | 38.43 | 0.18 | 18.04 | 0.40 |
|
169
|
-
| `stir` | 37.914 | 0.973 | 0.027 | 4.236 | 25.10 | 39.18 | 5.08 | 43.31 | 21.07 |
|
170
|
-
| `wgse` | 39.036 | 0.978 | 0.023 | 4.231 | 25.76 | 44.11 | 3.81 | 415.26 | 73.62 |
|
171
|
-
| `spk2imgnet` | 39.154 | 0.978 | 0.022 | 4.243 | 25.20 | 43.09 | 3.90 | 1000.50 | 123.38 |
|
172
|
-
| `bsf` | 39.576 | 0.979 | 0.019 | 4.139 | 24.93 | 43.03 | 2.47 | 705.23 | 401.50 |
|
173
|
-
|
174
|
-
### 4. Model Usage
|
175
|
-
We also provide a direct interface for users interested in taking the spike-to-image model as a part of their work:
|
176
|
-
|
177
|
-
```python
|
178
|
-
import spikezoo as sz
|
179
|
-
from spikezoo.models.base_model import BaseModel, BaseModelConfig
|
180
|
-
# input data
|
181
|
-
spike = sz.load_vidar_dat("data/data.dat", width=400, height=250, out_format="tensor")
|
182
|
-
spike = spike[None].cuda()
|
183
|
-
print(f"Input spike shape: {spike.shape}")
|
184
|
-
# net
|
185
|
-
net = BaseModel(BaseModelConfig(model_params={"inDim": 41}))
|
186
|
-
net.build_network(mode = "debug")
|
187
|
-
# process
|
188
|
-
recon_img = net(spike)
|
189
|
-
print(recon_img.shape,recon_img.max(),recon_img.min())
|
190
|
-
```
|
191
|
-
For detailed usage, welcome check [test_model.ipynb](examples/test/test_model.ipynb).
|
192
|
-
|
193
|
-
### 5. Spike Utility
|
194
|
-
#### I. Faster spike loading interface
|
195
|
-
We provide a faster `load_vidar_dat` function implemented with `cpp` (by [@zeal-ye](https://github.com/zeal-ye)):
|
196
|
-
``` python
|
197
|
-
import spikezoo as sz
|
198
|
-
spike = sz.load_vidar_dat("data/scissor.dat",width = 400,height = 250,version='cpp')
|
199
|
-
```
|
200
|
-
🚀 Results on [test_load_dat.py](examples/test_load_dat.py) show that the `cpp` version is more than 10 times faster than the `python` version.
|
201
|
-
|
202
|
-
#### II. Spike simulation pipeline.
|
203
|
-
We provide our overall spike simulation pipeline in [scripts](scripts/), try to modify the config in `run.sh` and run the command to start the simulation process:
|
204
|
-
``` bash
|
205
|
-
bash run.sh
|
206
|
-
```
|
207
|
-
|
208
|
-
#### III. Spike-related functions.
|
209
|
-
For other spike-related functions, welcome check [spike_utils.py](spikezoo/utils/spike_utils.py)
|
210
|
-
|
211
|
-
## 📅 TODO
|
212
|
-
- [x] Support the overall pipeline for spike simulation.
|
213
|
-
- [ ] Provide the tutorials.
|
214
|
-
- [ ] Support more training settings.
|
215
|
-
- [ ] Support more spike-based image reconstruction methods and datasets.
|
216
|
-
|
217
|
-
## 🤗 Supports
|
218
|
-
Run the following code to find our supported models, datasets and metrics:
|
219
|
-
``` python
|
220
|
-
import spikezoo as sz
|
221
|
-
print(sz.METHODS)
|
222
|
-
print(sz.DATASETS)
|
223
|
-
print(sz.METRICS)
|
224
|
-
```
|
225
|
-
**Supported Models:**
|
226
|
-
| Models | Source
|
227
|
-
| ---- | ---- |
|
228
|
-
| `tfp`,`tfi` | Spike camera and its coding methods |
|
229
|
-
| `spk2imgnet` | Spk2ImgNet: Learning to Reconstruct Dynamic Scene from Continuous Spike Stream |
|
230
|
-
| `wgse` | Learning Temporal-Ordered Representation for Spike Streams Based on Discrete Wavelet Transforms |
|
231
|
-
| `ssml` | Self-Supervised Mutual Learning for Dynamic Scene Reconstruction of Spiking Camera |
|
232
|
-
| `ssir` | Spike Camera Image Reconstruction Using Deep Spiking Neural Networks |
|
233
|
-
| `bsf` | Boosting Spike Camera Image Reconstruction from a Perspective of Dealing with Spike Fluctuations |
|
234
|
-
| `stir` | Spatio-Temporal Interactive Learning for Efficient Image Reconstruction of Spiking Cameras |
|
235
|
-
| `base`,`spikeclip` | Rethinking High-speed Image Reconstruction Framework with Spike Camera |
|
236
|
-
|
237
|
-
**Supported Datasets:**
|
238
|
-
| Datasets | Source
|
239
|
-
| ---- | ---- |
|
240
|
-
| `reds_base` | Spk2ImgNet: Learning to Reconstruct Dynamic Scene from Continuous Spike Stream |
|
241
|
-
| `uhsr` | Recognizing Ultra-High-Speed Moving Objects with Bio-Inspired Spike Camera |
|
242
|
-
| `realworld` | `recVidarReal2019`,`momVidarReal2021` in [SpikeCV](https://github.com/Zyj061/SpikeCV) |
|
243
|
-
| `szdata` | SpikeReveal: Unlocking Temporal Sequences from Real Blurry Inputs with Spike Streams |
|
244
|
-
|
245
|
-
|
246
|
-
## ✨ Acknowledgment
|
247
|
-
Our code is built on the open-source projects of [SpikeCV](https://spikecv.github.io/), [IQA-Pytorch](https://github.com/chaofengc/IQA-PyTorch), [BasicSR](https://github.com/XPixelGroup/BasicSR) and [NeRFStudio](https://github.com/nerfstudio-project/nerfstudio).We appreciate the effort of the contributors to these repositories. Thanks for [@ruizhao26](https://github.com/ruizhao26), [@shiyan_chen](https://github.com/hnmizuho) and [@Leozhangjiyuan](https://github.com/Leozhangjiyuan) for their help in building this project.
|
248
|
-
|
249
|
-
## 📑 Citation
|
250
|
-
If you find our codes helpful to your research, please consider to use the following citation:
|
251
|
-
```
|
252
|
-
@misc{spikezoo,
|
253
|
-
title={{Spike-Zoo}: Spike-Zoo: A Toolbox for Spike-to-Image Reconstruction},
|
254
|
-
author={Kang Chen and Zhiyuan Ye and Tiejun Huang and Zhaofei Yu},
|
255
|
-
year={2025},
|
256
|
-
howpublished = "[Online]. Available: \url{https://github.com/chenkang455/Spike-Zoo}"
|
257
|
-
}
|
258
|
-
```
|
File without changes
|
File without changes
|
File without changes
|