In this recipe, you will learn how to predict a person's age and gender by an image. One of the possible applications is collecting statistical information about people viewing content in digital signage displays for example.
Age and gender prediction
Getting ready
Before you proceed with this recipe, you need to install the OpenCV 3.x Python API package.
How to do it...
You need to complete the following steps:
- Import the modules:
import cv2
import numpy as np
import matplotlib.pyplot as plt
- Load the models:
age_model = cv2.dnn.readNetFromCaffe('../data/age_gender...