SkillAgentSearch skills...

Inpaint Anything

Inpaint anything using Segment Anything and inpainting models.

Install / Use

npx skills add geekyutao/Inpaint-Anything

Installs into whichever agent you are using.

About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<p align="center"> <img src="./example/IAM.png"> </p>

Inpaint Anything: Segment Anything Meets Image Inpainting

Inpaint Anything can inpaint anything in images, videos and 3D scenes!

  • Authors: Tao Yu, Runseng Feng, Ruoyu Feng, Jinming Liu, Xin Jin, Wenjun Zeng and Zhibo Chen.
  • Institutes: University of Science and Technology of China; Eastern Institute for Advanced Study.
  • [Paper] [Website] [Hugging Face Homepage]
<p align="center"> <img src="./example/MainFramework.png" width="100%"> </p>

TL; DR: Users can select any object in an image by clicking on it. With powerful vision models, e.g., SAM, LaMa and Stable Diffusion (SD), Inpaint Anything is able to remove the object smoothly (i.e., Remove Anything). Further, prompted by user input text, Inpaint Anything can fill the object with any desired content (i.e., Fill Anything) or replace the background of it arbitrarily (i.e., Replace Anything).


🚧 New: main_2026 branch — modernized stack + robotics support (beta)

The main_2026 branch brings Inpaint Anything up to date with the 2026 model landscape, and adds a new direction: data engineering for robotics.

| | main (this branch) | main_2026 | | --- | --- | --- | | Segmentation | SAM 1 | SAM 3 — plus open-vocabulary text prompts | | Video / 3D tracking | OSTrack | SAM 3 video predictor — one less model and checkpoint | | Video inpainting | STTN | ProPainter | | Text-guided fill / replace | SD 2 (no longer downloadable) | SDXL, optional FLUX.1-Fill | | Robotics | — | remove_hands.py — batch hand removal for Human-to-Robot pipelines |

Two things you can do there that you cannot do here:

  • Name the object instead of clicking it. --text_select "dog" finds every match, which also means the pipelines can run unattended over a whole dataset.
  • Prepare egocentric data for robot learning. remove_hands.py erases human hands from egocentric video and exports the masks — the hand removal and inpainting stage of Human-to-Robot synthesis pipelines such as Qwen-RobotManip and EgoEngine. On EgoMimic footage it matches human annotation at IoU 0.96, and it reconstructs the background rather than blacking the arm out.
git checkout main_2026
# then follow the Quick start in that branch's README

⚠️ main_2026 is in beta. It needs Python ≥ 3.12, PyTorch ≥ 2.7 and CUDA ≥ 12.6 (SAM 3's floor), and the NeRF-based 3D path has not been end-to-end verified on that stack yet. Every legacy backend (SAM 1 / MobileSAM, OSTrack, STTN) is still selectable by flag, so you can fall back per stage.

🤝 Contributions very welcome — especially on the robotics side. Issues and PRs against main_2026 are appreciated: more egocentric datasets, action retargeting, robot rendering and compositing, or newer inpainting backends. Please open an issue if you hit anything.


📜 News

[2026/7/28] <span style="color:red">🔥NEW</span> main_2026 branch (beta): upgraded to SAM 3 with text prompts, ProPainter for video, SDXL/FLUX for text-guided editing, and robotics support via remove_hands.py. OSTrack is no longer needed. Contributions welcome!
[2023/9/15] Remove Anything 3D code is available!
[2023/4/30] Remove Anything Video available! You can remove any object from a video!
[2023/4/24] Local web UI supported! You can run the demo website locally!
[2023/4/22] Website available! You can experience Inpaint Anything through the interface!
[2023/4/22] Remove Anything 3D available! You can remove any 3D object from a 3D scene!
[2023/4/13] Technical report on arXiv available!

🌟 Features

💡 Highlights

  • [x] Any aspect ratio supported
  • [x] 2K resolution supported
  • [x] Technical report on arXiv available (<span style="color:red">🔥NEW</span>)
  • [x] Website available (<span style="color:red">🔥NEW</span>)
  • [x] Local web UI available (<span style="color:red">🔥NEW</span>)
  • [x] Multiple modalities (i.e., image, video and 3D scene) supported (<span style="color:red">🔥NEW</span>)
<!-- ## Updates | Date | News | | ------ | -------- | 2023-04-12 | Release the Fill Anything feature | | 2023-04-10 | Release the Remove Anything feature | | 2023-04-10 | Release the first version of Inpaint Anything | -->

<span id="remove-anything">📌 Remove Anything</span>

<!-- <table> <tr> <td><img src="./example/remove-anything/dog/with_points.png" width="100%"></td> <td><img src="./example/remove-anything/dog/with_mask.png" width="100%"></td> <td><img src="./example/remove-anything/dog/inpainted_with_mask.png" width="100%"></td> </tr> </table> --> <p align="center"> <img src="./example/GIF/Remove-dog.gif" alt="image" style="width:400px;"> </p>

Click on an object in the image, and Inpainting Anything will remove it instantly!

Installation

Requires python>=3.8

python -m pip install torch torchvision torchaudio
python -m pip install -e segment_anything
python -m pip install -r lama/requirements.txt 

In Windows, we recommend you to first install miniconda and open Anaconda Powershell Prompt (miniconda3) as administrator. Then pip install ./lama_requirements_windows.txt instead of ./lama/requirements.txt.

Usage

Download the model checkpoints provided in Segment Anything and LaMa (e.g., sam_vit_h_4b8939.pth and big-lama), and put them into ./pretrained_models. For simplicity, you can also go here, directly download pretrained_models, put the directory into ./ and get ./pretrained_models.

For MobileSAM, the sam_model_type should use "vit_t", and the sam_ckpt should use "./weights/mobile_sam.pt". For the MobileSAM project, please refer to MobileSAM

bash script/remove_anything.sh

Specify an image and a point, and Remove Anything will remove the object at the point.

python remove_anything.py \
    --input_img ./example/remove-anything/dog.jpg \
    --coords_type key_in \
    --point_coords 200 450 \
    --point_labels 1 \
    --dilate_kernel_size 15 \
    --output_dir ./results \
    --sam_model_type "vit_h" \
    --sam_ckpt ./pretrained_models/sam_vit_h_4b8939.pth \
    --lama_config ./lama/configs/prediction/default.yaml \
    --lama_ckpt ./pretrained_models/big-lama

You can change --coords_type key_in to --coords_type click if your machine has a display device. If click is set, after running the above command, the image will be displayed. (1) Use left-click to record the coordinates of the click. It supports modifying points, and only last point coordinates are recorded. (2) Use right-click to finish the selection.

Demo

<table> <tr> <td><img src="./example/remove-anything/person/with_points.png" width="100%"></td> <td><img src="./example/remove-anything/person/with_mask.png" width="100%"></td> <td><img src="./example/remove-anything/person/inpainted_with_mask.png" width="100%"></td> </tr> </table> <table> <tr> <td><img src="./example/remove-anything/bridge/with_points.png" width="100%"></td> <td><img src="./example/remove-anything/bridge/with_mask.png" width="100%"></td> <td><img src="./example/remove-anything/bridge/inpainted_with_mask.png" width="100%"></td> </tr> </table> <table> <tr> <td><img src="./example/remove-anything/boat/with_points.png" width="100%"></td> <td><img src="./example/remove-anything/boat/with_mask.png" width="100%"></td> <td><img src="./example/remove-anything/boat/inpainted_with_mask.png" width="100%"></td> </tr> </table> <table> <tr> <td><img src="./example/remove-anything/baseball/with_points.png" width="100%"></td> <td><img src="./example/remove-anything/baseball/with_mask.png" width="100%"></td> <td><img src="./example/remove-anything/baseball/inpainted_with_mask.png" width="100%"></td> </tr> </table>

<span id="fill-anything">📌 Fill Anything</span>

<!-- <tabl

Related Skills

View on GitHub
GitHub Stars7.7k
CategoryDevelopment
Updated1d ago
Forks659

Languages

Jupyter Notebook

Security Score

95/100

Audited on Aug 7, 2026

No findings