Commit 796c0a59f5bb967382dbad42de1465431d064da8

Authored by Josh Klontz
1 parent d1d6726d

variables renamed: input ==> gallery

openbr/core/eval.cpp
... ... @@ -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 262 if (predictedProperty.isEmpty())
263 263 predictedProperty = "Label";
... ... @@ -269,8 +269,8 @@ void EvalClassification(const QString &predictedInput, const QString &truthInput
269 269 if (truthProperty.isEmpty())
270 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 274 if (predicted.size() != truth.size()) qFatal("Input size mismatch.");
275 275  
276 276 QHash<QString, Counter> counters;
... ... @@ -403,11 +403,11 @@ QString getDetectKey(const TemplateList &amp;templates)
403 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 412 // Figure out which metadata field contains a bounding box
413 413 QString truthDetectKey = getDetectKey(truth);
... ... @@ -476,10 +476,10 @@ float EvalDetection(const QString &amp;predictedInput, const QString &amp;truthInput, co
476 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 483 (void) csv;
484 484 (void) normalizationIndexA;
485 485 (void) normalizationIndexB;
... ... @@ -487,9 +487,9 @@ float EvalLandmarking(const QString &amp;predictedInput, const QString &amp;truthInput,
487 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 494 if (predictedProperty.isEmpty())
495 495 predictedProperty = "Regressor";
... ... @@ -501,8 +501,8 @@ void EvalRegression(const QString &amp;predictedInput, const QString &amp;truthInput, QS
501 501 if (truthProperty.isEmpty())
502 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 506 if (predicted.size() != truth.size()) qFatal("Input size mismatch.");
507 507  
508 508 float rmsError = 0;
... ...
openbr/core/eval.h
... ... @@ -26,10 +26,10 @@ namespace br
26 26 float Evaluate(const QString &simmat, const QString &mask = "", const QString &csv = ""); // Returns TAR @ FAR = 0.001
27 27 float Evaluate(const cv::Mat &scores, const FileList &target, const FileList &query, const QString &csv = "", int parition = 0);
28 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 35 #endif // __EVAL_H
... ...