Comments (11)
Have you tried to do a face swap in supervised mode?
from motion-cosegmentation.
How would I do that?
from motion-cosegmentation.
For the reference we also provide fully-supervised segmentation. For fully-supervised add --supervised option. And run git clone https://github.com/AliaksandrSiarohin/face-makeup.PyTorch face_parsing which is a fork of @zllrunning.
from motion-cosegmentation.
That's what I am doing in the code I posted. I'm using that face parser in the code.
from motion-cosegmentation.
Motion segmentation network is not needed than. You can use fomm.
from motion-cosegmentation.
what's fomm?
from motion-cosegmentation.
First order motion model.
from motion-cosegmentation.
This is the code for running and loading the model. I have first_order_motion_model=True on load_checkpoints().
from part_swap import load_checkpoints
cpu = True
reconstruction_module, segmentation_module = load_checkpoints(config='config/vox-512-sem-10segments.yaml',
checkpoint='log/vox-512-sem-10segments 26-04-21 19:25:33/00000005-checkpoint.pth.tar',
blend_scale=0.125, first_order_motion_model=True,cpu=cpu)
from part_swap import make_video, load_face_parser
face_parser = load_face_parser(cpu=cpu)
def swap(source_image, target_image):
shape = source_image.shape
source_image = resize(source_image, (512, 512))[..., :3]
target_video = [resize(target_image, (512, 512))[..., :3]]
out = make_video(swap_index=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], source_image = source_image,
target_video = target_video, use_source_segmentation=True, segmentation_module=segmentation_module,
reconstruction_module=reconstruction_module, face_parser=face_parser, cpu=cpu)[0]
return resize(out, (shape[0], shape[1]))
from motion-cosegmentation.
OK, but checkpoint should also be one from first order.
from motion-cosegmentation.
oh, I didn't realized you could use the first order model directly to do it. I thought had to train a face swap on top of it.
from motion-cosegmentation.
I dunno I'll use that.
from motion-cosegmentation.
Related Issues (20)
- 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
- 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
- How to visualize the segments using command line? HOT 1
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.