Coder Social home page Coder Social logo

frankzhangyk / ct-wgan_vgg_tensorflow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hyeongyuy/ct-wgan_vgg_tensorflow

0.0 0.0 0.0 249 KB

Low Dose CT Image Denoising Using a Generative Adversarial Network with Wasserstein Distance and Perceptual Loss

Python 100.00%

ct-wgan_vgg_tensorflow's Introduction

WGAN_VGG_tensorflow

Low Dose CT Image Denoising Using a Generative Adversarial Network with Wasserstein Distance and Perceptual Loss

  • WGAN_VGG

I/O (DICOM file -> .npy)

  • Input data Directory
    • DICOM file extension = ['.IMA', '.dcm']

$ os.path.join(dcm_path, patient_no, [LDCT_path|NDCT_path], '*.' + extension)

Ntwork architecture

Network architecture

  • Generator
  • 8 conv layers (with relu)
  • kernel size : 3*3
  • filters
    • first_7 : 32
    • last : 1
  • discriminator
  • str :
    • 6 conv layer(with leaky relu)
      -> fully connected : 1024 (with leaky relu)
      -> fully connected : 1 (cross entropy)
  • filters:
    • first_2 : 64
    • mid_2 : 128
    • last_2 : 256
    • kernel size : 3*3
  • Perceptual loss
  • pre-trained VGG net
  • feed : ground truth (generated image)
  • loss: L2 (ground truth)
  • gradient : only generator

Training detail

procedure

  • mini batch size L : 128
  • opt : Adam(alpha = 1e-5, beta1 = 0.5, beta2 = 0.9)
  • discriminator iter : 4
  • lambda(WGAN weight penalty) : 10
  • lambda1(VGG weight) : 0.1, lambda2 : 0.1

Different

[X] epoch : 100 -> iteration
[X] remove mostly air images -> no remove (Hounsfield unit scale -> normalize 0 ~ 1)

Main file(main.py) Parameters

  • Directory
  • dcm_path : dicom file directory
  • LDCT_path : LDCT image folder name
  • NDCT_path : NDCT image folder name
  • test_patient_no : test patient id list(p_id1,p_id2...) (train patient id : (patient id list - test patient id list)
  • checkpoint_dir : save directory - trained model
  • test_npy_save_dir : save directory - test numpy file
  • pretrained_vgg : pretrained vggnet directory
  • Image info
  • patch_size : patch size
  • whole_size : whole size
  • img_channel : image channel
  • img_vmax : max value
  • img_vmin : min value
  • Train/Test
  • model : red_cnn, wgan_vgg, cyclegan (for image preprocessing)
  • phase : train | test
  • others
  • is_mayo : summary ROI sample1,2
  • save_freq : save a model every save_freq (iterations)
  • print_freq : print_freq (iterations)
  • continue_train : load the latest model: true, false
  • gpu_no : visible devices(gpu no)
  • Training detail
  • num_iter : iterations (default = 200000)
  • alpha : learning rate (default=1e-5)
  • batch_size : batch size (default=128)
  • d_iters : discriminator iteration (default=4)
  • lambda_ : Gradient penalty term weight (default=10)
  • lambda_1 : Perceptual loss weight (in WGAN_VGG network) (default=0.1)
  • #lambda_2 : MSE loss weight(in WGAN_VGG network) (default=0.1, not used)
  • beta1 : Adam optimizer parameter (default=0.5)
  • beta2 : Adam optimizer parameter (default=0.9)

Run

  • train

python main.py

  • test

python main.py --phase=test

pretrained vgg

ct-wgan_vgg_tensorflow's People

Contributors

hyeongyuy 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.