IsraelBackground removalHigh resolution600K+ monthly downloads

Explore RMBG 2.0

Remove image backgrounds with BRIA’s high-resolution BiRefNet-based foreground segmentation model. Use the playground to give RMBG 2.0 a representative input and review its output. Adjust the available settings to shape the result for your task.

Model

briaai/RMBG-2.0

Input

Configure your request

An image or batch of images passed directly to ImageSegmentationPipeline inputs.

Documentation

RMBG 2.0 field reference

Use this reference to understand how every field in the playground changes the request sent to briaai/RMBG-2.0.

inputs

Required

Type: File array

Uploads one image or a batch of images for foreground segmentation and background removal. Clear subject boundaries improve results; every additional image increases processing time and memory use.

subtask

Optional

Type: String

Default: None

Values: Automatic, semantic, instance, panoptic

Selects the segmentation task requested from the pipeline. Automatic uses the model default, semantic groups pixels by class, instance separates individual objects, and panoptic combines semantic regions with object instances when supported.

threshold

Optional

Type: Number

Default: 0.9

Range: 0–1

Filters predicted segments by confidence before they are returned. Raising it removes uncertain foreground regions but may discard real detail, while lowering it retains more candidates and may introduce false positives.

mask_threshold

Optional

Type: Number

Default: 0.5

Range: 0–1

Converts each soft probability mask into a binary foreground/background mask. Higher values require stronger confidence for a pixel to remain foreground and can shrink fine edges; lower values retain more edge detail but may include background.

overlap_mask_area_threshold

Optional

Type: Number

Default: 0.5

Range: 0–1

Controls removal of small or disconnected regions when predicted masks overlap. Higher values apply stricter cleanup, while lower values preserve more fragments; tune it when thin foreground details disappear or background islands remain.

timeout

Optional

Type: Number

Default: None

Range: 0–Unbounded

Limits how long the pipeline waits while downloading an image or other remote media source. Increase it for large files or slow hosts, and lower it when the application should fail quickly instead of holding a request open.