Age and Gender Detection 2
Age and Gender Detection 2
Age and gender, two key facial attributes, play a really foundational role in social
interactions, making age and gender estimation from one face image a very important task in
machine learning applications, like access control, human-computer interaction, law
enforcement, marketing intelligence and visual surveillance. It plays a very important role in
an exceedingly wide selection of the real-world applications like targeted advertisement,
forensic science, visual surveillance, content-based searching, human computer interaction
systems, etc. for instance we are able to use this method to display advertisement supported
different gender and different age bracket.
The network architecture used for age approximation in based on the paper of [2]G.Levi and
T.Hassner. This network is intended to be shallow to prevent over-fitting.
The convolutional neural network for this python project has 3 convolutional layers:
We will use the DNN Face Detector for face detection. The model is only 2.7MB and is
pretty fast even on the CPU
We will load the gender network into memory and pass the detected face through the
network. The forward pass gives the probabilities or confidence of the two classes. We take
the max of the two outputs and use it as the final gender prediction.
We load the age network and use the forward pass to get the output. Since the network
architecture is similar to the Gender Network, we can take the max out of all the outputs to
get the predicted age group.
We will display the output of the network on the input images and show them using the
imshow function.
3. The Dataset
For this python project, we’ll use the Adience dataset; the dataset is available in the public
domain and you can find it here. This dataset serves as a benchmark for face photos and is
inclusive of various real-world imaging conditions like noise, lighting, pose, and appearance.
The images have been collected from Flickr albums and distributed under the Creative
Commons (CC) license. It has a total of 26,580 photos of 2,284 subjects in eight age ranges
(as mentioned above) and is about 1GB in size. The models we will use have been trained on
this dataset.