Disclaimer: This is an example of a student written assignment.
Click here for sample essays written by our professional writers.

Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of UKEssays.com.

Age and Gender Prediction using Convolutional Neural Network

Info: 2180 words (9 pages) Assignment
Published: 16th Nov 2021 in Assignment

Reference this


The age and gender prediction have become relevant today due to the rise of social media and other platforms. This paper estimates the facial attributes such as age and gender from facial images obtained in several vigorous conditions. These facial attributes like age and gender can enhance the performance of face recognition beyond predicting age and gender. This paper proposes a method for the prediction of age and gender from the face images with the use of a convolutional neural network. The mainstay of this system contains a number of deep convolutional neural networks that are low-cost and provide exceptional results on several competitive benchmarks when compared with conventional methods i.e., VGG-16. We assess our method on the IMDB-WIKI dataset and show which network performs better in predicting the age and gender.

Get Help With Your Assignment

If you need assistance with writing your assignment, our professional assignment writing service is here to help!

Assignment Writing Service


Age and gender, two of the vital facial attributes, plays a fundamental role in social interactions, thereby making age and gender estimation an important task in applications, like security control, human- computer interaction, and visual surveillance, etc., [9]. Over the past few years, the age and gender estimation was done using physically designed features and statistical models, and achieved acceptable results on certain benchmarks datasets like FG-NET and MORPH. Though, these statistical models produced satisfactory results on the recent benchmark datasets like IMDB, Adience, etc.,

This paper focuses on age and gender prediction from face images using the facial attributes to enhance the model of our system. This paper proposes an age and gender prediction method using a squeezenet network that can produce similar results like that of AlexNet but with fewer parameters and a small model size thereby comparing its performance with VGG-16 network. The dataset that is being used in this paper for both training, validation, and testing is IMDB-WIKI due to its large sample size and its wider distribution of age with 101 classes.


In the past, the age, and gender prediction was based on the geometrical features of the face. These features can distinguish a baby from the adult but not with aged people. However, this problem was overcome by using textural features along with the geometrical features to distinguish the adult from elderly people and achieve the necessary results. Over the past few years, Convolutional Neural Network (CNN) has been used in the estimation of age and gender. CNN uses a certain feature representation even with large datasets.

Levi et al. [1] uses a simple Deep Neural Network (DNN) architecture with limited availability of data and obtaining an accurate age and gender classification. With the introduction of Deep CNN and residual learning, Lee et al. [4] focused on detecting faces in input images, and then estiamted the age and gender of each face using a deep residual learning model with several residual learning blocks from ResNet. Sebastian et al. [5] compared four popular neural network architectures for age and gender classification (CaffeNet, GoogleNet, VGG16, Deep-CNN [1]) and studied the effect of pre training, assesses the robustness of the alignment preprocessing via cross-method test and visualized the model's prediction strategies using the recent Layer-wise Relevance Propagation (LRP) algorithm. Ito et al. [6] proposed an age and gender prediction method that uses Deep Multi-Task Learning (DMTL) which shares a part of the network thereby using feature extraction to improve the prediction accuracy of age and gender. Hebda et al. [7] implemented a Deep Neural Network (DNN) architecture for the estimation of age and gender from the facial images in embedded devices and also supporting real-time video stream processing using public datasets like FERET and ADIENCE.


This section describes the proposed method using squeezenet architecture and VGG-16 architecture in the prediction of age and gender. We explain in detail the proposed methodology in the following:

A. Squeezenet

Squeezenet [10] is a network architecture that is significant for its less computation it needs and thereby preserving accuracy. Compared to other models, squeezenet has a fire module that consists of expand layer and squeeze layer. The squeeze layer reduces the size of the convolutional layers whereas the expand layer later increases the size of the convolutional layer that has been reduced thereby making sure that they have the same feature map size. The objective of the squeezenet architecture is to maintain the accuracy even with the use of fewer parameters.

B. VGG-16

The VGG-16 architecture [17] has 16 layers and each layer has weights. This network is pretty large when compared to squeezenet and has about 138 million parameters. The network is an upgrade of AlexNet by replacing the large kernel-sized filters with multiple kernel-sized filters of size 3X3.

C. IMDB-WIKI Dataset

IMDB-WIKI is a public data set that is available for predicting the age of people, containing more than 500K images. It contains information like DOB (Date of Birth), gender, the date the photo was taken, etc., For training the age parameter, the calculation is done by subtracting the parameters of the date the photo was taken and the DOB. The data set is split into 101 classes with each class signifying each age group [8].

D. Training and Validation

Squeezenet, VGG-16 models are trained using the IMDBWIKI dataset for classifying the gender and predicting the age. The squeezenet has 9 blocks of fire modules whereas the VGG-16 has 16 layers. The input image has been resized from 224 X 224 pixels to 64 X 64 pixels and these pixels are normalized so that the mean is 0 and the variance is 1. 90% of the dataset is taken for training (128,000 images) and out of that 10% is taken as validation (46,000 images) for checking whether the overfitting of data is taking place or not. Stochastic gradient descent (SGD) is being used as the optimizer for training and the training accuracy, validation accuracy, validation loss, training loss is being calculated for each epoch. The weights used here is Imagenet. The loss is calculated by using the categorical cross entropy.


The training dataset was trained in the pre-trained networks of squeezenet and VGG-16 for 100 epochs for age prediction and 25 epochs for gender prediction.










Training loss





Training accuracy





Validation loss





Validation accuracy





Table I provides a comparison of experimental results undertaken for both network architectures in predicting the age and gender. From the table, we can infer that the VGG-16 architecture performs better than squeezenet architecture and it exhibits better accuracy both on age and gender prediction.

Fig. 1. The accuracy and loss curves of squeezenet architecture in age prediction.

Fig. 2. The accuracy and loss curves of VGG-16 architecture in age prediction.

Fig. 3. The accuracy and loss curves of squeezenet architecture in gender classification.

Fig. 4. The accuracy and loss curves of VGG-16 architecture in gender classification.


This paper proposes an age and gender prediction method using a squeezenet network and compares its results with the VGG-16 network. VGG-16 exhibits better performance on both age and gender compared to squeezenet. The future work includes to improve the training and validation accuracy of age and gender prediction by using more hidden layers and also to train different networks with high proportion of low-resolution face images.


[1] Gil Levi and Tal Hassner, "Age and Gender Classification Using Convolutional Neural Networks", IEEE Workshop on Analysis and Modeling of Faces and Gestures (AMFG), at the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), Boston, 2015.

[2] Ari Ekmekji, " Convolutional Neural Networks for Age and Gender Classification", Stanford University, 2016

[3] A. Dehghan, E. G. Ortiz, G. Shu, and S. Z. Masood, " Dager: Deep age, gender and emotion recognition using convolutional neural network", arXiv:1702.04280, 2017.

[4] Lee, Seok & Hosseini, Sepidehsadat Kwon, Hyuk Moon, Jaewon Koo, Hyung Cho, Nam.," Age and gender estimation using deep residual learning network",1-3. 10.1109/IWAIT.2018.8369763, (2018).

[5] Sebastian Lapushkin, Alexander Binder, Klaus-Robert Muller, and Wojciech Samek, "Understanding and Comparing Deep Neural Networks for Age and Gender Classification", Proceedings of the IEEE International Conference on Computer Vision Workshops (ICCVW), 1629-1638, 2017.

[6] Ito, Koichi & Kawai, Hiroya Okano, Takehisa Aoki, Takafumi, "Age and Gender Prediction from Face Images Using Convolutional Neural Network", 7-11. 10.23919/APSIPA.2018.8659655,2018.

[7] Hebda, Bartłomiej & Kryjak, Tomasz, "A compact deep convolutional neural network architecture for video based age and gender estimation", Federated Conference on Computer Science and Information Systems, 787–790, 2016.

[8] Rasmus Rothe, Radu Timofte, Luc Van Gool, " IMDB-WIKI – 500k+ face images with age and gender labels" [Data File]. Available from https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/.

[9] Zhang, K., Gao, C., Guo, L., Sun, M., Yuan, X., Han, T., Zhao, Z. and Li, B. , "Age Group and Gender Estimation in the Wild With Deep RoR Architecture".IEEE Access, 5, pp.22492-22503,2017.

[10] Iandola, Forrest & Han, Song Moskewicz, Matthew Ashraf, Khalid Dally, William Keutzer, Kurt. (2016). "SqueezeNet: AlexNetlevel accuracy with 50x fewer parameters and ¡0.5MB model size",arXiv:1602.07360v4 [cs.CV], 4 Nov 2016.

[11] G. Guo, G. Mu, Y. Fu and T. Huang, "Human age estimation using bioinspired features," in Proc. CVPR, 2009, pp. 112–119.

[12] Y. Fu, and T. Huang, "Human age estimation with regression on discriminative aging manifold," IEEE Transactions on Multimedia, vol. 10, no. 4, pp. 578–584, Apr. 2008.

[13] G. Guo, Y. Fu, C. Dyer and T. Huang, "Image-based human age estimation by manifold learning and locally adjusted robust regression," IEEE Transactions on Image Processing, vol. 17, no. 7, pp. 1178–1188, Jul. 2008

[14] G. Guo and G. Mu, "Simultaneous dimensionality reduction and human age estimation via kernel partial least squares regression," in Proc. CVPR,2011, pp. 657–664

[15] G. Guo and G. Mu, "Joint estimation of age, gender and ethnicity: CCA vs. PLS," in Proc. IEEE International Conference and Workshops on Automatic Face and Gesture Recognition, 2013, pp. 1–6.

[16] E. Eidinger, R. Enbar, and T. Hassner, "Age and gender estimation of unfiltered faces," IEEE Transactions on Information Forensics and Security, vol. 9, no. 12, pp. 2170–2179, Dec. 2014.

[17] Simonyan, Karen Zisserman, Andrew," Very Deep Convolutional Networks for Large-Scale Image Recognition",arXiv 1409.1556,2014.


Cite This Work

To export a reference to this article please select a referencing stye below:

Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.

Related Services

View all

DMCA / Removal Request

If you are the original writer of this assignment and no longer wish to have your work published on UKEssays.com then please: