Skip to content

Imran-Chaudhary/Face-Image-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Face-Image-Classification

Image recognition is an interesting topic and I am excited to exercises deep learning techniques to recognize human face image using age, gender and ethnicity attributes. Sequential models with variety of input layers were tested using Keras while compiling the model. Final face recognition shows an excellent accuracy score and acceptable MSE.

Data

Main data set is from UTKFace which has been downloaded and made it available to use. 27304 images with five columns, it was a reasonable size dataset. Features distribution and null/missing values were checked along with features relevancy. Keras / sklearn with Convolutional Neural Network models were used to perform the tasks. Random samples extracted from the data set

text

Exploratory Data Analysis - Data Insight

Three target variables Age, Gender and Ethnicity are mentioned categorizing the distribution.

Age- Ranging from 1-116 yrs

text

Gender - 0: Male, 1: Female

text

Ethnicity: 0: White, 1: Black, 2: Asian, 3: Indian, 4: Other

text

Features Relevancy

Shows the heatmap for feature's relevancy.

text

Deep Learning Models - Regression and Classification

As Age is considered to be the contineous variable (Regression Problem) and Gender, Ethnicity are considered (Classification Problem) due to categorical / binary variables.

Convolutional Neural Network - Age Prediction Model

Different batch sizes were tried as input, including 64,128,256 and 512 number of layers using 'relu' as an activation. Then image was flattened and output in a sigle layer and finally model was compiled using'adam' as an optimizer with measuring 'MSE'.

text

Loss and MSE - Age Model

text

Convolutional Neural Network - Gender Prediction Model

Similar number of input layers were used with 'simoid' as activation for binary classification. Mode was compiled using 'adam' as optimizer, binary_crossentropy as loss function and accuracy as metrics.

text text

Confusion Metrix show relatively bigger numbers for 'FP' and 'FN', which might be due to some images can't be recognized fully , i.e. kids.. text

Convolutional Neural Network - Ethnicity Prediction Model

Ethnicity model was tested using 'softma' as activation (for multi classification) , 'adam' as optimizer and accuracy as metrics.

text

text

Confusion metrics show the stronger prediction in category 0, 3 and 1.

text

Model Performence - Random Face Selection

Finally we took a test of randomly selecting face images and see that 'Gender' and 'Ethnicity' models have higher prediction where as 'Age' model sometimes show an offset of ~6-7 years which was the same as of MSE.

Actual VS Prediction

text text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published