Skip to content

Commit

Permalink
Update test_image.py
Browse files Browse the repository at this point in the history
set default cpu
  • Loading branch information
kuaikuaikim authored Dec 28, 2017
1 parent 2a794b7 commit 319ef58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

if __name__ == '__main__':

pnet, rnet, onet = create_mtcnn_net(p_model_path="./model_store/pnet_epoch.pt", r_model_path="./model_store/rnet_epoch.pt", o_model_path="./model_store/onet_epoch.pt", use_cuda=True)
pnet, rnet, onet = create_mtcnn_net(p_model_path="./model_store/pnet_epoch.pt", r_model_path="./model_store/rnet_epoch.pt", o_model_path="./model_store/onet_epoch.pt", use_cuda=False)
mtcnn_detector = MtcnnDetector(pnet=pnet, rnet=rnet, onet=onet, min_face_size=24)

img = cv2.imread("./test.jpg")
Expand All @@ -17,4 +17,4 @@
bboxs, landmarks = mtcnn_detector.detect_face(img)
# print box_align

vision.vis_face(img2,bboxs,landmarks)
vision.vis_face(img2,bboxs,landmarks)

0 comments on commit 319ef58

Please sign in to comment.