DhruvParth commited on
Commit
f89b7e9
1 Parent(s): 1436a4e

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +70 -0
README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - pytorch
5
+ - diffusers
6
+ - unconditional-image-generation
7
+ - diffusion-models-class
8
+ ---
9
+
10
+ ### Fine-tuned Skin Rash Detection Model v2
11
+
12
+ #### Model Overview
13
+ - **Base Model**: `google/ddpm-celebahq-256`
14
+ - **Fine-tuning Dataset**: Skin Rash Dataset
15
+ - **Output Image Size**: 256 x 256 pixels
16
+
17
+ #### Updates and Changes
18
+ 1. **Parameter Increase**:
19
+ - Previous Model: 18.54 Million Parameters
20
+ - Current Model: 113.67 Million Parameters
21
+
22
+ 2. **Image Output Size**:
23
+ - Previous: 32 x 32 pixels
24
+ - Current: 256 x 256 pixels
25
+
26
+ 3. **Batch Size**:
27
+ - Previous: 64 samples per batch
28
+ - Current: 6 samples per batch
29
+
30
+ 4. **Gradient Accumulation**:
31
+ - Implemented gradient accumulation to simulate a larger batch size without exceeding GPU memory limits.
32
+
33
+ 5. **Timesteps**:
34
+ - Reduced timesteps from 1000 to 40 for faster training and inference.
35
+
36
+ #### Training Details
37
+ - **Epochs**: 12
38
+ - **Number of Training Images**: 656
39
+ - **Optimizer**: AdamW with learning rate adjusted for gradient accumulation
40
+ - **Learning Rate**: Initially set at \(1 imes 10^-5\), adjusted for gradient accumulation
41
+ - **Gradient Accumulation Steps**: 2
42
+ - **Loss Function**: Mean Squared Error (MSE) Loss
43
+
44
+ #### Performance
45
+ - **Training Loss**: Monitored and recorded over 12 epochs, with periodic visualization of generated images to ensure the model learns effectively.
46
+
47
+ #### Training Environment
48
+ - **Hardware**: GPU with 15GB RAM
49
+ - **Software**: PyTorch, torchvision, diffusers library
50
+
51
+ #### Usage
52
+ - The fine-tuned model can generate high-resolution images of skin rashes, which can be useful for medical analysis and diagnosis.
53
+ - Due to the increased parameter count and higher resolution, the model is more accurate in capturing fine details in the images.
54
+
55
+ #### Example Usage Code
56
+ ```python
57
+ from diffusers import DDPMPipeline
58
+
59
+ pipeline = DDPMPipeline.from_pretrained('DhruvParth/ddpm-celebahq-256-fineTuned-skin_rash_v2_12epochs')
60
+ image = pipeline().images[0]
61
+ image
62
+ ```
63
+ ```
64
+
65
+ #### Considerations
66
+ - **Batch Size**: Due to GPU memory constraints, batch size is limited to 6 samples.
67
+ - **Training Time**: Reduced timesteps to 40, allowing faster training and inference without significantly compromising on quality.
68
+ - **Gradient Accumulation**: Enabled to manage large model parameter count and small batch size effectively.
69
+
70
+ This model card provides an overview of the fine-tuning process and the modifications made to enhance the model's performance on the skin rash dataset. The details should help users understand the changes and the expected usage of the model.