Skip to content
mentoor

Topic 1 of 6 · 3 min read

Inpainting and object removal

Goal: Choose the selection and the fill instruction that removes an unwanted object without changing the rest of the photo.

Inpainting means selecting one area of a photo and telling the model what should appear there instead; everything outside the selection should stay as it was. Removing a stranger, a bin or a cable is the same job: you replace pixels with a believable fill.

Check yourself · 1 of 3

You remove a parked car from a street photo, but a dark shape is left on the road. What was most likely missed?

Choose one answer

Why it matters

A photo with one distraction often gets thrown away. Inpainting can save it. It also fails in quiet ways. The model may change things you never selected, or fill the gap with something odd. You need to control both the selection and the instruction.

How to do it

  1. Select a little more than the object. Include its shadow, its reflection and any glow on the ground. If you leave the shadow, the object looks like a ghost.
  2. Describe the fill, not the removal. A model fills a space with what you describe. "Remove the man" can leave a blur. "Pavement and the shop wall, matching the rest of the street" gives it a target.
  3. Say what must not change. In tools that edit by chat, such as Gemini or ChatGPT, or in Photoshop's generative fill, add "keep everything else exactly the same".
  4. Work in small steps. One object per edit. If the result is wrong, undo and fix the selection, not only the wording.
  5. Zoom in and check the edges. Look for repeated textures, bent lines, warped text and missing hands or feet nearby.

Before and after

Before: Remove the person on the left.

The tool may crop the photo, smear the wall or invent a new person.

After: In the selected area on the left, replace the man in the grey coat and his shadow with the brick wall and pavement that continue from both sides. Keep the light, colours and every other part of the photo unchanged.

What goes wrong

  • Drift outside the selection. Some chat tools redraw the whole image. Faces, text and small details elsewhere can shift a little. Compare the full photo with the original, not just the edited area.
  • Fixing text. Editing a sign or a label often gives letters that look right but are wrong. Retype text in a normal editor.
  • Over-trust. A clean result is not a true one. If the photo is evidence, a record or an advert, read the topic on edits that mislead.

Examples

Removing a bin from a street photo

Selection: the bin, its shadow on the pavement and the wet patch beside it.

Instruction: "Fill the selected area with the pavement and the cream wall behind it, continuing the brick pattern. Do not change anything outside the selection."

The selection covers the shadow, so no dark patch is left. The instruction names the surfaces to continue.

A sign that came back wrong

You ask the tool to change "OPEN 9-5" to "OPEN 9-6". It returns "OPEN 9-6" with a bent 6 and a different font. A better route: remove the old text with inpainting, then add the new text in a normal editor with a matching font.

Key points

  • Inpainting replaces a selected area and should leave the rest of the photo unchanged.
  • Select the object plus its shadow and reflection, not just the object.
  • Describe what should fill the space instead of only saying "remove".
  • Edit one object at a time and compare the whole result with the original.
  • Generated letters on signs and labels are often wrong, so retype text yourself.

Common mistakes

  • Selecting only the object and leaving its shadow behind.
  • Typing "remove it" with no description of the fill.
  • Removing several objects at once, then not knowing which step broke the picture.
  • Trusting generated text on signs, labels and screens.

Check yourself · 2 of 3

Which instruction is best for removing a cyclist from the left of a beach photo?

Choose one answer

Check yourself · 3 of 3

An AI tool corrects one word on a shop sign and the new word looks right at a glance. What is the safest next step?

Choose one answer

Practice items, not counted towards your mastery.

Start here