December 2, 2024 1 min read

AI-based solution that replaces a character’s visage

by Onix

This case study showcases our contribution to creating a solution that replaces a character’s face with the user’s face in a short, comical video. The Onix team implemented a mapping algorithm that doesn’t solely rely on traditional facial landmarks but also uses the broader contours and shape of the target entity, whether it’s an animal’s face or an object. Moreover, we used advanced tracking algorithms in OpenCV to keep the human face consistently placed on the moving object. As users move or change expressions, accessories should adjust accordingly. A hat, for instance, should remain on the head, not float above it if a user raises their eyebrows. Also, different users have different face sizes and shapes. The accessories must fit proportionally. We used facial landmarks to create “anchor points” for accessories. For instance, glasses anchor to the bridge of the nose and ears, ensuring they move with the face realistically. Also, we developed an algorithm that adjusts accessory size based on detected face dimensions. For instance, the width between the eyes can determine the size of glasses. Regardless of where you make changes – on the mobile version or web, all modifications are automatically reflected across all platforms.

Don’t want to miss anything?

Subscribe to keep your fingers on the tech pulse. Get weekly updates on the newest stories, case studies and tips right in your mailbox.