neuralchen / SimSwap

An arbitrary face-swapping framework on images and videos with one single trained model!
Other
4.52k stars 892 forks source link

Provide manual mask #108

Open Lundez opened 3 years ago

Lundez commented 3 years ago

Hi!

Is there a way to provide a manual mask? I'm trying to do face swap on "Dirty Dancing" and often the quality is a bit low and thereby the face recognition does not work as expected (especially when moving a lot). I was thinking perhaps it'd make sense to "assist" the model by drawing the mask

instant-high commented 3 years ago

You can try my GUI including some modified scripts. https://drive.google.com/file/d/1oxX32fuLQtyB1ZQ0eqLXhx2DsJ0DhEoL/view?usp=sharing Hope it works for you...View my video on YouTube Try setting lower detection thresh (0.1)

https://www.youtube.com/watch?v=ZGS__rb_u-o

Lundez commented 3 years ago

@instant-high thanks! On Linux, but I can try to move it to my Windows PC if I can't get the manual settings to change correctly :)

Really informative vid

instant-high commented 3 years ago

In the original script Insightface_func/facedetect_crop......py you can change the value for testing:

def prepare(self, ctx_id, det_thresh=0.5, det_size=(640, 640)): (My modified script takes that value as additional commandline parameter)