Skip to content

Commit ca3ba18

Browse files
authored
Update TYY_demo_mtcnn.py
1 parent f5773ac commit ca3ba18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

demo/TYY_demo_mtcnn.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import timeit
99
from moviepy.editor import *
1010
from mtcnn.mtcnn import MTCNN
11+
from keras import backend as K
1112

1213
def draw_label(image, point, label, font=cv2.FONT_HERSHEY_SIMPLEX,
1314
font_scale=1, thickness=2):
@@ -18,7 +19,7 @@ def draw_label(image, point, label, font=cv2.FONT_HERSHEY_SIMPLEX,
1819

1920

2021
def main():
21-
22+
K.set_learning_phase(0) # make sure its testing mode
2223
weight_file = "../pre-trained/wiki/ssrnet_3_3_3_64_1.0_1.0/ssrnet_3_3_3_64_1.0_1.0.h5"
2324

2425
# for face detection

0 commit comments

Comments
 (0)