Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Three numbers that tell you whether a face swap actually worked

Every face swap looks fine at 600 pixels. The failures show up when you measure, and the measurements that matter are not the ones most tools report. Here are three that are cheap to compute, plus one that is popular and misleading. 1. Landmark drift, normalised Run the same landmark detector on the source, the target, and the output. The output should sit near the target, not between the two.…

When evaluating the success of a face swap, three key metrics provide insight into whether the swap has been convincingly executed. The first metric, landmark drift normalized, measures the distance between anchor points on the swapped face and the original face. If this drift exceeds approximately 0.04, the swap is deemed unsuccessful, as it indicates the swapped face has not adequately adapted to the new geometry.

Conversely, a lower drift relative to the source face suggests a successful blend, where the swapped face appears more similar to the target.

The second metric, identity cosine similarity, gauges the likeness between the swapped face and the original target face. Embeddings generated by a facial recognition model are used to calculate the cosine similarity between the target and swapped face embeddings, as well as the source and swapped face embeddings. A high cosine similarity score indicates a successful swap, as the swapped face closely matches the target's identity.

However, it is crucial to note that the thresholds for this metric may vary depending on the specific model employed, and reported values should be calibrated against real pairs of faces.

The third metric, colour error in LAB space on skin patches, addresses the challenge posed by RGB color differences. By converting the swapped face to the CIELAB color space and measuring the ΔE (difference in energy) over a skin patch that excludes the eyes, mouth, and hair, this metric quantifies colour discrepancies caused by the swap.

An error under approximately 4 is generally imperceptible in side-by-side comparisons. When the error falls between 4 and 8, the swapped face appears to be of a different individual, while an error exceeding 8 renders the swap easily detectable as artificial.

However, a key limitation to consider is that whole-image SSIM, a common metric for assessing image similarity, is often found to be ineffective in this context. Despite achieving high SSIM scores, a face swap can still be identified as deceptive if it maintains the background, hair, and clothing while altering the facial features.

The ultimate goal is not merely to achieve high metric scores, but to create a swap that remains unnoticed even when scrutinized closely by someone familiar with the original face. Therefore, a comprehensive evaluation involving landmark drift, identity cosine similarity, and colour error in LAB space should be employed to ensure the success of a face swap in real-world scenarios.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

A vs B: Placing Your WAF Before or After a JSON API Gateway

An automated attacker does not need a suspicious URL to probe for SQL injection. A normal-looking POST to a search endpoint can carry the payload inside a JSON filter, nested object, or array.

  • Option A places WAF before API gateway, inspecting JSON payloads first
  • Option B places WAF after API gateway, after request transformation
  • Testing required for both placements, focusing on WAF decisions and application actions

How to Evaluate and Block SQL Injection Attempts Hidden in JSON Bodies

An API can reject suspicious query strings while still accepting dangerous input inside a JSON request body. A search endpoint might receive {"filter":"pending"} , then concatenate that value into a…

  • Identify endpoint and set safe test conditions
  • Install SafeLine WAF to filter HTTP/S traffic
  • Test JSON bodies in controlled environment

When a review sends the plan back

First published on openspec-ui.dev . A tester ran Review on an OpenSpec change and got five things to fix. They ran Propose again and saw no change in the files.

  • Review sends plan back for changes
  • Tester identifies five necessary fixes
  • Verdict "changes needed" triggers Update stage

Package a Chrome Extension Without Store Upload Errors

Originally published on ExtensionLaunch . If you want to package a Chrome extension for the Chrome Web Store, the file you need is a ZIP, not the CRX that Chrome's "Pack extension" button gives you. Below is a short, practical walkthrough: which file format serves which purpose, the commands that build a clean archive, and a quick lookup…

  • Use ZIP format, not CRX, for Chrome extension uploads
  • Ensure ZIP contains extension files directly, not nested folders
  • Update version number in manifest.json to avoid rejection

More from Sunday, 29 November 2026 →