https://github.com/bnm6900030/swintormer
https://github.com/bnm6900030/swintormer
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bnm6900030/swintormer
- Owner: bnm6900030
- Created: 2023-10-29T10:36:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-10T10:30:22.000Z (about 1 year ago)
- Last Synced: 2024-10-30T22:40:31.446Z (8 months ago)
- Language: Python
- Size: 165 KB
- Stars: 35
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-diffusion-categorized - [Code
README
# Image Deblurring based on Diffusion Models
The code and pre-trained models of the paper "Image Deblurring based on Diffusion Models" will be released in this
repository.
> **Abstract:** *This article introduces a sliding window model for defocus deblurring that achieves the best
performance to date with extremely low memory usage. Named Swintormer, the method utilizes a diffusion model to generate
latent prior features that assist in restoring more detailed images. It also extends the sliding window strategy to
specialized Transformer blocks for efficient inference. Additionally, we have further optimized Multiply-Accumulate
operations (Macs). Compared to the currently top-performing GRL method, our Swintormer model drastically reduces
computational complexity from 140.35 GMACs to 8.02 GMacs, while also improving the Signal-to-Noise Ratio (SNR) for
defocus deblurring from 27.04 dB to 27.07 dB. This new method allows for the processing of higher resolution images on
devices with limited memory, significantly expanding potential application scenarios. The article concludes with an
ablation study that provides an in-depth analysis of the impact of each network module on final performance. The source
code and model will be available at the following website: https://github.com/bnm6900030/swintormer.*
## Installation
- Python 3.8.10
- PyTorch 2.0.0
- NVIDIA GPU + [CUDA](https://developer.nvidia.com/cuda-downloads)```bash
# Clone the github repo and go to the default directory 'swintormer'.
git clone https://github.com/bnm6900030/swintormer.git
cd swintormer
pip install -r requirements.txt
```## Training
```bash
python basicsr/train.py -opt /home/lab/code1/IR/options/train/swintormer/train_swintormer.yml
```
## Testing
```bash
python basicsr/test.py
```
## Generate feature
```bash
python generate_feature.py
```## Visual Results
Part visual results are available below. More visual results will come soon.
## Acknowledgements
This code is built on [BasicSR](https://github.com/XPixelGroup/BasicSR) and [Restormer](https://github.com/swz30/Restormer).
## Citations
If this work is helpful for your research, please consider citing the following BibTeX entry.
```
@misc{chen2024efficient,
title={Efficient Image Deblurring Networks based on Diffusion Models},
author={Kang Chen and Yuanjie Liu},
year={2024},
eprint={2401.05907},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
```## Contact
If you have any question, please contact [email protected]