Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.49 KB

Segmentation.md

File metadata and controls

50 lines (37 loc) · 1.49 KB

PanDerm - Skin Lesion Segmentation

This implementation uses PanDerm for skin lesion segmentation.

Install Environment

Main dependencies: Pytorch, Pytorch Lightning, MMSegmentation

cd segmentation
pip install -r requirements.txt

Data Preparation

  1. Download datasets:
  2. Update _load_name() in ./datasets/dataset_seg.py with your data path

Fine-tuning with PanDerm Weight

  1. Download Pretrained Weights

  2. Set Pretrained Path

    • Update cae_weight in ./models/cae_seg.py
    • Modify pretrained parameter in run.sh
  3. Start Training

    cd segmentation
    bash run.sh

    Note: Adjust the path config to your desired storage location

  4. Evaluation

    • Add --evaluate to run.sh for evaluation mode
    • Model fine-tuned weights for evaluation on HAM10000 dataset Download here
    cd segmentation
    bash run.sh --evaluate

    This loads the checkpoint from your specified model storage path

Starter Code for Your Own Dermoscopic Images

See evaluate.ipynb to learn:

  • Loading our pre-trained model
  • Using it for skin lesion segmentation