harveymannering commited on
Commit
2719411
1 Parent(s): 120bc8b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -19
README.md CHANGED
@@ -1,21 +1,8 @@
1
- See the following code:
2
-
3
  # Model Use
4
 
5
- This model is an class condition DDPM that can generate ultra sound images. It is based on the diffusion model from the [Towards Realistic Ultrasound Fetal Brain Imaging Synthesis](https://arxiv.org/abs/2304.03941) paper. The dataset used to train the model is this [FETAL_PLANES_DB dataset](https://zenodo.org/record/3904280). The classes that can be generated and the associated integer labels are
6
-
7
- | Label | Class |
8
- | -------- | ------- |
9
- | 0 | Fetal abdomen |
10
- | 1 | Fetal brain |
11
- | 2 | Fetal femur |
12
- | 3 | Fetal thorax |
13
- | 4 | Maternal cervix |
14
- | 5 | Other |
15
 
16
- When generating images simply provide the label of you chosen class as an argument to the UNet.
17
-
18
- Below you will see code that allows you to load this model, generate an image, and display it.
19
 
20
  ```python
21
  # !pip install --upgrade diffusers transformers accelerate scipy ftfy safetensors
@@ -47,16 +34,15 @@ plt.imshow(np.transpose(x[0].cpu().detach().numpy(), (1,2,0)) + 0.5)
47
  ```
48
 
49
  # Example Outputs
50
-
51
- The images from the original dataset as well as synthetic images. The following preprocessing/augmentation steps were applied to every image:
52
  1. Random Horizontal Flip
53
  2. Random Rotation (±45°)
54
- 3. Resize with Bicubic Interpolation
55
 
56
  <img width="608" alt="image" src="https://cdn-uploads.huggingface.co/production/uploads/6349716695ab8cce385f450e/uxDp-0svPAp2dCmTK36rf.png">
57
 
58
  # Training Loss
59
 
60
- Baseline was trained on images from the "Voluson E6" machine only. Training and validation loss are given below. Checkpoints were saved every 50 epochs and the best-performing checkpoint on the validation loss was at epoch 250. The model provided here is the checkpoint from epoch 250.
61
 
62
  <img width="608" alt="image" src="https://cdn-uploads.huggingface.co/production/uploads/6349716695ab8cce385f450e/XEZb34rdFYaeFckDMyCYm.png">
 
 
 
1
  # Model Use
2
 
3
+ This model is a class-conditional DDPM that can generate ultrasound images. It is based on the diffusion model from the [Towards Realistic Ultrasound Fetal Brain Imaging Synthesis](https://arxiv.org/abs/2304.03941) paper. The dataset used to train the model is the [FETAL_PLANES_DB dataset](https://zenodo.org/record/3904280). The classes that can be generated and the associated integer labels are: Fetal abdomen (0), Fetal brain (1), Fetal femur (2), Fetal thorax (3), Maternal cervix (4), and Other (5). When generating images, simply provide the label of your chosen class as an argument to the UNet.
 
 
 
 
 
 
 
 
 
4
 
5
+ Below, you will find code that allows you to load this model, generate an image, and display it:
 
 
6
 
7
  ```python
8
  # !pip install --upgrade diffusers transformers accelerate scipy ftfy safetensors
 
34
  ```
35
 
36
  # Example Outputs
37
+ The figure below includes examples of both real and synthetic images. The following preprocessing and augmentation steps were applied to all training images:
 
38
  1. Random Horizontal Flip
39
  2. Random Rotation (±45°)
40
+ 3. Resize to 128×128 using Bicubic Interpolation
41
 
42
  <img width="608" alt="image" src="https://cdn-uploads.huggingface.co/production/uploads/6349716695ab8cce385f450e/uxDp-0svPAp2dCmTK36rf.png">
43
 
44
  # Training Loss
45
 
46
+ The baseline model was trained exclusively on images from the 'Voluson E6' machine. Training and validation losses are presented below. Checkpoints were saved every 50 epochs, and the best-performing checkpoint in terms of validation loss was found at epoch 250. The model provided here corresponds to the checkpoint from epoch 250.
47
 
48
  <img width="608" alt="image" src="https://cdn-uploads.huggingface.co/production/uploads/6349716695ab8cce385f450e/XEZb34rdFYaeFckDMyCYm.png">