
andreasjansson/portrait-blur

Blur out-of-focus parts of an image
Run andreasjansson/portrait-blur with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
Field | Type | Default value | Description |
---|---|---|---|
image |
string
|
Input image to apply portrait mode blur effect
|
|
blur_strength |
number
|
10
Min: 1 Max: 30 |
Blur strength (higher = more blur)
|
edge_averaging |
integer
|
11
Min: 1 Max: 31 |
Edge smoothing window size (higher = smoother transitions)
|
return_debug_image |
boolean
|
False
|
Return debug depth visualization
|
{
"type": "object",
"title": "Input",
"required": [
"image"
],
"properties": {
"image": {
"type": "string",
"title": "Image",
"format": "uri",
"x-order": 0,
"description": "Input image to apply portrait mode blur effect"
},
"blur_strength": {
"type": "number",
"title": "Blur Strength",
"default": 10,
"maximum": 30,
"minimum": 1,
"x-order": 1,
"description": "Blur strength (higher = more blur)"
},
"edge_averaging": {
"type": "integer",
"title": "Edge Averaging",
"default": 11,
"maximum": 31,
"minimum": 1,
"x-order": 2,
"description": "Edge smoothing window size (higher = smoother transitions)"
},
"return_debug_image": {
"type": "boolean",
"title": "Return Debug Image",
"default": false,
"x-order": 3,
"description": "Return debug depth visualization"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"type": "object",
"title": "Output",
"required": [
"blurred_image",
"depth_debug"
],
"properties": {
"depth_debug": {
"type": "string",
"title": "Depth Debug",
"format": "uri"
},
"blurred_image": {
"type": "string",
"title": "Blurred Image",
"format": "uri"
}
}
}
{'blurred_image': 'https://replicate.delivery/xezq/fZVGYqMrfwqOEEJBgdCAZR1kXoZZICa2E56k9jdpVIPCukOVA/portrait_blur.jpg',
'depth_debug': None}