Boosting Medical Image Segmentation via Conditional-Synergistic Convolution and Lesion Decoupling

September 8, 2022 ยท View on GitHub

Preface

This repo contains the source code and prediction maps of our CCLDNet and CCLDNet*.

Update

:fire: Update 2022/09/08 :fire: Our paper is now accepted by Computerized Medical Imaging and Graphics (CMIG). (PDF)

Dataset

  • Datasets in use:

    • Download EndoScene (912 pairs) (source) and put it into the ./data/TrainDataset_Endo

    • Download ClinicDB (612 pairs), Kvasir (1000 pairs), ETIS (196 pairs), ColonDB (380 pairs), and EndoScene (300 pairs) (source), then put them into the ./data/TrainDataset_CVC_Kva

    • Download ISIC 2018 (2594 pairs) (source) and put it into the ./data/TrainDataset_ISIC_2018

๐Ÿ’กImportant tips๐Ÿ’ก

The center label and boundary label can be generated by ./utils/label.py.

Usage

Repo clone

git clone https://github.com/QianChen98/CCLD-Net.git
cd CCLDNet

Prerequisites

Required packages are listed below:

  • Ubuntu 16.04
  • python=3.7
  • pytorch>=1.7
  • cuda>=10.1

Inference

  • Download the pre-trained weights and save them as ./model_save/name/last.pth (e.g. ./model_save/EndoScene_CCLDNet/last.pth )

    • large means the pre-trained weights for CCLDNet*
    • EndoScene_CCLDNet (Baidu Cloud, Fetch code: c4ed)
    • EndoScene_CCLDNet_large (Baidu Cloud, Fetch code: nqys)
    • CVC_Kva_CCLDNet (Baidu Cloud, Fetch code: z42k)
    • CVC_Kva_CCLDNet_large (Baidu Cloud, Fetch code: af2o)
    • ISIC_2018_CCLDNet (Baidu Cloud, Fetch code: lmyp)
    • ISIC_2018_CCLDNet_large (Baidu Cloud, Fetch code: abi8)
  • Run the following command for testing:


 # EndoScene
python test.py --model_path ./model_save/EndoScene_CCLDNet/last.pth --swin_type base --crossnum endo --data_dir ./data/TrainDataset_Endo
python test.py --model_path ./model_save/EndoScene_CCLDNet_large/last.pth --swin_type large --crossnum endo --data_dir ./data/TrainDataset_Endo
 # CVC_Kva
 python test.py --model_path ./model_save/CVC_Kva_CCLDNet/last.pth --swin_type base --crossnum CVC --data_dir ./data/TrainDataset_CVC_Kva
python test.py --model_path ./model_save/CVC_Kva_CCLDNet_large/last.pth --swin_type large --crossnum CVC --data_dir ./data/TrainDataset_CVC_Kva
 # ISIC_2018
 python test.py --model_path ./model_save/ISIC_2018_CCLDNet/last1.pth --swin_type base --crossnum CA1 --data_dir ./data/TrainDataset_ISIC_2018
python test.py --model_path ./model_save/ISIC_2018_CCLDNet_large/last1.pth --swin_type large --crossnum CA1 --data_dir ./data/TrainDataset_ISIC_2018
...
python test.py --model_path ./model_save/ISIC_2018_CCLDNet/last5.pth --swin_type base --crossnum CA5 --data_dir ./data/TrainDataset_ISIC_2018
python test.py --model_path ./model_save/ISIC_2018_CCLDNet_large/last5.pth --swin_type large --crossnum CA5 --data_dir ./data/TrainDataset_ISIC_2018
  • Note that for researchers training with multiple GPUs, remember to add --multi_load to the inference command during testing.

Training

  • Run the following command for training (Note that the type_name below can be either base or large.):
    
    # EndoScene
    python train.py --crossnum 'endo' --swin_type [type_name]  --data_dir ./data/TrainDataset_Endo  
    
    # CVC_Kva
    python train.py --crossnum 'CVC' --swin_type [type_name]  --data_dir ./data/TrainDataset_CVC_Kva  
    
    # ISIC_2018
    python train.py --crossnum 'CA1' --swin_type [type_name]  --data_dir ./data/TrainDataset_2018
    ...  
    python train.py --crossnum 'CA5' --swin_type [type_name]  --data_dir ./data/TrainDataset_2018
    

Result

  • Qualitative performance

    Quantitative results in terms of Dice coefficient (Dice), Accuracy (Acc), Specificity (Spe), Jaccard index (Jac), Sensitivity (Sen) and mean absolute error (MAE). Six datasets are employed. For brevity, values in the table below are in the form of CCLDNet|CCLDNet*.

DatasetDiceJacSpeAccSenMAE
EndoScene (912 pairs)88.51 | 89.2282.52 | 83.3699.67 | 99.6697.55 | 97.6587.67|88.472.31|2.21
ClinicDB (612 pairs)93.89 | 94.0289.56 | 89.2699.63 | 99.5199.39 | 99.3495.09|94.570.49|0.54
Kvasir (1000 pairs)91.73 | 92.2886.97 | 87.7899.03 | 99.2097.99 | 98.0290.65|91.391.71|1.66
ColonDB (380 pairs)78.64 | 79.8071.29 | 72.5598.88 | 98.9596.93 | 96.9081.64|83.072.79|2.83
EndoScene (300 pairs)87.92 | 90.7580.97 | 83.9699.36 | 99.5999.22 | 99.4595.46|95.640.65|0.48
ETIS (196 pairs)78.64 | 77.5371.34 | 70.1598.69 | 98.9998.42 | 98.7185.95|84.621.37|1.12
ISIC 2018 (2594 pairs)90.97 | 91.1584.72 | 84.9997.65 | 97.6896.72 | 96.7691.56|91.692.65|2.58
  • Downloading links of our result maps: