Age and Gender Detection Using CNN and OpenCV

This application detects the age and gender from a stream video. First it detects the face from video using the HAAR CASCADE which is the Machine learning Object detection Algorithm. This object detection algorithm select the face part only and discard the remaining part. And then o

2025-06-28 16:30:09 - Adil Khan

Project Title

Age and Gender Detection Using CNN and OpenCV

Project Area of Specialization Artificial IntelligenceProject Summary

This application detects the age and gender from a stream video. First it detects the face from video using the HAAR CASCADE which is the Machine learning Object detection Algorithm. This object detection algorithm select the face part only and discard the remaining part. And then our application predicts the age and detects the gender. Once the age and gender are detected accurately then it take the image from stream video and stored into the database. and this image we will use in future for the different purpose like security purpos, University Profling, etc.

Project Objectives

Our project is based on the age and gender detection from single face image of any person. Age and gender, are facial attributes which play a very foundational role in social interactions by making age and gender estimation from a single face image. It is an important task in intelligent applications, such as access control, human-computer interaction, law enforcement, marketing intelligence and visual surveillance, etc.

The world’s population is ageing and almost every country is experiencing growth in the number of different age group. It is arbitrary to define the age of person because biological age varies from person to person. This paper consist to age and gender detection from single image or from a stream video.

Firstly the web cam captures the picture of person that would be male or female, and may belong to any age group. Then it store in the computer. The CNN identify the image with the help of image pixels and store in form of filter. This filter will be any type like edge filter, color filter, and curve filter. This filter will be of any size. In this filter there are random values. Then CNN scan these random values and gives the setup values which help to identify the image properties. Similarly the other properties of image like eye, nose, ear etc. are feed in Convolutional layers. This convolutional layer output will be feed in the fully connected layer which result help in classification. And finally the machine checks the image that the person will be male or female and what is age of this person. This checking performs with the help of sigmoid function.

Because this project will help for university profiling. It also help that how many people will come into university and what is the age and gender of the person. This will use in security purpose. And this data store which will be helpful to know how many male students and how many female student entered in the university on a particular day and also will identify their ages. There are a lot of project about the gender only and the age only and the accuracy is the main factor of this project. The main reason is that the accuracy of many projects is less than 70 percent. In our project will accurate our model.

Project Implementation Method

The predicted gender may be one of ‘Male’ and ‘Female’, and the predicted age may be one of the following ranges- (0 – 2), (4 – 6), (8 – 12), (15 – 20), (25 – 32), (38 – 43), (48 – 53), (60 – 100) (8 nodes in the final softmax layer). It is very difficult to accurately guess an exact age from a single image because of factors like makeup, lighting, obstructions, and facial expressions. And so, we make this a classification problem instead of making it one of regression [1]. In the above research paper the gender prediction accuracy is the less and the age is not specific one but in the form of following range.

this project will apply in the different areas like University, Shopping Malls, etc. we make the application which is apply on CCTV Camera.

Benefits of the Project

We will use this project for university profiling. This camera fix in the university gate and record the stream. Our project capture the people image and generate the real time age and gender. Label it and store it which is use in future. This project will also use in commercial sites.

Technical Details of Final Deliverable Final Deliverable of the Project HW/SW integrated systemCore Industry SecurityOther IndustriesCore Technology Artificial Intelligence(AI)Other TechnologiesSustainable Development Goals Industry, Innovation and InfrastructureRequired Resources
Item Name Type No. of Units Per Unit Cost (in Rs) Total (in Rs)
Total in (Rs) 78338
VStarcam IP67 waterproof outdoor ip camera Equipment11500015000
ADATA 1TB SC685 - Up to 530 MB/s - 3D NAND USB Type-C, USB 3.2 Compact Equipment12800028000
Crucial 16GB DDR4 RAM For Laptop 2400/2666 MHz SODIMM 260-Pin Equipment21300026000
Businesses and organizations $ 58 /1st year Miscellaneous 193389338

More Posts