Spaces:
Sleeping
Sleeping
Update Face_Censoring.py
Browse files- Face_Censoring.py +4 -4
Face_Censoring.py
CHANGED
@@ -17,15 +17,15 @@ def censor_face(filePath):
|
|
17 |
height = frame.shape[0]
|
18 |
width = frame.shape[1]
|
19 |
|
20 |
-
st.write(height, width)
|
21 |
|
22 |
-
gray=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
|
23 |
-
st.write("
|
24 |
|
25 |
output=cv2.VideoWriter(output_file, cv2.VideoWriter_fourcc(*'mp4v'), 30, (width, height))
|
26 |
|
27 |
while success:
|
28 |
-
faces = face_cascade.detectMultiScale(
|
29 |
for (x,y, w, h) in faces: #multiple faces in a video
|
30 |
frame[y:y+h, x:x+w] = cv2.blur(frame[y:y+h, x:x+w], (150, 150))
|
31 |
output.write(frame)
|
|
|
17 |
height = frame.shape[0]
|
18 |
width = frame.shape[1]
|
19 |
|
20 |
+
#st.write(height, width)
|
21 |
|
22 |
+
#gray=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
|
23 |
+
st.write("Frame: " + str(frame))
|
24 |
|
25 |
output=cv2.VideoWriter(output_file, cv2.VideoWriter_fourcc(*'mp4v'), 30, (width, height))
|
26 |
|
27 |
while success:
|
28 |
+
faces = face_cascade.detectMultiScale(frame, 1.1, 4)
|
29 |
for (x,y, w, h) in faces: #multiple faces in a video
|
30 |
frame[y:y+h, x:x+w] = cv2.blur(frame[y:y+h, x:x+w], (150, 150))
|
31 |
output.write(frame)
|