Gender Recognition System Using Convolutional Neural Network

: Human gender detection which is a part of facial recognition has received extensive attention because of it’s different kinds of application. Previous research works on gender detection have been accomplished based on different static body feature for example face, eyebrow, hand-shape, body-shape, finger nail etc. In this research work, we have presented human gender classification using Convolution Neural Network (CNN) from human face images as CNN has been recognised as best algorithm in the field of image classification. To implement our system, at first a pre-processing technique has been applied on each image using image processing. The pre-processed image is passed through the Convolution, RELU and Pooling layer for feature extraction. A fully connected layer and a classifier is applied in the classification part of the image. To obtain a better result, we have implemented our system using different optimizers. We use libraries like , Keras , Opencv and also uses Tensorflow as backend.


I. INTRODUCTION
Gender detection plays a significant role in modern technology.The detection of gender has many dynamic applications such as social interaction, security maintenance and surveillance, video games, human-computer interaction, criminal identification, mobile application, commercial development, monitoring application etc.It has occupied a great space in the field of facial recognition.
Various methods have been proposed for classifying gender from several controlled and uncontrolled dataset.It is more challenging in uncontrolled situations.Beside these some face images are so confusing, in most of the time a human is also fail to detect the gender from the image.So there is a wide scope for improving the performances of gender recognition approaches.
Our main purpose is to detect human gender from facial images where we have used an image processing technique for appearance based feature extraction and Convolution Neural Network (CNN) for the classification of human gender.In this regard, at first we take the input through an camera to capture the video.From that video the face picture is captured and then we applied an image processing technique where we have converted the face image into a two dimensional array where the values of the array indicates the pixel values of the image.After that, all the pixel values have been divided by 255 so that all the values of the array come to a range between 0 to 1.This is done to reduce the difference among the values.After this pre-processing step, a machine learning algorithm called Convolution Neural Network is applied for the classification of gender using a compact variant of MobileNetV2 architecture II.LITERATURE SURVEY Phuoc Nguyen and his colleagues worked for gender a system.They fused GMM and SVM classifier for the proposed work and vector quantization is used.Australian speech database was used for training and testing of this system.Australian speech database contains 108 speakers and each speaker has 200 utterances.97.96 % to 98.68 % accuracy was claimed by them in the proposed systemText Font of Entire Document M. H. Bahari and his colleague proposed an approach for gender identification system using hybridization of Weighted Supervised Non-Negative Matrix Factorization (WSNMF) and General Regression Neural Network (GRNN

IV. PROPOSED SYSTEM
To create a real time Gender Recognition system which identifies the gender of human's based on the Facial features.The goal of this project is to create an algorithm that identifies the gender with high accuracy value.Convolution neural networks are considered as the fundamental techniques for predicting the features in the images such as shape , size, etc.
We are using a MobilenetV2 algorithm with TensorFlow , Keras and Opencv which enables the system to produce the accurate values for the gender recognition system.At first we take the input through an camera to capture the video.From that video the face picture is captured and then we applied an image processing technique where we have converted the face image into a two dimensional array where the values of the array indicates the pixel values of the image.After that, all the pixel values have been divided by 255 so that all the values of the array come to a range between 0 to 1.This is done to reduce the difference among the values.After this pre-processing step, a machine learning algorithm called Convolution Neural Network is applied for the classification of gender using a compact variant of MobileNetV2 architecture V. METHODOLOGY A Convolutional Neural Network (ConvNet / CNN) is a Deep Learning algorithm, which allows an input image to take on different aspects and can be distinguished from one image (learnable weights and biases).ConvNet requires much less pre-processing than other classification algorithms.While the filters are hand-made in primitive methods, ConvNets can learn these features with adequate training.The ConvNet architecture is similar to that of neurons in the human brain and was influenced by the Visual Cortex organization.Within a limited area of the visual field known as the Receptive Field, only individual neurons respond to stimuli.The entire visual area is protected by a selection of these fields.
The data collection consists of more than 3,000 facial images of both male images and female images.The images cover in a wide range of poses, facial expression, lighting, occlusion, resolution .It can be used for variety of tasks, for example face detection, gender recognition etc.The survey is focused on gender detection of the neural network (CNN) image dataset architecture.We need to split our dataset into three parts that is training dataset, test dataset and validation dataset.The purpose of splitting data is to avoid overfitting which is paying attention to minor noise which is not necessary and only optimizes the training datasets accuracy.We need a model that performs well on dataset that has never seen , which is called generalization.The training set is the actual subset of the dataset that we use to train the model.The model observes and learns from this data and then optimizes its parameters.The validation dataset is used to select hyper parameters (learning rate, regularization parameters).When the model is performing well enough on our validation dataset, we can stop learning using a training dataset.The test set is the remaining subset of data used to provide an unbiased evaluation of a final model fit on the training dataset.Technologies used in this recognition system are 1.Image pre-processing 2. Feature extraction 5.1 Image Pre-Processing Image pre-processing is a method to perform some operations on an image, in order to get an enhanced image or to extract some useful information from it.It is a type of signal processing in which input is an image and output may be image or characteristics/features associated with that image.It removes low frequency background noise, normalizes the intensification of the individual practical image, removes reflection of light to get rid of the image noise, and prepares the face image to better feature extraction.

Feature Extraction
In Convolutional Neural Network (CNN), the feature extraction is performed by the Convolution and the Pooling layer.In our proposed system these layers are defined as follows: 1.The convolution layer contains 32 filters with a 3 × 3 kernel.Here RELU is used as the activation function followed by batch normalization.2. The POOL layer uses a 3 × 3 pool size to reduce spatial dimension from 96 × 96 to 32 × 32.A dropout is used in our network architecture which disconnects nodes arbitrarily from layer to layer.VI.RESULT As mentioned in the proposed system in this system we integrate a camera to take the inputs from where the pictures are captured.when the camera is integrated and the video is recorded from which the picture is captured the following results will be shown  If the system detects the person in the picture and classifies the person as male then it displays the gender as male along with accuracy and the box which is highlighted around the captured face will be displayed in blue color.
Figure 2: Result Image of camera input  If the system detects the person in the picture and classifies the person as female then it displays the gender as female along with accuracy and the box which is highlighted around the captured face will be displayed in pink color.

VII. CONCLUSION
The proposed system uses convolutional neural network, tensorflow , keras , opencv to recognize the gender of the people captured by the integrated camera .As gender plays a major role in today's modern technology it can be used in many applications such as social interaction, security maintenance and surveillance, video games, human-computer interaction, criminal identification, mobile application, commercial development, monitoring application, smart adverting etc.

3 .
Next the convolution and ReLU layers are applied twice before applying another POOL layer.This operation of multiple convolutional and ReLU layers allow to learn a richer set of features.Here-194 T. A. Sumi et al. -The filter size is being increased from 32 to 64.As we go deep into the network, we will learn the filters more.-The max pooling size is decreased from 3 × 3 to 2 × 2 so that spatial dimensions don't get reduced too quickly.4. Again the convolution and ReLU layers is applied twice before applying another POOL layer.The filter size is increased to 128.And 25% dropout of the nodes is executed in this step for the reduction of over fitting.

Figure 1 :
Figure 1: Architecture for Gender Recognition System

Fig. 1 .
Fig. 1.(a) Image of result if there is a female person in the video,(b) Image of the result if there are a group of people  If the system detects a group of people in the picture then it classifies the people as female and male and then then it displays colored boxes and accuracy according to the gender it identified earlier .
). Dutch database was used for the feature extraction, training and testing of the classifier.96% accuracy is obtained for gender detection as claimed by the author in this Paper In 2009, M. H. Sedaaghi et.al. used probabilistic neural network, Support Vector Machine, KNN and GMM classifier for recognizing the age and gender of a speaker based on speech International Journal of Advanced Research in Science, Communication and Technology (IJARSCT) www.ijarsct.co.inImpact Factor: 6.252