Inpainting
An AI technique that takes an image with a user-defined masked region and regenerates that region guided by the surrounding pixels and, often, a text prompt. Used for object removal, scene modification, and targeted deepfake manipulation.
Inpainting is an AI image-editing operation: mark a region of an image, and a generative model fills it in plausibly. It's what lets you remove a person from a photo, change a sign's text, or swap out a product in a product shot.
Most modern inpainting is done with diffusion models conditioned on the masked region and optionally a text prompt describing what should go there.
The deepfake angle
Inpainting enables local manipulation attacks that a whole-image detector can miss:
- Sign or document modification — change a date on a screenshot, alter a number on a receipt, swap a name on an ID photo.
- Selective face manipulation — modify an expression, alter gaze direction, add or remove details without regenerating the whole face.
- Evidence fabrication — add or remove objects from a scene photo (e.g., damage to a car, a weapon in a hand).
Because the surrounding pixels are real, whole-image detection scores can average out: the unmanipulated regions pull the score toward "real" while the manipulated region's artifacts get diluted.
Detection implications
Detecting inpainting requires localized analysis rather than whole-image classification:
- Patch-level detection that scores individual regions separately.
- Edge-detection on the inpainting mask boundary — where the regenerated region meets the original.
- Frequency-domain analysis looking for diffusion fingerprints in specific sub-regions.
Our image detector returns a whole-image probability; for suspected inpainting, use localized review in addition.