Giter Site home page Giter Site logo

styleclip-pytorch's Introduction

StyleCLIP-PyTorch: Text-Driven Manipulation of StyleGAN Imagery

  • With PTI (Pivot Tuning Inversion)
  • Global Direction Methods

Following will be updated soon

  • Explanation and instruction for module
  • Colab notebook demo

References

  1. stylegan2-ada-pytorch
  2. CLIP
  3. StyleCLIP
  4. Pivot Tuning Inversion

Installation

Docker build

$ sh build_img.sh
$ sh build_container.sh [container-name]

Install package

$ docker start [container-name]
$ docker attach [container-name]
$ pip install -v -e .

Pretrained weights

Download and save this pretrained weights in pretrained/ directory

Extract W, S, S_mean, S_std

FFHQ1024

$ python extract.py

FFHQ256

$ python extract.py --ckpt=pretrained/ffhq256.pkl --dataset_name=ffhq256

Extract global image direction

FFHQ1024

$ python manipulator.py extract

FFHQ256

$ python manipulator.py extract --ckpt=pretrained/ffhq256.pkl --face_preprocess=True --dataset_name=ffhq256

RUN demo.ipynb on jupyter notebook

  • Scripts for CLI env will be added.

Manipulation option

  • Source image
    • Input image projection
    • Generate z from random seed
  • Text description(neutral, target)
  • Manipulation strength (alpha)
  • Disentangle threshold (beta)

TODO

  • Save generator checkpoint by generated by pivot tuning inversion(FFHQ)
  • Global direction module refactoring(especially in gpu usage)

styleclip-pytorch's People

Contributors

nampyohong 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.