• Stars
    star
    236
  • Rank 165,927 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Code for "Restoring Vision in Adverse Weather Conditions with Patch-Based Denoising Diffusion Models" [TPAMI 2023]

Restoring Vision in Adverse Weather Conditions with Patch-Based Denoising Diffusion Models

This is the code repository of the following paper to train and perform inference with patch-based diffusion models for image restoration under adverse weather conditions.

"Restoring Vision in Adverse Weather Conditions with Patch-Based Denoising Diffusion Models"
Ozan Özdenizci, Robert Legenstein
IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2023.
https://doi.org/10.1109/TPAMI.2023.3238179

Datasets

We perform experiments for image desnowing on Snow100K, combined image deraining and dehazing on Outdoor-Rain, and raindrop removal on the RainDrop datasets. To train multi-weather restoration, we used the AllWeather training set from TransWeather, which is composed of subsets of training images from these three benchmarks.

Saved Model Weights

We share a pre-trained diffusive multi-weather restoration model WeatherDiff64 with the network configuration in configs/allweather.yml. To evaluate WeatherDiff64 using the pre-trained model checkpoint with the current version of the repository:

python eval_diffusion.py --config "allweather.yml" --resume 'WeatherDiff64.pth.tar' --test_set 'raindrop' --sampling_timesteps 25 --grid_r 16
python eval_diffusion.py --config "allweather.yml" --resume 'WeatherDiff64.pth.tar' --test_set 'rainfog' --sampling_timesteps 25 --grid_r 16
python eval_diffusion.py --config "allweather.yml" --resume 'WeatherDiff64.pth.tar' --test_set 'snow' --sampling_timesteps 25 --grid_r 16

A smaller value for grid_r will yield slightly better results and higher image quality:

python eval_diffusion.py --config "allweather.yml" --resume 'WeatherDiff64.pth.tar' --test_set 'raindrop' --sampling_timesteps 25 --grid_r 4
python eval_diffusion.py --config "allweather.yml" --resume 'WeatherDiff64.pth.tar' --test_set 'rainfog' --sampling_timesteps 25 --grid_r 4
python eval_diffusion.py --config "allweather.yml" --resume 'WeatherDiff64.pth.tar' --test_set 'snow' --sampling_timesteps 25 --grid_r 4

We also share our pre-trained diffusive multi-weather restoration model WeatherDiff128 with the network configuration in configs/allweather128.yml.

Check out below for some visualizations of our patch-based diffusive image restoration approach.

Image Desnowing

Input Condition Restoration Process Output
snow11 snow12 snow13
snow21 snow22 snow23

Image Deraining & Dehazing

Input Condition Restoration Process Output
rh11 rh12 rh13
rh21 rh22 rh23

Raindrop Removal

Input Condition Restoration Process Output
rd11 rd12 rd13
rd21 rd22 rd23

Reference

If you use this code or models in your research and find it helpful, please cite the following paper:

@article{ozdenizci2023,
  title={Restoring vision in adverse weather conditions with patch-based denoising diffusion models},
  author={Ozan \"{O}zdenizci and Robert Legenstein},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, 
  pages={1-12},
  year={2023},
  doi={10.1109/TPAMI.2023.3238179}
}

Acknowledgments

Authors of this work are affiliated with Graz University of Technology, Institute of Theoretical Computer Science, and Silicon Austria Labs, TU Graz - SAL Dependable Embedded Systems Lab, Graz, Austria. This work has been supported by the "University SAL Labs" initiative of Silicon Austria Labs (SAL) and its Austrian partner universities for applied fundamental research for electronic based systems.

Parts of this code repository is based on the following works:

More Repositories

1

LSNN-official

Long short-term memory Spiking Neural Networks
Python
92
star
2

eligibility_propagation

Python
79
star
3

LSM

Liquid State Machines in Python and NEST
Python
49
star
4

live-plotter

Live plots with matplotlib with a simple interface
Python
44
star
5

L2L

Learning to Learn: Gradient-free Optimization framework
Python
36
star
6

spore-nest-module

Synaptic Plasticity with Online Reinforcement learning
C++
25
star
7

H-Mem

Code for Limbacher, T. and Legenstein, R. (2020). H-Mem: Harnessing synaptic plasticity with Hebbian Memory Networks
Python
12
star
8

SimManager

The Simulation Manager is a library for enabling reproducible scientific simulations.
Python
9
star
9

SparseAdversarialTraining

Code for "Training Adversarially Robust Sparse Networks via Bayesian Connectivity Sampling" [ICML 2021]
Python
7
star
10

structured_information_representation

Simulation code für Müller et al., A model for structured information representation in neural networks of the brain
Python
6
star
11

MemoryDependentComputation

Code for Limbacher, T., Özdenizci, O., & Legenstein, R. (2022). Memory-enriched computation and learning in spiking neural networks through Hebbian plasticity. arXiv preprint arXiv:2205.11276.
Python
6
star
12

OutputCodeMatching

Code for "Improving Robustness Against Stealthy Weight Bit-Flip Attacks by Output Code Matching" [CVPR 2022]
Python
5
star
13

Cognitive-Map-Learner

This repo contains an example jupyter-notebook for the CML algorithm on all different kinds of the abstract random graph tasks.
Jupyter Notebook
5
star
14

IGI-Reading-Group

IGI Reading Group
5
star
15

Spike-Frequency-Adaptation-Supports-Network-Computations

Code for: Spike Frequency Adaptation Supports Network Computations on Temporally Dispersed Information
Jupyter Notebook
5
star
16

CSNN

Python
4
star
17

SimRecorder

An high-performance library for recording and storing simulation data
Python
4
star
18

dendritic_rewiring

Simulation code for Limbacher, T. and Legenstein, R. (2020). Emergence of Stable Synaptic Clusters on Dendrites Through Synaptic Rewiring
Python
4
star
19

nevesim

Neural EVEnt-based SIMulator
C++
3
star
20

dynamic_rnn_with_gradients

Python
1
star
21

adaptation_working_memory

Spike frequency adaptation supports network computations on temporally dispersed information
Jupyter Notebook
1
star