zhangyux15 / 4d_association

code for cvpr2020 "4D Association Graph for Realtime Multi-person Motion Capture Using Multiple Video Cameras"
187 stars 32 forks source link

Possibly incorrect evaluation script #10

Open tijiang13 opened 4 years ago

tijiang13 commented 4 years ago

Hi, while this shouldn't be a thing for Shelf dataset, I think it's a good thing to point out that your evaluation script will possibly overestimate the score under certain circumstances.

Here is the part of your evaluation script:

// evaluate
std::map<int, Eigen::Matrix4Xf> shelfSkels;
for (const auto& skel : skelUpdater.GetSkel3d())
    shelfSkels.insert(std::make_pair(-skel.first, MappingToShelf(skel.second)));

Eigen::MatrixXf hungarianMat(shelfSkels.size(), gt[frameIdx].size());
for (int i = 0; i < shelfSkels.size(); i++)
    for (int j = 0; j < gt[frameIdx].size(); j++)
        hungarianMat(i, j) = (std::next(shelfSkels.begin(), i)->second -
            std::next(gt[frameIdx].begin(), j)->second).topRows(3).colwise().norm().sum();

for (const auto& matchPair : HungarianAlgorithm(hungarianMat)) {
    const auto shelfIter = std::next(shelfSkels.begin(), matchPair.second.x());
    const auto gtIter = std::next(gt[frameIdx].begin(), matchPair.second.y());
    const Eigen::VectorXi c = Evaluate(shelfIter->second, gtIter->second);
    const int identity = gtIter->first;
    auto iter = correctJCnt.find(identity);
    if (iter == correctJCnt.end())
        iter = correctJCnt.insert(std::make_pair(identity, std::vector<Eigen::VectorXi>())).first;
    iter->second.emplace_back(c);
}

Notice the cases where gt[frameIdx].size() > shelfSkels.size() (e.g. when your method fails to detect certain person in the frame), it will assume that person doesn't appear in that frame, which will lead to overestimation of final score.