Skip to content

Commit

Permalink
Update gender.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vipstone authored Jun 21, 2018
1 parent c03898e commit c0e6b4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions faceai/gender.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
import numpy as np
import chineseText

img = cv2.imread("E:\\Code\\Python\\img\\gather_2.jpg")
img = cv2.imread("img/gather.png")
face_classifier = cv2.CascadeClassifier(
"F:\\Python3.6.5\\Lib\\site-packages\\opencv-master\\data\\haarcascades\\haarcascade_frontalface_default.xml"
"C:\Python36\Lib\site-packages\opencv-master\data\haarcascades\haarcascade_frontalface_default.xml"
)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = face_classifier.detectMultiScale(
gray, scaleFactor=1.2, minNeighbors=3, minSize=(140, 140))

gender_classifier = load_model(
"E:\\Github\\faceai\\faceai\\classifier\\gender_models\\simple_CNN.81-0.96.hdf5")
"classifier/gender_models/simple_CNN.81-0.96.hdf5")
gender_labels = {0: '女', 1: '男'}
color = (255, 255, 255)

Expand Down

0 comments on commit c0e6b4b

Please sign in to comment.