Giter Site home page Giter Site logo

Comments (3)

bryandlee avatar bryandlee commented on August 25, 2024

Hi, I don't quite get what you mean by re-using the generated data to put in it's original place.
Is it like [crop the head -> model inference -> put back to original image]?
or like warp the previous generated frame using optical flow?

from animegan2-pytorch.

carbendi avatar carbendi commented on August 25, 2024

Hey sorry for the confusion,

So If I understand correctly the script detects the face, stabilize and than process it. And the reseult is like in this video.
https://youtu.be/fZ3AqJwcPhU

When I want to replace the real face ( in the target video) with the toonified one, the toonified one is jumpy (becouse of the face detect and stabilization)

I was wondering if it is possible to use the stabilization data that the script generated by head tracking in the first place, reverse it and apply to the final image? So it will have the original movement and size and it will follow the head as it was in the original video.

Hope this makes sense :)

from animegan2-pytorch.

bryandlee avatar bryandlee commented on August 25, 2024

Actually you don't need to crop & align the head. Instead, you can simply resize the image:

  1. get a video frame
  2. run face detector on the video frame
  3. compute the face size x
  4. resize the video frame so that the resulting face size becomes about 400px (which means the resize ratio = 400 / x)
  5. apply model to the resized image, and resize the output image back to its original size
  6. go back to 1 and process next frame

from animegan2-pytorch.

Related Issues (20)

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.