Giter Site home page Giter Site logo

jinglongdu / aidsrgan-miccai2022 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yongsongh/aidsrgan-miccai2022

0.0 0.0 0.0 11.16 MB

Official Pytorch Code for "Rethinking Degradation: Radiograph Super-Resolution via AID-SRGAN" - MICCAI 2022 Workshop

License: Apache License 2.0

Python 100.00%

aidsrgan-miccai2022's Introduction

Pytorch code for the paper
"Rethinking Degradation: Radiograph Super-Resolution via AID-SRGAN" | MICCAI 2022 Workshop

Paper ☀️ | Poster ❄️ | Dataset 🌀 | Model(Includes PSRGAN: kdsrgan_medical_x2_120000_G eg.):zap:

About this repo:

Special thanks for their excellent work:

  1. PSRGAN
  2. SPSR
  3. KAIR

Introduction

  • We propose a practical degradation model for radiographs, which considers most possible degradation factors, such as statistical noise, motion blur, compression, and each of them has variant parameters. This model aims to represent complex nonlinear degeneracies, unlike current models that focus more on downsampling. In addition, the degradation model is applied to synthesize data to train the proposed SR model.

  • We propose a medical attention denoising SRGAN model (AID-SRGAN). An attention mechanism is introduced into the denoising module to make it more robust to complicated degradation. Moreover, we propose a two- stage training approach to train the proposed AID-SRGAN, i.e., we first separately train the denoising module and SR module to obtain a relatively good denoising network and SR network, respectively. We then jointly train the denoising and SR modules in an end-to-end manner to further improve the performance. Finally, it is a flexible framework and easy to follow.

Using the code:

  • Clone this repository:
git clone https://github.com/yongsongH/AIDSRGAN-MICCAI2022

The code is stable using Python 3.7, Pytorch 0.4.1

To install all the dependencies using pip:

pip install -r requirements.txt

Links for downloading the Datasets:

  1. MURA SR Dataset - Link (training)
  2. MURA Test Dataset - mini and plus (test)

Using the Code for our dataset

Dataset Preparation

⚠️ In order to running the code, please carefully check the following information.

Training

1️⃣ First, we need three types of datasets. These include real low-resolution images, only downsampled low-resolution images, and high-resolution images. For example (X4 and X2 are Upsampling factors.):

Real low-resolution images Only downsampled low-resolution images High-resolution images
MURA_LR_X2 MURA_LHR_X2 MURA_SR_GT
MURA_LR_X4 MURA_LHR_X4 MURA_SR_GT

2️⃣ X2, Like:

options folder-----
      train_enhance_msrresnet_denosing_add_deloss.json----
      
        "dataroot_H": "trainsets/MURA_SR_GT"              // path of H training dataset
        "dataroot_L": "trainsets/MURA_LR_X2"              // path of L training dataset
        "dataroot_LHR": "trainsets/MURA_LHR_X2"           // path of L_HR training dataset
          .......

Test

1️⃣ Like training, we need to be careful to choose the right dataset when we test. For example (X4 and X2 are Upsampling factors.):

Real low-resolution images Only downsampled low-resolution images High-resolution images
MURA_mini_X2 None MURA_Test_HR
MURA_mini_X4 None MURA_Test_HR
MURA_plus_X2 None MURA_Test_HR
MURA_plus_X4 None MURA_Test_HR

2️⃣ X2, Like:

main_test_aidsrgan_need_hr.py -----
      
        model_name = 'aidsrgan_390000_x2'
        testset_name = 'MURA_mini_X2'
        hr_testset_name = 'MURA_Test_HR'      # hr path
        need_degradation = False              # default: True
        x8 = False                            # default: False, x8 to boost performance, default: False
        sf = 2                                # scale factor
        show_img = False                      # default: False
          .......
  • When tested, their GT images will be the same.

😱 Please be careful!

😵 The upsampling factor must correspond to the pre-trained model and dataset. Otherwise there will be unexpected errors.

Training Command:

After the .json file is confirmed, please run the training code. Like:

  run main_train_aidsrgan+.py

Testing Command:

After the parameters are confirmed, please run the test code. Like:

  run main_test_aidsrgan_need_hr.py

Citation:

 @misc{https://doi.org/10.48550/arxiv.2208.03008,
 
  doi = {10.48550/ARXIV.2208.03008},
  
  url = {https://arxiv.org/abs/2208.03008},
  
  author = {Huang, Yongsong and Wang, Qingzhong and Omachi, Shinichiro},
  
  
  title = {Rethinking Degradation: Radiograph Super-Resolution via AID-SRGAN},
  
  publisher = {arXiv},
  
  year = {2022},
  
  copyright = {Creative Commons Attribution 4.0 International}
}

Contact

If you meet any problems, please describe them and contact me.

🙅‍♂️ Impolite or anonymous emails are not welcome. Thank you for understanding.

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.