Import Libraries
- Opencv: To Read and process the image which includes resizing, making a face blob, forming a bounding box, etc.
- Matplotlib: To plot the image.
Python3
import cv2 import matplotlib.pyplot as plt |
Age and Gender Detection Using OpenCV in Python
In this article, we will discuss the process of creating an Age and Gender Predictor using OpenCV.
Let’s divide the task into 2 parts:
- Age prediction – The prediction will be in the form of categories where categories are a few age intervals like 0-6,18-25, etc.
- Gender prediction – The prediction is a classifier based where categories are Male and Female.