GithubHelp home page GithubHelp logo

azmarie / caricature-your-face Goto Github PK

View Code? Open in Web Editor NEW
37.0 3.0 5.0 91.87 MB

๐Ÿง‘๐Ÿปโ€๐ŸŽค Generate geometry-aware face caricatures using Style Transfer

Home Page: https://azmariewang.medium.com/geometry-aware-style-transfer-implementation-and-analysis-3a9034dfca2d

License: MIT License

Python 97.94% Shell 2.06%
style-transfer caricatures facial-landmarks neural-style-transfer

caricature-your-face's People

Contributors

azmarie avatar

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

Watchers

 avatar  avatar  avatar

caricature-your-face's Issues

RuntimeError: solve_cuda: U(4,4) is zero, singular U.

Hi,
Just trying to test this, but I get the following issue:

./run.sh


Started Deformable Style Transfer

Settings
content_path: data/content/barack_obama.jpg
style_path: data/style/Vincent_van_Gogh/151.png
content_pts_path: data/content/pts/barack_obama.txt
style_pts_path: data/style/pts/151.txt
output_dir: data/output/Vincent_van_Gogh
output_prefix: barack_obama-151
im_size: 256
max_iter: 150
checkpoint_iter: 50
content_weight: 8.0
warp_weight: 0.5
reg_weight: 50.0
optim: sgd
lr: 0.3
verbose: True
save_intermediate: True
save_extra: True

Optimizing at scale 1, image size (64, 64)
STEP 000: Loss 7.949
= alphaLcontent 0.434
+ Lstyle 4.580
+ beta
Lwarp 2.935
+ gamma*TV 0.000
Traceback (most recent call last):
File "main.py", line 101, in
output = DST(initial_im, content_im_orig, style_im_orig, extractor,
File "/home/nerdy/github/Caricature-Your-Face/styletransfer.py", line 143, in DST
new_im, content_im_warp, warp_field = apply_warp(new_im, [src_Kpts_aug], [dst_Kpts_aug], device, sharp=sharp_warp, im2=content_im_warp)
File "/home/nerdy/github/Caricature-Your-Face/warp.py", line 432, in apply_warp
new_im, new_im2, warp_field = image_warp(new_im, dst, dst-src, device, sharp=sharp, img2=new_im2)
File "/home/nerdy/github/Caricature-Your-Face/warp.py", line 86, in image_warp
w, v = solve_interpolation(dst_pts, flow_pts, device)
File "/home/nerdy/github/Caricature-Your-Face/warp.py", line 226, in solve_interpolation
w_v, _ = torch.solve(rhs, lhs)
RuntimeError: solve_cuda: U(4,4) is zero, singular U.

The last line changes. For example it could also be:

RuntimeError: solve_cuda: U(29,29) is zero, singular U.

How to add new style images?

Dear Azmarie,

I want to add new style images. so I want to know how to create *.ljson files for new style face images? thanks!

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.