a-person-mask-generator  by djbielejeski

Extension for generating person masks in image editing workflows

created 1 year ago
364 stars

Top 78.4% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides extensions for Automatic1111 and ComfyUI to automatically generate segmentation masks for various human body parts (background, hair, body, face, clothes) within an image-to-image workflow. It leverages Google's Multi-class selfie segmentation model, offering a streamlined way to isolate and manipulate specific elements of a person in generated images.

How It Works

The extension utilizes Google's Multi-class selfie segmentation model to perform pixel-level classification of human subjects. It generates distinct masks for background, hair, body, face, and clothes. A recent refinement feature adds a bounding box around detected masks, crops the image to that area, and re-runs segmentation for improved accuracy, particularly on distant subjects or high-resolution images.

Quick Start & Requirements

  • ComfyUI: git clone https://github.com/djbielejeski/a-person-mask-generator into custom_nodes folder, then pip install -r requirements.txt.
  • Automatic1111: Install via the "Install from URL" tab in the Extensions menu with https://github.com/djbielejeski/a-person-mask-generator.git.
  • Prerequisites: Python, Git. ComfyUI or Automatic1111 Web UI.
  • Resources: Requires sufficient VRAM for the segmentation model.

Highlighted Details

  • Supports both ComfyUI and Automatic1111 Stable Diffusion Web UI.
  • Generates masks for background, hair, body, face, and clothes.
  • Includes a mask refinement option for improved accuracy.
  • Offers facial landmark mask outputs for ComfyUI.

Maintenance & Community

The project has seen recent updates, including ComfyUI compatibility fixes and mask refinement features. There are no explicit links to community channels or roadmaps provided in the README.

Licensing & Compatibility

The repository does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project does not specify a license, which may impact commercial use. There are no explicit benchmarks or performance metrics provided.

Health Check
Last commit

3 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
2
Star History
26 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.