Giter VIP home page Giter VIP logo

stylegan-web's Introduction

stylegan-web's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stylegan-web's Issues

Feature Suggestion - include latent_directions

So I've been trying out different stylegan repos - and I'm imaging a fusion of two.
Basically the guts of this repo
GreenLimeSia/GenEdi#3

Screenshot_2020-12-27_08-12-00

While it is in pytorch - I think it would be great to surface these in side bar as in the 512 vectors currently in another tab.

Also checkout artbreeder
https://www.artbreeder.com/
it has some simple controls to switch up / infuse latent vectors.

Side note - the nvidia labs are switching over to pytorch -
NVlabs/stylegan2-ada#32 (comment)

I get noise only

I installed this app under windows, setup everything, but I get this noise for any model. What's happened?

image

I have RTX 3060, is this compatible?

Frontend Build Error - Because of fast-api.js

Hello,

First of all, I'd like to thank you for this amazing repository! My friend and I are examining it in this fork: https://github.com/aiksir/stylegan-web

When I run this command to build the frontend: npm run-script build, I get the following error:

(forked-stylegan-web) baris@bariss-MacBook-Pro forked-stylegan-web % npm run-script build

> [email protected] build /Users/baris/Documents/PycharmProjects/forked-stylegan-web
> rollup -c rollup.config.js


./app/index.js → dist/index.bundle.js...
created dist/index.bundle.js in 880ms

./app/projector.js → dist/projector.bundle.js...
[!] Error: 'import' and 'export' may only appear at the top level
node_modules/face-api.js/build/es6/env/isNodejs.js (1:0)
1: export function isNodejs() {
   ^
2:     return typeof global === 'object'
3:         && typeof require === 'function'
Error: 'import' and 'export' may only appear at the top level
    at error (/Users/baris/Documents/PycharmProjects/forked-stylegan-web/node_modules/rollup/dist/shared/node-entry.js:5400:30)
    at Module.error (/Users/baris/Documents/PycharmProjects/forked-stylegan-web/node_modules/rollup/dist/shared/node-entry.js:9824:16)
    at tryParse (/Users/baris/Documents/PycharmProjects/forked-stylegan-web/node_modules/rollup/dist/shared/node-entry.js:9717:23)
    at Module.setSource (/Users/baris/Documents/PycharmProjects/forked-stylegan-web/node_modules/rollup/dist/shared/node-entry.js:10080:33)
    at /Users/baris/Documents/PycharmProjects/forked-stylegan-web/node_modules/rollup/dist/shared/node-entry.js:12366:20
    at async Promise.all (index 4)
    at async Promise.all (index 6)
    at async Promise.all (index 2)
    at async Promise.all (index 0)
    at async Promise.all (index 1)
    at async Promise.all (index 0)
    at async Promise.all (index 0)
    at async Promise.all (index 0)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `rollup -c rollup.config.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/baris/.npm/_logs/2020-10-15T10_02_32_356Z-debug.log

I have made a quick search on the internet but I couldn't figure it out because I'm not much familiar with Vue. Are you aware of this issue?

Couldn't set up environment using vcvars64.bat

nvcc fatal : Could not set up the environment for Microsoft Visual Studio using 'C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/../../../../../../../VC/Auxiliary/Build/vcvars64.bat'

Enhancement - Feature load / save / find latent_representations / augmentation

https://github.com/jasonlbx13/FaceHack/blob/b4beda81354806a13efe3c992d819fc6a9f83d65/face_gan/main.py

Given an existing star / celebrity load / save

this code could be put into a pipeline / for subparsers
maybe it may have to look like photoshop layers (will raise another ticket)

Uploading Screen Shot 2021-01-17 at 9.05.41 am.png…

def augmentation(args):

    os.makedirs(args.dst_dir+'/augmentation', exist_ok=True)

    print('Loading networks from "{}"...'.format(args.network_pkl))
    tflib.init_tf()
    with open(args.network_pkl, "rb") as f:
        generator_network, discriminator_network, Gs_network = pickle.load(f)

    Gs_syn_kwargs = dnnlib.EasyDict()
    Gs_syn_kwargs.output_transform = dict(func=tflib.convert_images_to_uint8, nchw_to_nhwc=True)
    Gs_syn_kwargs.randomize_noise = False
    Gs_syn_kwargs.minibatch_size = 1
    pic = np.load(args.src_dir)
    for i in tqdm(range(int(args.num))):

        scale1 = random.uniform(-float(args.smile_range), float(args.smile_range))
        scale2 = random.uniform(-float(args.age_range), float(args.age_range))
        scale3 = random.uniform(-float(args.angleh_range), float(args.angleh_range))
        scale4 = random.uniform(-float(args.anglep_range), float(args.anglep_range))
        scale5 = random.uniform(-float(args.angry_range), float(args.angry_range))
        scale6 = random.uniform(-float(args.sad_range), float(args.sad_range))
        scale7 = random.uniform(-float(args.eye_range), float(args.eye_range))

        latent_vector = pic[np.newaxis, :]
        new_latent_vector = latent_vector.copy()
        new_latent_vector[0][:8] = (latent_vector[0] + scale1 * smile_drt + scale2 * age_drt
                                    + scale3 * angleh_drt + scale4 * anglep_drt
                                    + scale5 * angry_drt + scale6 * sad_drt
                                    + scale7 * eye_drt)[:8]
        img = Gs_network.components.synthesis.run(new_latent_vector, **Gs_syn_kwargs)
        img = PIL.Image.fromarray(img[0])
        img.save('{}/augmentation/{}.png'.format(args.dst_dir, str(i).zfill(4)))

Clipboard Error on HTTP server

Hi,

When I run the project locally, clipboard functionality works fine. However, when I try to run the project on a server (for example, AWS EC2 instance), copy to latent code buttons and hash copy-paste in merger page do not work because of this issue: navigator.clipboard is undefined

resim

What I've learned is clipboard doesn't work with unsecured applications. So, it's necessary to run flask over HTTPS if you would like to use clipboard functionalities. If you think that this functionality is not necessary, at least it might be good to add a note in README.md.

Feature suggestion - merger animation exporting

It would be very useful to have the ability to export the intermediate "Merge" images into a gif.

Also as a major feature suggestion:

  • having the ability of learning and exploring meaningful latent directions

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.