Home

Awesome

[Swin-LiteMedSAM] Submission to the SEGMENT ANYTHING IN MEDICAL IMAGES ON LAPTOP 2024 CVPR challenge [Teamname: lkeb]

<p align="center"> <img src="asset/Swin-LiteMedSAM.png" width="800"/> </p>

Install

Model

Usage

  1. Data

    Download training npz data from challenge website, the training data contained 11 modalities, including CT, MRI, PET, X-Ray, ultrasound, mammography, OCT, endoscopy, fundus, dermoscopy, and microscopy.

  2. Train

    • Distill encoder
    cd distill
    python train_distill.py
    
    • Only train decoder
    python train.py
    
    • Train encoder & decoder together
    python train.py -freeze False
    
  3. Docker Infer

    • Load the docker
    docker load -i lkeb.tar.gz
    
    • Run the docker infer case in $PWD/imgs
    docker container run -m 8G --name lkeb --rm -v $PWD/imgs/:/workspace/inputs/ -v $PWD/lkeb/:/workspace/outputs/ lkeb:latest /bin/bash -c "sh predict.sh"
    
    • if you run into Permission denied error.
    chmod -R 777 ./*