Spaces:
Build error
Build error
Francesco Pochetti
commited on
Commit
·
4a130a3
1
Parent(s):
f0ffcd0
adding files
Browse files- app.py +1 -2
- requirements.txt +0 -1
app.py
CHANGED
@@ -2,7 +2,6 @@ import face_recognition
|
|
2 |
import cv2
|
3 |
import gradio as gr
|
4 |
from PIL import Image
|
5 |
-
from scipy.ndimage.filters import gaussian_filter
|
6 |
import numpy as np
|
7 |
|
8 |
def run(image):
|
@@ -12,7 +11,7 @@ def run(image):
|
|
12 |
|
13 |
for top, right, bottom, left in face_locations:
|
14 |
face_image = image[top:bottom, left:right]
|
15 |
-
face_image =
|
16 |
image[top:bottom, left:right] = face_image
|
17 |
|
18 |
return Image.fromarray(image)
|
|
|
2 |
import cv2
|
3 |
import gradio as gr
|
4 |
from PIL import Image
|
|
|
5 |
import numpy as np
|
6 |
|
7 |
def run(image):
|
|
|
11 |
|
12 |
for top, right, bottom, left in face_locations:
|
13 |
face_image = image[top:bottom, left:right]
|
14 |
+
face_image = cv2.GaussianBlur(face_image, (99, 99), 30)
|
15 |
image[top:bottom, left:right] = face_image
|
16 |
|
17 |
return Image.fromarray(image)
|
requirements.txt
CHANGED
@@ -1,3 +1,2 @@
|
|
1 |
-
scipy
|
2 |
opencv-python==4.5.5.62
|
3 |
face_recognition==1.2.3
|
|
|
|
|
1 |
opencv-python==4.5.5.62
|
2 |
face_recognition==1.2.3
|