happy-jihye / cartoon-stylegan Goto Github PK
View Code? Open in Web Editor NEWFine-tuning StyleGAN2 for Cartoon Face Generation
Fine-tuning StyleGAN2 for Cartoon Face Generation
Thanks for providing this code!
When trying to run the following cell in the the Colaboratory notebook to project an input image to latent space :
#Project your own image and Make Eigenvector of latent spaces (by pretrained model)
!python projector.py --ckpt=/content/Cartoon-StyleGan2/networks/ffhq256.pt --factor='networks/factor' --e_ckpt=/content/Cartoon-StyleGan2/networks/encoder_ffhq.pt \
--files=/content/Cartoon-StyleGan2/celea.jpg
I get the following error:
ImportError: cannot import name 'compare_ssim' from 'skimage.measure' (/usr/local/lib/python3.7/dist-packages/skimage/measure/init.py)
This seems to be because /usr/local/lib/python3.7/dist-packages/skimage/measure/__init__.py
uses 'skimage.measure.compare_ssim' when it was recently changed to 'skimage.metrics.structural_similarity'
Link talking about skimage update: williamfzc/stagesepx#150
Hi, Jihye !
Nice to meet you !
When I had tried to start all boxes in your collab I got this error.
Could you help me, please )
ImportError: cannot import name 'ensure_checkpoint_exists' from 'utils' (/content/Cartoon-StyleGan2/utils.py)
How to blend 2 StyleGAN model
How do you specify a picture for testing?
Thank you for sharing this good work. I'm testing new image on the Colab inference notebook you have shared but unfortunately the Example 3 gives me bad results on all of images I uploaded. Don't know why although I run the exact same code on Colab notebook. Can you please take a look and share code for inference new images. Thanks in advance. I think it's because of encoder model. This is the image after run the projector.py line of code on Colab notebook.
Maybe that leads to the generated images being distorted too.
Thanks for the work. Looks really cool! I have two questions about the script train.py
:
(1) Does the parameter freezeFC
mean that you want to freeze the whole style network (from z
to w
) on left of the generator? Looks you do not really freeze it but instead use the latent w
computed from the source generator.
(2) For the generator_source
, do we also need to load the weight of source generator before starting the training? I see you only define it without pre-loading any weight.
is it possible to do inference on cpu in google colab?
Thanks for the code~
I'm confused about freezing the specific layers of generator.
After you set the layers of the generator to false in Line 181
requires_grad(generator, False)
What's the purpose of Line 192~195?
Thanks for your amasing work shared here.
I was wondering how to train a model using my custom dataset.
Access denied with the following error:
Access denied with the following error:
Cannot retrieve the public link of the file. You may need to change
the permission to 'Anyone with the link', or have had many accesses.
You may still be able to access the file from the browser:
https://drive.google.com/uc?id=1yIn_gM3Fk3RrRphTPNBPgJ3c-PuzCjOB
Too many users have viewed or downloaded this file recently. Please
try accessing the file again later. If the file you are trying to
access is particularly large or is shared with many people, it may
take up to 24 hours to be able to view or download the file. If you
still can't access a file after 24 hours, contact your domain
administrator.
Currently we're using noise to generate source image and transfer it to output image right? How can we use our own custom source image?
Hello:
I found your repo., it looks great. However, I am rather new to Python language, but I have rather good experience with C#, and have some experience with ONNX models. I am using Python 3.9 on Windows 10.
I want to know if I can convert any of the PT model, like: 550000.PT to onnx model, like: 550000.onnx.
I have installed Netron 5.6.4, and I can view 550000.PT file, it looks very complicated.
Can you suggest on how to do this?
I found someone showed some Python script to convert other type of model to ONNX, but it seems they know the model very well. But I don’t know too much about any model used in your repo.
Please advise,
Thanks,
Permission denied: https://drive.google.com/uc?id=1yIn_gM3Fk3RrRphTPNBPgJ3c-PuzCjOB
Maybe you need to change permission over 'Anyone with the link'?
Permission denied: https://drive.google.com/uc?id=1OysFtj7QTy7rPnxV9TXeEgBfmtgr8575
Maybe you need to change permission over 'Anyone with the link'?
Permission denied: https://drive.google.com/uc?id=1Oylfl5j-XGoG_pFHtQwHd2G7yNSHx2Rm
Maybe you need to change permission over 'Anyone with the link'?
Permission denied: https://drive.google.com/uc?id=1wWt4dPC9TJfJ6cF3mwg7kQvpuVwPhSN7
Maybe you need to change permission over 'Anyone with the link'?
Permission denied: https://drive.google.com/uc?id=1yEky49SnkBqPhdWvSAwgK5Sbrc3ctz1y
Maybe you need to change permission over 'Anyone with the link'?
Permission denied: https://drive.google.com/uc?id=1z51gxECweWXqSYQxZJaHOJ4TtjUDGLxA
Maybe you need to change permission over 'Anyone with the link'?
Permission denied: https://drive.google.com/uc?id=1PJaNozfJYyQ1ChfZiU2RwJqGlOurgKl7
Maybe you need to change permission over 'Anyone with the link'?
Permission denied: https://drive.google.com/uc?id=1PILW-H4Q0W8S22TO4auln1Wgz8cyroH6
Maybe you need to change permission over 'Anyone with the link'?
Permission denied: https://drive.google.com/uc?id=1P5T6DL3Cl8T74HqYE0rCBQxcq15cipuw
Maybe you need to change permission over 'Anyone with the link'?
Permission denied: https://drive.google.com/uc?id=1P65UldIHd2QfBu88dYdo1SbGjcDaq1YL
Maybe you need to change permission over 'Anyone with the link'?
Hi
instead of changing the facial expression in the colab, Can you show an example of encoding one photo and generating cartoon face of that photo?
Thank you
Hi, I am trying to run the colab inference code and when reaching the "Generate Images using Pretrained model" part, with running "from model import Generator", I get the error:
ImportError: /root/.cache/torch_extensions/py310_cu121/fused/fused.so: cannot open shared object file: No such file or directory
I would assume it is a permission issue, and how to solve it. Thank you in advance.
subj
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.