DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to clean up hair edges and export a mask for design tools with Unbagrnd

Refine a cutout's outline and hand edits, then save the alpha channel as a black-and-white matte.

  • Content
  • Beginner
  • 15 minutes
  • From the README
  • Any agent

Who it is forA graphic designer who needs a precise cutout of a person or animal with fine hair or fur, and a layer mask for Photoshop-style design tools.

The problemThe AI cutout is close but leaves rough hair edges or small errors, and design tools need the mask as a separate file.

The outcomeA refined cutout plus a black-and-white matte file that can be used as a layer mask.

What you need first

  • A Windows, macOS (Apple Silicon), Linux, or Android device
  • Internet access once, to download the AI model on first use (about 170 MB)
  • For building from source: Node.js 20+, Rust 1.88+ via rustup, and the Tauri prerequisites for your OS
  • For the API: Docker with docker compose, and openssl to generate an admin key

Steps

  1. Open the image in Unbagrnd and let the model produce the first cutout.
  2. Use the brush to erase or restore small areas, and use undo or redo as needed.
  3. Shift, smooth, or feather the outline with the live preview until hair or fur edges look right.
  4. Export the mask to save the cutout's alpha channel as a black-and-white matte.
  5. Import the matte into your design tool as a layer mask.

Prompt for your agent

Using the unbagrnd app from github.com/zidniryi/unbagrnd, refine the cutout of <image path> and export its alpha channel as a black-and-white matte. Expected output: a grayscale image where the subject is white and the background is black. Verify that the matte contains only black and white pixels.

Caveat. Refinement tools work on the output of the on-device model, so very difficult images may still need manual brushwork.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page