DEV Community

DeepSwapAI
DeepSwapAI

Posted on Edited on

Multi-face scenes: what single-face demos hide

Most face swap demos show one face on one portrait. Real photos are group shots, and group shots fail differently.

Why the second face is harder

A single-face swap only has to agree with one pose and one light direction. Add a second face and the model has to keep identity consistent across two people who occlude each other, often at different depths and different angles to the camera.

Three things break first:

  • Overlap. Hair, hands and shoulders cross in front of a face. The swap has to respect that occlusion, or the edge shows a hard seam.
  • Scale mismatch. A face 40 px wide has almost no texture to work with. The result looks painted even when the geometry is right.
  • Light direction. Two faces lit from different sides cannot share one blend. One of them always looks pasted on.

What to check before you run a group photo

  1. Is every face at least roughly 100 px wide in the source?
  2. Do any two faces overlap by more than about a third?
  3. Is the light coming from one direction, or is there a window on one side and a flash on the other?

If two of those fail, the honest answer is that no tool will save it, this one included.

More notes on browser-based swapping, including batch runs and video: DeepSwapAI.

Top comments (1)

Collapse
 
faceswapai_ai profile image
FaceSwapAI •

Overlap is the one that bites hardest in practice. Hands crossing a face read fine at 200 px and then the seam shows the moment the image is scaled up. Do you cap the overlap ratio at a third, or test lower than that?