Skip to content

lyskds/LLCM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LLCM

Leapfrog Latent Consistency Model for Medical Images Generation

The scarcity of accessible medical image data poses a significant obstacle in effectively training deep learning models for medical diagnosis, as hospitals refrain from sharing their data due to privacy concerns. In response, we gathered a diverse dataset named MedImgs, which comprises over 250,127 images spanning 61 disease types and 159 classes of both humans and animals from open-source repositories. We propose a Leapfrog Latent Consistency Model (LLCM) that is distilled from a retrained diffusion model based on the collected MedImgs dataset, which enables our model to generate real-time high-resolution images. You may find belwo some sample medical images generated by our LLCM at several inference steps

image

Results comparison with the other state-of-the-art (SOTA) models image

  • You may refer to our paper for more details

Demo

  • If you want to generate medical images using our model weight, visit our website. From the drop-down menu, select any prompt and the number of images. You may generate any number of images as per your requirement. The more the number of images to be generated, the more the inference time. So, we restrict the maximum number of images to 4 for a single click on our website.
  • An example is shown below

image

How to fine-tune our model with your dataset

  • Install these libraries: pip install diffusers transformers accelerate
  • Move to the directory of the codes and launch this script 'train_text_to_img_llcm_launch.py' using the command shown below, after loading our model weight and train it to obtain the fine-tuned weight.
  • python train_text_to_img_llcm_launch.py

How to generate image with your fine-tuned weight

  • Run 'inference.py' using the command shown below, after loading your fine-tuned weight to genetate images by specifying the prompt.
  • python inference.py

About

Leapfrog Latent Consistency Model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages