Skip to content
/ LEAF Public

Implementation of "Latent Diffusion with Efficient Encoder Distillation for Aligned Features in Medical Image Segmentation"

License

Notifications You must be signed in to change notification settings

lispear/LEAF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leaf LEAF: Latent Diffusion with Efficient Encoder Distillation for Aligned Features in Medical Image Segmentation

Performance

leaf

Setup

  1. Clone the repository:
git clone https://github.com/lispear/LEAF.git
cd LEAF-master
  1. Install dependencies (requires conda):
conda create -n leaf python=3.11.11 -y
conda activate leaf
pip install -r requirements.txt 

Training

  1. Create assets directory:
mkdir assets
cd assets
  1. Prepare pre-trained models:
  • Download U-Net and VAE
  • Place the downloaded files in the assets folder.
  • Extract the weights:
unzip kl-f8.zip -d vae
unzip lsun_churches.zip -d unet
cd ..
python extract_weights.py
  1. Generate training configuration:
python src/util/config_util.py --output config.yaml
  1. Run training script:
accelerate launch \
    --num_processes 1 \
    --num_machines 1 \
    --mixed_precision 'no' \
    --dynamo_backend 'no' \
    train.py --config config.yaml

About

Implementation of "Latent Diffusion with Efficient Encoder Distillation for Aligned Features in Medical Image Segmentation"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages