Skip to content
Snippets Groups Projects
Commit 3288f15b authored by td's avatar td
Browse files

README for part 1 and 2 (including images)

parent 4777386a
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,49 @@
MSO 3.4 Apprentissage Automatique
Thomas DESGREYS
---
To compute all the trainings and evaluations, I had to use both Google Colab and Kaggle (in parallel because of the
slowness) because they offer free GPU use. That's why on the final notebook
[BE2_GAN_and_Diffusion.ipynb](BE2_GAN_and_Diffusion.ipynb), some cells or not correctly run.
## Part 1: DC-GAN
The aim of this part is to generate written numbers thanks to a Deep Convolutional Generative Adversarial Networks.
![](written_numbers.png)
For this purpose, we implement a generator and a discriminator : the generator is trained to generate fake numbers from noise, in order to
lure the discriminator and the discriminator is trained to differentiate true numbers from fakes.
![](dcgan_results.png)
We can see on the loss curves that the accuracy of the discriminator is quite constant as the generator get better so its hard for it to get better.
The generator loss is decreasing. The variation of the losses is unstable as the two models are in competition.
![](dc_gan_generation.png)
We observe at the end of the training (5 epochs) that the generated images are really close to real written numbers.
However, we note that the generator doesn't create specific numbers but "something" that looks like a number.
## Part 2: Conditional GAN (cGAN)
In this part we aim at to generating facades from a template image.
![](cgan_training.png)
For this purpose, we use a UNET architecture for the generator and a patch GAN for the discriminator.
![](cgan_losses.png)
We can see the same unstable behavior as for the DC-GAN. The GAN is getting better on average so that's satisfying.
### Comparison of the model for 100 and 200 epochs
With the training data, we observe that the model use its memory to recreate quite the same facades. The model with 200 epochs generates less blurry images.
![](comparison_train.png)
With the validation data, the model is creating more original images. Its sticks to the template to create realistic images with still a lot of artefacts. The images are quite fare from the original but that's normal given the sole information of the template.
The model with 200 epochs show a bit more details but also mor noise so we can't conclude its better.
# How to submit your Work ?
![](comparison_val.png)
This work must be done individually. The expected output is a private repository named gan-diffusion on https://gitlab.ec-lyon.fr. It must contain your notebook (or python files) and a README.md file that explains briefly the successive steps of the project. Don't forget to add your teacher as developer member of the project. The last commit is due before 11:59 pm on Wednesday, April 9th, 2025. Subsequent commits will not be considered.
## Part 3: Diffusion
\ No newline at end of file
File moved
cgan_results.png

1.3 MiB

cgan_training.png

113 KiB

dc_gan_generation.png

393 KiB

dcgan_results.png

51.4 KiB

diffuser_result_4.png

82 KiB

diffuser_result_6.png

81.5 KiB

written_numbers.png

160 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment