mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
Merge pull request #133 from sugyan/fix-preprocess_face
Fix preprocess_face for age prediction
This commit is contained in:
commit
5d77c1ceff
@ -444,7 +444,7 @@ def analyze(img_path, actions = [], models = {}, enforce_detection = True, detec
|
||||
|
||||
elif action == 'age':
|
||||
if img_224 is None:
|
||||
img_224 = functions.preprocess_face(img_path, target_size = (224, 224), grayscale = False, enforce_detection = enforce_detection) #just emotion model expects grayscale images
|
||||
img_224 = functions.preprocess_face(img = img_path, target_size = (224, 224), grayscale = False, enforce_detection = enforce_detection, detector_backend = detector_backend) #just emotion model expects grayscale images
|
||||
#print("age prediction")
|
||||
age_predictions = age_model.predict(img_224)[0,:]
|
||||
apparent_age = Age.findApparentAge(age_predictions)
|
||||
|
Loading…
x
Reference in New Issue
Block a user