← Latest papers
💻 computer science

Face inpainting with Identity Preserving Latent Diffusion Models

This paper proposes ID-ControlNet, an identity-preserving face inpainting framework built on latent diffusion models that utilizes facial identity embeddings and a specialized triplet loss strategy to reconstruct occluded regions while maintaining high identity fidelity without costly fine-tuning.

Original authors: João Santos, Carlos Santiago, Manuel Marques

Published 2026-05-19
📖 4 min read☕ Coffee break read

Original authors: João Santos, Carlos Santiago, Manuel Marques

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a cherished family photo, but someone has scribbled a big black marker over a person's face. Face inpainting is the digital art of erasing that marker and painting a new face in its place so the photo looks whole again.

The tricky part? If you just ask a computer to "fill in the blank," it might paint a generic face that looks nice but doesn't look like the original person. It's like asking a painter to recreate a portrait of your friend, but they only know what "a face" looks like, not what your friend's face looks like. The result is a stranger, not your friend.

This paper introduces a new tool called ID-ControlNet to solve this problem. Here is how it works, explained simply:

The Problem: The "Generic" Painter

Standard AI tools (called Diffusion Models) are amazing artists. They can fill in missing parts of a picture so well that you can't tell the difference. However, they lack a "memory" of who the person is. When they fill in a missing nose or eyes, they tend to guess based on an "average" face. If the missing part is crucial for identity (like the eyes), the AI might accidentally change the person's identity entirely.

The Solution: The "Identity GPS"

The authors built ID-ControlNet, which acts like a GPS for the AI artist.

  • The Artist: They use a powerful, pre-trained AI artist (based on Stable Diffusion) that is already great at painting realistic faces. They don't retrain this artist; they just give it a new set of instructions.
  • The GPS: They attach a special "identity detector" (a face recognition system) to the artist. Before the artist starts painting, this detector takes a look at the unmasked parts of the face (like the chin or forehead) and creates a digital "ID card" (an embedding) that says, "This is Person X."
  • The Guide: As the AI paints the missing parts, the "ID card" is constantly fed into the process. It's like having a strict supervisor whispering in the artist's ear: "Remember, this is Person X! Make sure the eyes look like Person X's eyes!"

The Secret Sauce: Training Without Retraining

Usually, to teach an AI to recognize a specific person, you have to spend hours "fine-tuning" it with hundreds of photos of that person. That's slow and expensive.

ID-ControlNet is different. It learns a general rule: "How do I use an ID card to guide the painting process?" Once it learns this rule, it can apply it to anyone instantly, without needing to be retrained for each new person. It's like learning the rules of a game once, rather than memorizing a new rulebook for every single player.

The New Test: The "Eye" Test

To prove their method works, the authors realized that standard tests weren't tough enough. They created a new dataset called E-Mask.

  • The Logic: They found that if you hide a person's mouth, it's hard to tell who they are. But if you hide their eyes, it's very hard to recognize them.
  • The Experiment: They covered up just the eyes in thousands of photos and asked the AI to fill them in.
  • The Result: Standard AI tools struggled to keep the identity when the eyes were hidden. ID-ControlNet, however, successfully "remembered" the person's identity and painted the eyes to match, even though it had never seen that specific person before.

The Verdict

The paper shows that ID-ControlNet is a "lightweight" upgrade. It doesn't slow down the painting process or require massive computing power.

  • Visual Quality: The pictures look just as realistic as before.
  • Identity: The person in the finished photo actually looks like the person in the original photo, even when big chunks of their face are missing.

In short, the authors gave a super-talented but forgetful AI artist a permanent ID badge, allowing it to recreate missing faces with the correct identity, instantly and without needing to study the subject first.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →