This is the official pytorch implementation of the MB-DCNN model:
Paper: A Mutual Bootstrapping Model for Automated Skin Lesion Segmentation and Classification. (https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8990108)
Python 3.7
Torch==1.4.0
Torchvision==0.5.0
Apex==0.1
CUDA 10.0
- Clone this repo
git clone https://github.com/YtongXie/MB-DCNN.git
cd MB-DCNN
-
Download ISIC2017 dataset, Extra 1320 images(The ID information of the extra 1320 images is listed in
./dataset/Extra_images.csv
) -
Put the data under
./dataset/data/
-
Run
python ./dataset/extractPatch_cls_train.py
andpython ./dataset/extractPatch_cls_val_test.py
to obtain the cropped training, validation and testing patches for classification task. -
Run
python ./dataset/extractPatch_seg_train.py
to obtain the resized training patches for segmentation task. -
Run
python ./dataset/list_cls.py
andpython ./dataset/list_seg.py
to generate the data lists.
-
Download pretrained weights from Deeplabv3+, Xception and put them under
./models/
. -
Run
python train_CoarseSN.py
to train the coarse segmentation network for roughly segmenting skin lesions. -
The segmentation network structure is defined in
./net/models.py
, and the hybrid loss is defined in./net/loss.py
.
- Run
python generate_Coarse_mask.py
to obtain the coarse masks for mask-CN and enhanced-SN.
-
Run
python train_MaskCN.py
to train the mask-guided classification network for skin lesion classification. -
The classification network structure is defined in
./net/models.py
, and the loss is cross-entropy loss.
- Run
python train_EnhancedSN.py
to train the enhanced segmentation network for more accurate skin lesion segmentation.
- Run
python eval_MaskCN.py
andpython eval_EnhancedSN.py
to start the evaluation.
If this code is helpful for your study, please cite:
@ARTICLE{8990108,
author={Yutong Xie and Jianpeng Zhang and Yong Xia and Chunhua Shen},
journal={IEEE Transactions on Medical Imaging},
title={A Mutual Bootstrapping Model for Automated Skin Lesion Segmentation and Classification},
year={2020},
volume={39},
number={7},
pages={2482-2493},}
The codes for Deeplabv3+ network and Xception network are reused from the YudeWang and Cadene.
Thanks to YudeWang and Cadene for the pretrained weights for Deeplabv3+ network and Xception network.
Yutong Xie (xuyongxie@mail.nwpu.edu.cn)