248 - keras implementation of GAN to generate cifar10 images

  Рет қаралды 17,673

DigitalSreeni

DigitalSreeni

Күн бұрын

Code generated in the video can be downloaded from here:
github.com/bns...

Пікірлер: 47
@innibenn
@innibenn Жыл бұрын
Great tutorial. Thanks for the effort you put into providing such lessons in a simplified and understandable manner
@shaelanderchauhan1963
@shaelanderchauhan1963 2 жыл бұрын
This cannel is highly underrated what an amazing content.
@ashwinigavali3316
@ashwinigavali3316 Жыл бұрын
Excellent videos.. Thank you and keep uploading new videos.
@peluquin79
@peluquin79 2 жыл бұрын
great educational videos! keep up your great contribution to people!
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Thank you!
@abdulrahimshihabuddin1119
@abdulrahimshihabuddin1119 2 жыл бұрын
Sir, could you please post tutorials on object detection algorithms? Would love to know how the data preprocessing should be done for those .
@lalitsingh5150
@lalitsingh5150 2 жыл бұрын
Great Video sir...Thanks a lot
@mmrsagar
@mmrsagar Жыл бұрын
@DigitalSreeni Excellent. I have two questions though: 1. If you are selecting (batch_size or half batch_size) samples randomly from the dataset in each epoch, how do you make sure that training uses all the available images in the dataset during training? 2. What is the point of using half batch_size? why don't just train the discriminator using same size (e.g. batch_size) real and fake images? Thank you for the detailed tutorial as always.
@nedim8403
@nedim8403 2 жыл бұрын
Dear Sir, When I use a custom dataset to create a synthetic image with GAN, I am getting the following warning after training when I make the following changes in your code.(then the training doesn't start and I get the following warning) 1.Are the changes I made correct? 2.Can I ask your opinion about the error? Would you consider posting a video where the custom size dataset is used with GAN? def define_discriminator(in_shape=(512,512,3)): .... n_nodes = 512 * 8 * 8 #8192 nodes model.add(Dense(n_nodes, input_dim=latent_dim)) #Dense layer so we can work with 1D latent vector model.add(LeakyReLU(alpha=0.2)) model.add(Reshape((8, 8, 512))) #8x8x128 dataset from the latent vector. # upsample to 16x16 model.add(Conv2DTranspose(512, (4,4), strides=(2,2), padding='same')) #16x16x128 model.add(LeakyReLU(alpha=0.2)) model.add(Conv2DTranspose(512, (4,4), strides=(2,2), padding='same')) #16x16x128 model.add(LeakyReLU(alpha=0.2)) model.add(Conv2DTranspose(512, (4,4), strides=(2,2), padding='same')) #16x16x128 model.add(LeakyReLU(alpha=0.2)) model.add(Conv2DTranspose(512, (4,4), strides=(2,2), padding='same')) #16x16x128 model.add(LeakyReLU(alpha=0.2)) # upsample to 32x32 model.add(Conv2DTranspose(512, (4,4), strides=(2,2), padding='same')) #32x32x128 model.add(LeakyReLU(alpha=0.2)) model.add(Conv2DTranspose(512, (4,4), strides=(2,2), padding='same')) #32x32x128 model.add(LeakyReLU(alpha=0.2)) ...... train(generator, discriminator, gan_model, dataset, latent_dim, n_epochs=200) WARNING:TensorFlow: Compiled the loaded model, but the compiled metrics have yet to be built. `model.compile_metrics` will be empty until you train or evaluate the model.
@ayaelserwy6504
@ayaelserwy6504 Жыл бұрын
Thank you for tha amazing explanatio🌸 I wanna ask why you used the tanh as an activation function? At the end we have to scale it to be between 0and 1
@cplusplus-python
@cplusplus-python 2 жыл бұрын
Great Explanation as always. Thank you. Just some questions: 1- How can we evaluate the quality of generated images? 2- Can we plot the generated images one by one instead of a grid? 3- Regarding feeding our own images, what If there is only one class (a folder of images), which part of the code should be changed?
@gulabpatel1480
@gulabpatel1480 2 жыл бұрын
Ans 1: Visually you can check or you can do similarity check(real img & corresponding generated images) but Vanilla gan randomly generates so don't expect one-one mapping as random vectors(after going g_model) can be any images(similar to real images). 2. Yes you do it, take single image instead of 25 together. 3. It's not a classification problem so class doesn't matter, just save your image in folder and feed into train. Help regarding reading and feeding into gans are available on stack overflow.
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Mr. Gulab Patel seems to have answered your questions very well. Thank you man!
@cplusplus-python
@cplusplus-python 2 жыл бұрын
@@DigitalSreeni Yes, Thank you.
@Haider_Waseem_445
@Haider_Waseem_445 Жыл бұрын
Thank you so much Sir you're amazing. #pakistan
@DigitalSreeni
@DigitalSreeni Жыл бұрын
Shukriya :)
@Haider_Waseem_445
@Haider_Waseem_445 Жыл бұрын
@@DigitalSreeni Dear Sir do you speak Urdu 🥰🤣
@parisasadeghi562
@parisasadeghi562 2 жыл бұрын
Thanks for great tutorials. I wonder if you could do a custom training loop for CGANs with the use of GradientTap in tensorflow?
@Saad_Wazir
@Saad_Wazir 4 ай бұрын
Thanks!
@cristinamano317
@cristinamano317 2 жыл бұрын
Nice tutorial. Could you please let me know if you are planning to discuss some topics about forecasting using charts ? It would be useful and interesting though :).
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Not yet on my list. Any specific applications you are looking for?
@khalidelamraoui256
@khalidelamraoui256 2 жыл бұрын
great work , could you please tell me why u choose 100 for latent-dim or what is the criteria of choosing 100
@gulabpatel1480
@gulabpatel1480 2 жыл бұрын
It's totally random you can take any length, there is no specific reason, if mostly researcher takes 100.
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Just as Mr. Gulab Patel mentioned, you can choose vector of any dimension. 100 is used as this was the dimension that many papers used. Do you really want another hyper parameter for your deep learning model :)?
@bhavinmoriya9216
@bhavinmoriya9216 2 жыл бұрын
Thanks a lot for awesome video! So if you use sigmoid instead of tanh the scaling must be MinMaxScaling?
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
tanh goes from -1 to 1, so you need any scaling that can scale values between -1 and 1.
@bhavinmoriya9216
@bhavinmoriya9216 2 жыл бұрын
@@DigitalSreeni Thanks a lot!
@nitinbommi1867
@nitinbommi1867 2 жыл бұрын
Technically, YES! But the authors recommend using LeakyReLU and tanh activation functions.
@bhavinmoriya9216
@bhavinmoriya9216 2 жыл бұрын
@@nitinbommi1867 Thnks buddy!
@javariatahir9405
@javariatahir9405 2 жыл бұрын
Sir, could you please make a video on DCGANs for medical imaging augmentation?
@chajayram46
@chajayram46 4 ай бұрын
Can we do image classification for 128 * 128
@raseluddin
@raseluddin 2 жыл бұрын
Thanks a lot
@topspap
@topspap 2 жыл бұрын
I'm getting this error when running the exact same code either with 2 or 250 Epochs. “W tensorflow/core/data/root_dataset.cc:266] Optimization loop failed: CANCELLED: Operation was cancelled” I’m using Python 3.9 | Tensorflow 2.10.0 | Tensorflow-gpu 2.10.0 | keras 2.10.0 | Window 10 Any idea?
@sriharsha5185
@sriharsha5185 2 жыл бұрын
I am trying to save generator and discriminator models after training, again loading them and training for some more epochs but it seems like gan loss leading to zero how can I retrain the gan
@Faisal-pv6st
@Faisal-pv6st 2 жыл бұрын
I'm having the exact same problem, did you solve it? really trying my best to solve the problem but i just couldn't figure out how to incrementally train the generator, discriminator and gan
@mdyounusahamed6668
@mdyounusahamed6668 Жыл бұрын
Why the latent vector is always 100? And how in converges to a 32 by 32 image?
@peterh6866
@peterh6866 2 жыл бұрын
Thank you!
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Thank you too!
@nirajgautam403
@nirajgautam403 2 жыл бұрын
how can i load my custom dataset , im using imagedatagenerator
@zakariaabderrahmanesadelao3048
@zakariaabderrahmanesadelao3048 2 жыл бұрын
Thanks
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Thank you very much. Please keep learning!!!
@nirajgautam403
@nirajgautam403 2 жыл бұрын
Okay so I was able to train my gan network on custom images data, after training , when loaded the model and generated images , it seems that it generates same images all the time and also the image look pretty random as it contains random patterns in it. Can any one tell me the reason or help me with it?
@KashifShaheed
@KashifShaheed 2 жыл бұрын
Have you solve your problem ?
@nirajgautam403
@nirajgautam403 2 жыл бұрын
@@KashifShaheed yes I used some different approach ie. Gradient tape with higher epochs , at the end I understood that the images are generated randomly , but this randomness is dependent on the last epoch of training the gan
@topspap
@topspap 2 жыл бұрын
Thank you for the great tutorials, i have learned a lot for your Videos Where can i get the Trained model with 250 epochs "cifar_generator_250epochs.h5" Just for testing.
@NehaSharmabcs
@NehaSharmabcs 2 ай бұрын
did you figured out where to get the model?
249 - keras implementation of Conditional GAN (cifar10 data set)
29:56
247 - Conditional GANs and their applications
39:51
DigitalSreeni
Рет қаралды 44 М.
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 12 МЛН
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 26 МЛН
ЭТО НАСТОЯЩАЯ МАГИЯ😬😬😬
00:19
Chapitosiki
Рет қаралды 2,2 МЛН
245 - Advantages of keras functional API in defining complex models
20:25
126 - Generative Adversarial Networks (GAN) using keras in python
33:34
290 - Deep Learning based edge detection using HED
19:35
DigitalSreeni
Рет қаралды 13 М.
Understand the Math and Theory of GANs in ~ 10 minutes
12:03
WelcomeAIOverlords
Рет қаралды 63 М.
A Friendly Introduction to Generative Adversarial Networks (GANs)
21:01
Serrano.Academy
Рет қаралды 254 М.
256 - Super resolution GAN (SRGAN) in keras
22:46
DigitalSreeni
Рет қаралды 25 М.
Training a GAN from your Own Images: StyleGAN2 ADA
20:04
Jeff Heaton
Рет қаралды 75 М.
Why Does Diffusion Work Better than Auto-Regression?
20:18
Algorithmic Simplicity
Рет қаралды 330 М.
Generative Adversarial Networks and TF-GAN (ML Tech Talks)
59:11
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 12 МЛН