File size: 1,099 Bytes
4f606ba e4b83b5 4f606ba e4b83b5 |
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 31 32 33 34 35 36 37 38 39 40 41 |
---
title: Image Blur Effects Demo
emoji: π
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 5.49.1
app_file: app.py
pinned: false
---
# Image Blur Effects Demo
This application demonstrates two types of blur effects using deep learning:
## Features
### 1. Gaussian Blur
- Automatically detects people in the image using **NVIDIA SegFormer**
- Applies Gaussian blur to the background
- Keeps the person sharp and in focus
- Adjustable blur intensity
### 2. Lens Blur (Depth-Based)
- Uses **Depth Anything V2** to estimate scene depth
- Simulates camera lens bokeh effect
- Close objects (foreground) stay sharp
- Far objects (background) progressively blur
- Adjustable focus threshold and blur intensity
## Models Used
- **Segmentation**: `nvidia/segformer-b0-finetuned-ade-512-512`
- **Depth Estimation**: `depth-anything/Depth-Anything-V2-Base-hf`
## Usage
1. Upload an image
2. Choose between Gaussian Blur or Lens Blur tab
3. Adjust parameters using the sliders
4. Click the apply button to see results
All images are processed at 512Γ512 resolution for optimal performance. |