ProGAN implementation from scratch

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 มิ.ย. 2024
  • ❤️ Support the channel ❤️
    / @aladdinpersson
    Paid Courses I recommend for learning (affiliate links, no extra cost for you):
    ⭐ Machine Learning Specialization bit.ly/3hjTBBt
    ⭐ Deep Learning Specialization bit.ly/3YcUkoI
    📘 MLOps Specialization bit.ly/3wibaWy
    📘 GAN Specialization bit.ly/3FmnZDl
    📘 NLP Specialization bit.ly/3GXoQuP
    ✨ Free Resources that are great:
    NLP: web.stanford.edu/class/cs224n/
    CV: cs231n.stanford.edu/
    Deployment: fullstackdeeplearning.com/
    FastAI: www.fast.ai/
    💻 My Deep Learning Setup and Recording Setup:
    www.amazon.com/shop/aladdinpe...
    GitHub Repository:
    github.com/aladdinpersson/Mac...
    ✅ One-Time Donations:
    Paypal: bit.ly/3buoRYH
    ▶️ You Can Connect with me on:
    Twitter - / aladdinpersson
    LinkedIn - / aladdin-persson-a95384153
    Github - github.com/aladdinpersson
    Timestamps:
    0:00 - Introduction
    0:54 - Summary of ProGAN
    14:07 - Results of implementation
    16:00 - Model implementation
    1:06:13 - Training setup
    1:26:22 - Evaluation
    1:27:58 - Ending

ความคิดเห็น • 86

  • @AladdinPersson
    @AladdinPersson  3 ปีที่แล้ว +11

    I'll be in the chat during the premiere if anyone wants to chat or has questions regarding the implementation. I've uploaded all the code to Github now with pretrained weights if you wanna evaluate the results: bit.ly/3byA6iW. If you have recommendations on GANs you think would make this into an even better resource for people wanting to learn about GANs let me know in the comments below and I'll try to do it! Also a friendly remainder to please like the video if you want to see more of these from scratch videos :)
    I learned a lot and was inspired to make these GAN videos by the GAN specialization on coursera which I recommend. Below you'll find both affiliate and non-affiliate links, the pricing for you is the same but a small commission goes back to the channel if you buy it through the affiliate link.
    affiliate: bit.ly/2OECviQ
    non-affiliate: bit.ly/3bvr9qy
    Timestamps:
    0:00 - Introduction
    0:54 - Summary of ProGAN
    14:07 - Results of implementation
    16:00 - Model implementation
    1:06:13 - Training setup
    1:26:22 - Evaluation
    1:27:58 - Ending

    • @xinyuyang3451
      @xinyuyang3451 3 ปีที่แล้ว +4

      Thanks for sharing. if you can make a video about the implementation of StyleGAN that would be great.

    • @dontaskme1625
      @dontaskme1625 3 ปีที่แล้ว

      how about tacotron or something like StarGAN-VC

    • @bigbobdizzlefrizzle
      @bigbobdizzlefrizzle 3 ปีที่แล้ว

      Hello Mr. Persson, I would highly appreciate if you could do a video about anomaly detection using GAN. Especially about how to train a GAN and afterwards use the discriminator instead of the generator. For example how to implement ANOgan or GANomaly. Your videos are very good and are helping a lot. Many thanks!

    • @insidiousmaximus
      @insidiousmaximus 2 ปีที่แล้ว +1

      Please could you explain how to use the generator model in deployment? For example I would like to be able to load the generator.pth and ping it for a new face and save it as an image.. thanks. I tried generating some noise and loading the state_dict from the .pth file and feeding the noise but all I get back is 8x8 colured pixel squares. I try to just copy what happens in the trainer but I cannot figure out how to get back full image of a face..

  • @benmiss1767
    @benmiss1767 3 ปีที่แล้ว +29

    Omg this channel is absolutely amazing, the implementations from scratch, the papers walkthroughs, the kaggle competitions explanations, literally everything you post is incredible. I didn’t really know what to do after completing coursera’s DL specialization about 2 months ago, I read some papers, worked on some small projects but as amazing as those courses were, there’s still a huge gap between them and being able to implement papers from scratch or being able to compete on kaggle, your channel just feels like the next logical step. I really really hope it will blow up, and that your videos and tutorials will allow you to get to the position you want (full time video making, working for your dream company, getting a phd in a prestigious university or whatever your ambitions are)
    Again, thank you

    • @AladdinPersson
      @AladdinPersson  3 ปีที่แล้ว +5

      Hey this means a lot and I appreciate the kind words 💗 I agree that there is some gap between the practical and the theory you learn from courses and that's where the ML/DL community is awesome with great blog posts/videos/tweets and I try my best to contribute to that and document what I'm learning about :) I would encourage you to also do something similar even if you're just starting out, upload your projects and code to GitHub/write blogposts/videos about what you're doing :)

    • @benmiss1767
      @benmiss1767 3 ปีที่แล้ว

      @@AladdinPersson thank you this is what I am gonna do ! :)

  • @ryntownsend
    @ryntownsend 3 ปีที่แล้ว

    Really appreciate your content, great work! Look forward to more videos in your GAN series, would love to see you walkthrough a StyleGAN implementation.

  • @merwamehmood5779
    @merwamehmood5779 3 ปีที่แล้ว

    Working on Gans and following your implementations!!!. Thanks waited long for this video

  • @janschnyder5137
    @janschnyder5137 3 ปีที่แล้ว +14

    Dude, Thank you. I just wanna tell you that your videos are insane, they help so much. in 1 week ive gone from 0 GAN knowledge to being able to make several cool things thanks to you. You and your videos are amazing. Currently waiting for StyleGAN, then your GAN videos will be hands down the best out there. Keep it up!

    • @Cornerstonemeta
      @Cornerstonemeta 2 ปีที่แล้ว

      Agreed!

    • @prod.kashkari3075
      @prod.kashkari3075 2 ปีที่แล้ว

      How did you go from 0 GAN knowledge you making a lot of things

    • @janschnyder5137
      @janschnyder5137 2 ปีที่แล้ว

      @@prod.kashkari3075 sorry i dont quite understand your question

    • @prod.kashkari3075
      @prod.kashkari3075 2 ปีที่แล้ว

      @@janschnyder5137 how did you get so good in a week?

    • @janschnyder5137
      @janschnyder5137 2 ปีที่แล้ว

      @@prod.kashkari3075 I already had some knowledge in deep learning, such that i could directly dive into the papers of GANs and get my hands dirty. I started with pix2pix on the first day, read the paper and tried to implement it with the help of the video. Then every day i did another new GAN architecture. Im still a very beginner tho, i just followed some tutorials.

  • @divymohanrai
    @divymohanrai 3 ปีที่แล้ว +1

    Finished watching the complete video ! Damn this content is the best, keep going 🏃‍♂️

  • @viniciustrevisan
    @viniciustrevisan 2 ปีที่แล้ว +5

    Awesome tutorial! I could even adapt this to TF 2.0 and it was really easy because of how well you explain everything on this video.
    Now it seems to me that this code can be used to easily build the StyleGAN, but I cannot understand how to implement the "affine transformations" A and B that are on the paper.
    Here's a suggestion for a future video, then: StyleGAN!
    Thanks again and keep up with the great work!

  • @hackercop
    @hackercop 2 ปีที่แล้ว

    This video was amazing thanks, I had to go through it several times to understand but it was great.

  • @Kevinhuang8956
    @Kevinhuang8956 2 ปีที่แล้ว

    Thank you for this tutorial, it helps me a lot in my assignment.

  • @PrajwalSingh15
    @PrajwalSingh15 ปีที่แล้ว

    Thank you so much for such an awesome tutorial on ProGAN. Following these steps, I implemented the code in TensorFlow :)

  • @a96415
    @a96415 3 ปีที่แล้ว

    This is by far one of the most user-friendly tutorials I've found! Do you think you can do a video on sinGAN next?

  • @hoheokkim6236
    @hoheokkim6236 2 หลายเดือนก่อน

    This helped me a lot! Thank you for uploading the high quality educative video!

  • @adesiph.d.journal461
    @adesiph.d.journal461 3 ปีที่แล้ว +7

    Dammn! Guess I need a day off from my work to keep up with your videos :) more power to you

  • @DragonKidPlaysMC
    @DragonKidPlaysMC 3 ปีที่แล้ว +6

    Suggestion:
    Please make a series on creating a small deep learning library from a scratch it would really be awesome to know how libraries such as PyTorch and TensorFlow work!

  • @DiogoSanti
    @DiogoSanti 3 ปีที่แล้ว

    Great job as always!

  • @ensabinha
    @ensabinha 2 ปีที่แล้ว

    Hey Aladdin, I found your channel. Your content is super good. I was checking specifically your videos about GAN. There is a way of doing anomaly detection using GANs, e.g., Anogan, GANomal, Skip-GANomaly, Adversarial Dual Autoencoders, etc... It would be great to see you approaching one of this papers in one of your videos :)

  • @sayedathar2507
    @sayedathar2507 3 ปีที่แล้ว +3

    This guy is 3 Blue 1 Brown of Pytorch and Tensorflow 😁

  • @gruhitpatel9061
    @gruhitpatel9061 ปีที่แล้ว

    Thank you so much for the video. It is really helpful, entire series. Also if you can make a video of DETR then it would be so great of you.

  • @norbertzabinski8166
    @norbertzabinski8166 3 ปีที่แล้ว

    Hi can you do a video explaining data loading for different formats of data eg different CSV types, folders of specific data, and how they come together image and bounding box and annotation great videos man, can't wait for this !!!!

  • @generichuman_
    @generichuman_ 2 ปีที่แล้ว

    This is an awesome implementation, I'll have to spend some time going over the code so I completely understand what's going on. I created a dataset of art from magic cards and put it through this and it worked perfectly! Like you, I limited the image size to 256. Even with a 3080, this is a beefy algorithm lol.

  • @garikhakobyan3013
    @garikhakobyan3013 3 ปีที่แล้ว

    Good video man!

  • @aidynabirov7728
    @aidynabirov7728 2 ปีที่แล้ว

    Great Tutorial!

  • @jup4929
    @jup4929 3 ปีที่แล้ว

    Great video Aladdin! Will you be covering the Two Time-Scale Update Rule for GANs at any point in the future? Thanks for the videos!

  • @mamo987
    @mamo987 2 ปีที่แล้ว

    thank you so much this was amazing

  • @nalankarunanayake
    @nalankarunanayake 3 ปีที่แล้ว

    Great work man :::::: keep it up ....

  • @mwont
    @mwont ปีที่แล้ว

    You are real hero, youtube does not deserve!

  • @cristhian4513
    @cristhian4513 3 ปีที่แล้ว

    good job bro :)!

  • @filippodainelli3659
    @filippodainelli3659 ปีที่แล้ว +1

    Hey Aladdin, thanks a lot for sharing your work on the Progressive Growing GAN and realizing a video tutorial with the reasoning behind. It's an amazing job. Especially because someone like me can try to tackle different generation problem in its specific field (atmospheric science) without having to read an improbable number of literature and codes. So really thanks because your code and explanation has been very helpful for my work. I just have a question to ask you. I re-adapted a bit your code to receive a folder of .npy files containing values of atmospheric fields as training input. However, despite trying other loss functions following GAN literature or tuning the hyper-parameters differently, I keep having the fields generated by the generator in a range of values between -1 and 1. I still haven't been able to solve the problem. Maybe is something I need to change in the architecture of the Generator? Do you have any idea on what it could be?
    Congratulations for your work and thanks again for sharing it with the community 😊

  • @kamilemirov9479
    @kamilemirov9479 3 ปีที่แล้ว

    video on Grad-Cam, please :)

  • @robertzhang4294
    @robertzhang4294 2 ปีที่แล้ว

    I enjoy all of your videos, but due to project requirements, I am required to use tensorflow, so I would greatly appreicate an alternative TensorFlow tutorial for ProGAN if possible. Thanks so much; your videos have been such a big help and hope you get the recognition you deserve!

    • @aamir122a
      @aamir122a 2 ปีที่แล้ว

      Design is still the same, with the Tensor flow all you have to do is implement your own custom training loop, however, my two cents stick with Pytorch, it is way simpler.

    • @ManojKumar-qg9bw
      @ManojKumar-qg9bw ปีที่แล้ว

      tf such a pain in the ass man :(

  • @mikhaeldito
    @mikhaeldito 3 ปีที่แล้ว +4

    Videos on VAE, please :)

  • @user-sd6gb6mm3x
    @user-sd6gb6mm3x 3 ปีที่แล้ว

    Hello, I am wondering which pytorch, torch, torchvision, tensorboard did you used? Thanks.

  • @chaddlesmcmaddles
    @chaddlesmcmaddles ปีที่แล้ว

    Awesome tutorial. Sub.

  • @VNstealer
    @VNstealer 3 ปีที่แล้ว

    Hi, thank you for the amazing video. I have a question about Loading the pre-trained weight. After loading the weight, with your current code, it seems like the model still train its weight again from scratch? it is almost like the weight is loaded, but then it doesn't use it. I have copy pasted exactly your code, just in case the error came from my part. But the same thing happen still

  • @kaustubhkulkarni
    @kaustubhkulkarni 3 ปีที่แล้ว

    Hey Aladdin, love your videos. This isn't related to ProGAN, but would it be possible to do Perceiver from scratch? It would be amazing... Thanks!

  • @biswajitroy_isgpp2343
    @biswajitroy_isgpp2343 9 หลายเดือนก่อน

    hey aladdin , it was a nice session i have a question when to input the dataset can we put all the images in one folder .And one more thing if ypu can pls show us an inference sample code

  • @amitdutta3875
    @amitdutta3875 3 ปีที่แล้ว

    can you make a video about custom object detection??

  • @user-sd6gb6mm3x
    @user-sd6gb6mm3x 3 ปีที่แล้ว

    Hello, I want to know how to use the trained ProGAN model (load and show the random result produced from it), thanks.

  • @alejandrogolfe2458
    @alejandrogolfe2458 2 ปีที่แล้ว

    Hi Aladdin Persson! Thank you for your implementation. I am trying to implement it for my own dataset which has 18k pictures. It trains and perfoms well to 64x64 or even 128x128 but sometimes the loss explode and the model losses the capability to generate images with some kind of sense. Do you know how can I solve this? I would really appreciate your help. Thank you for your time!

  • @moe5124
    @moe5124 2 ปีที่แล้ว

    Thanks a lot for the video Aladdin. I'm running into a problem when using the generate examples functions in utils. The images generated are noise (most bright blue or green or whatever). On the other hand the fake samples on Tensorboard are fine.

    • @user-dc2ln8ec5h
      @user-dc2ln8ec5h 11 หลายเดือนก่อน

      Hi,there just got the same problem do you find the solution ?

  • @madhuvarun2790
    @madhuvarun2790 3 ปีที่แล้ว

    can you explain the forward function of WSConv2d block?

  • @jaewanpark5708
    @jaewanpark5708 ปีที่แล้ว

    you are the best :D

  • @wolfisraging
    @wolfisraging 3 ปีที่แล้ว

    Thanks mate this is extremely helpful, I spent many days but didn't feel much confidence in implementing it. Anyways, what gpu you have and about how much time it took you to get those final results?

    • @AladdinPersson
      @AladdinPersson  3 ปีที่แล้ว

      Hope you're doing awesome Rishik! I don't really remember but I first tried to train this with a GTX 1060 but unfortunately I could only get up to image sizes of 32x32 or something and then I didn't have enough vram. For this I used a 3090, I didn't spent too much time on it but maybe it trained 1-2 days or something like that.

    • @wolfisraging
      @wolfisraging 3 ปีที่แล้ว

      ​@@AladdinPersson Hmm okay got it, I'm planning to utilize this progan in my next project, so needed to know.
      And yeah that's my name 😁, and yes I am doing pretty great, thanks, I hope you're doing better :)

  • @simonchin79
    @simonchin79 3 ปีที่แล้ว

    Mind showing any anomaly detection model from scratch?

  • @cloudmom9313
    @cloudmom9313 3 ปีที่แล้ว

    Hi, Aladdin! Thanks one more time :) At 1:19:43 you explain the fourth term like it won't let the critic loss to drift far away from zero. I also watched your paper walkthrough on that, but still didn't get the idea. From the experiments, the critic loss value fluctuates kinda 10, -40, and so on, which makes the effort of the fourth term miserable and by removing it we won't see the big change. Could you please elaborate on that? What am I getting wrong?

  • @zyzlnr5690
    @zyzlnr5690 3 ปีที่แล้ว

    Is it possible that I want to change one style QRcode image to another by using pix2pix likely?

  • @tarunteja28
    @tarunteja28 3 ปีที่แล้ว

    For how many progressive epochs does the original proGAN is trained?

  • @muhammadwaqar4374
    @muhammadwaqar4374 2 ปีที่แล้ว

    How can I load your pre-trained model and generate new images?

  • @HipHop-cz6os
    @HipHop-cz6os 3 ปีที่แล้ว

    What color theme are u using?

  • @sahil-7473
    @sahil-7473 3 ปีที่แล้ว

    Hey bro! What your computer configuration you have?

  • @sushilghildiyal9524
    @sushilghildiyal9524 หลายเดือนก่อน

    How to tweak the model if we have more than 3 channels?

  • @vanshshah6418
    @vanshshah6418 ปีที่แล้ว

    which Gpu are you using?? can you share me the link i wan to buy.

  • @boquangdong
    @boquangdong 2 ปีที่แล้ว

    Hello Aladdin. this is a great video. I trained on my GPU (RTX 3080). I complete step6 (256x256) at batch_size = 4. However, I cannot complete step7 (512x512) at batch_size = 2 and step8 (1024x1024) at batch_size = 1.
    At step7 I can calculate loss_gen and loss_critic in first batch_idx. however, loss_gen=NAN and loss_critic=NAN at epoch=0 and batch_idx=100. and I can't complete the training at the first epoch.
    I hope you can take a look and reply me on this situation. thank you

  • @shraddhamishra2228
    @shraddhamishra2228 2 ปีที่แล้ว

    What is the minimum hardware configuration of computer to run this code

  • @cityboss-zr9wo
    @cityboss-zr9wo 11 หลายเดือนก่อน

    if channels_img is 1, how can i modify the code?

  • @hashimhussain5780
    @hashimhussain5780 ปีที่แล้ว

    Hello, I keep getting the error "The size of tensor a (4) must match the size of tensor b (32) at non-singleton dimension 3", due to the line "interpolated_images = real * beta + fake.detach() * (1 - beta)". Any solutions?
    Edit: It only seems to be work when starting at 32x32 size for me, and crashes otherwise / any other size. The model seems fine however

  • @AssetIlyasbekov
    @AssetIlyasbekov หลายเดือนก่อน

    hello, working on diploma project about GANs. Did i understand correclty, that you implemented this network with 256 units, instead of 512? Where i can find version with 512 units, because by editing ConvBlock i'm having troubles with img_size and channels, thank you!

    • @AssetIlyasbekov
      @AssetIlyasbekov หลายเดือนก่อน

      i mean implementation of this model, so it can generate photorealistic images of faces

  • @zw1478
    @zw1478 2 ปีที่แล้ว

    👍

  • @yimingqu2403
    @yimingqu2403 3 ปีที่แล้ว +1

    Another great video. But one small pronunciation mistake at "He Initialization". In Chinese, He(何) sounds like the "he" in "her", not the pronoun "he".

    • @Agrover112
      @Agrover112 3 ปีที่แล้ว

      I remember there was a researcher named He He and I laughed a lot

  • @alfagame2109
    @alfagame2109 3 ปีที่แล้ว

    Hi ı have a image completion project with tensorflow. I run my train.py but ı cant run my test.py .Can u look at my code please?

  • @Agrover112
    @Agrover112 3 ปีที่แล้ว

    Are you an MS student?

  • @AssetIlyasbekov
    @AssetIlyasbekov หลายเดือนก่อน

    29:26

  • @ttaylor9916
    @ttaylor9916 8 หลายเดือนก่อน

    this would be a perfect course, if the final correct code was posted, rather than having to try to figure out all the corrections, and then correct the git version, and figure out the differences between git and the video versions, etc....

  • @shraddhamishra2228
    @shraddhamishra2228 2 ปีที่แล้ว

    Kindly reply