Awesome
<div align="center"> <h1> UNet Zoo for Medical Image Segmentation </h1> </div>Introduction
The Exploration of CNN-, ViT-, Mamba-, and KAN-based UNet for Medical Image Segmentation.
9 Segmentation Networks, 7 public benchmark datasets, 6 evaluation metrics are public available!
Please keep an eye on this repository. I plan to complete it by the end of September 2024.
Contents
- Segmentation Network List
- Segmentation Dataset List
- Segmentation Evaluation Metrics List
- Environment
- Usage
- Reference
Networks
- CNN-based UNet
UNet, Attention UNet, DenseUNet, ConvUNeXt,
- ViT-based UNet
TransUNet, SwinUNet
- Mamba-based UNet
Mamba-UNet, VM-UNet
- KAN-based UNet
U-KAN, etc
Datasets
- Dataset of GLAS -> [Official], [Google Drive], [Baidu Netdisk] with passcode: 'fp42'
- Dataset of BUSI -> [Official], [Google Drive], [Baidu Netdisk] with passcode: '5m5m'
- Dataset of 2018DSB -> [Official], [Google Drive], [Baidu Netdisk] with passcode: 'yavx'
- Dataset of CVC-ClinicDB -> [Official], [Google Drive], [Baidu Netdisk] with passcode: '3tpy'
- Dataset of Kvasir-SEG -> [Official], [Google Drive], [Baidu Netdisk] with passcode: '6fgs'
- Dataset of ISIC2016 -> [Official], [Google Drive], [Baidu Netdisk] with passcode: 'm2fw'
- Dataset of PH2 -> [Official], [Google Drive], [Baidu Netdisk] with passcode: 'aiax'
Metrics
Dice, IoU, Accuracy, Precision, Sensitivity, Specificity
Environment
- Pytorch
- Some basic python packages: Torchio, Numpy, Scikit-image, SimpleITK, Scipy, Medpy, nibabel, tqdm ......
- For Mamba-related packages, please see [PyPI (mamba-ssm)], [Official GitHub (mamba)], [PyPI (causal-conv1d)] , [GitHub (causal-conv1d)].
- For KAN-related packages, please see [PyPI (pykan)], [Official GitHub (ConvKAN)], [PyPI (convkan)], [Official GitHub (ConvKAN)].
Usage
- Download the Code.
git clone https://github.com/ziyangwang007/UNet-Seg.git
cd UNet-Seg
-
Download the Dataset via Google Drive or Baidu Netdisk to
UNet-Seg/data
folder. -
Train the model.
CUDA_VISIBLE_DEVICES=0 python -u train.py --network UNet --datasets PH2 && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network UNet --datasets isic16 && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network UNet --datasets BUSI && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network UNet --datasets GLAS && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network UNet --datasets CVC-ClinicDB && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network UNet --datasets Kvasir-SEG && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network UNet --datasets 2018DSB && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network DenseUnet --datasets PH2 && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network DenseUnet --datasets isic16 && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network DenseUnet --datasets BUSI && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network DenseUnet --datasets GLAS && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network DenseUnet --datasets CVC-ClinicDB && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network DenseUnet --datasets Kvasir-SEG && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network DenseUnet --datasets 2018DSB && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network AttU_Net --datasets PH2 && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network AttU_Net --datasets isic16 && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network AttU_Net --datasets BUSI && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network AttU_Net --datasets GLAS && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network AttU_Net --datasets CVC-ClinicDB && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network AttU_Net --datasets Kvasir-SEG && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network AttU_Net --datasets 2018DSB && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network ConvUNeXt --datasets PH2 && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network ConvUNeXt --datasets isic16 && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network ConvUNeXt --datasets BUSI && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network ConvUNeXt --datasets GLAS && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network ConvUNeXt --datasets CVC-ClinicDB && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network ConvUNeXt --datasets Kvasir-SEG && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network ConvUNeXt --datasets 2018DSB && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network SwinUnet --datasets PH2 && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network SwinUnet --datasets isic16 && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network SwinUnet --datasets BUSI && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network SwinUnet --datasets GLAS && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network SwinUnet --datasets CVC-ClinicDB && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network SwinUnet --datasets Kvasir-SEG && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network SwinUnet --datasets 2018DSB && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network TransUNet --datasets PH2 && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network TransUNet --datasets isic16 && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network TransUNet --datasets BUSI && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network TransUNet --datasets GLAS && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network TransUNet --datasets CVC-ClinicDB && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network TransUNet --datasets Kvasir-SEG && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network TransUNet --datasets 2018DSB && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network KANUSeg --datasets PH2 && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network KANUSeg --datasets isic16 && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network KANUSeg --datasets BUSI && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network KANUSeg --datasets GLAS && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network KANUSeg --datasets CVC-ClinicDB && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network KANUSeg --datasets Kvasir-SEG && \
CUDA_VISIBLE_DEVICES=0 python -u train.py --network KANUSeg --datasets 2018DSB
- Test the model.
CUDA_VISIBLE_DEVICES=0 python -u test.py --network UNet --datasets PH2 && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network UNet --datasets isic16 && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network UNet --datasets BUSI && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network UNet --datasets GLAS && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network UNet --datasets CVC-ClinicDB && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network UNet --datasets Kvasir-SEG && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network UNet --datasets 2018DSB && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network DenseUnet --datasets PH2 && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network DenseUnet --datasets isic16 && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network DenseUnet --datasets BUSI && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network DenseUnet --datasets GLAS && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network DenseUnet --datasets CVC-ClinicDB && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network DenseUnet --datasets Kvasir-SEG && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network DenseUnet --datasets 2018DSB && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network AttU_Net --datasets PH2 && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network AttU_Net --datasets isic16 && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network AttU_Net --datasets BUSI && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network AttU_Net --datasets GLAS && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network AttU_Net --datasets CVC-ClinicDB && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network AttU_Net --datasets Kvasir-SEG && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network AttU_Net --datasets 2018DSB && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network ConvUNeXt --datasets PH2 && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network ConvUNeXt --datasets isic16 && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network ConvUNeXt --datasets BUSI && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network ConvUNeXt --datasets GLAS && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network ConvUNeXt --datasets CVC-ClinicDB && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network ConvUNeXt --datasets Kvasir-SEG && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network ConvUNeXt --datasets 2018DSB && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network SwinUnet --datasets PH2 && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network SwinUnet --datasets isic16 && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network SwinUnet --datasets BUSI && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network SwinUnet --datasets GLAS && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network SwinUnet --datasets CVC-ClinicDB && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network SwinUnet --datasets Kvasir-SEG && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network SwinUnet --datasets 2018DSB && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network TransUNet --datasets PH2 && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network TransUNet --datasets isic16 && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network TransUNet --datasets BUSI && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network TransUNet --datasets GLAS && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network TransUNet --datasets CVC-ClinicDB && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network TransUNet --datasets Kvasir-SEG && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network TransUNet --datasets 2018DSB && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network KANUSeg --datasets PH2 && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network KANUSeg --datasets isic16 && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network KANUSeg --datasets BUSI && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network KANUSeg --datasets GLAS && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network KANUSeg --datasets CVC-ClinicDB && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network KANUSeg --datasets Kvasir-SEG && \
CUDA_VISIBLE_DEVICES=0 python -u test.py --network KANUSeg --datasets 2018DSB
Reference
TBC
TBC
TBC