Coder Social home page Coder Social logo

blender_stylegan2-ada_addon's Introduction

Blender_StyleGAN2-ada_addon

Implementation of NVLab's StyleGAN2-ada for material creation in Blender

demo.mp4

Setup

In order to install the needed modules, it must be done so for the Blender's inculded python binary

cd Blender/{Blender.version}/python/bin

pip ensurepip

pip install click requests tqdm pyspng ninja imageio-ffmpeg==0.4.3

Also install pytorch following their instructions https://pytorch.org/get-started/locally/

Note: if you already have installed some or any of these packages, uninstall them first as they won't be installed inside Blender libraries

Download https://github.com/NVlabs/stylegan2-ada-pytorch Copy legacy.py inside Blender/{Blender.version}/python/lib Copy dnnlib folder inside Blender/{Blender.version}/python/lib/site-packages

Put your trained models in C:\pkl\ (hardcoded for now, change line 27 if needed)

Done!

Usage (for now)

Download or train a model (lots of them here https://github.com/justinpinkney/awesome-pretrained-stylegan2)

Open the .blend

Run the script, on the 3D View sidebar, a tab named 'StyleGAN' should appear

Pick trained model .pkl (should be on the same drive as Blender installation)

With the object selected, pick a random seed and click on 'Generate Image'

Acknowledgements

@inproceedings{Karras2020ada,
  title     = {Training Generative Adversarial Networks with Limited Data},
  author    = {Tero Karras and Miika Aittala and Janne Hellsten and Samuli Laine and Jaakko Lehtinen and Timo Aila},
  booktitle = {Proc. NeurIPS},
  year      = {2020}
}

blender_stylegan2-ada_addon's People

Contributors

marianbasti avatar

Watchers

 avatar

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.