|
|
--- |
|
|
license: mit |
|
|
--- |
|
|
|
|
|
# Model Card for DiffuSETS |
|
|
|
|
|
## Description |
|
|
|
|
|
<!-- Provide a longer summary of what this model is. --> |
|
|
|
|
|
- **Developed by:** Yongfan Lai |
|
|
- **License:** mit |
|
|
|
|
|
|
|
|
### Source Code |
|
|
|
|
|
<!-- Provide the basic links for the model. --> |
|
|
|
|
|
- **Repository:** [Github](https://github.com/Raiiyf/text2ecg) |
|
|
|
|
|
### Assets List |
|
|
|
|
|
- **prerequisites_for_inference.zip**: |
|
|
``` |
|
|
prerequisites/ |
|
|
βββ clf_data/ : Directory contains data for imbalanced classification experiments |
|
|
βββ clip_model.pth : CLIP model checkpoints. |
|
|
βββ mimic_vae_lite_0_new.pt : Subsets of VAE encoding latents of MIMIC IV ECG dataset. |
|
|
βββ ptbxl_text_embed.csv : Pre-generated text embeddings of PTB-XL dataset |
|
|
βββ ptbxl_vae.pt : VAE encoding latents of PTB-XL dataset. |
|
|
βββ unet_all.pth : A pretrained full capacity DiffuSETS model. |
|
|
βββ vae_model.pth : VAE model checkpoints suit for the unet model and latent datasets above. |
|
|
``` |
|
|
|
|
|
- **mimic_vae_lite_0_new.zip**: |
|
|
``` |
|
|
prerequisites/ |
|
|
βββ mimic_vae_0_new.pt: VAE encoding latents of MIMIC IV ECG dataset. Only needed while training. |
|
|
``` |
|
|
|
|
|
## Usage |
|
|
|
|
|
|
|
|
**Quick Start:** Download and unzip the prerequisites_for_inference.zip, place the `./prerequisites` folder under repo's root, then start ECG generation through |
|
|
|
|
|
```sh |
|
|
python DiffuSETS_inference.py path/to/your/config.json |
|
|
``` |
|
|
|
|
|
or |
|
|
|
|
|
```sh |
|
|
python -m test_scripts.diversity |
|
|
``` |
|
|
|
|
|
**For users want to train from scratch:** Besides above prerequisites_for_inference.zip, the mimic_vae_0_new.pt (training data encoded by vae) should also be downloaded and put into the `./prerequisites` folder. |
|
|
|
|
|
For more details about training and inference, please refer to our [github repo page](https://github.com/Raiiyf/text2ecg) |
|
|
|