photo_bg_remover
Background Remover — Cut out the subject and remove the background from an existing photo, producing a transparent PNG (or a solid fill color). Edits a user-supplied image; does not generate new imagery. [category: photo]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | JPG, PNG, WebP, BMP (max 20MB) | |
| model | No | Segmentation model; u2net_human_seg is tuned for people. Invalid values fall back to u2net. | u2net |
| bg_color | No | Optional solid background fill color. Default: transparent. | |
| alpha_matting | No | Re-solves hair, fur and glass edges as a soft fade instead of a hard cut. Slower and uses more memory. | |
| alpha_matting_erode_size | No | Width of the band around the subject that gets re-solved. Only used when edge softening is on. Values outside 0-64 are pulled back into range. | |
| alpha_matting_background_threshold | No | How certain a pixel must be to count as definitely background. Only used when edge softening is on. Values outside 0-255 are pulled back into range. | |
| alpha_matting_foreground_threshold | No | How certain a pixel must be to count as definitely the subject. Only used when edge softening is on. Values outside 0-255 are pulled back into range. |