This is an implementation of ["An imporved U-Net++ Network for Skin lesion Image Segmentation"] in Keras deep learning framework (Tensorflow as backend). U-Net++ (nested U-Net architecture) is proposed for a more precise segmentation, which introduce intermediate layers to skip connections of U-Net, which naturally form multiple new up-sampling paths from different depths, ensembling U-Nets of various receptive fields.
U-Net++: A Nested U-Net Architecture for Medical Image Segmentation
Zhou Zongwei, Md Mahfuzur Rahman Siddiquee, Nima Tajbakhsh, and Jianming Liang
Biomedical Informatics, Arizona State University
Deep Learning in Medical Image Analysis (DLMIA) 2018. (Oral)
Python 3.6, Keras 2.2.2, Tensorflow 1.4.1 and other common packages listed in requirements.txt
.
Backbone model | Name | Weights |
---|---|---|
VGG16 | vgg16 |
imagenet |
VGG19 | vgg19 |
imagenet |
ResNet18 | resnet18 |
imagenet |
ResNet34 | resnet34 |
imagenet |
ResNet50 | resnet50 |
imagenet imagenet11k-places365ch |
ResNet101 | resnet101 |
imagenet |
ResNet152 | resnet152 |
imagenet imagenet11k |
ResNeXt50 | resnext50 |
imagenet |
ResNeXt101 | resnext101 |
imagenet |
DenseNet121 | densenet121 |
imagenet |
DenseNet169 | densenet169 |
imagenet |
DenseNet201 | densenet201 |
imagenet |
Inception V3 | inceptionv3 |
imagenet |
Inception ResNet V2 | inceptionresnetv2 |
imagenet |
git clone https://github.com/laizhendong/skin_lesion_image_segmentation.git
pip install -r requirements.txt
git submodule update --init --recursive
Application 1: [Data ISBI 2016](https://www.kaggle.com/c/data-ISBI 2016)
CUDA_VISIBLE_DEVICES=0 python ISBI2016_application.py --run 1 \
--arch Xnet \
--backbone vgg16 \
--init random \
--decoder transpose \
--input_rows 512 \
--input_cols 512 \
--input_deps 3 \
--nb_class 1 \
--batch_size 2048 \
--weights None \
--verbose 1
Application 2: [Data ISBI 2017](https://www.kaggle.com/c/data-ISBI 2017)
CUDA_VISIBLE_DEVICES=0 python ISBI2017_application.py --run 1 \
--arch Xnet \
--backbone DenseNet169 \
--init random \
--decoder transpose \
--input_rows 512 \
--input_cols 512 \
--input_deps 3 \
--nb_class 1 \
--batch_size 2048 \
--weights None \
--verbose 1
Train a U-Net++ structure (Xnet
in the code):
from segmentation_models import Unet, Nestnet, Xnet
# prepare data
x, y = ... # range in [0,1]
# prepare model
model = Xnet(backbone_name='resnet50', encoder_weights='imagenet', decoder_block_type='transpose') # build U-Net++
# model = Unet(backbone_name='resnet50', encoder_weights='imagenet', decoder_block_type='transpose') # build U-Net
# model = NestNet(backbone_name='resnet50', encoder_weights='imagenet', decoder_block_type='transpose') # build DLA
model.compile('Adam', 'binary_crossentropy', ['binary_accuracy'])
# train model
model.fit(x, y)
- Add VGG backbone for U-Net++
- Add ResNet backbone for U-Net++
- Add ResNeXt backbone for U-Net++
- Add DenseNet backbone for U-Net++
- Add Inception backbone for U-Net++
This repository has been built upon qubvel/segmentation_models. We appreciate the effort of Pavel Yakubovskiy for providing well-organized segmentation models to the community. This research has been supported partially by NIH under Award Number R01HL128785, by ASU and Mayo Clinic through a Seed Grant and an Innovation Grant. The content is solely the responsibility of the authors and does not necessarily represent the official views of NIH.