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
- Open the image in Unbagrnd and let the model produce the first cutout.
- Use the brush to erase or restore small areas, and use undo or redo as needed.
- Shift, smooth, or feather the outline with the live preview until hair or fur edges look right.
- Export the mask to save the cutout's alpha channel as a black-and-white matte.
- 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.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for zidniryi/unbagrnd and "Clean up hair edges and export a mask for design tools"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer