What is image inpainting?

Definition

A mask marks which pixels may change. The system estimates content that fits the nearby colors, shapes and objects, while the rest of the picture provides context.

The result can be plausible without recovering the original scene. Edges, lighting and details need review, especially when the selected area covers a large or complex object.

ELI5

Imagine cutting a hole in a picture and asking someone to draw what would fit in the gap. They can see the rest of the picture to guide the repair.

For example, you can mark a scratch on a scanned photo and let a tool fill the area with a continuation of the nearby background.

Does inpainting recover the exact original pixels?

Usually it creates a plausible fill. It cannot know exactly what was hidden or lost from the image alone.

What does a mask do?

It tells the tool which area may be regenerated and which area should remain available as context.

  1. Blue and white text "SMALL MODEL, MORE CONTROL" beside a flat off-white square with two blue corner handles on black.
    New top local AI image generator is here!
    AI Search21m 55s1 VIEW
Definition card for image inpainting: What is image inpainting?

Image inpainting fills or replaces a selected part of an image using the surrounding picture and, in some systems, a text prompt.