Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #15

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 13 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Gender-and-Age-Detection <img alt="GitHub" src="https://img.shields.io/github/license/smahesh29/Gender-and-Age-Detection">
# Age-Detection Of Insulators <img alt="GitHub" src="https://img.shields.io/github/license/smahesh29/Gender-and-Age-Detection">


<h2>Objective :</h2>
<p>To build a gender and age detector that can approximately guess the gender and age of the person (face) in a picture or through webcam.</p>
<p>To Determine the age of insulator.</p>

<h2>About the Project :</h2>
<p>In this Python Project, I had used Deep Learning to accurately identify the gender and age of a person from a single image of a face. I used the models trained by <a href="https://talhassner.github.io/home/projects/Adience/Adience-data.html">Tal Hassner and Gil Levi</a>. 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, I made this a classification problem instead of making it one of regression.</p>
<p>In this Python Project, I had used Deep Learning to accurately identify the aging of insulators <a href="https://ars.els-cdn.com/content/image/1-s2.0-S0142941823001034-gr2_lrg.jpg</a>. The age is predicted as per usage of insulator when it is exposed to air .</p>

<h2>Dataset :</h2>
<p>For this python project, I had used the Adience dataset; the dataset is available in the public domain and you can find it <a href="https://www.kaggle.com/ttungl/adience-benchmark-gender-and-age-classification">here</a>. 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 I used had been trained on this dataset.</p>
<p>For this python project, I had used the Adience dataset; the dataset is available in the public domain and you can find it <a href="https://www.kaggle.com/ttungl/adience-benchmark-gender-and-age-classification">here</a>. This dataset serves as a benchmark for face photos and is inclusive of various real-world imaging conditions like noise, lighting, hydrophobic, and appearance. The images have been collected from drones taken /from the data set and distributed under the Creative Commons (CC) license. It has a total of 13,000 photos of Labels :5373 photos containing the Val, Train,Test subjects and is about 1GB in size. The models I used had been trained on this dataset.</p>

<h2>Additional Python Libraries Required :</h2>
<ul>
Expand All @@ -24,16 +24,16 @@

<h2>The contents of this Project :</h2>
<ul>
<li>opencv_face_detector.pbtxt</li>
<li>opencv_face_detector_uint8.pb</li>
<li>opencv_age_detector.pbtxt</li>
<li>opencv_age_detector_uint8.pb</li>
<li>age_deploy.prototxt</li>
<li>age_net.caffemodel</li>
<li>gender_deploy.prototxt</li>
<li>gender_net.caffemodel</li>
<li>insulator_deploy.prototxt</li>
<li>insulator_net.caffemodel</li>
<li>a few pictures to try the project on</li>
<li>detect.py</li>
</ul>
<p>For face detection, we have a .pb file- this is a protobuf file (protocol buffer); it holds the graph definition and the trained weights of the model. We can use this to run the trained model. And while a .pb file holds the protobuf in binary format, one with the .pbtxt extension holds it in text format. These are TensorFlow files. For age and gender, the .prototxt files describe the network configuration and the .caffemodel file defines the internal states of the parameters of the layers.</p>
<p>agee detection, we have a .pb file- this is a protobuf file (protocol buffer); it holds the graph definition and the trained weights of the model. We can use this to run the trained model. And while a .pb file holds the protobuf in binary format, one with the .pbtxt extension holds it in text format. These are TensorFlow files. For age and gender, the .prototxt files describe the network configuration and the .caffemodel file defines the internal states of the parameters of the layers.</p>

<h2>Usage :</h2>
<ul>
Expand All @@ -45,7 +45,7 @@
</ul>
<p><b>Note: </b>The Image should be present in same folder where all the files are present</p>
<ul>
<li><b>Detecting Gender and Age of face through webcam</b> Use Command :</li>
<li><b>Detecting Age of insulator through image </b> Use Command :</li>

python detect.py
</ul>
Expand All @@ -54,50 +54,10 @@
</ul>

# Working:
[![Watch the video](https://img.youtube.com/vi/ReeccRD21EU/0.jpg)](https://youtu.be/ReeccRD21EU)

<h2>Examples :</h2>
<p><b>NOTE:- I downloaded the images from Google,if you have any query or problem i can remove them, i just used it for Educational purpose.</b></p>

>python detect.py --image girl1.jpg
Gender: Female
Age: 25-32 years

<img src="Example/Detecting age and gender girl1.png">

>python detect.py --image girl2.jpg
Gender: Female
Age: 8-12 years

<img src="Example/Detecting age and gender girl2.png">

>python detect.py --image kid1.jpg
Gender: Male
Age: 4-6 years

<img src="Example/Detecting age and gender kid1.png">

>python detect.py --image kid2.jpg
Gender: Female
Age: 4-6 years

<img src="Example/Detecting age and gender kid2.png">

>python detect.py --image man1.jpg
Gender: Male
Age: 38-43 years

<img src="Example/Detecting age and gender man1.png">
<h2>Examples :</h2>
<p><b>NOTE:- I downloaded the images from Google,if you have any query or problem i can remove them, i just used it for future purpose.</b></p>

>python detect.py --image man2.jpg
Gender: Male
Age: 25-32 years

<img src="Example/Detecting age and gender man2.png">

>python detect.py --image woman1.jpg
Gender: Female
Age: 38-43 years

<img src="Example/Detecting age and gender woman1.png">