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.

BUG interactive_face_detection_demo

Alim_S_
Beginner
327 Views

In the example interactive_face_detection_demo there is an error in the detectors.cpp file in case of several faces

std::vector<float> FacialLandmarksDetection::operator[] (int idx) const {

....

    auto begin = n_lm * idx;
    auto end = begin + n_lm / 2;
    for (auto i_lm = begin; i_lm < end; ++i_lm) {
        float normed_x = normed_coordinates[2 * i_lm];
        float normed_y = normed_coordinates[2 * i_lm + 1];

        if (doRawOutputMessages) {
            std::cout << normed_x << ", " << normed_y << std::endl;
        }

        normedLandmarks.push_back(normed_x);
        normedLandmarks.push_back(normed_y);
    }

for fix, need to change to :

    auto begin = n_lm * idx;
    auto end = begin + n_lm;
    for(auto i_lm = begin; i_lm < end; i_lm += 2) 
    {
        float normed_x = normed_coordinates[i_lm];
        float normed_y = normed_coordinates[i_lm + 1];
        normedLandmarks.push_back(normed_x);
        normedLandmarks.push_back(normed_y);
    }

#endif
 

0 Kudos
0 Replies
Reply