Commit 796c0a59f5bb967382dbad42de1465431d064da8
1 parent
d1d6726d
variables renamed: input ==> gallery
Showing
2 changed files
with
19 additions
and
19 deletions
openbr/core/eval.cpp
| @@ -255,9 +255,9 @@ struct Counter | @@ -255,9 +255,9 @@ struct Counter | ||
| 255 | } | 255 | } |
| 256 | }; | 256 | }; |
| 257 | 257 | ||
| 258 | -void EvalClassification(const QString &predictedInput, const QString &truthInput, QString predictedProperty, QString truthProperty) | 258 | +void EvalClassification(const QString &predictedGallery, const QString &truthGallery, QString predictedProperty, QString truthProperty) |
| 259 | { | 259 | { |
| 260 | - qDebug("Evaluating classification of %s against %s", qPrintable(predictedInput), qPrintable(truthInput)); | 260 | + qDebug("Evaluating classification of %s against %s", qPrintable(predictedGallery), qPrintable(truthGallery)); |
| 261 | 261 | ||
| 262 | if (predictedProperty.isEmpty()) | 262 | if (predictedProperty.isEmpty()) |
| 263 | predictedProperty = "Label"; | 263 | predictedProperty = "Label"; |
| @@ -269,8 +269,8 @@ void EvalClassification(const QString &predictedInput, const QString &truthInput | @@ -269,8 +269,8 @@ void EvalClassification(const QString &predictedInput, const QString &truthInput | ||
| 269 | if (truthProperty.isEmpty()) | 269 | if (truthProperty.isEmpty()) |
| 270 | truthProperty = "Label"; | 270 | truthProperty = "Label"; |
| 271 | 271 | ||
| 272 | - TemplateList predicted(TemplateList::fromGallery(predictedInput)); | ||
| 273 | - TemplateList truth(TemplateList::fromGallery(truthInput)); | 272 | + TemplateList predicted(TemplateList::fromGallery(predictedGallery)); |
| 273 | + TemplateList truth(TemplateList::fromGallery(truthGallery)); | ||
| 274 | if (predicted.size() != truth.size()) qFatal("Input size mismatch."); | 274 | if (predicted.size() != truth.size()) qFatal("Input size mismatch."); |
| 275 | 275 | ||
| 276 | QHash<QString, Counter> counters; | 276 | QHash<QString, Counter> counters; |
| @@ -403,11 +403,11 @@ QString getDetectKey(const TemplateList &templates) | @@ -403,11 +403,11 @@ QString getDetectKey(const TemplateList &templates) | ||
| 403 | return ""; | 403 | return ""; |
| 404 | } | 404 | } |
| 405 | 405 | ||
| 406 | -float EvalDetection(const QString &predictedInput, const QString &truthInput, const QString &csv) | 406 | +float EvalDetection(const QString &predictedGallery, const QString &truthGallery, const QString &csv) |
| 407 | { | 407 | { |
| 408 | - qDebug("Evaluating detection of %s against %s", qPrintable(predictedInput), qPrintable(truthInput)); | ||
| 409 | - const TemplateList predicted(TemplateList::fromGallery(predictedInput)); | ||
| 410 | - const TemplateList truth(TemplateList::fromGallery(truthInput)); | 408 | + qDebug("Evaluating detection of %s against %s", qPrintable(predictedGallery), qPrintable(truthGallery)); |
| 409 | + const TemplateList predicted(TemplateList::fromGallery(predictedGallery)); | ||
| 410 | + const TemplateList truth(TemplateList::fromGallery(truthGallery)); | ||
| 411 | 411 | ||
| 412 | // Figure out which metadata field contains a bounding box | 412 | // Figure out which metadata field contains a bounding box |
| 413 | QString truthDetectKey = getDetectKey(truth); | 413 | QString truthDetectKey = getDetectKey(truth); |
| @@ -476,10 +476,10 @@ float EvalDetection(const QString &predictedInput, const QString &truthInput, co | @@ -476,10 +476,10 @@ float EvalDetection(const QString &predictedInput, const QString &truthInput, co | ||
| 476 | return averageOverlap; | 476 | return averageOverlap; |
| 477 | } | 477 | } |
| 478 | 478 | ||
| 479 | -float EvalLandmarking(const QString &predictedInput, const QString &truthInput, const QString &csv, int normalizationIndexA, int normalizationIndexB) | 479 | +float EvalLandmarking(const QString &predictedGallery, const QString &truthGallery, const QString &csv, int normalizationIndexA, int normalizationIndexB) |
| 480 | { | 480 | { |
| 481 | - (void) predictedInput; | ||
| 482 | - (void) truthInput; | 481 | + (void) predictedGallery; |
| 482 | + (void) truthGallery; | ||
| 483 | (void) csv; | 483 | (void) csv; |
| 484 | (void) normalizationIndexA; | 484 | (void) normalizationIndexA; |
| 485 | (void) normalizationIndexB; | 485 | (void) normalizationIndexB; |
| @@ -487,9 +487,9 @@ float EvalLandmarking(const QString &predictedInput, const QString &truthInput, | @@ -487,9 +487,9 @@ float EvalLandmarking(const QString &predictedInput, const QString &truthInput, | ||
| 487 | return 0; | 487 | return 0; |
| 488 | } | 488 | } |
| 489 | 489 | ||
| 490 | -void EvalRegression(const QString &predictedInput, const QString &truthInput, QString predictedProperty, QString truthProperty) | 490 | +void EvalRegression(const QString &predictedGallery, const QString &truthGallery, QString predictedProperty, QString truthProperty) |
| 491 | { | 491 | { |
| 492 | - qDebug("Evaluating regression of %s against %s", qPrintable(predictedInput), qPrintable(truthInput)); | 492 | + qDebug("Evaluating regression of %s against %s", qPrintable(predictedGallery), qPrintable(truthGallery)); |
| 493 | 493 | ||
| 494 | if (predictedProperty.isEmpty()) | 494 | if (predictedProperty.isEmpty()) |
| 495 | predictedProperty = "Regressor"; | 495 | predictedProperty = "Regressor"; |
| @@ -501,8 +501,8 @@ void EvalRegression(const QString &predictedInput, const QString &truthInput, QS | @@ -501,8 +501,8 @@ void EvalRegression(const QString &predictedInput, const QString &truthInput, QS | ||
| 501 | if (truthProperty.isEmpty()) | 501 | if (truthProperty.isEmpty()) |
| 502 | predictedProperty = "Regressand"; | 502 | predictedProperty = "Regressand"; |
| 503 | 503 | ||
| 504 | - const TemplateList predicted(TemplateList::fromGallery(predictedInput)); | ||
| 505 | - const TemplateList truth(TemplateList::fromGallery(truthInput)); | 504 | + const TemplateList predicted(TemplateList::fromGallery(predictedGallery)); |
| 505 | + const TemplateList truth(TemplateList::fromGallery(truthGallery)); | ||
| 506 | if (predicted.size() != truth.size()) qFatal("Input size mismatch."); | 506 | if (predicted.size() != truth.size()) qFatal("Input size mismatch."); |
| 507 | 507 | ||
| 508 | float rmsError = 0; | 508 | float rmsError = 0; |
openbr/core/eval.h
| @@ -26,10 +26,10 @@ namespace br | @@ -26,10 +26,10 @@ namespace br | ||
| 26 | float Evaluate(const QString &simmat, const QString &mask = "", const QString &csv = ""); // Returns TAR @ FAR = 0.001 | 26 | float Evaluate(const QString &simmat, const QString &mask = "", const QString &csv = ""); // Returns TAR @ FAR = 0.001 |
| 27 | float Evaluate(const cv::Mat &scores, const FileList &target, const FileList &query, const QString &csv = "", int parition = 0); | 27 | float Evaluate(const cv::Mat &scores, const FileList &target, const FileList &query, const QString &csv = "", int parition = 0); |
| 28 | float Evaluate(const cv::Mat &scores, const cv::Mat &masks, const QString &csv = ""); | 28 | float Evaluate(const cv::Mat &scores, const cv::Mat &masks, const QString &csv = ""); |
| 29 | - void EvalClassification(const QString &predictedInput, const QString &truthInput, QString predictedProperty="", QString truthProperty=""); | ||
| 30 | - float EvalDetection(const QString &predictedInput, const QString &truthInput, const QString &csv = ""); // Return average overlap | ||
| 31 | - float EvalLandmarking(const QString &predictedInput, const QString &truthInput, const QString &csv = "", int normalizationIndexA = 0, int normalizationIndexB = 1); // Return average error | ||
| 32 | - void EvalRegression(const QString &predictedInput, const QString &truthInput, QString predictedProperty="", QString truthProperty=""); | 29 | + void EvalClassification(const QString &predictedGallery, const QString &truthGallery, QString predictedProperty = "", QString truthProperty = ""); |
| 30 | + float EvalDetection(const QString &predictedGallery, const QString &truthGallery, const QString &csv = ""); // Return average overlap | ||
| 31 | + float EvalLandmarking(const QString &predictedGallery, const QString &truthGallery, const QString &csv = "", int normalizationIndexA = 0, int normalizationIndexB = 1); // Return average error | ||
| 32 | + void EvalRegression(const QString &predictedGallery, const QString &truthGallery, QString predictedProperty = "", QString truthProperty = ""); | ||
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | #endif // __EVAL_H | 35 | #endif // __EVAL_H |