Create README.md
Browse files
README.md
CHANGED
|
@@ -1,14 +1,41 @@
|
|
| 1 |
---
|
| 2 |
-
title: Image Blur
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.49.1
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
-
license: mit
|
| 11 |
-
short_description: 'Deep Learning Assignment: Image Blur Effects Demo'
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Image Blur Effects Demo
|
| 3 |
+
emoji: 🏃
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.49.1
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Image Blur Effects Demo
|
| 13 |
+
|
| 14 |
+
This application demonstrates two types of blur effects using deep learning:
|
| 15 |
+
|
| 16 |
+
## Features
|
| 17 |
+
|
| 18 |
+
### 1. Gaussian Blur
|
| 19 |
+
- Automatically detects people in the image using **NVIDIA SegFormer**
|
| 20 |
+
- Applies Gaussian blur to the background
|
| 21 |
+
- Keeps the person sharp and in focus
|
| 22 |
+
- Adjustable blur intensity
|
| 23 |
+
|
| 24 |
+
### 2. Lens Blur (Depth-Based)
|
| 25 |
+
- Uses **Depth Anything V2** to estimate scene depth
|
| 26 |
+
- Simulates camera lens bokeh effect
|
| 27 |
+
- Close objects (foreground) stay sharp
|
| 28 |
+
- Far objects (background) progressively blur
|
| 29 |
+
- Adjustable focus threshold and blur intensity
|
| 30 |
+
|
| 31 |
+
## Models Used
|
| 32 |
+
- **Segmentation**: `nvidia/segformer-b0-finetuned-ade-512-512`
|
| 33 |
+
- **Depth Estimation**: `depth-anything/Depth-Anything-V2-Base-hf`
|
| 34 |
+
|
| 35 |
+
## Usage
|
| 36 |
+
1. Upload an image
|
| 37 |
+
2. Choose between Gaussian Blur or Lens Blur tab
|
| 38 |
+
3. Adjust parameters using the sliders
|
| 39 |
+
4. Click the apply button to see results
|
| 40 |
+
|
| 41 |
+
All images are processed at 512×512 resolution for optimal performance.
|