Image Generation using GANs | Deep Learning with PyTorch (6/6)
ฝัง
- เผยแพร่เมื่อ 11 ก.ย. 2024
- 💻 For real-time updates on events, connections & resources, join our community on WhatsApp: jvn.io/wTBMmV0
Learn all about the applications of GANs, generative modelling, generating fake digits and anime faces with GANs and more in this beginner-friendly tutorial. This lecture is part 6/6 of the Deep Learning with PyTorch Free Certification course. To learn more visit jovian.ai/lear...
Code and Resources:
🔗 Generative Adversarial Networks in PyTorch: jovian.ai/aaka...
🔗 Generative Adversarial Networks using MNSIT: jovian.ai/aaka...
🔗 Tensorflow 2.1 port of Pytorch - Zero to GANs: jovian.ai/kart...
🔗 Discussion forum: jovian.ai/foru...
Topics covered in this video:
⌨️ Generative modelling and applications of GANs
⌨️ Training generator and discriminator networks
⌨️ Generating fake digits & anime faces with GANs
Deep Learning with PyTorch: Zero to GANs is a beginner-friendly online course offering a practical and coding-focused introduction to deep learning using the PyTorch framework.
You can learn more and register for a Free Certificate of Accomplishment at zerotogans.com.
This course is taught by Aakash N S, co-founder & CEO of Jovian - a platform for sharing, showcasing and collaborating on data science projects online.
--
Learn Data Science the right way at www.jovian.ai
Interact with a global community of like-minded learners jovian.ai/forum/
Get the latest news and updates on Machine Learning at / jovianml
Connect with us professionally on / jovianml
Subscribe for new videos on Artificial Intelligence / jovianml
#DeepLearning #ResNets #PyTorch #MachineLearning #ArtificialIntelligence #DataScience
Fantastic courses, I followed all the lessons from 1 to 6.
I also really like the way you explain things, from the concept, program, function explanation, coding structures, etc.
It's easy to follow and understand. Thanks a lot man, this really helps me a ton!! 👍👍
can you tell me about the hardware requiremnts to run this project?
Had to comment, man love the work! I got a habit of reading blogs and research papers and awesome job overall. Looking forward to more such courses in the future
Probably one of the best videos I've seen on training GANs ❤ Keep up the good work and I hope to see more videos from you guys in the future!
Thanks! Glad you liked the video. For more free content go to jovian.com/learn
Thank You Very much Aakash Bhai, good knowledge great efforts selfless service! I wish, you get millions of subscribers and great communities of programmers out of Bharat.
Thank you so much!
Is it enough to learn basics of GAN or do I need to learn more?? And can you share some sources
ossavabik video
Hi, thanks for the video. Quick question: in the custom dataset class, in the getitem method, why do we use the transforms? Is it because when we iterate over batches in the training, internally the getitem is invoked, so we want the images that we get to be transformed?
edit: The mentioned class is at 1:33:03. Thanks!
very effective learning platform
Hey Aakash, Thanks for this course. I have completed zero to pandas and zero to gbms as well prior to this one along with a couple of projects for all three of them. Can you guide me to the next series of courses/skills I should be doing/learning for a career in data analytics? (Other than your Bootcamp) I will be grateful
Hey, this is not Aakash, but I can give you some suggestions.
You can start by applying for internships/jobs and prepare for data science interviews if you looking to get a job in this field. When you apply for jobs, the job requires some skills, make a list of the most important skills asked by most of the jobs you are applying for and start studying all of them one by one. Here are a few suggestions for the next things you should learn: SQL, Excel, BI tools like tableau or power BI, Statistics, NLP & more projects on ML/DL. You can also participate in Kaggle competitions.
thankyou for this wonderful explanation
Thank you man! Thank you for your help
Glad you like our course!
Thank you very much for the course @Jovian @aakashns /bow =)
i need each generated image individually in a file, how to do that ? ... i do not want the generated images as a batch image.... please help.
I want to generate bank document data that can have tabular data as well as form data through GAN. What strategy can I follow for data preparation and in what format should I send the send the input to the generator so that it can generate accuarate images with correct textual information.
Wonderful course
Many thanks
sir in this code is used for synthetic image generation using conditional GAN
Excellent tutorial on GANs
Glad you liked it
why the output images not individually? I mean the output every time is one image contains small images, Why ??
It's because the data is organized in that way, you can try to modify the code so that you get one image at a time.
Did you find out how to generate one image at a time?
@@159_vivekpatel5 i did it dear friends: colab.research.google.com/drive/11VWZ-_sykTUQ9KPrzFqGTM5f-CDXo6TV#scrollTo=VvGLvkVJWcJP
in this project can we useany dataset?
Very good. Thanks for the video.
Glad you liked it!
i am trying to run the code in pycharm so how to load the images locally
Can i generate frontal face of human by folllowing this code?
Can you please share the direct link of Layer visualization lessons of your channel.
Thank you so much for the tutorial.
is a 3D reconstruction from a 2D image?
can anyone tell me about the hardware requirements for text to image generation using GAN project
after all this 6 lectures where i stand what can i write on resune ??
Well now you have a basic knowledge on Deep Learning, GAN's and you can dive deep into these fields with these basic knowledges, try creating more projects add those in your resume, remember this field is vast so never stop learning.
@@jovianhq thanks alot for this course, i wouldn't had found this new passion
@@jovianhq how can i save all last epoch generated 512x512 images to an output folder ?
@@jovianhq What is the type of GAN's used in this example? As you know that there are different type of GAN's e.g. Conditional GANs (cGANs)
Great work thank you. But what if my dataset is small (around 5k) , will the anime code work for me?
Yes, it will work with any datasets, but you might have have to do some minor modifications.
@jovianhq I am getting the bellow error - "Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same" at save_samples(0,fixed_latent) function. what should i do ?
You have to add .to(device) at the end of your generator and discriminator function. The example below shows the final code for the generator function.
generator = nn.Sequential(
# in: latent_size x 1 x 1
nn.ConvTranspose2d(latent_size, 512, kernel_size=4, stride=1, padding=0, bias=False),
nn.BatchNorm2d(512),
nn.ReLU(True),
# out: 512 x 4 x 4
nn.ConvTranspose2d(512, 256, kernel_size=4, stride=2, padding=1, bias=False),
nn.BatchNorm2d(256),
nn.ReLU(True),
# out: 256 x 8 x 8
nn.ConvTranspose2d(256, 128, kernel_size=4, stride=2, padding=1, bias=False),
nn.BatchNorm2d(128),
nn.ReLU(True),
# out: 128 x 16 x 16
nn.ConvTranspose2d(128, 64, kernel_size=4, stride=2, padding=1, bias=False),
nn.BatchNorm2d(64),
nn.ReLU(True),
# out: 64 x 32 x 32
nn.ConvTranspose2d(64, 3, kernel_size=4, stride=2, padding=1, bias=False),
nn.Tanh()
# out: 3 x 64 x 64
).to(device)
Now that the output from the generator function is on GPU, you need to convert it back to CPU for it to be displayed by pyplot. This is done by adding images = images.cpu() in the show_images() function shown below
def show_images(images, nmax=64):
fig, ax = plt.subplots(figsize=(8, 8))
ax.set_xticks([])
ax.set_yticks([])
images = images.cpu()
ax.imshow(make_grid(denorm(images.detach()[:nmax]), nrow=8).permute(1, 2, 0))
@Jovian why is real target torch.ones.(real_iamges.size(0))?? thta will create a matric of all ones of size the same as real_image. how can matrix of all 1s be treated as real target. it has to be really a real target meaning an anime image vector . isn'it like that ?
It's just a starting point, an image is made from pixels. An image in digital terms is a matrix of 0's and 1's or 0-1. Initially, we are assuming all pixels as 1, now using machine learning you'll have to reduce the loss to reach the target.
"Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor" - for the last line history = fit(epochs, lr)
I am getting this error. Both discriminator and generator were sent to gpu.
i am also getting the same error! what should i do here?