inpaint-anything  by Uminosachi

Browser UI for inpainting with Segment Anything masks

created 2 years ago
263 stars

Top 97.6% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a browser-based UI for image inpainting using Stable Diffusion, leveraging the Segment Anything (SAM) model for intuitive mask generation. It's designed for users who want to efficiently edit images by simply pointing to areas for inpainting, enhancing accuracy and saving time compared to manual masking.

How It Works

The application integrates Segment Anything to allow users to click on image areas to generate masks. These masks are then used with Stable Diffusion inpainting models to modify specific regions of an image based on user-provided prompts. This approach streamlines the inpainting workflow by automating mask creation, which is often a bottleneck in image editing.

Quick Start & Requirements

  • Install via pip install -r requirements.txt (or requirements_mac.txt for macOS).
  • Requires Python 3.10 and a CUDA-enabled GPU for optimal performance.
  • Launch with python iasam_app.py.
  • Official documentation and demo links are not explicitly provided in the README.

Highlighted Details

  • Supports multiple SAM models (SAM 2, High Quality, Fast SAM, MobileSAM) with varying VRAM requirements.
  • Includes a "Cleaner" tab powered by Lama Cleaner for additional image restoration.
  • Offers mask adjustment tools (expand, trim, add by sketch) for fine-tuning inpainting areas.
  • Allows direct integration with other applications via the inpaint-anything library for mask generation.

Maintenance & Community

The project references several key research papers for its core components (SAM, SAM 2, Fast SAM, MobileSAM), indicating a foundation in current computer vision research. No specific community channels (Discord, Slack) or active development/sponsorship information is present in the README.

Licensing & Compatibility

The source code is licensed under the Apache 2.0 license, which permits commercial use and linking with closed-source projects.

Limitations & Caveats

Privacy protection extensions in browsers may interfere with mask retrieval. The initial download of inpainting models can take a significant amount of time. The README does not specify hardware requirements beyond the need for CUDA, nor does it detail performance benchmarks.

Health Check
Last commit

7 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
6 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.