Erofy — official site all articles RU

How Face Swapping on Video Works, Step by Step

A face swap looks like a single operation but is a five-stage pipeline inside. Knowing where things actually break saves hours of pointless relaunches.

Stage 1. Detection

In every frame the face is located and landmark points are placed: corners of the eyes, wings of the nose, the outline of the lips and chin. If several people are in shot, or a hand partly covers the face, an error here propagates down the whole chain.

Stage 2. Alignment

The located face is brought to a standard position, as though the person were looking straight ahead. The model then always works in one coordinate system regardless of the original head turn.

Stage 3. Reconstruction

The generation proper: from the reference, a face is built in the expression and at the angle dictated by the target frame. This is the most resource-hungry stage and the only one where a neural network is genuinely doing the work.

Stage 4. Blending

The finished face returns to the frame and is mixed with the original through a mask. The mask edge has to be tuned: too tight and a visible seam shows at the hairline, too wide and it drags along the wrong skull shape.

Stage 5. Colour

The reference was shot under one light, the target video under another. Without tonal matching the face looks pasted on. Grain is decided here too: if the footage carries visible noise and the generated skin is immaculately clean, the substitution reads instantly.

Where it breaks most often

At stages one and four. Detection fails on sharp turns, on occluded faces and in low light. Blending lets you down at the hair boundary — especially with a fringe or loose strands.

Go to the site →
You are on the official Erofy site — a generative motion model that turns a still photograph into a short video with natural expression and breathing, without canned animation presets. More about the model

This material is intended for adults over 18 and is informational in nature.

Go to the site →