Spaces:
Sleeping
Sleeping
Update Face_Censoring.py
Browse files- Face_Censoring.py +3 -3
Face_Censoring.py
CHANGED
@@ -2,8 +2,8 @@ import cv2
|
|
2 |
import streamlit as st
|
3 |
|
4 |
def censor_face(filePath):
|
5 |
-
st.write(str(filePath))
|
6 |
-
output_file = 'censored_' + str(filePath)
|
7 |
video=cv2.VideoCapture(filePath)
|
8 |
success, frame = video.read()
|
9 |
|
@@ -11,7 +11,7 @@ def censor_face(filePath):
|
|
11 |
width = frame.shape[1]
|
12 |
|
13 |
face_cascade=cv2.CascadeClassifier('XML\faces.xml')
|
14 |
-
output=cv2.VideoWriter('censored_' + filePath, cv2.VideoWriter_fourcc(*'mp4v'), 30, (width, height))
|
15 |
|
16 |
while success:
|
17 |
faces = face_cascade.detectMultiScale(frame, 1.1, 4)
|
|
|
2 |
import streamlit as st
|
3 |
|
4 |
def censor_face(filePath):
|
5 |
+
st.write(str(filePath.name))
|
6 |
+
output_file = 'censored_' + str(filePath.name)
|
7 |
video=cv2.VideoCapture(filePath)
|
8 |
success, frame = video.read()
|
9 |
|
|
|
11 |
width = frame.shape[1]
|
12 |
|
13 |
face_cascade=cv2.CascadeClassifier('XML\faces.xml')
|
14 |
+
output=cv2.VideoWriter('censored_' + str(filePath.name), cv2.VideoWriter_fourcc(*'mp4v'), 30, (width, height))
|
15 |
|
16 |
while success:
|
17 |
faces = face_cascade.detectMultiScale(frame, 1.1, 4)
|