Git Product home page Git Product logo

3dmrisegmentation's Introduction

3D MRI Segmentation using Zoom-in&out training strategy

This is PyTorch implementation of Deep Residual 3D U-Net for MRI segmentation.

This is also the source code for Automatic post-stroke lesion segmentation on MR images using 3D residual convolutional neural network

Visualization of Prediction Results

Highlights

  • We developed a deep learning model for MRI 3D lesion segmentation of chronic stroke.
  • Our novel zoom-in&out strategy increases performance and accelerates optimization.
  • High performance was achieved in both volumetric and surface-based metrics.

Zoom-in&out training strategy for volumetric segmentation

Zoom-in&out training strategy for efficient volumetric segmentation

We used a two-stage zoom-in&out strategy to first train them on small volumes, and then we finetuned the models on larger volumes. Advantages are:

  • Training models with smaller volumes can have a regularizing effect due to performing data augmentation by randomly extracting diverse sub-volumes from original volumes.
  • A “zoom-in” step is a computationally inexpensive option and can utilize sub-optimal graphic processing units (GPUs) for the task. By feeding smaller volumes to older but more accessible GPUs, models can be trained in parallel, and, as a result, are faster.
  • The “zoom-out” stage involves showing models larger volumes to learn from the broader context of input images and improves the robustness of the model.

The details for the model optimization in our experiments.

Optimization Stage Zoom-In Stage Zoom-Out Stage
Input volume size (mm3) 128 × 128 × 128 (24% sub-volume) 144 × 172 × 168 (48% sub-volume)
Training Length 1200 epochs 150 epochs
Initial learning rate 1.00E−03 1.00E−04
Optimizer Adam optimizer and cosine annealing with warm restart scheduler
GPU Nvidia Titan Xp with 12 GB memory Nvidia Titan RTX with 24 GB memory

Effectiveness of zoom-in&out strategy

Methods microDSC DSC HD (mm) ASSD (mm) TPR Precision
3D-ResU-Net w/o zoom-out 0.73 0.60 (0.47–0.73) 35.1 (20.4–51.3) 7.6 (3.7–12.3) 0.83 (0.71–0.91) 0.54 (0.39–0.67)
3D-ResU-Net w/ zoom-in&out 0.79 0.64 (0.51–0.76) 20.4 (10.0–33.3) 3.6 (1.7–6.2) 0.81 (0.68–0.89) 0.62 (0.48–0.74)
Δ +0.06 +0.04 −14.7 −4.0 −0.02 +0.08
Best scores are marked in bold.

Visualization of segmentation results

Visualization of segmentation results1 Visualization of segmentation results2

Dependencies

Usage

Training a 3D segmentation model

  • python train.py --data_dir <path_to_dataset> --save_dir <path_to_snapshots>

Applying zoom-in&out strategy

Zoom-in stage

  • python train.py --data_dir <path_to_dataset> --save_dir <path_to_snapshots> -v xi yi zi where xi, yi, zi are the size of input volume in the zoom-in stage.

Zoom-out stage

  • python train.py --data_dir <path_to_dataset> --save_dir <path_to_snapshots> -v xo yo zo --resume_model <path_to_a_snapshot> where xo, yo, zo are the size of input volume in the zoom-out stage.

Volume size selection in Zoom-In&Out training strategy

Here are our suggestions for selecting an optimal volume size in Zoom-In&Out training strategy

  • Visualizing typical images from the dataset, and then reviewing the spatial distribution of target lesions to estimate the possible effective input volume size for a specific application. (In our study, we observed in early experiments that using volume sizes significantly smaller than those in our final configuration does not achieve a competitive performance. This performance gap may indicate that volumes cropped for training during these experiments were overwhelmed by regions without positive stroke lesions, which could have negatively biased our model optimization in the early experiments.)
  • Performing a systematic search on proportions of original volume size (e.g., 25%, 50%, 75% ) to find an optimal configuration.

Testing a trained model

  • python test.py --data_dir <path_to_dataset> --model_path <path_to_a_snapshot>

Citations

3dMRISegmentation is an open-source library and is licensed under the GNU General Public License (v3).

If you are using this library, please cite:

Naofumi Tomita, Steven Jiang, Matthew E. Maeder, and Saeed Hassanpour. "Automatic Post-Stroke Lesion Segmentation on MR Images using 3D Residual Convolutional Neural Network." NeuroImage: Clinical (2020): 102276.

3dmrisegmentation's People

Contributors

ntomita avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

3dmrisegmentation's Issues

Incomplete Code

Hi, Hope you will be fine. Iam Research student from Comsats University Islamabad Pakistan. I have read your paper this is very remarkable paper and now iam trying to reproduce this paper for my research . So when I start this paper I got issue in this file 'train.py ' it look that code is missing in this file because I can't get where I have to put path for dataset. Kindly help me in this problem. To extend your work I need complete code of your paper . It would be great help if you could provide me complete code of your paper .Bundle of thanks in advance. looking forward to your kind response.

训练效果不好 Poor training effect

Hello, I trained ATLAS R2 using your code python train.py --data_dir <path_to_dataset> --save_dir <path_to_snapshots>, but Dice only has 0.08, Is there any way to improve Dice?

help

Hi, Hope you will be fine. Iam Research student from Comsats University Islamabad Pakistan. I have read your paper this is very remarkable paper and now iam trying to reproduce this paper for my research . So when I start this paper I got issue in this file 'train.py ' it look that code is missing in this file because I can't get where I have to put path for dataset. Kindly help me in this problem. To extend your work I need complete code of your paper . It would be great help if you could provide me complete code of your paper .Bundle of thanks in advance. looking forward to your kind response.

helpp

Hi, Hope you will be fine. Iam Research student from Comsats University Islamabad Pakistan. I have read your paper this is very remarkable paper and now iam trying to reproduce this paper for my research
There is issue in your code. When i run train.py it generate separate file for every epoch and there is 1200 epochs which generate 1200 epoch files. so please tell me in testing i have to give path for every single file which is very time consuming . Kindly help me
Capture

question

Thankyou sir.
One more question I want to ask that at training there is 1200 epochs and it will saves only best models but how we can find out which epoch is best. Secondly I want this results shown in figure
Capture1

test.py

Hi, Hope you will be fine. Iam Research student from Comsats University Islamabad Pakistan. I have read your paper this is very remarkable paper and now iam trying to reproduce this paper for my research
There is issue in your code. When i run train.py it generate separate file for every epoch and there is 1200 epochs which generate 1200 epoch files. so please tell me in testing i have to give path for every single file which is very time consuming . Kindly help me.

Pretrained weights

Hi,
Is it possible for you to provide the pretrained weights for the model?
Thank you in advance.

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.