Perghect commited on
Commit
7626c11
·
verified ·
1 Parent(s): 691c517

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +49 -0
README.md CHANGED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: imgBlur
3
+ emoji: 🖼️
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: gradio
7
+ sdk_version: 5.23.1
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
+ # Image Blur Effects with Gaussian and Lens Blur
13
+
14
+ Welcome to `imgBlur`, a Hugging Face Space that applies blur effects to images using Gaussian and lens blur techniques. This app uses machine learning models to separate foreground and background (for Gaussian blur) or estimate depth (for lens blur), creating professional-looking blur effects.
15
+
16
+ ## Try the App
17
+
18
+ You can use the app directly on Hugging Face Spaces: [https://huggingface.co/spaces/Perghect/imgBlur](https://huggingface.co/spaces/Perghect/imgBlur)
19
+
20
+ ### How to Use the App
21
+
22
+ 1. **Upload an Image**: Click the "Upload Image" box to upload an image from your device.
23
+ 2. **Choose a Blur Type**:
24
+ - **Gaussian Blur**: Uniformly blurs the background while keeping the foreground sharp.
25
+ - **Lens Blur**: Applies a depth-based blur, simulating a depth-of-field effect (closer objects are sharp, farther objects are blurred).
26
+ 3. **Adjust Parameters**:
27
+ - For Gaussian Blur, use the "Gaussian Blur Sigma" slider to control blur intensity (higher values = more blur).
28
+ - For Lens Blur, use the "Max Blur Radius" slider to control the maximum blur intensity and the "Foreground Percentile" slider to adjust the depth threshold for the foreground.
29
+ 4. **Apply the Blur**: Click the "Apply Blur" button to process the image.
30
+ 5. **View the Result**: The processed image will appear in the "Output Image" box, along with a description of the effect applied.
31
+
32
+ **Example**: Try uploading an image with a clear foreground and background (e.g., a person in front of a landscape) to see the effects in action.
33
+
34
+ ## Run the App Locally
35
+
36
+ If you’d like to run this app on your own machine or modify the code, follow these steps:
37
+
38
+ ### Prerequisites
39
+
40
+ - Python 3.8 or higher
41
+ - Git
42
+ - A machine with a GPU (recommended for faster processing, though CPU works too)
43
+
44
+ ### Steps
45
+
46
+ 1. **Clone the Repository**:
47
+ ```bash
48
+ git clone https://huggingface.co/spaces/Perghect/imgBlur
49
+ cd imgBlur