<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[DeepSwapAI Notes]]></title><description><![CDATA[DeepSwapAI Notes]]></description><link>https://deepswapai-ai.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Dec 2026 21:47:24 GMT</lastBuildDate><atom:link href="https://deepswapai-ai.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[The ear is the last check and the first thing that looks off]]></title><description><![CDATA[Most people judge a face swap with three stops: eyes, mouth, jaw. The ear never makes the list, which is why it is often the first thing that makes a…]]></description><link>https://deepswapai-ai.hashnode.dev/the-ear-is-the-last-check-and-the-first-thing-that-looks-off</link><guid isPermaLink="true">https://deepswapai-ai.hashnode.dev/the-ear-is-the-last-check-and-the-first-thing-that-looks-off</guid><category><![CDATA[generative ai]]></category><category><![CDATA[face swap]]></category><category><![CDATA[Photo Editing]]></category><dc:creator><![CDATA[DeepSwapAI]]></dc:creator><pubDate>Fri, 04 Dec 2026 06:13:11 GMT</pubDate><content:encoded><![CDATA[<p>Most people judge a face swap with three stops: eyes, mouth, jaw. The ear never makes the list, which is why it is often the first thing that makes a picture feel wrong without anyone being able to say why.</p>
<p>Ears are hard because they are pure geometry and pure shadow, with no expression to hide behind.</p>
<p><strong>The helix edge.</strong> The outer rim of the ear catches light in a thin, hard line. When a swap is blended at the cheek and stops before the rim, that line goes soft. The rim also has a slight thickness that shows as a second, darker edge just inside it. A blend that smooths both edges into one turns the ear into a flat shape.</p>
<p><strong>The bowl.</strong> The concha is a shadow trap. Whatever the light direction in the target photo, the inside of the ear should be darker than the rim facing the light and lighter than the shadow behind the head. If the swapped ear keeps the source photo's fill light, it glows in the wrong place. That glow reads as a sticker even at thumbnail size.</p>
<p><strong>Height against the face.</strong> The top of the ear usually sits between the eyebrow line and the eye line, and the lobe hangs near the base of the nose. Change the head pitch and both landmarks move. A swap between a level portrait and a slightly tilted one will place the ear a few millimetres too high or low, and the jaw will look longer or shorter than it should.</p>
<p><strong>What is attached to it.</strong> Earrings, hair tucked behind the ear, the arm of a pair of glasses. Anything that crosses the ear is a hard constraint: the swap has to keep the object, not repaint over it. Glasses arms are the worst case, because the temple piece is thin, sits at the exact depth of the ear, and casts its own small shadow.</p>
<p>A practical check that costs ten seconds: crop tight on the ear at 200 percent and ask three questions. Does the rim keep one clean highlight? Is the inside of the bowl darker than the rim on the lit side? Does the lobe line up with the base of the nose?</p>
<p>If all three pass, most viewers will accept the face even if the skin texture is a little too even. If any of them fails, no amount of pore detail will save it.</p>
<p>We keep the full swap checklist, including the ear pass, in one place: <a href="https://deepswapai.com/?utm_source=hashnode&amp;utm_medium=social&amp;utm_campaign=ears-1204&amp;utm_content=deepswapai">https://deepswapai.com/?utm_source=hashnode&amp;utm_medium=social&amp;utm_campaign=ears-1204&amp;utm_content=deepswapai</a></p>
]]></content:encoded></item><item><title><![CDATA[Temporal flicker is the real bug in video face swap]]></title><description><![CDATA[A single frame can look perfect and the clip still reads as fake. The failure is not per-frame quality, it is what happens between frames. Here is what…]]></description><link>https://deepswapai-ai.hashnode.dev/temporal-flicker-is-the-real-bug-in-video-face-swap</link><guid isPermaLink="true">https://deepswapai-ai.hashnode.dev/temporal-flicker-is-the-real-bug-in-video-face-swap</guid><dc:creator><![CDATA[DeepSwapAI]]></dc:creator><pubDate>Thu, 03 Dec 2026 03:56:38 GMT</pubDate><content:encoded><![CDATA[<h1>Temporal flicker is the real bug in video face swap</h1>
<p>A single frame can look perfect and the clip still reads as fake. The failure is not per-frame quality, it is what happens between frames. Here is what actually breaks in a video face-swap pipeline, and the four cheap fixes that removed most of the flicker in ours.</p>
<h2>1. The mask jitters more than the face does</h2>
<p>A face detector returns a slightly different box on every frame. If you build the mask from that box, the skin boundary moves by 1-3 px per frame at 30 fps. Nobody notices on a still. Everybody notices in motion: the jawline shimmers like heat haze.</p>
<p>Fix: compute the mask on frame 0, then track it with optical flow and only re-detect every 15-30 frames. Blend the re-detection back with a low-pass filter instead of snapping to it.</p>
<h2>2. Identity embeddings drift</h2>
<p>If the source identity embedding is recomputed per frame from a different crop, the swapped face slowly morphs. Short clips hide it. A 40-second clip ends up with a face that no longer matches the person at second 0.</p>
<p>Fix: compute the identity embedding once from the best-lit frame of the source, cache it, and reuse it for the whole clip. Consistency beats per-frame accuracy.</p>
<h2>3. Lighting changes are applied late</h2>
<p>Relighting per frame after the swap creates a visible brightness step whenever the subject walks past a window. The eye catches a 3% exposure jump instantly in motion.</p>
<p>Fix: estimate the light direction and exposure on the target frame before the swap, so the generator already works in the correct illumination. Then only a small residual correction is needed.</p>
<h2>4. Compression eats the seam</h2>
<p>Every encode re-quantises the region around the seam. If the swap is sharp and the plate is soft, the encoder spends bits on the difference and the boundary pulses on scene cuts and fast motion.</p>
<p>Fix: match grain and softness to the plate before export, and give the encoder a higher bitrate on the face region if your pipeline supports ROI encoding. For short clips, a quality-based CRF of 18 with a slow preset is usually enough.</p>
<h2>The order that matters</h2>
<ol>
<li>Cache identity, do not recompute per frame.</li>
<li>Track the mask, re-detect sparsely.</li>
<li>Relight before the swap, not after.</li>
<li>Match texture, then encode.</li>
</ol>
<p>None of this is model architecture. It is pipeline hygiene, and it is the difference between a clip that survives a phone screen at arm's length and one that does not.</p>
<p>If you want to test the result without building the pipeline: <a href="https://deepswapai.com/?utm_source=hashnode&amp;utm_medium=social&amp;utm_campaign=video-flicker-1203&amp;utm_content=deepswapai">DeepSwapAI</a> handles photos, video and GIF up to 10 minutes, HD, no watermark, and deletes files after 24 hours.</p>
]]></content:encoded></item><item><title><![CDATA[A GIF swap loses its blend in the color table, not in the model]]></title><description><![CDATA[Share a still of a face swap and it looks finished. Export the same frames as a GIF and a faint rectangle of slightly warm skin shows up along the jaw. The…]]></description><link>https://deepswapai-ai.hashnode.dev/a-gif-swap-loses-its-blend-in-the-color-table-not-in-the-model</link><guid isPermaLink="true">https://deepswapai-ai.hashnode.dev/a-gif-swap-loses-its-blend-in-the-color-table-not-in-the-model</guid><category><![CDATA[ComputerVision]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[DeepSwapAI]]></dc:creator><pubDate>Wed, 02 Dec 2026 17:50:25 GMT</pubDate><content:encoded><![CDATA[<p>Share a still of a face swap and it looks finished. Export the same frames as a GIF and a faint rectangle of slightly warm skin shows up along the jaw. The frames did not change. The palette did.</p>
<p>GIF is an indexed format: 256 colors, and most encoders build one global table for the whole file. A still photo hands the encoder a full spread of skin tones. A clip forces it to average those tones across every frame, over a moving subject and a moving background, and whatever falls between two entries gets snapped to the nearest one.</p>
<p>Skin is the one gradient in a photo people read continuously. Banding on a wall is invisible. Banding on a cheek reads as a stripe of green.</p>
<p>Two things follow from that.</p>
<p><strong>1. The swapped patch and the plate never compress the same way.</strong> A blend that sits 0.5% off in luminance is invisible in the intermediate file and becomes a hard edge once the encoder snaps both sides of the seam to different palette entries.</p>
<p><strong>2. The seam you see in a GIF may not exist in the source.</strong> Before you go back and re-blend, export five frames at final size, then export them again with a fixed 256-color palette. If the edge appears only after the second export, the blend was fine.</p>
<p>Practical checks worth adding to any GIF pipeline:</p>
<ul>
<li>Export at the final size first. Downscaling after quantization reshuffles every edge pixel.</li>
<li>Keep frames that differ only in the face inside one palette. Changing palettes per frame makes the seam flicker, which reads worse than a static edge.</li>
<li>For short clips, raise the frame delay instead of dropping colors. GIF has no temporal compression, so a 12fps clip at 128 colors usually looks cleaner than 24fps at 64.</li>
</ul>
<p>None of this is a model problem. Batch and multi-face swaps make it more visible because every face adds its own skin range to the same table, and the encoder has to fit all of them into 256 entries. That is where a two-face swap starts tinting one face slightly pink and the other slightly grey, frame after frame.</p>
<p>We build DeepSwapAI around photo, video and GIF export, and the GIF palette is where support questions usually start. If you want to see what a shared palette changes, <a href="https://deepswapai.com/?utm_source=hashnode&amp;utm_medium=social&amp;utm_campaign=gif-1202&amp;utm_content=deepswapai">try a swap</a> and export both formats from the same clip.</p>
]]></content:encoded></item><item><title><![CDATA[A batch swap breaks on the second face, and it is always the same reason]]></title><description><![CDATA[Batch swapping looks like the easy mode of face swap: pick three faces, drop them into one group shot, export. In practice the second face is where it…]]></description><link>https://deepswapai-ai.hashnode.dev/a-batch-swap-breaks-on-the-second-face-and-it-is-always-the-same-reason</link><guid isPermaLink="true">https://deepswapai-ai.hashnode.dev/a-batch-swap-breaks-on-the-second-face-and-it-is-always-the-same-reason</guid><dc:creator><![CDATA[DeepSwapAI]]></dc:creator><pubDate>Tue, 01 Dec 2026 16:57:45 GMT</pubDate><content:encoded><![CDATA[<p>Batch swapping looks like the easy mode of face swap: pick three faces, drop them into one group shot, export. In practice the second face is where it falls apart, and the reason is not the model.</p>
<p><strong>One key light, three different results</strong></p>
<p>A group photo has one dominant light source. Each face in it sits at a different angle to that source: the left face is lit from 45 degrees, the middle one straight on, the right one from behind. A swap that keeps the <em>source</em> photo's lighting for every target looks correct exactly once. The other two read as pasted, because their shading does not belong to the room.</p>
<p>The fix is boring. Decide the scene's light direction first, then swap the faces in the order of how far each one is from that direction, from the most similar to the most opposed. Each step you take the face that already agrees with the room, so the model has the least to invent. Doing the hardest face first means the model starts by guessing, and every later face inherits the guess.</p>
<p><strong>The order is a budget, not a preference</strong></p>
<p>Every swap spends some of the photo's signal: skin texture, shadow under the jaw, the noise pattern of the sensor. Three swaps spend three times as much. If the third face needs the most repair, you have nothing left to repair it with and it shows up as a soft, plastic patch. Sort by difficulty and the last face is the easiest one.</p>
<p>Two more things that break batches specifically:</p>
<ul>
<li><strong>Shared hair.</strong> People in group shots are physically close, so hair crosses the boundary between two faces. Swap both faces in that cluster before you touch anything else, otherwise the second swap eats the first one's hair.</li>
<li><strong>Uniforms and teammates.</strong> Identical shirts remove the colour cue the eye uses to know which body belongs to which head. Slight differences in neck shading carry that job alone, so keep the collar line intact.</li>
</ul>
<p><strong>A working order</strong></p>
<ol>
<li>Note where the light is.</li>
<li>Rank faces by angle to that light.</li>
<li>Swap from closest to furthest.</li>
<li>Do hair-crossing pairs back to back.</li>
<li>Re-check the chin shadow and the neck on the last face, not the first.</li>
</ol>
<p>Batch swap is not three separate swaps. It is one scene that has to stay coherent for as long as you keep editing it. Try it on a three-person shot here: <a href="https://deepswapai.com/?utm_source=hashnode&amp;utm_medium=social&amp;utm_campaign=day-1201&amp;utm_content=deepswapai">deepswapai.com</a> — batch and multi-face, HD, no watermark.</p>
]]></content:encoded></item><item><title><![CDATA[Your phone already broke the edges before the face swap did]]></title><description><![CDATA[Portrait mode on a phone does one thing before it saves the file: it guesses where the subject ends. A face swap makes the same kind of guess, and on the…]]></description><link>https://deepswapai-ai.hashnode.dev/your-phone-already-broke-the-edges-before-the-face-swap-did</link><guid isPermaLink="true">https://deepswapai-ai.hashnode.dev/your-phone-already-broke-the-edges-before-the-face-swap-did</guid><dc:creator><![CDATA[DeepSwapAI]]></dc:creator><pubDate>Mon, 30 Nov 2026 22:23:37 GMT</pubDate><content:encoded><![CDATA[<p>Portrait mode on a phone does one thing before it saves the file: it guesses where the subject ends. A face swap makes the same kind of guess, and on the same photo the two guesses land on the same pixels. That is why a swap on a bokeh-heavy phone shot reads as fake much faster than the same swap on a flat camera photo.</p>
<h2>Blur is a map of the mistakes</h2>
<p>Real depth of field is smooth. A portrait-mode cutout is not: look along a hairline or a shoulder and you will find a rim of sharp pixels next to blurred ones, and behind that a halo where the background was stretched to fill what the mask removed. Swap a face in and the new face brings its own jaw and hair edge, which almost never sits on the old one. The old halo is still there, now framing a different person.</p>
<p>That is the tell. Not the blend, not the colour match: the halo belongs to a head that is no longer in the picture.</p>
<h2>Craning in makes it worse, not better</h2>
<p>The usual instinct is to crop tighter. It works against you here. A tight crop puts the mask edge, the halo and the blur transition all inside the frame, so the eye compares three inconsistent edges within a few centimetres of each other. A wider frame pushes the blurred background back where it belongs and lets the sharp face own the image.</p>
<p>Same reason to avoid shooting against a railing, a fence or a row of windows: a phone will blur them into a gradient of bars, and any mask error shows as a bar that bends.</p>
<h2>Fixes that cost nothing</h2>
<ul>
<li>Shoot portrait mode off, then add background blur after the swap if you still want it. The swap runs on clean, flat focus.</li>
<li>If the shot is already taken, pull the blur radius down rather than up. A gentle background blur hides the halo instead of outlining it.</li>
<li>Keep the hair inside the frame. Ears, ponytails and loose strands are the three things a phone mask fails on worst, and a swap only inherits the failure.</li>
<li>Check the shoulder line before you post. If the blur transition runs across a shoulder that has moved, re-shoot instead of retouching.</li>
</ul>
<p>A face swap is a second guess on top of the first one. The better the original guess, the less the second one has to hide.</p>
<p>Photo, video and GIF swapping, HD and no watermark: <a href="https://deepswapai.com/?utm_source=hashnode&amp;utm_medium=blog&amp;utm_campaign=portrait-mode&amp;utm_content=deepswapai">DeepSwapAI</a></p>
]]></content:encoded></item></channel></rss>