851-labs / background-remover

Remove backgrounds from images.

  • Public
  • 1.7M runs
  • T4
  • GitHub
  • Paper
  • License

Input

image
*file

Input image

number

Threshold for hard segmentation (0.0-1.0). If 0.0, uses soft alpha.

Default: 0

boolean

If True, remove the foreground instead of the background.

Default: false

string
Shift + Return to add a new line

Background type: 'rgba', 'map', 'green', 'white', [R,G,B] array, 'blur', 'overlay', or path to an image.

Default: "rgba"

string
Shift + Return to add a new line

Output format (e.g., png, jpg). Defaults to png.

Default: "png"

Output

output
Generated in

Run time and cost

This model costs approximately $0.00040 to run on Replicate, or 2500 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia T4 GPU hardware. Predictions typically complete within 2 seconds.

Readme

It uses the transparent-background python package to remove the backgrounds from images.

See it in use at emojis.com.