- Install codecs for ffmpeg
sudo apt install ubuntu-restricted-extras
sudo apt install ffmpeg
- Create a virtual environment and install the dependencies
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- Clone MONAI Generative Models repository and install it
git clone https://github.com/Project-MONAI/GenerativeModels.git
cd GenerativeModels
pip install .
cd ..
- Download the model weights to the
pretrained_models
directory The models can be downloaded from here and here.
They should be place in
gradio_medical_ldm/
L pretrained_models/
L autoencoder.pth
L diffusion_model.pth
- Run the app
gradio app.py
- Open the app in your browser (tested with Chrome)
The outputs directory contain the generated .nii.gz images.