GithubHelp home page GithubHelp logo

johnnylili / dcsrn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yunzeman/dcsrn

0.0 1.0 0.0 46 KB

An implementation of BRAIN MRI SUPER RESOLUTION USING 3D DEEP DENSELY CONNECTED NEURAL NETWORKS

Python 100.00%

dcsrn's Introduction

DCSRN-Tensorflow

version 0.1.0 - Feb 7 2018 - by Yunze MAN

This is an implementation of Brain MRI Super Resolution Using 3D Deep Densely Connected Neural Networks with Tensorflow. The paper is based on Densely connected convolutional networks, it takes a low resolution 3D MRI image, performs a super resolution process and then output the high resolution image. This repository is only on test phase right now, any contributions helping with bugs and compatibility issues are welcomed.

1. Introduction

Imgur This repo DCSRN is a code package of paper Brain MRI Super Resolution Using 3D Deep Densely Connected Neural Networks The paper propose a 3D Densely Connected Super-Resolution Networks (DCSRN), derived from Densely connected convolutional networks. After trainning on the public dataset HCP, this method achieves a better performance in terms of SSIM, PSNR and NRMSE. So far, the implementation only support SSIM performance. The encapsulation structure of this project follows tf-unet, which is well designed and easy to understand.

2. Installation

2.1 Prerequisites

2.1.1 Please make sure that your machine is equipped with modern GPUs that support CUDA.
Modern GPU allow training and testing phases to execute 50x times faster or more.
2.1.2 Please make sure that python (3.6 is recommended) is installed
Insufficient compatibility guaranteed for Python 2

Anaconda3 is recommended.

2.2 Requirements

2.2.1 Please refer to requirements.txt
conda install numpy nibabel glob Pillow matplotlib

Anaconda is recommended to create an environment for the project to run with.

2.2.2 Please install new version of tensorflow
There are new features of Tensorflow in the current and coming codes, 
so a relatively new version of tensorflow is needed.

3. Usage

3.1 Data preparation

3.1.1 Download HCP data from http://www.humanconnectomeproject.org/data/
You may want to sign up to get the permission to the public dataset first.
There are several datasets provided by HCP,
    Smaller ones contain 35 subjects' MRI
    Larger ones contains 1113 subjects' MRI.
Either one is OK to use, just pay attention to the volume of data
3.1.2 Use code to transform NII data into NPY format
HCP dataset has the format
    $HCP/mgh_$NUMBER/A_LONG_CODE/$TIME_STRING/A_NUMBER/Filename.nii
Put nii2npy.py under $HCP and run: 
    python nii2npy.py
You are suppose to get HCP_NPY/ in the same dir with $HCP
3.1.3 Do data Augmentation
Put data_augment.py under $HCP and run:
    python data_augment.py
You are suppose to get HCP_NPY_Augment/ in the same dir with $HCP

This data augmentation process generates 100 64x64x64 volumes from each subject's 3D MRI. According to the paper, the patches are generated randomly in the image.

3.2 Run the code

cd to DCSRN/ and run:
    python dcsrn_test.py
snapshots will be saved at /DCSRN/snapshots/

4. Visualization

Original Slice:

Imgur

After FFT:

Imgur

5. Questions on paper

  1. The paper use a low-pass filtering-like method to generate low resolution images, the method meet with the nature of MRI, which makes it valid, but paper also mentions that this method avoid checkerboard artifact. However, I think since DenseNet does not involve deconvolution process, there is nothing to do with checkerboard artifact in this process. Not sure if I'm right.
  2. The second question is about the graph in the paper. The bypass-like links don't concat before bn+elu+conv units, but concat after them. This is not consistent with the original DenseNet, I don't see why paper use this way of connection. I view it as a minor typo and my implementation follows the DenseNet's way of connection.

6. Contact Information

If you encounter any problems in using these codes, please open an issue in this repository. You may also contact Yunze MAN ([email protected]).

Thanks for your interest! Have fun!

dcsrn's People

Contributors

yunzeman avatar

Watchers

 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.