# RIDNet
**Repository Path**: wangmingMY/RIDNet
## Basic Information
- **Project Name**: RIDNet
- **Description**: Pytorch code for "Real image denoising with feature attention", ICCV (Oral), 2019.
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2019-11-28
- **Last Updated**: 2022-07-13
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Real Image Denoising with Feature Attention
This repository is for Real Image Denoising with Feature Attention (RIDNet) introduced in the following paper
[Saeed Anwar](https://saeed-anwar.github.io/), [Nick Barnes], "Real Image Denoising with Feature Attention", [ICCV (Oral), 2019](https://arxiv.org/abs/1904.07396)
The model is built in PyTorch 0.4.0, PyTorch 0.4.1 and tested on Ubuntu 14.04/16.04 environment (Python3.6, CUDA9.0, cuDNN5.1).
## Contents
1. [Introduction](#introduction)
2. [Network](#network)
2. [Train](#train)
3. [Test](#test)
4. [Results](#results)
5. [Citation](#citation)
6. [Acknowledgements](#acknowledgements)
## Introduction
Deep convolutional neural networks perform better on images containing spatially invariant noise (synthetic noise); however, their performance is limited on real-noisy photographs and requires multiple stage network modeling. To advance the practicability of denoising algorithms, this paper proposes a novel single-stage blind real image denoising network (RIDNet) by employing a modular architecture. We use a residual on the residual structure to ease the flow of low-frequency information and apply feature attention to exploit the channel dependencies. Furthermore, the evaluation in terms of quantitative metrics and visual quality on three synthetic and four real noisy datasets against 19 state-of-the-art algorithms demonstrate the superiority of our RIDNet.
Sample results on a real noisy face image from RNI15 dataset.
## Network

The architecture of the proposed network. Different green colors of the conv layers denote different dilations while the smaller
size of the conv layer means the kernel is 1x1. The second row shows the architecture of each EAM.
The feature attention mechanism for selecting the essential features.
## Train
**Will be added later**
## Test
### Quick start
1. Download the trained models for our paper and place them in '/TestCode/experiment'.
The real denoising model can be downloaded from [Google Drive](https://drive.google.com/open?id=1QxO6KFOVxaYYiwxliwngxhw_xCtInSHd) or [here](https://icedrive.net/0/e3Cb4ifYSl). The total size for all models is 5MB.
2. Cd to '/TestCode/code', run the following scripts.
**You can use the following script to test the algorithm**
```bash
#RIDNET
CUDA_VISIBLE_DEVICES=0 python main.py --data_test MyImage --noise_g 1 --model RIDNET --n_feats 64 --pre_train ../experiment/ridnet.pt --test_only --save_results --save 'RIDNET_RNI15' --testpath ../LR/LRBI/ --testset RNI15
```
## Results
**All the results for RIDNET can be downloaded from GoogleDrive from [SSID](https://drive.google.com/open?id=15peD5EvQ5eQmd-YOtEZLd9_D4oQwWT9e), [RNI15](https://drive.google.com/open?id=1PqLHY6okpD8BRU5mig0wrg-Xhx3i-16C) and [DnD](https://noise.visinf.tu-darmstadt.de/submission-detail). The size of the results is 65MB**
### Quantitative Results
The performance of state-of-the-art algorithms on widely used publicly available DnD dataset in terms of PSNR (in dB) and SSIM. The best results are highlighted in bold.
The quantitative results (in PSNR (dB)) for the SSID and Nam datasets.. The best results are presented in bold.
For more information, please refer to our [papar](https://arxiv.org/abs/1904.07396)
### Visual Results

A real noisy example from DND dataset for comparison of our method against the state-of-the-art algorithms.


Comparison on more samples from DnD. The sharpness of the edges on the objects and textures restored by our method is the best.
A real high noise example from RNI15 dataset. Our method is able to remove the noise in textured and smooth areas without introducing artifacts
A challenging example from SSID dataset. Our method can remove noise and restore true colors


Few more examples from SSID dataset.
## Citation
If you find the code helpful in your resarch or work, please cite the following papers.
```
@article{anwar2019ridnet,
title={Real Image Denoising with Feature Attention},
author={Anwar, Saeed and Barnes, Nick},
journal={arXiv preprint arXiv:1904.07396},
year={2019}
}
@article{anwar2017chaining,
title={Chaining identity mapping modules for image denoising},
author={Anwar, Saeed and Huynh, Cong Phouc and Porikli, Fatih},
journal={arXiv preprint arXiv:1712.02933},
year={2017}
}
```
## Acknowledgements
This code is built on [DRLN (PyTorch)](https://github.com/saeed-anwar/DRLN)