{"id":2483,"date":"2021-09-03T09:00:31","date_gmt":"2021-09-03T01:00:31","guid":{"rendered":"https:\/\/blog.ailia.ai\/uncategorized\/agegenderrecognitionretail-machine-learning-model-for-age-and-gender-identification\/"},"modified":"2025-05-20T16:18:45","modified_gmt":"2025-05-20T08:18:45","slug":"agegenderrecognitionretail-machine-learning-model-for-age-and-gender-identification","status":"publish","type":"post","link":"https:\/\/blog.ailia.ai\/en\/tips-en\/agegenderrecognitionretail-machine-learning-model-for-age-and-gender-identification\/","title":{"rendered":"AgeGenderRecognitionRetail : A Machine Learning Model to Identify Age and Gender"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\" id=\"7b41\"><strong>Overview<\/strong><\/h3>\n\n\n\n<p id=\"a880\"><em>AgeGenderRecognitionRetail\u00a0<\/em>is a machine learning model developed by\u00a0<em>Intel\u00a0<\/em>to identify the age and gender of a person from a single picture.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"540\" src=\"https:\/\/blog.ailia.ai\/wp-content\/uploads\/image-41.jpg\" alt=\"\" class=\"wp-image-266\"\/><figcaption class=\"wp-element-caption\">Source: <a href=\"https:\/\/pixabay.com\/ja\/videos\/%E3%82%AB%E3%83%83%E3%83%97%E3%83%AB-%E8%8B%A5%E3%81%84%E3%81%A7%E3%81%99-%E9%9B%BB%E8%A9%B1-50020\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/pixabay.com\/ja\/videos\/%E3%82%AB%E3%83%83%E3%83%97%E3%83%AB-%E8%8B%A5%E3%81%84%E3%81%A7%E3%81%99-%E9%9B%BB%E8%A9%B1-50020\/<\/a><\/figcaption><\/figure>\n\n\n\n<p><a href=\"https:\/\/github.com\/openvinotoolkit\/open_model_zoo\/tree\/master\/models\/intel\/age-gender-recognition-retail-0013?source=post_page-----3632935d19ec--------------------------------\" rel=\"noreferrer noopener\" target=\"_blank\"><\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/openvinotoolkit\/open_model_zoo\/tree\/master\/models\/intel\/age-gender-recognition-retail-0013\" target=\"_blank\" rel=\"noreferrer noopener\">open_model_zoo\/models\/intel\/age-gender-recognition-retail-0013<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"7b25\"><strong>Architecture<\/strong><\/h3>\n\n\n\n<p id=\"6a03\"><em>AgeGenderRecognitionRetail\u00a0<\/em>takes a 62&#215;62 face image as input, and outputs the gender and age. The gender is output as a two-dimensional probability vector, and the age as a number.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"267\" height=\"338\" src=\"https:\/\/blog.ailia.ai\/wp-content\/uploads\/image-40.png\" alt=\"\" class=\"wp-image-265\"\/><figcaption class=\"wp-element-caption\">Source: <a href=\"https:\/\/github.com\/openvinotoolkit\/open_model_zoo\/tree\/master\/models\/intel\/age-gender-recognition-retail-0013\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/openvinotoolkit\/open_model_zoo\/tree\/master\/models\/intel\/age-gender-recognition-retail-0013<\/a><\/figcaption><\/figure>\n\n\n\n<p id=\"c06e\">The age is output as a value between 0 and 1.0 which has to be multiplied by 100 to compute the age.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"875\" height=\"300\" src=\"https:\/\/blog.ailia.ai\/wp-content\/uploads\/image-39.png\" alt=\"\" class=\"wp-image-264\"\/><figcaption class=\"wp-element-caption\">Source: <a href=\"https:\/\/github.com\/openvinotoolkit\/open_model_zoo\/blob\/master\/demos\/interactive_face_detection_demo\/cpp\/detectors.cpp\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/openvinotoolkit\/open_model_zoo\/blob\/master\/demos\/interactive_face_detection_demo\/cpp\/detectors.cpp<\/a><\/figcaption><\/figure>\n\n\n\n<p id=\"d8ac\">The model architecture is a simple CNN. Caffe was used for training.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1031\" height=\"1009\" src=\"https:\/\/blog.ailia.ai\/wp-content\/uploads\/image-38.png\" alt=\"\" class=\"wp-image-263\"\/><\/figure>\n\n\n\n<p id=\"0c68\"><em>AgeGenderRecognitionRetail<\/em>&nbsp;was trained using Intel\u2019s internal dataset made of 20,000 images. This model is capable of recognizing ages from 18 to 75 years old. A person under the age of 18 cannot be accurately estimated since the dataset did not contain images of children.<\/p>\n\n\n\n<p id=\"7edd\">Faces facing the camera with an angle up to 45 degrees are supported. Since the accuracy is higher with faces facing the camera, it is desirable to use a face orientation detection model such as&nbsp;<a href=\"https:\/\/medium.com\/axinc-ai\/hope-net-a-machine-learning-model-for-estimating-face-orientation-83d5af26a513\"><em>HopeNet<\/em><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"429\" height=\"339\" src=\"https:\/\/blog.ailia.ai\/wp-content\/uploads\/image-35.png\" alt=\"\" class=\"wp-image-260\"\/><figcaption class=\"wp-element-caption\">Source: <a href=\"https:\/\/github.com\/openvinotoolkit\/open_model_zoo\/tree\/master\/models\/intel\/age-gender-recognition-retail-0013\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/openvinotoolkit\/open_model_zoo\/tree\/master\/models\/intel\/age-gender-recognition-retail-0013<\/a><\/figcaption><\/figure>\n\n\n\n<p id=\"5cb2\">The average error for the age estimation is 6.99 years, and the accuracy of the gender estimation is 95.80%.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"297\" height=\"194\" src=\"https:\/\/blog.ailia.ai\/wp-content\/uploads\/image-37.png\" alt=\"\" class=\"wp-image-262\"\/><figcaption class=\"wp-element-caption\">Source: <a href=\"https:\/\/github.com\/openvinotoolkit\/open_model_zoo\/tree\/master\/models\/intel\/age-gender-recognition-retail-0013\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/openvinotoolkit\/open_model_zoo\/tree\/master\/models\/intel\/age-gender-recognition-retail-0013<\/a><\/figcaption><\/figure>\n\n\n\n<p id=\"2b49\">In the official demo application, when the model is applied to videos, the tracking of faces is smoothed over multiple frames. Age is updated by 5%, and gender is calculated by summing the probability values.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"523\" height=\"281\" src=\"https:\/\/blog.ailia.ai\/wp-content\/uploads\/image-36.png\" alt=\"\" class=\"wp-image-261\"\/><figcaption class=\"wp-element-caption\">Source: <a href=\"https:\/\/github.com\/openvinotoolkit\/open_model_zoo\/blob\/master\/demos\/interactive_face_detection_demo\/cpp\/face.cpp\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/openvinotoolkit\/open_model_zoo\/blob\/master\/demos\/interactive_face_detection_demo\/cpp\/face.cpp<\/a><\/figcaption><\/figure>\n\n\n\n<p id=\"9cb8\">Even when the person is wearing a mask, a face properly facing the camera can be detected with a reasonable degree of accuracy.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"853\" src=\"https:\/\/blog.ailia.ai\/wp-content\/uploads\/image-41-1.jpg\" alt=\"\" class=\"wp-image-267\"\/><figcaption class=\"wp-element-caption\">Source: <a href=\"https:\/\/pixabay.com\/ja\/photos\/%e7%9c%8b%e8%ad%b7%e5%a9%a6-%e3%83%9e%e3%82%b9%e3%82%af%e3%82%b5%e3%83%bc%e3%82%b8%e3%82%ab%e3%83%ab%e3%83%9e%e3%82%b9%e3%82%af-4962034\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/pixabay.com\/ja\/photos\/%e7%9c%8b%e8%ad%b7%e5%a9%a6-%e3%83%9e%e3%82%b9%e3%82%af%e3%82%b5%e3%83%bc%e3%82%b8%e3%82%ab%e3%83%ab%e3%83%9e%e3%82%b9%e3%82%af-4962034\/<\/a><\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"e471\"><strong>Usage<\/strong><\/h3>\n\n\n\n<p id=\"260d\">AgeGenderRecognitionRetail can be used with ailia SDK on the webcam video stream with the following command.<\/p>\n\n\n\n<p><code>$ python3 age-gender-recognition-retail.py -v 0<\/code><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/axinc-ai\/ailia-models\/tree\/master\/face_recognition\/age-gender-recognition-retail?source=post_page-----3632935d19ec--------------------------------\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><a href=\"https:\/\/github.com\/axinc-ai\/ailia-models\/tree\/master\/face_recognition\/age-gender-recognition-retail\" target=\"_blank\" rel=\"noreferrer noopener\">ailia-models\/face_recognition\/age-gender-recognition-retail<\/a><\/p>\n\n\n\n<p>Use the following command to estimate the age after face recognition if performed for images in a specific folder.<\/p>\n\n\n\n<p><code>$ python3 age-gender-recognition-retail.py -i faces -d<\/code><\/p>\n\n\n\n<p id=\"0d45\">Here is an output example.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"ailia MODELS : AgeGenderRecognitionRetail\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/LI79oYR3M94?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p id=\"6298\"><a href=\"https:\/\/axinc.jp\/en\/\" rel=\"noreferrer noopener\" target=\"_blank\">ax Inc.<\/a>&nbsp;has developed&nbsp;<a href=\"https:\/\/ailia.jp\/en\/\" rel=\"noreferrer noopener\" target=\"_blank\">ailia SDK<\/a>, which enables cross-platform, GPU-based rapid inference.<\/p>\n\n\n\n<p id=\"6298\">ax Inc. provides a wide range of services from consulting and model creation, to the development of AI-based applications and SDKs. Feel free to&nbsp;<a href=\"https:\/\/axinc.jp\/en\/\" rel=\"noreferrer noopener\" target=\"_blank\">contact us<\/a>&nbsp;for any inquiry.<\/p>\n\n\n\n<p><a href=\"https:\/\/medium.com\/@kyakuno?source=post_page-----3632935d19ec--------------------------------\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview AgeGenderRecognitionRetail\u00a0is a machine learning model developed by\u00a0Intel\u00a0to identify the age and gender of a person from a single picture. open_model_zoo\/models\/intel\/age-gender-recognition-retail-0013 Architecture AgeGenderRecognitionRetail\u00a0takes a 62&#215;62 face image as input, and outputs the gender and age. The gender is output as a two-dimensional probability vector, and the age as a number. The age is output as a value between 0 and 1.0 which has to be multiplied by 100 to compute the age. The model architecture is a simple CNN. Caffe was used for training. AgeGenderRecognitionRetail&nbsp;was trained using Intel\u2019s internal dataset made of 20,000 images. This model is capable of recognizing ages from 18 to 75 years old. A person under [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":2419,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[255],"tags":[266],"class_list":["post-2483","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips-en","tag-ailiamodels-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.ailia.ai\/en\/wp-json\/wp\/v2\/posts\/2483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ailia.ai\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ailia.ai\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ailia.ai\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ailia.ai\/en\/wp-json\/wp\/v2\/comments?post=2483"}],"version-history":[{"count":1,"href":"https:\/\/blog.ailia.ai\/en\/wp-json\/wp\/v2\/posts\/2483\/revisions"}],"predecessor-version":[{"id":2485,"href":"https:\/\/blog.ailia.ai\/en\/wp-json\/wp\/v2\/posts\/2483\/revisions\/2485"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ailia.ai\/en\/wp-json\/wp\/v2\/media\/2419"}],"wp:attachment":[{"href":"https:\/\/blog.ailia.ai\/en\/wp-json\/wp\/v2\/media?parent=2483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ailia.ai\/en\/wp-json\/wp\/v2\/categories?post=2483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ailia.ai\/en\/wp-json\/wp\/v2\/tags?post=2483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}