Community
cancel
Showing results for 
Search instead for 
Did you mean: 
alexandra
Beginner
193 Views

age-gender-recognition-retail-0013 output

Good afternoon!
I try to write the output of age-gender-recognition-retail-0013. But I don't understand what the numbers mean in layers 'age_conv3' and 'prob'.

Yeah, 'age_conv3' is age but how i can understand how much it? I must to multiply on 100 and then I will see real age? For example, the age_conv3' contains '0.2519f. It is 25.19 years or not? I have doubts because its output for default first image in site with description of this model and it is 18.97 years. Why?

And I think, that if number in 'prob' is bigger than 0.5 it's female else male. Right?

Maybe, there is documentation for this problems but i didn't find. However, I found the sample 'Interactive Face Detection C++ Demo' but i didn’t find solution in it.

Thank you in advance!

 

0 Kudos
2 Replies
193 Views

Hi Alexandra,

Interactive_face_detection_demo C++ project can be referred for more details.

detectors.cpp :- 

AgeGenderDetection::Result AgeGenderDetection::operator[] (int idx) const {
    Blob::Ptr  genderBlob = request->GetBlob(outputGender); //outputGender="prob"
    Blob::Ptr  ageBlob    = request->GetBlob(outputAge); //outputAge="age_conv3"

    AgeGenderDetection::Result r = {ageBlob->buffer().as<float*>()[idx] * 100,
                                         genderBlob->buffer().as<float*>()[idx * 2 + 1]};
    if (doRawOutputMessages) {
        std::cout << "[" << idx << "] element, male prob = " << r.maleProb << ", age = " << r.age << std::endl;
    }

    return r;
}


For my sample the ageBlob->buffer().as<float*>()[idx] was 0.233105145  and genderBlob->buffer().as<float*>()[idx * 2 + 1] was 0.984277546.

Since age is in probability measure, multiplied it by 100 to get  r.age=23.3105145 and r.maleprob=0.984277546.

alexandra
Beginner
193 Views

Hemanth Kumar G. (Intel) wrote:

Hi Alexandra,

Interactive_face_detection_demo C++ project can be referred for more details.

detectors.cpp :- 

AgeGenderDetection::Result AgeGenderDetection::operator[] (int idx) const {
    Blob::Ptr  genderBlob = request->GetBlob(outputGender); //outputGender="prob"
    Blob::Ptr  ageBlob    = request->GetBlob(outputAge); //outputAge="age_conv3"

    AgeGenderDetection::Result r = {ageBlob->buffer().as<float*>()[idx] * 100,
                                         genderBlob->buffer().as<float*>()[idx * 2 + 1]};
    if (doRawOutputMessages) {
        std::cout << "[" << idx << "] element, male prob = " << r.maleProb << ", age = " << r.age << std::endl;
    }

    return r;
}


For my sample the ageBlob->buffer().as<float*>()[idx] was 0.233105145  and genderBlob->buffer().as<float*>()[idx * 2 + 1] was 0.984277546.

Since age is in probability measure, multiplied it by 100 to get  r.age=23.3105145 and r.maleprob=0.984277546.

Yes, I thought so, but doubted. Thank you so much!

Reply