This facial attribute extraction program detects facial coordinates using FaceNet model and uses MXNet facial attribute extraction model for extracting 40 types of facial attributes. This solution detects Emotion, Age and Gender along with facial attributes.
Deep Learning Models used for the library are,
- FaceNet model used for facial landmark recognition.
- A trained lightened moon Mxnet model used for facial attribute extraction.
- AgeNet pre-trained caffe model used for Age detection.
- GenderNet caffe model used for Gender detection.
- Getting started
- Features
- Facial Attribute Classes
- Emotion Detection Classes
- Gender Detection Classes
- Age Detection Classes
- Usage
- Results
- Want to Contribute?
- Need Help / Support?
- Collection of Other Components
- Changelog
- Credits
- License
- Keywords
Prerequisites for running the code are:
- Python == 3.6
- python-opencv == 4.2.0
- numpy == 1.18.5
- pandas == 0.24.2
- Keras == 2.2.4
- mxnet == 1.6.0
- python-dotenv == 0.14.0
- imageio == 2.4.1
We have tested our program in above version, however you can use it in other versions as well.
Replace "your/path/to/folder/" in .env file with path of your system.
My username is abc, replace that with your system username.
Eg: FACEDETECTOR = "/home/abc/AIML-Human-Attributes-Detection-with-Facial-Feature-Extraction/model/facenet/opencv_face_detector.pbtxt"
- Face detection using FaceNet model
- Detects facial attribute of a face in an image.
- Detects Emotions on the face.
- Predicts Gender of the detected face.
- Predicts Age of the detected face.
["5_o_Clock_Shadow","Arched_Eyebrows","Attractive","Bags_Under_Eyes","Bald", "Bangs","Big_Lips","Big_Nose",
"Black_Hair","Blond_Hair","Blurry","Brown_Hair","Bushy_Eyebrows","Chubby","Double_Chin","Eyeglasses","Goatee",
"Gray_Hair", "Heavy_Makeup","High_Cheekbones","Male","Mouth_Slightly_Open","Mustache","Narrow_Eyes","No_Beard",
"Oval_Face","Pale_Skin","Pointy_Nose","Receding_Hairline","Rosy_Cheeks","Sideburns","Smiling","Straight_Hair",
"Wavy_Hair","Wearing_Earrings","Wearing_Hat","Wearing_Lipstick","Wearing_Necklace","Wearing_Necktie","Young"]
- Happy
- Neutral
- Surprise
- Angry
- Fear
- Sad
- Disgust
- Male
- Female
['(0-2)', '(4-6)', '(8-12)', '(15-20)', '(25-32)', '(38-43)', '(48-53)', '(60-100)']
Inside the project's directory run:
python predict.py
You can find sample images in the Dataset folder and results can be seen on the terminal. Results directory contains images with detected faces.
- Created something awesome, made this code better, added some functionality, or whatever (this is the hardest part).
- Fork it.
- Create new branch to contribute your changes.
- Commit all your changes to your branch.
- Submit a pull request.
We also provide a free, basic support for all users who want to use image processing techniques for their projects. In case you want to customize this image enhancement technique for your development needs, then feel free to contact our AI/ML developers.
We have built many other components and free resources for software development in various programming languages. Kindly click here to view our Free Resources for Software Development.
Detailed changes for each release are documented in CHANGELOG.md.
- Refered mxnet-face for attribute extraction. mxnet-face.
- Refered fer2013/IMDB for emotional classification. fer2013/IMDB.
- Refered AgeGender recognition. AgeGender.
Mxnet_face, facial_attribute_extraction, Age_recognition, gender_recognition, emotion_recognition, caffemodel, fer2013