Does a Face Swap Stay Inside the Face? A Pixel Check
ClapClip Team · Published on 2026-10-24 · 4 min read
A face swap can look convincing and still be wrong: shifted hair, a softened jaw, a background that quietly changed. To check that, we compared each output against a no-op control from the same SDK and measured where the pixels actually moved. Every changed pixel landed inside the face region.
Key takeaways
- All detected changes were inside the face region. Not a single changed pixel fell outside the hand-marked box in either size.
- Outside the face, the image was effectively untouched. Mean absolute difference was 0.0007 / 255 at 512 × 512 and 0.0004 / 255 at 256 × 256.
- About a third of the face region changed, which is what a swap should look like: eyes, nose, mouth and skin, not the entire crop.
- This is a containment check, not a quality score. It says nothing about whether the resulting face looks right or resembles the source.
What we checked
The question was narrow on purpose: if the tool is asked to replace one face, does it leave everything else alone?
The comparison is against a control image produced by the same SDK with no swap applied. That removes the SDK's own colour handling, resizing and encoding from the result, so any remaining difference comes from the swap itself rather than from the pipeline around it.
- Target: one public-domain portrait (
skimage.data.astronaut), at its original 512 × 512 and at a Lanczos-reduced 256 × 256. The same person in both, not two different photos. - Source face: one front-facing portrait, reused for both sizes.
- Settings: baseline model, detection threshold 0.5, recognition 0.2, edge blur 0.4, fusion area 50, portrait restore off.
- Repeats: three runs per size. Outputs hashed identically across the three, so the numbers describe one result, not an average of three different ones.
- Face region: a hand-marked rectangle around the head, wider than the face itself so hair and jaw are included. It is a diagnostic region, not a segmentation mask.
The result
| Measure | 512 × 512 | 256 × 256 |
|---|---|---|
| Runs that produced a valid image | 3 / 3 | 3 / 3 |
| Mean absolute difference inside the region | 6.33 / 255 | 7.04 / 255 |
| Mean absolute difference outside the region | 0.0007 / 255 | 0.0004 / 255 |
| Pixels changed inside the region | 30.4% | 31.6% |
| Pixels changed outside the region | 0.0% | 0.0% |
| Share of all changed pixels inside the region | 100% | 100% |
A pixel counted as changed when its strongest RGB channel moved by more than 8 out of 255 — a threshold high enough to ignore rounding and compression noise, low enough to catch a real edit.
The outside-region figure is the interesting one. At 0.0007 / 255 it is roughly two thousandths of one intensity step: the background, clothing and hair outside the box are bit-for-bit what the control produced, up to dithering.
What this does and does not prove
It proves containment for this test: with these two files and these settings, the swap stayed where it was supposed to stay. That is the failure mode people actually complain about — a face swap that also touches a hand, a collar or an earring.
It does not prove quality. Nothing here scores whether the new face looks like the source, whether the skin texture survived, or whether the result would convince a person. Those need a different test, and a different set of images.
It also does not generalise. One target photo, one source face, two sizes. A profile shot, two people in frame, or a face partly hidden by hair will behave differently — and those are the cases worth measuring next.
How to run this check on your own output
You do not need our harness to ask the same question of any editor:
- Export the same frame twice if the tool allows a no-op pass, or export the frame before and after the edit.
- Crop both to the same size and subtract them channel by channel.
- Threshold the difference — anything above about 8 / 255 is a real change, below that is noise.
- Look at where the changed pixels sit. If they cluster outside the face, the edit is doing more than it claims.
This is also the fastest way to catch a resize sneaking in: a global shift in every pixel usually means the image was re-encoded or scaled, not swapped.
Bottom line
On one portrait at two sizes, the face swap changed a third of the face region and left the rest of the frame untouched — mean difference outside the region under 0.001 / 255, with zero changed pixels outside it. Containment held; whether the face itself is good is a separate question this test does not answer.
The measurements, control images and scoring script are kept with the rest of the benchmarks so the check can be re-run rather than trusted.
Related ClapClip tools
Desktop Face Swap App
Download a private face swap app for Windows 10 and 11. Swap faces in videos and photos locally with live preview, GPU acceleration, and no uploads.
AI Photo Face Swap
Swap faces in photos in seconds with natural blending of skin tone, lighting, and shadows — processed privately on your device.
Local Face Swap
100% on-device face swap — no uploads, no cloud queue, no limits. The private, offline alternative to online face swap tools.
