Commit 3de65631c5743cdf87fadfcb109a9907e5936184
1 parent
b3488cbf
treat 0,0 like -1,-1 and NaN,NaN
Showing
1 changed file
with
3 additions
and
2 deletions
openbr/core/eval.cpp
| ... | ... | @@ -866,10 +866,11 @@ float EvalLandmarking(const QString &predictedGallery, const QString &truthGalle |
| 866 | 866 | QList<QPointF> truthPoints = truth[truthIndex].file.points(); |
| 867 | 867 | |
| 868 | 868 | // Standardize how we represent unlabeled points here |
| 869 | - const QPointF find(-1,-1); | |
| 869 | + const QPointF findNegOne(-1,-1); | |
| 870 | + const QPointF findZero(0,0); | |
| 870 | 871 | const QPointF replace(std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN()); |
| 871 | 872 | for (int j=0; j<truthPoints.size(); j++) |
| 872 | - if (truthPoints[j] == find) | |
| 873 | + if ((truthPoints[j] == findNegOne) || (truthPoints[j] == findZero)) | |
| 873 | 874 | truthPoints[j] = replace; |
| 874 | 875 | |
| 875 | 876 | if (normalizationIndexA >= truthPoints.size()) qFatal("Normalization index A is out of range."); | ... | ... |