- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is there a face (Age and Gender) detection demo in python? I see the C++ but struggling to create a python equivalent.
Much appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Duggy it depends on what is your goal. It should relatively easy to call age-gender-recognition-retail-0013 or emotions-recognition-retail-0003 models in Python, just notice, they take as input a crop of input image with detected face, so practically, you will need to call some face detection model, then pass crops with detected faces to these models as input, one by one, if image contains many faces. But for test purposes you may prepare such crops by any way (and store as small image files) outside of your test.
Then you may try to modify Python face_recognition_demo, which already detects faces on input image, to extend it with call for age-and-gender or/and emotions detectors. You will need extend FrameProcessor class and draw_detections function in face_recognition.py file with adding infer for new models and drawing results.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Duggy we do not have python demo for age and gender or emotions recognition models. But what kind of difficulties do you have in creating python application for these models? Is that not clear how to run inference in python with OpenVINO?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Was hoping to utilize an existing demo to make life easier. Not sure which one would be the easiest to implement rather than starting from scratch.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Duggy it depends on what is your goal. It should relatively easy to call age-gender-recognition-retail-0013 or emotions-recognition-retail-0003 models in Python, just notice, they take as input a crop of input image with detected face, so practically, you will need to call some face detection model, then pass crops with detected faces to these models as input, one by one, if image contains many faces. But for test purposes you may prepare such crops by any way (and store as small image files) outside of your test.
Then you may try to modify Python face_recognition_demo, which already detects faces on input image, to extend it with call for age-and-gender or/and emotions detectors. You will need extend FrameProcessor class and draw_detections function in face_recognition.py file with adding infer for new models and drawing results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladimir_Dudnik,
Thank you for providing your solutions in the community!
Hi Duggy,
This thread will no longer be monitored since this issue has been resolved.
If you need any additional information from Intel, please submit a new question.
Regards,
Wan

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page