Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Warvito committed Apr 9, 2023
1 parent 731ee63 commit 9f54d3d
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,31 @@ preprocess the data. The following is the list of execution for preprocessing:
After preprocessing, you can train the model using similar commands as in the following files (note: This project was
executed on a cluster with RunAI platform):

1) `cluster/runai/training/stage1.sh`
2) `cluster/runai/training/ldm.sh`

These files indicates which parameters and configuration file was used for training, as well how the host directories
1) `cluster/runai/training/stage1.sh` - Command to start to execute in the server the training the first stage of the model.
The main python script in for this is the `src/python/training/train_aekl.py` script. The `--volume` flags indicate how the dataset
is mounted in the Docker container.
2) `src/python/training/eda_ldm_scaling_factor.py` - Script to find the best scaling factor for the latent diffusion model.
3) `cluster/runai/training/ldm.sh` - Command to start to execute in the server the training the diffusion model on the latent representation.
The main python script in for this is the `src/python/training/train_ldm.py` script. The `--volume` flags indicate how the dataset
is mounted in the Docker container.

These `.sh` files indicates which parameters and configuration file was used for training, as well how the host directories
were mounted in the used Docker container.

### Inference and evaluation
Finally, we converted the mlflow model to .pth files (for easly loading in MONAI), sampled images from the diffusion
model, and evaluated the model. The following is the list of execution for inference and evaluation:

1) `src/python/testing/convert_mlflow_to_pytorch.py` - Convert mlflow model to .pth files
2) `src/python/testing/sample_images.py` - Sample images from the diffusion model
3) `src/python/testing/compute_fid.py` - Compute FID score between generated images and real images
4) `src/python/testing/compute_msssim.py` - Measure the mean structural similarity index between images in
order to measure the diversity between them, as well between real and reconstructed images (created by the AutoencoderKL
).

2) `src/python/testing/sample_images.py` - Sample images from the diffusion model. `cluster/runai/testing/sampling_unconditioned.sh` shows
how to execute this script in the server to generate the 1000 samples used in the following scripts.
3) `src/python/testing/compute_msssim_reconstruction.py` - Measure the mean structural similarity index between images and
reconstruction to measure the preformance of the first stage.
4) `src/python/testing/compute_msssim_sample.py` - Measure the mean structural similarity index between test images and
samples in order to measure the diversity of the synthetic data.
5) `src/python/testing/compute_msssim_test_set.py` - Measure the mean structural similarity index between test images
to measure the diversity of the reference test set.
6) `src/python/testing/compute_fid.py` - Compute FID score between generated images and real images.

## Released models
- Version 0.1 - (Mar 9, 2023) Initial release
Expand Down

0 comments on commit 9f54d3d

Please sign in to comment.