Skip to content
프로젝트

소개

CVPR 2026 (Main) | MambaLiteUNet: Cross-Gated Adaptive Feature Fusion for Robust Skin Lesion Segmentation

AI 및 머신러닝

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
+1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

MambaLiteUNet | arXiv | Slides | Paper Link

This repository provides code for MambaLiteUNet: Cross-Gated Adaptive Feature Fusion for Robust Skin Lesion Segmentation, including environment setup, dependency installation, dataset preparation, training, and testing.


MambaLiteUNet CVPR 2026 Poster


1. Environment Setup & Install Dependencies

  1. Create a Conda environment with Python 3.9:

    conda create -n mambaliteunet python=3.9 -y
    conda activate mambaliteunet
    
  2. Upgrade pip (optional, but recommended):

    pip install --upgrade pip
    
  3. Install PyTorch with CUDA 11.8:

    pip install torch==2.6.0+cu118 torchvision==0.21.0+cu118 torchaudio==2.6.0+cu118 --index-url https://download.pytorch.org/whl/cu118
    

    Or try this:

    pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
    

    This installs a PyTorch build (e.g., 2.6.0+cu118) compatible with CUDA 11.8.

  4. Install additional dependencies:

    pip install -r requirements.txt
    

    If conflicts occur, recreate or adjust package versions.

    N.B. If causal_conv1d or mamba_ssm fails, try:

    pip install --no-cache-dir causal_conv1d mamba_ssm
    
  5. Verify installation:

    python -c "import torch; print(torch.__version__); print(torch.cuda.is_available())"
    
    • Expected output includes a PyTorch version (2.6.0+cu118) and True for CUDA availability.
    • If False, confirm you have correct NVIDIA drivers and CUDA installed.

2. Dataset Preparation

Depending on your dataset, you may need additional preprocessing. For certain legacy dependencies (e.g., scipy==1.2.1), consider using a separate Python 3.7 environment:

conda create -n tool python=3.7 -y
conda activate tool
pip install h5py
conda install scipy==1.2.1
pip install pillow

ISIC2017

  1. Download from ISIC 2017 Challenge.
  2. Extract training and ground-truth folders into /data/ISIC2017/.
  3. Run:
    python prepare_ISIC2017.py
    

ISIC2018

  1. Download from ISIC 2018 Challenge.
  2. Extract training and ground-truth folders into /data/ISIC2018/.
  3. Run:
    python prepare_ISIC2018.py
    

HAM10000

  1. Download from HAM10000.
  2. Extract training and ground-truth folders into /data/HAM10000/.
  3. Run:
    python prepare_HAM10000.py
    

PH2

  1. Download from PH2.
  2. Extract training and ground-truth folders into /data/PH2/.
  3. Run:
    python prepare_PH2.py
    

Custom Dataset

  1. Organize files as:
    ./custom_data/
     ├── images/
     │   ├── xx0.png
     │   ├── xx1.png
     ├── masks/
     │   ├── xx0.png
     │   ├── xx1.png
     ├── prepare_custom_dataset.py
    
  2. Adjust prepare_custom_dataset.py for train, validation, and test split sizes.
  3. Run:
    python prepare_custom_dataset.py
    

3. Training and Testing

3.1 Training MambaLiteUNet

Run the training script:

python train.py
  • By default, the training script may automatically run a test at the end of each epoch (or at final epochs). If you prefer to run tests separately or later, you can disable that section in train.py and use test.py whenever desired.
  • Outputs (logs, checkpoints, etc.) appear in ./results/.

If pretrained weights are needed, ensure you have them referenced in train.py or elsewhere.

3.2 Testing MambaLiteUNet

  1. Update the checkpoint path in test.py (e.g., resume_model) to your trained model.
  2. Run:
    python test.py
    
  3. Outputs will be saved in ./results/.

N.B. Additional Notes on Model Complexity

Since MambaLiteUNet incorporates Mamba-based components, we adopted a profiling approach similar to those used in related Mamba-based segmentation models to maintain methodological consistency in our comparisons. Specifically, the model complexity reported in our paper was evaluated using thop.profile() with an input resolution of 256 × 256, following approaches similar to those implemented in VM-UNet, VM-UNetV2, and UltraLight-VM-UNet, which were included as baseline models in our study.

Due to the specific computational characteristics of Mamba/SSM architectures, comprehensive FLOPs estimation may require additional accounting for selective-scan operations, as discussed in the mamba repo. Additionally, thop-reported parameter counts may differ from the complete parameter count obtained directly through PyTorch, depending on the profiler version and implementation.

Notes on Reproducibility and Experimental Variability

Exact reproduction of deep learning results can be challenging, even when using the same code and random seeds. Small variations in performance may arise due to two main factors:

  1. Non-deterministic GPU kernels: Some CUDA operations may not be fully deterministic, depending on their implementation. Results can therefore vary across runs, GPU architectures, and library versions.
  2. Training configuration and checkpoint selection: Even with identical data splits and preprocessing, differences in effective batch size and checkpoint-selection criteria can affect the final results. On smaller datasets, such variations may have a greater impact.

We believe these references can help you learn more: References: [1] PyTorch Reproducibility Notes [2] Summers & Dinneen, ICML 2021 [3] Bouthillier et al., MLSys 2021 [4] Zhuang et al., MLSys 2022 [5] Åkesson et al., Computers in Biology and Medicine, 2024


4. Citation

If you find this repository or our work useful in any way, please consider citing our paper:

@inproceedings{mambaliteunet,
  title={MambaLiteUNet: Cross-Gated Adaptive Feature Fusion for Robust Skin Lesion Segmentation},
  author={Rahman, Md Maklachur and Jung, Soon Ki and Hammond, Tracy},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={8556--8565},
  year={2026}
}

5. Acknowledgements

We thank the organizers of the ISIC 2017 and ISIC 2018 Challenges and the open-source community for publicly releasing valuable datasets, including HAM10000, PH2, and others. We also acknowledge the authors of the open-source repositories used in this work: VMamba, Vision Mamba, VM-UNet, and UltraLight-VM-UNet.


Enjoy experimenting with MambaLiteUNet! If you encounter any issues, consider opening an issue or discussion in the repository.

관련 프로젝트 살펴보기

불러오는 중…