Comments (11)
This is rather complicated, need to write code for frame detection and back Inpainting.
from motion-cosegmentation.
I guess it will be easier to try some exiting solution for this.
from motion-cosegmentation.
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.
- Slice the video into chunks using https://github.com/AliaksandrSiarohin/first-order-model/blob/master/crop-video.py
- Also crop image Win Diesel using paint to make it a square image.
- Run a face swap for all chunks from 1.
- 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.
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.
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.
Ok, let me try once. then get to know what challenges are made from my side. will update on this soon.
from motion-cosegmentation.
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.
@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.
@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.
@urmit-space Thank you so much. That's very helpful.
from motion-cosegmentation.
Related Issues (20)
- occlusion on the face segments
- some problems about model training HOT 3
- Fine tuning the motion-cosegmentation Model HOT 11
- Problems when training the model HOT 2
- Fomm and Motion-cos HOT 3
- Having problems training the model HOT 18
- Training of a 512x512 model did not go well. HOT 11
- Problems with "untaring" vox-first-order.pth.tar HOT 1
- First Order Motion Model based alignment ?? HOT 1
- Non-matching tensors HOT 1
- Explanation of models and params HOT 1
- RuntimeError: CUDA error: device-side assert triggered
- The weight file cannot be obtained HOT 1
- Split for fitting the regression model? HOT 1
- how to generate segematation map?
- Problem with loss function when training with 512x512 data HOT 2
- Attempting part_swap.py with 512x512 trained checkpoint HOT 1
- Option supervised
- New error HOT 2
- Not sure what to make of this
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from motion-cosegmentation.