Giter VIP home page Giter VIP logo

left_ventricle_segmentation's Introduction

Left_Ventricle_Segmentation

Edge-Sensitive Left Ventricle Segmentation Using Deep Reinforcement Learning

For the left ventricle segmentation, the clinical experts complete the task of segmentation by first finding an initial point on the boundary, and then locating the rest of the edge points to obtain a closed mask. Inspired by the human segmentation process, we explore how to utilize deep reinforcement learning to perform left ventricle segmentation.

The following demo shows the segmentation process of the proposed reinforcement learning agent. (This is just a demo to show the process. Actually, the RL agent takes 0.9 seconds in average to find a closed contour).

The proposed model consists of two neural networks. The first is FirstP-Net, whose goal is to find the first edge point and generate a probability map of the edge points positions. The second is NextP-Net, which locates the next point based on the previous edge point and image information. This model segments the image by finding the edge points step by step and ultimately obtaining a closed and accurate segmentation result.

  • The overall process of the proposed system.

  • Segmentation performances.

Dependencies

  • CUDA 9.0
  • Python 2.7
  • PyTorch 0.4.0

The experiments are conducted on a Ubuntu 16.04 LTS PC with one NVIDIA GeForce GTX 1080 Ti. Driver version is 410.78. GCC version is 5.4.0. Please refer to requirements.txt for more details about the packages used.

Installation

  1. Clone this repository.
git clone [email protected]:Mayy1994/Left_Ventricle_Segmentation.git
  1. As we use a crop and resize function like that in Fast R-CNN to fix the size of the state, it needs to be built with the right -arch option for CUDA support before training. [Reference]

    GPU arch
    TitanX sm_52
    GTX 960M sm_50
    GTX 1070 sm_61
    GTX 1080 (Ti) sm_61
cd nms/src/cuda/
nvcc -c -o nms_kernel.cu.o nms_kernel.cu -x cu -Xcompiler -fPIC -arch=[arch]
cd ../../
python build.py
cd ../

cd roialign/roi_align/src/cuda/
nvcc -c -o crop_and_resize_kernel.cu.o crop_and_resize_kernel.cu -x cu -Xcompiler -fPIC -arch=[arch]
cd ../../
python build.py
cd ../../

Dataset setup

Please download the datasets Sunny Brook 2009 and ACDC 2017 and unzip the datasets to the current directory.

Training

  • Create a virtual environment and install the required python packages.
  • Train First-P-Net and Next-P-Net, respectively.
python First_P.py
python train_Sunny_Brook_2009.py    # For SunnyBrook Dataset
python train_ACDC_2017.py           # For ACDC Dataset

Evaluation

python val_Sunny_Brook_2009.py    # For SunnyBrook Dataset
python val_ACDC_2017.py           # For ACDC Dataset

left_ventricle_segmentation's People

Contributors

mayy1994 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dongzhenyuan

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.