# inference.remove-background.v1

Source: https://docs.prodia.com/job-types/inference-remove-background-v1/

The `inference.remove-background.v1` job removes the background of an input
image and returns an output image with the background removed and a black/white
mask. The output image and mask are only available as `image/png`.

```json
{
    "type": "inference.remove-background.v1"
}
```

<table>
    <tr>
        <th> INPUT </th>
        <th colspan="2"> OUTPUT </th>
    </tr>
    <tr>
        <td> rocket in a desesrt </td>
        <td> just the rocket </td>
        <td> black & white rocket mask </td>
    </tr>
    <tr>
        <td> <img src="./inference.remove-background.v1.md.assets/rocket.png" /> </td>
        <td> <img src="./inference.remove-background.v1.md.assets/output.png" /> </td>
        <td> <img src="./inference.remove-background.v1.md.assets/mask.png" /> </td>
    </tr>
</table>

## Schema

```json
{
	"type": "object",
	"required": [
		"type"
	],
	"properties": {
		"type": {
			"type": "string",
			"enum": [
				"inference.birefnet.segment.v1",
				"inference.remove-background.v1",
				"inference.mask-background.v1"
			]
		},
		"config": {
			"type": "object",
			"properties": {
				"contour": {
					"description": "Enable contour detection for a crisp outline mask style.",
					"type": "boolean",
					"default": false
				},
				"contour_tolerance": {
					"description": "Increase contour tolerance to smooth and expand the mask.",
					"type": "integer",
					"default": 0,
					"minimum": 0,
					"maximum": 128
				}
			}
		}
	}
}
```
