Most face swap checks look at the eyes. A hat gives you a better test, because a brim turns the whole upper face into a measured shadow.
What the brim fixes
A hat brim cuts a hard line across the forehead and puts the eyes in shade while the mouth stays lit. That is two exposure zones on one face, and any swap has to reproduce both.
- The line itself. On a real photo the shadow edge is straight but slightly soft, and it curves with the forehead. On a swapped face the edge often goes soft in the middle and sharp at the temples, or slides upward between frames.
- Skin tone across the edge. Lit forehead and shaded eyes should differ by a predictable amount. If the shaded half comes back the same brightness as the lit half, the swap was graded on a flat patch and the hat is now lying.
- The brim's own shadow on the nose. A forward brim throws a faint band across the bridge. Blends that ignore it leave the nose brighter than the cheeks under a hat, which reads as a cutout immediately.
Video is where it shows
A turning head under a brim moves the shadow line across the forehead every frame. Swaps that treat the shadow as texture keep the line pinned while the head rotates, and the eye reads it as a sticker sliding over skin.
The fix is unglamorous: model the brim as an occluder, then relight the face under it instead of painting the shadow back in.
I write these checks down while testing the tool I work on — DeepSwapAI, a browser face swap for photos, video and GIFs. Free tier, no install.