face_morpher
face_morpher copied to clipboard
Is there any way to morph the images without cropping just the face?
Do you mean morphing something other than a face? Opencv's face detector does require the face to be fairly prominent in the image but you shouldn't need to crop the face.
No, morphing faces, but with the rest of the image too. I'd like to reposition the faces, but don't want to delete the rest of the image around the faces.
Ah, I see. It is possible and can be complex depending on the images. face_morpher uses the face points automatically detected from stasm, and it detects points only on the face whilst wonderfully handling different face, eyes, mouth shapes, tilts, etc.
To morph the rest of the image, you would have to add more points surrounding the outside of the face. Getting it consistent across all face images will be tricky. It would require detecting and aligning the neck, collar, hair, etc. and handle all inconsistencies of the background across images.
Alternatively, you can manually define your own control points for all images and supply the array of points into locator.py.
Alyssa
Hi, Alyssa. First of all I would like to thank you for this great app! No hand driven triangulation, resizing, etc. But maybe it's possible to crossfade the rest of the image as background with no geometry changes? We mostly looking at the face while magic is going and having some background on video is better than black nothing. Unfortunately I have not enough programmer skills to modify the program that way but I think it would be useful improvment!
Slava
Hi Slava
Thanks for the comment. Do you mean adding a static background image instead of the black?
Not quite.. I mean crossfade entire images as background and place face morphing over it. I've made some examples..
What you've done looks pretty cool! Its the reason the app provides an alpha background --- for users to put any background.
I like your use case but probably not going to implement this cross-fade effect as its user/application specific. Its also more of a photoshop effect rather than the scientific implementation of morphing (which was the goal of this project). That said, I really like the last gif!
Please, please, please!...
I've done just that in my branch... ;-)