09-16-2020 05:23 AM
Is there any support for age and gender classification using the Vitis-AI landmark application?
I have seen the below Vitis-AI facelandmark.hpp file where they mentioned that Facelandmark model can be used for facelandmark, age and gender classification.
But when I am trying to get the age and gender classification result from the landmark application it is throwing the error that the age and gender is not a member of FaceLandmark class
But by using the SDK_AI package I can able to get the age and gender classification results as well
Just wanted to confirm is it removed from the Vitis-AI facelandmark application?
Can anyone confirm once?
09-23-2020 12:34 AM
Hi @deepg799 ,
Just got cofirmation from dev contact. Yes, the age and gender support is removed from Vitis AI.
If you have particular support request for that I would suggest you to contact Xilinx FAE.
09-20-2020 07:57 PM
Hi @deepg799 ,
What code/reference did you refer to? And would you share the details of your code and the error message?
09-20-2020 09:53 PM - edited 09-20-2020 09:57 PM
The below AI-sample application I used for the same.
https://github.com/Xilinx/Vitis-AI/tree/v1.2/Vitis-AI-Library/overview/samples/facelandmark
In the above application I modified the file "process_result.hpp" file as shown below"
#include <iostream>
#include <opencv2/opencv.hpp>
#include <string>
cv::Mat process_result(cv::Mat &image,
const vitis::ai::FaceLandmarkResult &result,
bool is_jpeg) {
auto points = result.points;
/* Modified to read the age and gender result */
std::cout << "Age : " << result.age;
std::cout << "Gender : " << result.gender;
LOG_IF(INFO, is_jpeg) << "points "; //
for (int i = 0; i < 5; ++i) {
LOG_IF(INFO, is_jpeg) << points[i].first << " " << points[i].second;
auto point = cv::Point{static_cast<int>(points[i].first * image.cols),
static_cast<int>(points[i].second * image.rows)};
cv::circle(image, point, 3, cv::Scalar(255, 8, 18), -1);
}
return image;
}
The error I am getting is:
age and gender undefined in FaceLandMark class
09-20-2020 11:58 PM
Hi @deepg799 ,
struct FaceLandmarkResult {
/// Five key points coordinate, this array of <x,y> has 5 elements ,x / y is
/// normalized relative to width / height, the value range from 0 to 1.
std::array<std::pair<float, float>, 5> points;
};
It is expected behavior if you tried to visit a non-existent member.
Let me double check with dev team if age and gender can be supported in laster VAI SW stack.
09-21-2020 04:52 AM - edited 09-21-2020 04:52 AM
Hii @jasonwu
thanks for your update.
yes, you are right.
But age and gender support is present for SDK_AI facelandmark application
It will be helpful if you could confirm the same once why it is removed from the vitis-AI stack.
09-23-2020 12:34 AM
Hi @deepg799 ,
Just got cofirmation from dev contact. Yes, the age and gender support is removed from Vitis AI.
If you have particular support request for that I would suggest you to contact Xilinx FAE.
09-30-2020 07:48 AM
Thanks for your valuable support.