GithubHelp home page GithubHelp logo

Comments (5)

robgon-art avatar robgon-art commented on August 22, 2024

Hi c-tanner,

I will look into this issue...

from machineray.

robgon-art avatar robgon-art commented on August 22, 2024

I added get_painting_info.py to create the painting_info.txt file.

To get the .pkl file, you have to create the dataset and train StyleGAN2.

Here are the commands I used in a Colab.

!python stylegan2/dataset_tool.py create_from_images 'datasets/paintings' 'art/resized/'

!python stylegan2/run_training.py --config=config-e --metrics=none \
   --data-dir='/content/datasets' --dataset=paintings \
   --mirror-augment=true \
   --total-kimg=5000 \
   --result-dir='/content/drive/MyDrive/results_nv_1024'

from machineray.

c-tanner avatar c-tanner commented on August 22, 2024

Thanks for the quick response! I'll give this a shot.

from machineray.

c-tanner avatar c-tanner commented on August 22, 2024

Hi @robgon-art,

Thanks again for the help in getting the dataset files generated. As I wait for the initial training run to complete, I'm curious as to:

  1. How subsequent runs of the Google Colab workflow (after the 24 hours of runtime are consumed) are chained together;
  2. How this relates to the final .pkl file that is ingested into the example workflow; and therefore
  3. How network-snapshot-000188.pkl in the example workflow is obtained.

Each time the workflow you provided is run, I noticed sequentially numbered folders being created inside of Google Drive within the results_nv_1024 folder (screenshot attached). Inside of each of those folders is a .pkl file (network-snapshot-000000.pkl). Are these numerous .pkl files collated at the end of the 13-15 days that you took to run the training, or is a single file from the latest run used?

I noticed you mentioned in your article:

I also used Google Drive to retain the work in progress between runs.

So I am assuming the .pkl files are preserved between runs and are collated at the end somehow?

I also noticed:

It took about 13 days to train the GAN, sending 5 million source images through the system.

Is this 5 million from the same 850 source images generated in the initial steps? Or 5 million unique source images?

Just wondering if I have this set up correctly. Thanks in advance, any guidance here is appreciated.

Screen Shot 2021-03-07 at 7 50 44 PM

Screen Shot 2021-03-07 at 7 51 00 PM

from machineray.

robgon-art avatar robgon-art commented on August 22, 2024

Yes, when you check the output in the Colab, you should see the system picking up from where it last left off. Like this:

Loading networks from "/content/drive/My Drive/results_nv_1024_week5/00025-stylegan2-paintings-1gpu-config-e/network-snapshot-004984.pkl"...

Also, you should notice the improved quality of the "fake" images being saved.

I only used 850 source images, with * 7 for the augmentation (and another * 2 for flipping horizontally). So there were 11,900 different variations of images that the GAN saw.

The five million number in the article is from the total number of source images passed through the system. I trained the model for over 5,000 iterations of 1 kimg each, which stands for one thousand images.

Also, you should check out the newer StyleGAN2 ADA which does automatic augmentation and trains a lot faster. You can check it out in my article, here: https://towardsdatascience.com/creating-abstract-art-with-stylegan2-ada-ea3676396ffb

Cheers,

  • Rob

from machineray.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.