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.
6392 Discussions

Need help porting custom age/gender model to openvino

Biradar__Abhishek
988 Views

Hi All,

Age/Gender model provided by openvino at this link doesn't support age less than 18 years, For our project we need a model which support age less than 18 years.

Currently we have a keras based wideresnet model integrated in our project for Age/Gender.  We need to get it ported to openvino platform as it supports age less than 18 years.

Step 1 : I used the keras_To_tensorflow.py attached in this file to convert to tensorflow model.

Step 2 : Then used the command "python3 mo_tf.py --input_model AgeNGender.pb --input_shape "[1, 64, 64, 3]" --data_type FP32" to create a openvino mode.

I used tensorflow cc based c++ code to check if the output of step 1 is working fine or not,  And noticed that the model works fine.   But when I use the output of step 2 with the "/opt/intel/openvino/deployment_tools/open_model_zoo/demos/interactive_face_detection_demo" code shared with sdk I always get age between 1-20 and gender as female always.

Can you guys please help me with getting this model working on openvino.

Thanks,

Abhishek

 

0 Kudos
6 Replies
JAIVIN_J_Intel
Employee
988 Views

Hi Abhishek,

Can you please try using --reverse_input_channels parameter with the model optimizer command that you have specified.

You may also refer to When to Reverse Input Channels for more information.

Let us know if this helps.

Regards,

Jaivin

0 Kudos
Biradar__Abhishek
988 Views

I tried the above option didn't help,  Results are still the same!!

0 Kudos
HemanthKum_G_Intel
988 Views

Hi Abhishek,

Can you share your tensorflow cc based c++ code to check the code structure and values of output layers?

0 Kudos
Biradar__Abhishek
988 Views

.

0 Kudos
Biradar__Abhishek
988 Views

Hi,

I got it working!! 

Thanks,

Abhishek

0 Kudos
Biradar__Abhishek
988 Views

Hi,

input is a [1,64,64,3] image, output are two soft max layer..  first one is for gender with 2 outputs and second has 101 output representing age..

    inputLayer = "input_1";
    outputLayer = {"dense_1/Softmax", "dense_2/Softmax"};

0 Kudos
Reply