Skip to main content

Search

Inpainting


Inpainting is a revolutionary video tool that lets you automatically remove unwanted objects throughout your clip. Traditionally, this professional process takes hours or days to accomplish. Thanks to the help of artificial intelligence, this technique is now more accessible, affordable, and easier than ever to implement into your projects.

To find the tool, select Edit videos and then Inpainting on the main left dashboard sidebar.

inpainting.gif

1. Import video clip

First, you'll need to upload your clip. You can drag and drop your clips directly from your computer into Runway, or sort through the Assets section on the left side of the editor if you've already uploaded them.
💡 For more information on what kinds of video formats we accept, see here.

Choosing the right clips will directly affect the quality of your results. Some of the same guidelines from using Green Screen also apply here: it is not recommended to use clips of low quality, or where the subject is moving in and out of the frame frequently. Additionally, we suggest ensuring that your Inpainting subject does not take up the majority of the frame; Inpainting requires a bit of background context to work properly!

monument.gifinpainting1.gif

2. Inpaint

Time to Inpaint! Begin by brushing over the subject you’d like to make disappear to create a mask. Feel free to adjust the brush size in the Controls panel on the right. It’s okay to draw out of the lines, but try to paint as close to your subject outline as possible for the most accurate selection.
💡 Inpainting currently dilates masked selections by 10 px — in simple terms, this will allow for your selections to be a bit more forgiving.inpainting2.gif

When you’re happy with your mask, hit Preview and play the entire clip, looking for areas that may be imperfect. Create more keyframes as necessary, while utilizing the Mode dropdown menu on the right, to ensure that your mask is correct. We recommend doing this in chronological order, only as needed.

3. Export

When you're happy with the entire clip, there are a couple of options. You can choose to export the clip directly from the tool, or continue editing into a timeline, applying effects, and more.

To export your clip, select Export Inpaint at the top right of the editor screen. A menu will appear containing customizable options for exporting. After selecting Export Inpaint from this menu, your clip will begin exporting to Assets.
💡 If your email notifications are turned on, you will also receive an email once the export is completed.

Screenshot 2023-08-02 at 3.12.42 PM.png


If you'd like to continue editing your Inpainted video in the Project, select Done Inpainting to open our fully featured editor.

Screenshot 2023-08-02 at 3.13.34 PM.png


If you ever wish to go back and edit your Inpainted clip, you can do so simply by opening up your project, selecting the clip from the timeline (it will become highlighted), and navigating to the right-hand Clip section to AI Magic Tools. Under this, you'll be able to see the applied tool, along with an Edit Inpainting button to make any edits.

Screenshot 2023-08-02 at 3.14.30 PM.png

Enjoy your cleaned-up clip!

inpaintingfinal.gif

 

 Best practices for Inpainting

Not quite getting the results you want from the tool, or simply want to make sure your input will provide adequate output clips before investing any time? Your ability to make the most of Inpainting, much like any other creative tool, can be greatly augmented by knowing the tool's strengths.

Certain "extreme" circumstances in a clip can cause artifacting in the preview and/or export. These artifacts resemble digital distortions (e.g. streaks or smudges), and are caused by the model needing to invent its own visuals from nothing in situations where the input clip provides little to no data to go off of. Some of these circumstances involve:

  1. Extreme amounts of movement generated by the camera or the subject(s) of your shot. Movement and camera motion are fine, but an extreme manifestation of either trait (such as highly shaky handheld recordings) may cause artifacts to appear.
  2. Extreme depth of field effects such as trying to simultaneously run one Inpainting session on a totally-blurred-out portion of a shot as well as something totally in-focus in the foreground.
  3. Trying to restore entire limbs or body parts in circumstances where an object is blocking part of a figure. While the model will then attempt to restore the rest of that figure's body when the blocking object is removed, no existent generative AI model is yet able to fully comprehend and regenerate accurate anatomical physics.
  4. The Inpainted area moves in and out of the shot quickly and erratically. While you can attempt to subvert this by repeatedly masking the item, cases where an Inpainted area/subject is constantly moving in and out of frame (such as a shot of a complex team sports game with multiple players passing on and off screen) require the model to do significant guesswork.
  5. The Inpainted area, item, or subject temporarily covers the entire frame. Unfortunately, Inpainting cannot regenerate the entirety of a setting, environment, or shot during a period where something — or someone — is blocking the entire frame.
  6. Extreme low contrast or lighting can additionally cause the model to struggle with placing Inpainting boundaries correctly, regardless of how many additional keyframes you add. 

To improve your results, try these best practices:

  1. Keep the Inpainted area/subject on screen as much as possible.
  2. Opt for clips with fluid, planned motion instead of unsteady footage.
  3. Use clips with decent contrast and enough lighting that your own eye can easily determine object boundaries.
  4. Try to use Inpainting for situations where something needs to be covered (e.g. hidden under a texture already presented in the clip, such as a brick wall or concrete floor or clothing fabric) rather than imagined (e.g. limbs or other traits need to be added).