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.pyandpython ./dataset/extractPatch_cls_val_test.pyto obtain the cropped training, validation and testing patches for classification task. -
Run
python ./dataset/extractPatch_seg_train.pyto obtain the resized training patches for segmentation task. -
Run
python ./dataset/list_cls.pyandpython ./dataset/list_seg.pyto generate the data lists.
-
Download pretrained weights from Deeplabv3+, Xception and put them under
./models/. -
Run
python train_CoarseSN.pyto 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.pyto obtain the coarse masks for mask-CN and enhanced-SN.
-
Run
python train_MaskCN.pyto 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.pyto train the enhanced segmentation network for more accurate skin lesion segmentation.
- Run
python eval_MaskCN.pyandpython eval_EnhancedSN.pyto 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 (yutong.xie678@gmail.com)