Тёмный

Build a Generative Adversarial Neural Network with Tensorflow and Python | Deep Learning Projects 

Nicholas Renotte
Подписаться 265 тыс.
Просмотров 151 тыс.
50% 1

Want to get your hands dirty building a deep learning powered GAN with Python? Well in this video you’ll learn everything involved to do it from scratch using Python and Tensorflow. You’ll learn how to build your very own Generative Adversarial Neural Network to generate new synthetic datasets.
Get the code: github.com/nicknochnack/GANBa...
Chapters
0:00 - Start
0:43 - Explainer
1:40 - PART 1 - Setup Environment
2:02 - Breakdown Board
17:54 - PART 2 - Visualize data and Build Data Pipeline
34:49 - PART 3 - Build the Neural Networks
1:07:28 - PART 4 - Build a Custom Training Loop
1:54:39 - PART 5 - Generating Images
2:00:58 - Ending
Oh, and don't forget to connect with me!
LinkedIn: bit.ly/324Epgo
Facebook: bit.ly/3mB1sZD
GitHub: bit.ly/3mDJllD
Patreon: bit.ly/2OCn3UW
Join the Discussion on Discord: bit.ly/3dQiZsV
Happy coding!
Nick
P.s. Let me know how you go and drop a comment if you need a hand!
#gan #python #deeplearning

Наука

Опубликовано:

 

15 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 239   
@leafiadias96
@leafiadias96 10 месяцев назад
I started following your channel 3 years ago when I wanted to create my first project in ML during undergrad, currently I am doing my Masters and I am just as excited when I see you have a video on the topics that I need better understanding with! Thanks and lots of love and support!❤
@jeffpierick1
@jeffpierick1 2 года назад
Your content always rocks! Thank you for putting in the immense time to make these complex concepts understandable and approachable!
@NicholasRenotte
@NicholasRenotte 2 года назад
🙏 thanks for your kind words @Jeff!
@rahulsuri8961
@rahulsuri8961 10 месяцев назад
Very nice tutorial. I love the way you actually explain what all the specific functions do as well. Love your energy, keep it up!
@CEBMANURBHAVARYA
@CEBMANURBHAVARYA 4 месяца назад
Recently started watching your videos. They are really good, descriptive and easy to understand. I am a beginner, and was able to grasp the concepts easily.
@satoshinakamoto5710
@satoshinakamoto5710 Год назад
this tutorial has been the closest to an Andrew Ng's machine learning course where you build a model from scratch instead of just importing it as a commodity.
@plopparn647
@plopparn647 11 месяцев назад
This video is one of the best i'v ever seen when it comes to describing an ai method. Everything is described in an easy to understand way, dont jump steps, and in a way which keeps attention. Huge thank you! Also, i would love to see a conditional version! :D
@jenniferhightower6065
@jenniferhightower6065 Год назад
Thank you so much for making these videos! You are a great teacher!
@maximeentsi2205
@maximeentsi2205 2 года назад
Your videos are just incredible, well detailed, it's an excellent way to discover the concepts!!!
@NicholasRenotte
@NicholasRenotte 2 года назад
Thanks a million @Maxime!
@mahmutyasiresmek1621
@mahmutyasiresmek1621 11 месяцев назад
Hey, just paused the video to drop a quick comment - 'Please make a content for conditional GAN.' Alright, time to resume watching!
@tresormalo5989
@tresormalo5989 Год назад
Thank you Nic, your videos help a lot. we're waiting for the next video about GAN ! Thaaanks !
@soufianechehboune4811
@soufianechehboune4811 2 года назад
Thanks Nicholas for your great work ! I use DCGAN to augment my dataset but I didn't get satisfied results with my algorithm, then I realized that the images should be the same ( or at least have similar shape ).
@junaidmughal3806
@junaidmughal3806 Год назад
Very humble guy, full of great knowledge, no nonsense talking or flexing
@saintadel8902
@saintadel8902 Год назад
Thanks man Finally I can understand a bit about GANs
@callum5295
@callum5295 2 года назад
Recently became interested in these types of neural networks - great timing! Thanks for your content, very nice :D
@NicholasRenotte
@NicholasRenotte 2 года назад
They're hella cool. So much more to explore when it comes to generative stuff!
@user-to4dx8nh4g
@user-to4dx8nh4g Год назад
Thank you for the explanation of each layers so well. It would be helpful for me if you can explain Conditional GAN.
@roger_island90
@roger_island90 2 года назад
Great work! Data in Ghana is costly but I can't just miss your videos.
@darthdaenerys
@darthdaenerys Год назад
Hey nick, i would love to watch your tutorial on cgan. Thanks for all your deep learning tutorials. Appreciate all your efforts!
@luisosorio4456
@luisosorio4456 10 месяцев назад
Amazing video ! I would love to see the conditional GAN video. Thank you
@guillermoalvarezdelacadena5110
@guillermoalvarezdelacadena5110 2 года назад
Amazing videos! Would love a conditional gan tutorial
@aqmf2424
@aqmf2424 2 года назад
Oh wow, what a nice find! Glad I found your channel!
@NicholasRenotte
@NicholasRenotte 2 года назад
Welcome to the team!!
@abdelrhmanabouelfoutouh4150
this is astonishing, keep going
@DefyingMotion21
@DefyingMotion21 11 месяцев назад
Great video! Would love to see a context-conditional GAN
@iliya-malecki
@iliya-malecki 2 года назад
first time seeing the channel, and i love it! keep up the good work
@NicholasRenotte
@NicholasRenotte 2 года назад
Thanks a mil, glad you liked it!
@brinaacademico7789
@brinaacademico7789 Год назад
the quality of this channel... OMG!!
@akshay2012rdts
@akshay2012rdts 10 месяцев назад
Great video man. Thanks.
@abhishekkanojia2816
@abhishekkanojia2816 11 месяцев назад
you a such a nice teacher , thanks for your deeds
@letsplay1097
@letsplay1097 9 месяцев назад
professional work right here , well done
@bananasplit1158
@bananasplit1158 2 года назад
Great content as always! Could you show how to create a custom dataset with multiple labels from scratch ?
@thepirate_kinz1509
@thepirate_kinz1509 9 месяцев назад
You can load your distinct images into sub folders inside a global or general folder called data.....or whatever you want. Then you can use keras.utils.image_dataset_from_directory('data') And store it in a variable maybe called data. With that you have your dataset up and running easily. Or you can got the hard way and use tf.data.Datasets
@ShedrackLawrence-shed
@ShedrackLawrence-shed 2 месяца назад
Brilliant video 🔥🔥🔥. Thanks for this
@musa_b
@musa_b 2 года назад
great job brother. that was super helpful
@NicholasRenotte
@NicholasRenotte 2 года назад
Cheers @Pyman!
@movieoh5
@movieoh5 Год назад
Always your video are amazing! Thanks a lot from South Korea! Hope I oneday meet you (fan meet up🤩)
@ProfessorZozza
@ProfessorZozza Год назад
Thank you so much for this!
@danieleceron
@danieleceron 2 года назад
Thanks for taking your time and effort in making these videos pleasant and easy to understand.
@NicholasRenotte
@NicholasRenotte 2 года назад
Glad you enjoyed it @Daniel!
@rubaitrahman4449
@rubaitrahman4449 2 года назад
I salute your effort
@hussainsalih3520
@hussainsalih3520 2 года назад
Excellent , Keep Moving :)
@Tourismmj
@Tourismmj Год назад
Thank you so much for sharing ❤❤❤❤
@attilahaas2396
@attilahaas2396 3 месяца назад
Absolute legend thank you
@letsplay0711
@letsplay0711 2 года назад
U are just awesome. Just watched thumbnail and I know going to add more into my skill set.... Thank you so much
@NicholasRenotte
@NicholasRenotte 2 года назад
Thanks a million!! Glad you liked it!
@y33l2
@y33l2 Год назад
wow THIS CONTENE IS AMAZING!!!
@Ahmedmahm0ud1911
@Ahmedmahm0ud1911 9 месяцев назад
You are amazing , truly amazing ❤❤
@asmaehamani8079
@asmaehamani8079 11 месяцев назад
Hello! thank you for this presentation Could you show us how we can load the pre-trained GAN and apply it to our custom dataset?
@sunidhigarg673
@sunidhigarg673 2 года назад
love your content!
@ercangunbilek3607
@ercangunbilek3607 Год назад
Hi Nicholas, Can the genarator produce images only for specific images ? For example, only shoes or bags ?
@fabricenyl6504
@fabricenyl6504 3 месяца назад
This guy is amazing
@souravdey8236
@souravdey8236 2 года назад
Ufffff that's something I m waiting for 🥳🥳🥳
@NicholasRenotte
@NicholasRenotte 2 года назад
Heyyyy, well it's here! Thanks a mill for checking it out @Sourav!
@user-fq7th7sh5q
@user-fq7th7sh5q 11 месяцев назад
Surprisingly, the gen and disc loss came close to 0.6 within only 10 epochs😅. Btw thanks for these fantastic tutorials, man!
@xanderthedev
@xanderthedev Год назад
I need some help I started training it for 2000 epochs, but from like around epoch 170 the loss was getting stuck above 2.0 (for the generator) until epoch 340 (last looked). And when I looked at the images it was producing in those epochs, they are almost all of them fully black images and also if this is important the discriminator is stuck on loss 0.2. Should I stop running it or is this normal, and if I need to stop running it. What do I need to change to let it work?
@georgesayapin6361
@georgesayapin6361 10 месяцев назад
Hi! Great tutorial for the simple images. However, I tried to apply the samepeople's photos data set and got an overfitted model (Precission:1.0 Recall:1.0, Accuracy:1.0), as well to much jitter in the performance curve. How can I deal with it?
@meltonsy
@meltonsy Год назад
When are we going to get a video on conditional GAN? Great content, very informative....
@mazenas3443
@mazenas3443 4 месяца назад
thank u So Much King. Hope God Protect U
@techsavy5669
@techsavy5669 Год назад
Awesome information. Just curious, sorry if i sound lame! Is learning GAN a good idea from a job search perspective!? I feel Gan will get automated as a hyperparameter inside Keras's augmentation soon so learning it explicitly won't be needed!
@marioskadriu441
@marioskadriu441 Год назад
We also want a video with conditional GAN ;)
@benjaminhezrony5761
@benjaminhezrony5761 11 месяцев назад
Hi Nicholas! The super resolution video would help me a good bit in my research. Have you made the video on that?
@topspap
@topspap Год назад
Hi, and thank you for the great tutorial Can you create a video on "How to Build a Conditional Generative Adversarial Neural Network"
@hassenzaayra5419
@hassenzaayra5419 Год назад
Thank you so much for your lessons, please i have a problem of mode collapse where I generate face using GAN ,can you please help me.
@digigoliath
@digigoliath 2 года назад
Awesome!!! TQVM!!
@NicholasRenotte
@NicholasRenotte 2 года назад
Thanks for checking it out!!
@sameerpasta2642
@sameerpasta2642 Год назад
Thanks for this video. It was a life saver. Really made learning fun for me
@kalidasbenny811
@kalidasbenny811 4 месяца назад
hey this was an amazing video and i learned a lot THANKS mate, nut when i load the pretrained model i am having an error stating axes don't match . It would be really helpful if you could tell me why the pretrained model cant be used
@Ranshin077
@Ranshin077 2 года назад
I would love to see a conditional GAN Video
@tamascsepely235
@tamascsepely235 6 месяцев назад
Thank you for the video it was really good. I have 2 questions: How can I make dataset out of pictures and how can I train my network in multiple runs if I e.g. don't wanna let my pc running at night?
@PapisShow
@PapisShow Год назад
Hi nick could you make a video on how to detect defects using a gray scale image as your datasets, I tried one of your programs is returns images must have either 3 or 4 dimensions, this is due to the data set being just 1 Chanel black and white
@bamboolia
@bamboolia 17 дней назад
Thanks for the great tutorial! The one bit I did not quite understand is HOW the generator actually creates new images. So at first it is just a random picture and after one epoch what does he do to the first created picture? How does he tune it and where to you change it in the code? For me it seems like there where only created random pictures again and again, but this can´t be, right?
@AdityaSharma-vs5dl
@AdityaSharma-vs5dl 3 месяца назад
sir i wanted to ask as we have made a custom loop for training ,, do i gotta make one for every GAN i make like i was thinking is there any librariees, or quick way to make it ,,like i am a beginner so wished if i could do it more simply like we do in traditional cnn,, thank you for the video
@SanKum7
@SanKum7 2 года назад
Hi, great tutorial. You said that you are working on the Super Resolution based on GANS and CNNS. Is it possible that you can make a list or a small video of the Super Resolution methods tat you have tried, the ones that does well, the ones that can be used as an Image Enhancement in a classification or an detection pipeline ? Thanks.
@NicholasRenotte
@NicholasRenotte 2 года назад
You got it, that tutorial is still a while away. Not completely happy with where it's at but happy to share my lessons learned!
@SanKum7
@SanKum7 2 года назад
@@NicholasRenotte Thanks for your reply and looking forward to it.
@akeshagarwal794
@akeshagarwal794 10 месяцев назад
@nicholas I love this session on GAN❤😊 please Make a video on 🤖GAN-Transformer architecture and how do we build in python from scratch.🔗
@ear4400
@ear4400 2 года назад
conditional GAN video please. This one was great but I want more!!!!!
@NicholasRenotte
@NicholasRenotte 2 года назад
I hear you, will give it a crack when I'm home!
@yashkumar5200
@yashkumar5200 2 года назад
Great content as usual! Lots of love brother. i just wanted to ask why you used 7*7*128 dense layer in the beginning model . I am still unable to understand that. Thanks!
@NicholasRenotte
@NicholasRenotte 2 года назад
Thanks Yash! It's because later we reshape to 7,7,128. So effectively a 7x7 array with 128 channels. This forms the spatial transformation which then allows the data to be passed through upsampling and conv2d layers!
@sharjeel_mazhar
@sharjeel_mazhar 2 года назад
Great video sir🔥💯 please make a video on Conditional GAN and also on WANDB
@NicholasRenotte
@NicholasRenotte 2 года назад
Definitely! You got it!
@ravitshoval2458
@ravitshoval2458 5 месяцев назад
can you also train it on specific designs of furnitures (that are unique and have nothing similar on the internet?)
@sriramsriram9246
@sriramsriram9246 Год назад
sir i have a doubt like that is it possible to train a GANs model for generate exoplanets? i mean space images?
@Dicbeofbe
@Dicbeofbe 9 месяцев назад
Thanks bru
@jrt6722
@jrt6722 11 месяцев назад
Sorry, the label of the real image is 0 and fake image is 1? It is reverse labeling compared to the traditional GAN. Would it affect how loss function is calculated?
@aisoft1891
@aisoft1891 Год назад
Hey Nicholas, great video. i was last stuck with Fashion dataset. I was working on virtual dressing room project. In this project there is DL, pose estimation, opencv image preprocessing. i had to fit dresses on realtime picture but it was failing. Can you be my mentor in this project?
@joseph3036
@joseph3036 Год назад
How to continue training the model from the last saved epoch in case of interruption?
@thepirate_kinz1509
@thepirate_kinz1509 9 месяцев назад
Hi Nick. How do we compile our model to run on the web
@javiergrandiogonzalez9849
@javiergrandiogonzalez9849 2 года назад
Hey great video, it is really helpfull! I have a doubt about the generator though. Would it make sense to use Conv2DTranspose instead of the upsampling layers?
@NicholasRenotte
@NicholasRenotte 2 года назад
Definitely could! Replace the conv block in the generator with Conv2DTranspose. I don’t know why but when I was using them I noticed training took significantly longer. I may have just been impatient though!
@pomberorajy
@pomberorajy 2 года назад
I was building a GAN the other day and I found that they work nicely. There is a medium post talking about the pros/cons. Suerte!
@NicholasRenotte
@NicholasRenotte 2 года назад
Shoot through the post, would love to take a look!
@aleeahmd_
@aleeahmd_ Год назад
I am having an error in generating images (TypeError: Invalid shape (28, 28, 1) for image data) how can I resolve it?
@dhanushikollure4422
@dhanushikollure4422 11 месяцев назад
Can't we use this model to generate new images from text inputs? For example, if we give the text input as a red bag, will it generate an image of a red bag?
@GeneralMan594
@GeneralMan594 2 года назад
Thank you very much for your lessons!! But I have a little problem with your code specifically with "generator.predict(np.random.randn(4,128,1))". It doesn’t work for me. It works if I set the dimensions (4, 128). Maybe it depends on the tensorflow version.
@ApPillon
@ApPillon Год назад
You need to resize it to add another axis, I think.
@tristangao3973
@tristangao3973 10 месяцев назад
I got the same problem too,bro.and it seems that remove that 1 can work,because (4,128,1)doesnot match the input_dim of dense funciton.
@jrt6722
@jrt6722 11 месяцев назад
Please tell me how I can adjust batch_size... My hypothesis is that not only we have to adjust ds.batch(batch_size) but also here : fake_images = self.generator(tf.random.normal((batch_size, noise_dim, 1)), training=False) correct? thank you very much in advance. :)
@rafiulislamrafi2470
@rafiulislamrafi2470 2 года назад
Thank You
@NicholasRenotte
@NicholasRenotte 2 года назад
Anytime @Rafiul!
@tammy_21
@tammy_21 Год назад
I am using cifar-10 dataset for this and my generator loss is 2.67 which shouldn't be the case. Please help.
@akshay2012rdts
@akshay2012rdts 10 месяцев назад
In thumbnail you look like you own a chain of restaurants in Texas by the name 'Los Pollos Hermanos'.😅 Anyways great video bro 🎉keep bringing us quality content.
@ruksharalam173
@ruksharalam173 8 месяцев назад
I was trying to use the generatormodel.h5 (from your GitHub repo). While loading this model in my code, I got the error: ValueError: axes don't match array. Could you please explain why this happened?
@sakshamjain7318
@sakshamjain7318 9 месяцев назад
Please make a video on Conditional GANS
@BhaveshWaghela-yp9nw
@BhaveshWaghela-yp9nw 2 месяца назад
@Nicholas you have forgot to remove img = img[0] from the code so when we run it in a sequence its gives that shape error that you are trying to debug at 1:04:00 timestamp.
@anjalipatel6888
@anjalipatel6888 Месяц назад
Thanks it helped me 😊
@jennywei0932
@jennywei0932 Год назад
Hi Nicholas, hello from Sydney too. I have one question. Is GAN an unsupervised learning or supervised learning? Based on your description, it has the discriminator using true or false for real and fake images. But it does not need human label these classes. The labels are auto-generated because the algorithm is designed to know the images from generator is false (fake) and from original dataset is true (real). But we do use labels to train the discriminator. So it's supervised learning right?
@kalidasbenny811
@kalidasbenny811 4 месяца назад
semi supervised
@nidhiagarwal4507
@nidhiagarwal4507 2 месяца назад
@NicholasRenotte I want to build GAN with my JSON Dataset, how can I start with it?
@juanete69
@juanete69 3 месяца назад
Why do you use a concatenated(realimage, fakeimage) at each iteration, both images simultaneously? And not one iteration with a real image and a different iteration with a fake image? Could it be more efficient if you swap the order of this concatenation at each iteration?
@nikvod1330
@nikvod1330 2 года назад
Hey Nick! Love you and your work! ^_^ How do I make action_space so that I can pass the mouse rotation angle and which button is pressed? Like -> Tuple(Box(0, 360, (1, )), Discrete(4)) If I create like this I take ___TypeError: 'Box' object is not iterable___
@nikvod1330
@nikvod1330 2 года назад
I know! I know :) MultiDiscrete([360, 4])
@abhinavmishra9323
@abhinavmishra9323 Год назад
can we just use Conv2D instead of using Dense layers and then applying convolution? I think that will also work
@ApPillon
@ApPillon Год назад
I think it should
@juanete69
@juanete69 3 месяца назад
Isn't it possible to do all this with keras, without creating custom classes?
@focus2568-gg1ch
@focus2568-gg1ch 7 месяцев назад
great tutorial!! can anyone help me with this query.. I have NVIDIA gpu in my laptop but in jupyter, it shows zero GPU
@wonggran9983
@wonggran9983 2 года назад
I got high marks in data structures and algorithms, and now suma cuum late, only use while loop to solve problem. Wonder when I can use what I learned...
@abhijeetsaroha1902
@abhijeetsaroha1902 Год назад
Can we create this GAN model without using a graphics card or tensorflow gpu ?
@iangatsi2135
@iangatsi2135 4 месяца назад
Hello Is it possible to GANs for option pricing.
@roi365
@roi365 Год назад
i want to make a ML project but i want the input and output to be different files, not nessecrily pictures. is it possible? how?
@roboticol6280
@roboticol6280 2 года назад
Good, but I have a problem with using the model to predict random noise in 52:43. Every time I do it, I get an UnimplementedError: Graph execution error:. I'm using tensorflow 2.8.0 btw on a kaggle notebook.
@uttejkuruva9105
@uttejkuruva9105 2 года назад
same here, could you find a fix???
@sheeptheshawn240
@sheeptheshawn240 9 месяцев назад
I can't figure out how to fix the "img.save( os.path.join( 'images', f'generated_img_{epoch}_{i}.png' ) )" line in the modelmonitor class on the newest version. Has anyone found a solution?
@Aditya-xl3tk
@Aditya-xl3tk 10 месяцев назад
I am new to GAN and ML. Here is a doubt i had: we had Reshape(7,7,128) and then upsampled it to 28 ,28. Why we didnt gave input as Reshape(28,28,128) and What would have happend if we did.
Далее
Tensorflow Tutorial for Python in 10 Minutes
11:33
Просмотров 400 тыс.
What are GANs (Generative Adversarial Networks)?
8:23
Просмотров 217 тыс.
Rose Burrito #shorts
00:35
Просмотров 4,1 млн
What Should Be Next? 👀🤯
00:56
Просмотров 3,2 млн
Build a Deep CNN Image Classifier with ANY Images
1:25:05
Variational Autoencoders
15:05
Просмотров 478 тыс.
247 - Conditional GANs and their applications
39:51
Просмотров 40 тыс.
What is RAG? (Retrieval Augmented Generation)
11:37
Просмотров 91 тыс.
Generative Adversarial Networks (GANs) - Computerphile
21:21
Understand the Math and Theory of GANs in ~ 10 minutes
12:03
Every Weird Math Paradox
11:15
Просмотров 20 тыс.
Bardak ile Projektör Nasıl Yapılır?
0:19
Просмотров 6 млн
MacBook Air Японский Прикол!
0:42
Просмотров 148 тыс.
Девушка и AirPods Max 😳
0:59
Просмотров 16 тыс.
✅ЛУЧШИЕ фишки iOS 18🔥
0:51
Просмотров 106 тыс.