py-agender PATH_TO_IMAGE
pip3 install py-agender[cpu] # for the cpu version of TensorFlow
pip3 install py-agender[gpu] # for the gpu version of TensorFlow
from pyagender import PyAgender
agender = PyAgender()
# see available options in __init__() src
faces = agender.detect_genders_ages(cv2.imread(MY_IMAGE))
# [
# {left: 34, top: 11, right: 122, bottom: 232, width:(r-l), height: (b-t), gender: 0.67, age: 23.5},
# ...
# ]
# Additional options & methods in PyAgender source