Samsung AI Center Moscow and co-authors model

LaMa.

Fill masked areas in photos

4.35 / 5Directory score
Official website

LaMa fills the area defined by a separate mask. It works best when the nearby details give the model enough context to extend the background.

LaMa repository with examples of filling the selected image area.
LaMa repository with examples of filling the selected image area. Open the source

Prepare the Editing Area

LaMa fills a section of the photo on the mask. Suppose a box that closed a couple of tiles on the wall got into the frame with the kitchen trim. Mark its contour along with the shadow, and leave the adjacent seams visible if possible. They set the step of masonry. Use a separate mask file of the same size as the picture and save the original. In the training example, it is convenient to start with a small area and expand it only with the visible traces of the box.

Where to watch after processing

Compare the source and the result in the same size. Follow all lines passing through the edit. On the tile, the adjacent seam should continue under the same slope. If the model drew a new strip of grout or repeated a chip, refine the mask and reassemble the example. Then reduce the image to the size of the publication. Sometimes the error is invisible when viewed generally, and the displacement of a large line catches the eye even on a small screen.

What does a filled pass mean

The model relies on visual context, so it helps to get a believable patch in the background. Content that the camera has not seen remains an assumption. Do not use the painted markings and hidden features of the object as documentary evidence. If the mask crosses important text, it is better to look for another frame or restore the signature from a reliable source. To publish about the state of the room, it is useful to save the original picture and explain the edit where it affects the meaning of the photo.

Suitable tasks

  • Remove a temporary item from the photo by mask
  • Fill in the blank on the photo on the neighboring invoice
Features

Strengths

  • A separate mask defines the edit area
  • Code and weights published by authors
Things to consider

Limitations

  • The closed part of the scene model recovers approximately
  • A complex regular texture gives out stitches or a wrong step of the pattern

Selection and conditions

Free access
Yes
Trial period
Not confirmed
No sign-up required
Not confirmed
Russian interface
Not confirmed
Local installation
Yes
API
Not confirmed

“Not confirmed” means there is not enough information. The feature may still be available; check the developer’s terms.

Input formats
Image, Mask
Result
Image

Terms

The project publishes the code, weights and format of the input set. For local application, you will need an environment from the instruction, an image and a mask agreed with it.

From task to first result

Practical example

Task
Remove a temporary item from the photo by mask
What to prepare
Own image with a distracting object and mask to remove only this object.

Task brief or prompt

Close the object and its shadow with one mask, and then compare the filling joint with the original.

Expected result

An image with a filled area on the site of the selected object.

How to check the result

  • Check the lines that cross the mask boundary.
  • Open the source and compare neighboring details.

An editorial teaching example of a task brief, not the result of hands-on testing of the service. Check that the required mode is available, that you have rights to the source material and that the intended use of the result is permitted.

Check details

Official sources

  1. LaMa Official Repository
  2. LaMa Research Preprint

This description is based on the developer’s material. Features, prices and availability may change; check the primary source before use.