Giter Club home page Giter Club logo

unsupervised-cross-domain-learning-for-noise-removal-from-a-single-image's Introduction

Unsupervised-Cross-Domain-Learning-for-Noise-Removal-from-a-Single-Image

This repository provides the official PyTorch implementation of the following paper:

Unsupervised-Cross-Domain-Learning-for-Noise-Removal-from-a-Single-Image

Requirements

To install requirements:

conda env create -n [your env name] -f environment.yaml
conda activate [your env name]

To train the model

Synthetic Noise (AWGN)

  1. Download DIV2K dataset for training in here
  2. Randomly split the DIV2K dataset into Clean/Noisy set. Please refer the .txt files in split_data.
  3. Place the splitted dataset(DIV2K_C and DIV2K_N) in ./dataset directory.
dataset
└─── DIV2K_C
└─── DIV2K_N
└─── test
  1. Use gen_dataset_synthetic.py to package dataset in the h5py format.
  2. After that, run this command:
sh ./scripts/train_awgn_sigma15.sh # AWGN with a noise level = 15
sh ./scripts/train_awgn_sigma25.sh # AWGN with a noise level = 25
sh ./scripts/train_awgn_sigma50.sh # AWGN with a noise level = 50
  1. After finishing the training, .pth file is stored in ./exp/[exp_name]/[seed_number]/saved_models/ directory.

Real-World Noise

  1. Download SIDD-Medium Dataset for training in here
  2. Radnomly split the SIDD-Medium Dataset into Clean/Noisy set. Please refer the .txt files in split_data.
  3. Place the splitted dataset(SIDD_C and SIDD_N) in ./dataset directory.
dataset
└─── SIDD_C
└─── SIDD_N
└─── test
  1. Use gen_dataset_real.py to package dataset in the h5py format.
  2. After that, run this command:
sh ./scripts/train_real.sh
  1. After finishing the training, .pth file is stored in ./exp/[exp_name]/[seed_number]/saved_models/ directory.

LDCT Noise

dataset
└─── LDCT_C
└─── LDCT_N
└─── test
  1. Use gen_dataset_real.py to package dataset in the h5py format.
  2. After that, run this command:
sh ./scripts/train_ldct.sh

To evaluate the model

Synthetic Noise (AWGN)

  1. Download CBSD68 dataset for evaluation in here
  2. Place the dataset in ./dataset/test directory.
dataset
└─── train
└─── test
     └─── CBSD68
     └─── SIDD_test
     └─── LDCT_test
  1. After that, run this command:
sh ./scripts/test_awgn_sigma15.sh # AWGN with a noise level = 15
sh ./scripts/test_awgn_sigma25.sh # AWGN with a noise level = 25
sh ./scripts/test_awgn_sigma50.sh # AWGN with a noise level = 50

Real-World Noise

  1. Download the SIDD test dataset for evaluation in here
  2. Place the dataset in ./dataset/test directory.
dataset
└─── train
└─── test
     └─── CBSD68
     └─── SIDD_test
     └─── LDCT_test
  1. After that, run this command:
sh ./scripts/test_real.sh

LDCT Noise

  1. Download the LDCT test dataset for evaluation in here
  2. Place the dataset in ./dataset/test directory.
dataset
└─── train
└─── test
     └─── CBSD68
     └─── SIDD_test
     └─── LDCT_test
  1. After that, run this command:
sh ./scripts/test_ldct.sh

Pre-trained model

We provide pre-trained models in ./checkpoints directory.

checkpoints
|   best_sigma15.pth # pre-trained model (AWGN with a noise level = 15)
|   best_sigma25.pth # pre-trained model (AWGN with a noise level = 25)
|   best_sigma50.pth # pre-trained model (AWGN with a noise level = 50)
|   best_SIDD.pth # pre-trained model (Real-World noise)
|   best_LDCT.pth # pre-trained model (LDCT noise)

Acknowledgements

This code is built on UID-FDK,U-GAT-IT,CARN, SSD-GAN. We thank the authors for sharing their codes.

Publications

If you find these codes useful, please cite our related papers, shown as follows.

[1] H.-X. Tsai and L.-W. Kang, "Unsupervised cross domain learning for noise removal from a single image," Proc. IEEE International Conference on Imaging Systems and Techniques, Kaohsiung, Taiwan, 2022.

[2] H.-X. Tsai and L.-W. Kang, "Cross domain deep learning for noise removal from LDCT images," Proc. IEEE International Conference on Consumer Electronics-Taiwan, Taipei, Taiwan, 2022, pp. 475-476.

Contact

If you have any questions, feel free to contact me

unsupervised-cross-domain-learning-for-noise-removal-from-a-single-image's People

Contributors

s0966066980 avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.