Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -54,7 +54,7 @@ np.random.shuffle(examples) # shuffle
|
|
54 |
|
55 |
@spaces.GPU
|
56 |
def process_frame(frame, mtcnn, model, cam, targets):
|
57 |
-
face = mtcnn(
|
58 |
if face is None:
|
59 |
return frame, None, None
|
60 |
|
|
|
54 |
|
55 |
@spaces.GPU
|
56 |
def process_frame(frame, mtcnn, model, cam, targets):
|
57 |
+
face = mtcnn(PILImage.fromarray(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)))
|
58 |
if face is None:
|
59 |
return frame, None, None
|
60 |
|