Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6570 ディスカッション

Age and Gender Detection in Python

Duggy
新規コントリビューター I
2,031件の閲覧回数

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!

ラベル(1)
0 件の賞賛
1 解決策
Vladimir_Dudnik
従業員
1,983件の閲覧回数

@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.

元の投稿で解決策を見る

4 返答(返信)
Vladimir_Dudnik
従業員
2,010件の閲覧回数

@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?

Duggy
新規コントリビューター I
1,999件の閲覧回数

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.

 

Vladimir_Dudnik
従業員
1,984件の閲覧回数

@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.

Wan_Intel
モデレーター
1,930件の閲覧回数

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


返信