Create High Resolution GAN Faces with Pretrained NVidia StyleGAN and Google CoLab

Поделиться
HTML-код
  • Опубликовано: 22 янв 2025

Комментарии • 76

  • @adambrown3913
    @adambrown3913 2 года назад +5

    I ran into unknown errors with this, I finally used pixbim animate photos AI to increase the resolution of faces. I hope this helps others.

  • @artessa_ai
    @artessa_ai 4 года назад +1

    Thank you for the amazing tutorial. It's straight forward and cuts out all the padding of other videos.

  • @Phiwipuss
    @Phiwipuss 4 года назад +1

    Help: AttributeError: module 'tensorflow' has no attribute 'Dimension' #7:00 Solved

    • @melissayanellvanderree9114
      @melissayanellvanderree9114 4 года назад

      Hey, I have the same problem. I know it is version 1.x but I can't find it in the code the name 'tensorflow'. Do you know where in the code I can find it? Thanks

    • @Phiwipuss
      @Phiwipuss 4 года назад

      @@melissayanellvanderree9114 I went through the all scripts, where the errors were accruing, and half of StackOverflow's content. No answers there. :( At least now I know that StyleGAN doesn't hate only me.

    • @adambrown3913
      @adambrown3913 2 года назад

      This is difficult for a common user, Use pixbim animate photos AI - it works like a charm for enhancing the resolution of faces.

  • @klarusdetro1544
    @klarusdetro1544 5 лет назад

    Amazing, amazing, amazing, quick and simple explained with a real example. You gained a new follower with this!

  • @iv_lucky
    @iv_lucky 5 лет назад

    I love your videos.) I spent a lot of time trying to use style-gan in my pc and after some successful tries I received bad images. Thank you so much and good luck!

  • @BiancaAguglia
    @BiancaAguglia 5 лет назад

    A useful time saver. Thank you for the video (and for the tip on working around the quota limit). 😊

  • @WilliamKhoo
    @WilliamKhoo 4 года назад +2

    AttributeError: module 'tensorflow' has no attribute 'Dimension'
    Help! =[

    • @mariamnaeem443
      @mariamnaeem443 4 года назад +4

      use %tensorflow_version 1.x

    • @WilliamKhoo
      @WilliamKhoo 4 года назад

      @@mariamnaeem443 Thanks that worked! Would you happen to know if I can have it spit out more than 1 image?

    • @mariamnaeem443
      @mariamnaeem443 4 года назад

      @@WilliamKhoo yes, pass a range of seeds instead of 1

    • @hudasaleem4825
      @hudasaleem4825 2 года назад

      @@mariamnaeem443 this %tensorflow_version 1.x dont now work in colab display the message " WARNING: Tensorflow 1 is deprecated, and support will be removed on August 1, 2022.
      After that, `%tensorflow_version 1.x` will throw an error ", what to do

  • @yaya_prazer
    @yaya_prazer 5 лет назад +3

    not cool... Error: ModuleNotFoundError: No module named 'dnnlib'

  • @koustavguha4540
    @koustavguha4540 4 года назад +3

    UnpicklingError: invalid load key, '

  • @oumarbamba9739
    @oumarbamba9739 4 года назад +2

    AttributeError: module 'tensorflow' has no attribute 'Dimension'

  • @mariamnaeem443
    @mariamnaeem443 4 года назад +2

    I get this error every time I try to run this :
    AttributeError: module 'tensorflow' has no attribute 'Dimension'
    Can you please help?

    • @rayanfernandes2631
      @rayanfernandes2631 4 года назад +4

      %tensorflow_version 1.x
      run this before u run main code

    • @mariamnaeem443
      @mariamnaeem443 4 года назад

      @@rayanfernandes2631 This works now, thanks alot

  • @cyberfication
    @cyberfication 4 года назад +1

    AttributeError: module 'tensorflow' has no attribute 'Dimension'
    I get the above error

  • @to-mi1949
    @to-mi1949 Год назад

    You make amazing videos!
    I have a question... I have a 3D scan of a face. The texture on the scan is a bit low quality and it has a shadow across it. I have more images of the same person in different angles and with different facial expressions that are high quality and without shadow.
    Is there a way to kinda take a screenshot of the bad scan, then use some type of gan to generate a new image on top of the screenshot, by combining those images?
    Hard to explain, but hope you get what I mean... like a face swap kind of!
    I have tried training stable diffusion models on the person, but the results are very bad and it just looks 20% right. Also hard to match the facial expression.
    Also tried deep fake softwares and apps, but they aren't accurate at all haha
    A gan is cool because they can produce high resolution images from low quality ones. However the issue then is that it doesn't get rid of the shadow across the face.
    Do you have any knowledge of how to do this? Or any tips/tricks 😅

  • @shabnampathan4515
    @shabnampathan4515 5 лет назад +1

    In Google colab how to resume the training of a model as Google colab service is available for 12 hours.
    How can we resume training using shell command from the point where the model is restored.

    • @HeatonResearch
      @HeatonResearch  5 лет назад

      You need to do something like this: towardsdatascience.com/resuming-a-training-process-with-keras-3e93152ee11a

    • @shabnampathan4515
      @shabnampathan4515 5 лет назад +2

      @@HeatonResearch thank you so much ,will give it a try

    • @HeatonResearch
      @HeatonResearch  5 лет назад

      @@shabnampathan4515 I will probably do a video on getting around the 12 hour limit at some point.

  • @geetanjalisharma1501
    @geetanjalisharma1501 3 года назад

    Sir, if our custom model is in our folder in our system, in that case how to give path of the pretrained model instead of Google drive link ?

  • @数学闹不清楚了
    @数学闹不清楚了 4 года назад

    Hi Sir, I just wanna know how to adjust the resolution of the generated image to the same size with my original dataset

  • @oumarbamba9739
    @oumarbamba9739 4 года назад +3

    32
    33
    ---> 34 def shape_to_list(shape: Iterable[tf.Dimension]) -> List[Union[int, None]]:
    35 """Convert a Tensorflow shape to a list of ints."""
    36 return [dim.value for dim in shape]
    AttributeError: module 'tensorflow' has no attribute 'Dimension'

  • @oumarbamba9739
    @oumarbamba9739 4 года назад

    while running your code I got this error message

  • @juli6248
    @juli6248 5 лет назад +2

    Thanks, Jeff. When I followed you steps, I got "UnpicklingError: invalid load key, '

  • @melissayanellvanderree9114
    @melissayanellvanderree9114 4 года назад

    Where do I have to change the name in the code about the tensorflow_version error? I can't find it. And I have also error about ---> 15 import dnnlib.tflib as tflib

    • @drishtisharma8486
      @drishtisharma8486 3 года назад

      I'm also facing the same error... how did you fix it..?

    • @bobow4075
      @bobow4075 2 года назад

      @@drishtisharma8486 Did you guys figure it out?

  • @mockingbird3809
    @mockingbird3809 5 лет назад +2

    Thank You So Much, Jeff. I wish you to be my Professor.... 😅

  • @ThalesPo
    @ThalesPo 5 лет назад

    So, it's 1 in the morning here and I couldn't pay attention to any of that. Tell me if I got it right. The generation of the image is being done by another computer, or a computer from google, because our PC's are just not powerful enough?. And how can I turn the knobs to input the values that I want for the dimensions, thus generating a custom face and not just a random one?

  • @susantachary7456
    @susantachary7456 4 года назад

    Thanks Jeff, really interesting

  • @PaulFishwick
    @PaulFishwick 3 года назад

    I just tried this in Google Colab Pro. Cells up to 10 execute correctly. Cell 11 "This code is based on code from nVidia" creates an error: ---------------------------------------------------------------------------
    AttributeError Traceback (most recent call last)
    in ()
    13 import PIL.Image
    14 import dnnlib
    ---> 15 import dnnlib.tflib as tflib
    16 import config
    17
    2 frames
    /content/stylegan/dnnlib/tflib/tfutil.py in ()
    32
    33
    ---> 34 def shape_to_list(shape: Iterable[tf.Dimension]) -> List[Union[int, None]]:
    35 """Convert a Tensorflow shape to a list of ints."""
    36 return [dim.value for dim in shape]
    AttributeError: module 'tensorflow' has no attribute 'Dimension'

    • @ЄвгенійПлотніков-щ8д
      @ЄвгенійПлотніков-щ8д 2 года назад

      Insert the next code to specify tensorflow version
      %tensorflow_version 1.x
      before import packages
      import os
      import pickle
      import numpy as np
      import PIL.Image
      import dnnlib
      import dnnlib.tflib as tflib
      import config

  • @naasikhendricks1501
    @naasikhendricks1501 3 года назад

    Hi Jeff can one apply a transfer function to give the model totally different type to fill in data?

    • @HeatonResearch
      @HeatonResearch  3 года назад

      In StyleGAN? I suggest using the transfer functions they have specified, otherwise you won't be able to use the pretrained mdo

  • @bobow4075
    @bobow4075 2 года назад +1

    Pretty sure this video is outdated, code dooesn't work

  • @dracoking7787
    @dracoking7787 4 года назад

    Hey Jeff one question which tensorflow version are you using

  • @futureentrepreneur4006
    @futureentrepreneur4006 4 года назад

    hello this looking intresting i have can we use this to generate high quality faces of old photos

  • @spenserarkbottest6283
    @spenserarkbottest6283 5 лет назад

    Is it possible that I can feed it with my own set of facial image materials to generate new image?

    • @HeatonResearch
      @HeatonResearch  5 лет назад

      Yes, but that is not the topic of this video. Here I am focusing primarily upon using the pre-trained weights. I will have upcoming videos on training GANs from scratch. However, this does require considerable compute power.

  • @ammarkhan2611
    @ammarkhan2611 4 года назад

    Thanks, Jeff.. Can I create full-body humans using this pre-trained network on Google Colab. I want the size of the images to be 512X512

  • @Phiwipuss
    @Phiwipuss 4 года назад

    Now I have this: "module 'tensorflow' has no attribute 'AUTO_REUSE'"

  • @bennoreuter4393
    @bennoreuter4393 4 года назад

    Are you also randomly generated?

  • @jrlingerfelt
    @jrlingerfelt 2 года назад

    Is there a software where you can use this tech to create videos, say an actual 10 minute cartoon so-to-speak

  • @Stwinky
    @Stwinky 5 лет назад

    Nice google drive trick Jeff!

  • @remi.dongmo
    @remi.dongmo 4 года назад

    Nice tutorial ! Is there a way or a model that spots AI generate images ?

  • @Phiwipuss
    @Phiwipuss 4 года назад +1

    "No module named 'dnnlib'" Solved

    • @narayanprasai8996
      @narayanprasai8996 3 года назад

      how did you do that?

    • @Phiwipuss
      @Phiwipuss 3 года назад +1

      @@narayanprasai8996 Can't remember. But to warn you, if you go down that hole, there is no wait out.

  • @namangoyal8477
    @namangoyal8477 3 года назад

    jeff, We have followed the tutorial but there is an issue while unpickling, many of the users have commented it. Kindly respond.
    27 with dnnlib.util.open_url(url, cache_dir=config.cache_dir) as f:
    ---> 28 _G, _D, Gs = pickle.load(f)
    29 # _G = Instantaneous snapshot of the generator. Mainly useful for resuming a previous training run.
    30 # _D = Instantaneous snapshot of the discriminator. Mainly useful for resuming a previous training run.
    UnpicklingError: invalid load key, '\x0a'.

  • @lightttt5146
    @lightttt5146 5 лет назад

    Please do a video about STYLE MIXING

  • @erdalalim9
    @erdalalim9 5 лет назад

    Hi Jeff thanks for sharing, I need to generate faces from LFW dataset.. Its possible just to train LFW dataset and then to generate? Or there is a way to use pre-trained networks to generate faces from LFW? thanks in advance

  • @gangulisilva8688
    @gangulisilva8688 Год назад

    Thank alot

  • @ashishjohnsonburself
    @ashishjohnsonburself 5 лет назад +1

    great

  • @mustangsally2048
    @mustangsally2048 5 лет назад

    What about how to generate full body shots?

    • @HeatonResearch
      @HeatonResearch  5 лет назад

      StyleGAN is just faces, but there are some projects out there that do full bodies.

    • @ivansmirnov2819
      @ivansmirnov2819 5 лет назад

      @@HeatonResearch Can you please name any?

    • @HeatonResearch
      @HeatonResearch  5 лет назад +1

      @@ivansmirnov2819 www.outerplaces.com/science/item/19334-data-grid-ai-people

    • @ivansmirnov2819
      @ivansmirnov2819 5 лет назад

      @@HeatonResearch Thanks! Too bad they're not open-source

  • @oumarbamba9739
    @oumarbamba9739 4 года назад

    AttributeError Traceback (most recent call last)
    in ()
    13 import PIL.Image
    14 import dnnlib
    ---> 15 import dnnlib.tflib as tflib
    16 import config
    17

  • @shin-ishikiri-no
    @shin-ishikiri-no 5 лет назад

    Mario and Luigi, but better.

  • @Phiwipuss
    @Phiwipuss 4 года назад

    I GIVE UP!!!

  • @ajinaufalaqil6589
    @ajinaufalaqil6589 4 года назад +1

    UnpicklingError: invalid load key, '\x0a'.
    help me