From 3bff52c049f4bf8d67de0106929edcd79d70a782 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Fri, 19 Apr 2013 20:41:40 -0400 Subject: [PATCH] Use File::subject rather than acccessing the property directly --- openbr/core/classify.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openbr/core/classify.cpp b/openbr/core/classify.cpp index ad2937e..e54fbc3 100644 --- a/openbr/core/classify.cpp +++ b/openbr/core/classify.cpp @@ -45,8 +45,12 @@ void br::EvalClassification(const QString &predictedInput, const QString &truthI qFatal("Input order mismatch."); // Typically these lists will be of length one, but this generalization allows measuring multi-class labeling accuracy. - QStringList predictedSubjects = predicted[i].file.get("Subject"); - QStringList trueSubjects = truth[i].file.get("Subject"); + QString predictedSubject = predicted[i].file.subject(); + QString trueSubject = truth[i].file.subject(); + + QStringList predictedSubjects(predictedSubject); + QStringList trueSubjects(trueSubject); + foreach (const QString &subject, trueSubjects.toVector() /* Hack to copy the list. */) { if (predictedSubjects.contains(subject)) { counters[subject].truePositive++; -- libgit2 0.21.4