File size: 928 Bytes
b618fbc
 
 
 
 
 
438f197
b618fbc
 
 
 
c554234
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
438f197
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
title: Image Blur Effects
emoji: 🖼️
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 5.23.1
app_file: app.py
pinned: false
---

# Image Blur Effects using Segmentation and Depth Estimation

This Hugging Face Space demonstrates how to apply two different blur effects to images:

1. **Gaussian Background Blur**: Uses image segmentation to identify the foreground object and apply a Gaussian blur to the background
2. **Depth-Based Lens Blur**: Uses monocular depth estimation to create a realistic lens blur effect, with blur intensity proportional to estimated depth

## How to Use

1. Upload an image with a clear foreground subject
2. Choose a blur effect type
3. Adjust the blur strength
4. For Gaussian Background Blur, specify the target class (e.g., person, cat, dog)
5. Click "Apply Effect"

## Models Used

- Image Segmentation: `facebook/maskformer-swin-base-ade`
- Depth Estimation: `intel/dpt-large`