Spaces:
Sleeping
Sleeping
Update Face_Censoring.py
Browse files- Face_Censoring.py +2 -2
Face_Censoring.py
CHANGED
|
@@ -31,11 +31,11 @@ def censor_face(filePath):
|
|
| 31 |
faces = face_cascade.detectMultiScale(frame, 1.1, 4)
|
| 32 |
for (x,y, w, h) in faces: #multiple faces in a video
|
| 33 |
frame[y:y+h, x:x+w] = cv2.blur(frame[y:y+h, x:x+w], (150, 150))
|
|
|
|
| 34 |
output.write(frame)
|
| 35 |
-
#tfile2.write(frame)
|
| 36 |
success, frame = video.read()
|
| 37 |
|
| 38 |
output.release()
|
| 39 |
-
|
| 40 |
|
| 41 |
return tfile2
|
|
|
|
| 31 |
faces = face_cascade.detectMultiScale(frame, 1.1, 4)
|
| 32 |
for (x,y, w, h) in faces: #multiple faces in a video
|
| 33 |
frame[y:y+h, x:x+w] = cv2.blur(frame[y:y+h, x:x+w], (150, 150))
|
| 34 |
+
st.write("frame")
|
| 35 |
output.write(frame)
|
|
|
|
| 36 |
success, frame = video.read()
|
| 37 |
|
| 38 |
output.release()
|
| 39 |
+
video.release()
|
| 40 |
|
| 41 |
return tfile2
|