rembg-web - Mask Only Example

This example demonstrates how to get only the mask (black/white) from background removal.

⚠️ Data Usage Notice: First-time usage will download the AI model (~200-300MB). Subsequent uses will load from cache. Please ensure you have a stable internet connection and sufficient data allowance.
Mask Only Mode: When onlyMask: true is set, the function returns a grayscale image where white areas represent the foreground (subject) and black areas represent the background.
Generating mask...

Original Image

No image selected

Generated Mask

Waiting for mask generation