Skip to content

lab-midas/med_segmentation

Repository files navigation

MedSeg: Medical Segmentation

All Contributors

Introduction

This repository contains code to train and evaluate 3D Convolutional Neural Networks for semantic segmentation on medical images. The architectures developed in this framework are a combination of auto-encoder UNet with shortcut connections as in ResNet, densely connections for deep supervision as in DensetNet and Merge-And-Run mapping for attention focusing as in MRGE.

Credits

Many thanks to all contributors of this repository. If you like it, please click on Star!

If you use this package for your research, please cite the paper:

Küstner T, Hepp T, Fischer M, Schwartz M, Fritsche A, Häring HU, Nikolaou K, Bamberg F, Yang B, Schick F, Gatidis S, Machann J
"Fully automated and standardized segmentation of adipose tissue compartments via deep learning in 3D whole-body MRI of epidemiological cohort studies" Radiology Artificial Intelligence 2020.
[BibTeX]   [Endnote]

@article{Kuestner2020,
    title={Fully automated and standardized segmentation of adipose tissue compartments via deep learning in 3D whole-body MRI of epidemiological cohort studies},
    author={Thomas K\"ustner and Tobias Hepp and Marc Fischer and Martin Schwartz and Andreas Fritsche and Hans-Ulrich Häring and Konstantin Nikolaou and Fabian Bamberg and Bin Yang and Fritz Schick and Sergios Gatidis and J\"urgen Machann},
    journal={Radiology Artificial Intelligence},
    year={2020},
}

Documentation

Installation

Clone the repository and install the requirements

$ git clone https://gitlab.com/iss_mia/cnn_segmentation/ desired_directory
$ python3 -m pip install -r requirements.txt

Usage

Set all parameters in the configuration file. Check call arguments:

$ python3 main.py -h 

Preprocessing

Conversion of input data (DICOM, NiFTY, Matlab/HDF5) to TFRecords

$ python3 main.py --preprocess -c config/config_default.yml

Training

Network training on specified databases

$ python3 main.py --train -c config/config_default.yml -e experiment_name

Evaluation

Evaluate metrics of trained network

$ python3 main.py --evaluate -c config/config_default.yml -e experiment_name

Prediction

Predict segmentation mask for test dataset with trained network

$ python3 main.py --predict -c config/config_default.yml -e experiment_name

Database information

Get database information stored in Patient class

$ python3 readme/Patient_example.py -c config/config_default.yml

Networks/Architectures

Architectures are implemented in /models/ModelSet.py.

DCNet

densely connected with merge-and-run mapping network

Dilated dense convolution

Densely connected networks (including modifications: dilated convs, ...)

UNet

vanilla UNet and extension for inclusion of positional input

Dilated DenseNet

Densely connected network with dilations

Loss functions

Custom loss functions are defined in /models/loss_function.py.

Metrics

Custom evaluation metrics are defined in /models/metrics.py.

Applications

  • Whole-body semantic organ segmentation
  • Whole-body adipose tissue segmentation

License

This project is licensed under the Apache License - see the LICENSE file for details.

Contributors

Thanks to Marc Fischer for providing the med_io pipeline around which this framework was structured.


marcfi

💻 🤔 🚧 🔧

Thomas Kuestner

💻 🤔 🚧 📆 📖 👀 ⚠️

tobiashepp

💻 🤔 🚧 🔧 🛡️

a-doering

💻

KaijieMo1

💻 📖

sergiosgatidis

🤔 📆 💬

SarahMue

💻 🤔 🔌 🚧

CDStark

💻 🚧

fl3on

💻 ⚠️

haison

🐛