Git Product home page Git Product logo

Comments (11)

AliaksandrSiarohin avatar AliaksandrSiarohin commented on June 22, 2024

This is rather complicated, need to write code for frame detection and back Inpainting.

from motion-cosegmentation.

AliaksandrSiarohin avatar AliaksandrSiarohin commented on June 22, 2024

I guess it will be easier to try some exiting solution for this.

from motion-cosegmentation.

urmit-space avatar urmit-space commented on June 22, 2024

This is rather complicated, need to write code for frame detection and back Inpainting.

yes, it takes more time like 4-5 min to create a face-swapping. but get a good result.
can you please help me out as you say the existing solution is easier? I don't know where to change it. if you tried before, let me give some help in the solution.

from motion-cosegmentation.

AliaksandrSiarohin avatar AliaksandrSiarohin commented on June 22, 2024
  1. Slice the video into chunks using https://github.com/AliaksandrSiarohin/first-order-model/blob/master/crop-video.py
  2. Also crop image Win Diesel using paint to make it a square image.
  3. Run a face swap for all chunks from 1.
  4. Write a script that take modified chunks and place them back to the original positions (positions is a part of the ffmpeg command).

from motion-cosegmentation.

urmit-space avatar urmit-space commented on June 22, 2024

OK let me try it.
in this, we have to first detect the face in the video. divided video in chunks where a face appeared then crop the face portion.
after these things applied by reverse sequence. is that correct?
crop-video.py has face crop logic or have to do it myself.

from motion-cosegmentation.

AliaksandrSiarohin avatar AliaksandrSiarohin commented on June 22, 2024

Yes, crop video will produce you ffmpeg commands for cropping. Also you may need to tweek default parameters of crop-video, if you want to include all the chunks.

from motion-cosegmentation.

urmit-space avatar urmit-space commented on June 22, 2024

Ok, let me try once. then get to know what challenges are made from my side. will update on this soon.

from motion-cosegmentation.

urmit-space avatar urmit-space commented on June 22, 2024

I get success in this now all things work. here I attach a video. greatee bro!!

completed.1.mp4

but two things I want to change. how can make all these things automatic just one click and want to improve the result?
and other I want to change crop box size like want exectly face crop so may result will improve.
The last one how can we achieve this type of face swapping. first-order-model-Face-swap GiF
I tried many times but not get exactly this type.

from motion-cosegmentation.

Hpjhpjhs avatar Hpjhpjhs commented on June 22, 2024

@urmit-space Hi, could you share the code about how to place the croped video back to the original positions (positions is a part of the ffmpeg command). It is appreciated If I can received your reply.

from motion-cosegmentation.

urmit-space avatar urmit-space commented on June 22, 2024

@Hpjhpjhs you get x, y, and size from the crop frame. you need to add an overlay video on the current video with respect frame.

!ffmpeg -i /content/Data/4.1_original_conan_obrien.mp4 -vf "movie=/content/Data/predictionscrop.mp4, scale=429: -1 [inner]; [in][inner] overlay =736: 130 [out]" /content/Data/completed.mp4

Maybe this will help.

from motion-cosegmentation.

Hpjhpjhs avatar Hpjhpjhs commented on June 22, 2024

@urmit-space Thank you so much. That's very helpful.

from motion-cosegmentation.

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.