bala1802 commited on
Commit
51ce0fb
β€’
1 Parent(s): c4ed69a

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +52 -13
README.md CHANGED
@@ -1,13 +1,52 @@
1
- ---
2
- title: StableDiffusionModel
3
- emoji: 🌍
4
- colorFrom: purple
5
- colorTo: green
6
- sdk: gradio
7
- sdk_version: 4.14.0
8
- app_file: app.py
9
- pinned: false
10
- license: apache-2.0
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ERA_Session20
2
+
3
+ ## Objective:
4
+ The purpose of this repository is to understand the architecture of Generative Art & Stable Diffusion
5
+
6
+ ## Repository:
7
+ ```
8
+ .
9
+ β”œβ”€β”€ LICENSE
10
+ β”œβ”€β”€ README.md
11
+ β”œβ”€β”€ config.py
12
+ β”œβ”€β”€ diffusion_loss.py
13
+ β”œβ”€β”€ image_generator.py
14
+ β”œβ”€β”€ inference.ipynb
15
+ β”œβ”€β”€ model.py
16
+ β”œβ”€β”€ prediction.py
17
+ β”œβ”€β”€ requirements.txt
18
+ β”œβ”€β”€ symmetry_loss_analysis.py
19
+ └── utils.py
20
+ ```
21
+
22
+ ## How to execute this repository?
23
+
24
+ In `inference.ipynb`,
25
+ - add the prompt in the `prompt` variable
26
+ - configure the required loss function and execute the prediction function
27
+
28
+ ## Results
29
+
30
+ `prompt = A King riding a horse`
31
+
32
+ ### 1. Without Loss Function
33
+
34
+ ![Alt text](image.png)
35
+
36
+ ### 2. Blue Channel
37
+
38
+ Computing the average absolute difference between the `blue channel` values of each pixel in the batch and the target value of `0.9`. This allows us to measure how far, on average the blue channel deviates from the desired value of `0.9` across all images in the batch
39
+
40
+ ![Alt text](image-1.png)
41
+
42
+ ### 3. Elastic Deformations
43
+
44
+ A data augmentation process. Applying the random elastic deformations to get an input image. The Strength and Smoothness of these deformations are controlled by the `alpha` and `sigma` parameters. The process involves generating displacement vectors for each pixel, adding these vectors to an identified grid, and then using the deformed grid to interpolate pixel values from the original image.
45
+
46
+ ![Alt text](image-2.png)
47
+
48
+ ### 4. Saturation
49
+
50
+ Applied a saturation adjustment to the images, and the error is calculated as the mean absolute pixel-wise difference between the original and the transformed images
51
+
52
+ ![Alt text](image-3.png)