Commit b547b5592c66764f5bb6c61ddbaf4784ccca3cb6
1 parent
8f0492db
Removed personal changes
Showing
5 changed files
with
12 additions
and
28 deletions
openbr/core/bee.cpp
| ... | ... | @@ -112,7 +112,7 @@ void BEE::writeSigset(const QString &sigset, const br::FileList &files, bool ign |
| 112 | 112 | metadata.append("Rects=\"["+landmarks.join(",")+"]\""); |
| 113 | 113 | } |
| 114 | 114 | } |
| 115 | - lines.append("\t<biometric-signature name=\"" + file.baseName() +"\">"); | |
| 115 | + lines.append("\t<biometric-signature name=\"" + file.get<QString>("Label",file.baseName()) +"\">"); | |
| 116 | 116 | lines.append("\t\t<presentation file-name=\"" + file.name + "\" " + metadata.join(" ") + "/>"); |
| 117 | 117 | lines.append("\t</biometric-signature>"); |
| 118 | 118 | } | ... | ... |
openbr/core/plot.cpp
| ... | ... | @@ -228,7 +228,7 @@ bool Plot(const QStringList &files, const File &destination, bool show) |
| 228 | 228 | QString(", xlab=\"False Accept Rate\", ylab=\"True Accept Rate\") + theme_minimal()") + |
| 229 | 229 | (p.major.size > 1 ? getScale("colour", p.major.header, p.major.size) : QString()) + |
| 230 | 230 | (p.minor.size > 1 ? QString(" + scale_linetype_discrete(\"%1\")").arg(p.minor.header) : QString()) + |
| 231 | - QString(" + scale_x_log10(labels=percent, limits=c(min(DET$X),1)) + scale_y_continuous(labels=percent) + annotation_logticks(sides=\"b\")\n\n"))); | |
| 231 | + QString(" + scale_x_log10(labels=percent, limits=c(min(DET$X),1)) + scale_y_log10(labels=percent) + annotation_logticks()\n\n"))); | |
| 232 | 232 | |
| 233 | 233 | p.file.write(qPrintable(QString("qplot(X, Y, data=DET%1").arg((p.major.smooth || p.minor.smooth) ? ", geom=\"smooth\", method=loess, level=0.99" : ", geom=\"line\"") + |
| 234 | 234 | (p.major.size > 1 ? QString(", colour=factor(%1)").arg(p.major.header) : QString()) + | ... | ... |
openbr/plugins/draw.cpp
| ... | ... | @@ -48,11 +48,11 @@ class DrawTransform : public UntrainableTransform |
| 48 | 48 | void project(const Template &src, Template &dst) const |
| 49 | 49 | { |
| 50 | 50 | const Scalar color(0,255,0); |
| 51 | - const Scalar verboseColor(0, 0, 0); | |
| 51 | + const Scalar verboseColor(255, 255, 0); | |
| 52 | 52 | dst.m() = inPlace ? src.m() : src.m().clone(); |
| 53 | 53 | |
| 54 | 54 | if (points) { |
| 55 | - const QList<Point2f> pointsList = OpenCVUtils::toPoints(src.file.points()); | |
| 55 | + const QList<Point2f> pointsList = OpenCVUtils::toPoints(src.file.namedPoints() + src.file.points()); | |
| 56 | 56 | for (int i=0; i<pointsList.size(); i++) { |
| 57 | 57 | const Point2f &point = pointsList[i]; |
| 58 | 58 | circle(dst, point, 3, color, -1); | ... | ... |
openbr/plugins/gallery.cpp
| ... | ... | @@ -119,7 +119,6 @@ class galGallery : public Gallery |
| 119 | 119 | { |
| 120 | 120 | if (t.isEmpty() && t.file.isNull()) |
| 121 | 121 | return; |
| 122 | - if (t.file.baseName() != "204765279_PCSOdata") | |
| 123 | 122 | stream << t; |
| 124 | 123 | } |
| 125 | 124 | }; |
| ... | ... | @@ -186,7 +185,7 @@ class EmptyGallery : public Gallery |
| 186 | 185 | if (file.name.isEmpty()) return; |
| 187 | 186 | |
| 188 | 187 | const QString newFormat = file.get<QString>("newFormat",QString()); |
| 189 | - QString destination = file.name + "/fold_" + QString::number(t.file.get<int>("Partition")) + "/target/" + (file.getBool("preservePath") ? t.file.path()+"/" : QString()); | |
| 188 | + QString destination = file.name + "/" + (file.getBool("preservePath") ? t.file.path()+"/" : QString()); | |
| 190 | 189 | destination += (newFormat.isEmpty() ? t.file.fileName() : t.file.baseName()+newFormat); |
| 191 | 190 | |
| 192 | 191 | QMutexLocker diskLocker(&diskLock); // Windows prefers to crash when writing to disk in parallel | ... | ... |
openbr/plugins/output.cpp
| ... | ... | @@ -76,29 +76,14 @@ class csvOutput : public MatrixOutput |
| 76 | 76 | { |
| 77 | 77 | if (file.isNull() || targetFiles.isEmpty() || queryFiles.isEmpty()) return; |
| 78 | 78 | QStringList lines; |
| 79 | - if (Globals->crossValidate == 0) { | |
| 80 | - for (int i=0; i<queryFiles.size(); i++) { | |
| 81 | - QStringList words; | |
| 82 | - for (int j=0; j<targetFiles.size(); j++) | |
| 83 | - words.append(queryFiles[i].name+","+targetFiles[j].baseName() + "," + toString(i,j)); // The toString idiom is used to output match scores - see MatrixOutput | |
| 84 | - lines.append(words.join("\n")); | |
| 85 | - } | |
| 86 | - QtUtils::writeFile(file.name, lines); | |
| 87 | - } else { | |
| 88 | - for (int k=0; k<Globals->crossValidate; k++) { | |
| 89 | - lines.clear(); | |
| 90 | - for (int i=0; i<queryFiles.size(); i++) { | |
| 91 | - int queryPartition = queryFiles[i].get<int>("Partition"); | |
| 92 | - if (queryPartition != k) continue; | |
| 93 | - QStringList words; | |
| 94 | - QList<int> targetPartitions = targetFiles.crossValidationPartitions(); | |
| 95 | - for (int j=0; j<targetFiles.size(); j++) | |
| 96 | - if (queryPartition == targetPartitions[j]) words.append(queryFiles[i].name+","+targetFiles[j].baseName() + "," + toString(i,j)); // The toString idiom is used to output match scores - see MatrixOutput | |
| 97 | - lines.append(words.join("\n")); | |
| 98 | - } | |
| 99 | - QtUtils::writeFile(file.name.arg(QString::number(k)), lines); | |
| 100 | - } | |
| 79 | + lines.append("File," + targetFiles.names().join(",")); | |
| 80 | + for (int i=0; i<queryFiles.size(); i++) { | |
| 81 | + QStringList words; | |
| 82 | + for (int j=0; j<targetFiles.size(); j++) | |
| 83 | + words.append(toString(i,j)); // The toString idiom is used to output match scores - see MatrixOutput | |
| 84 | + lines.append(queryFiles[i].name+","+words.join(",")); | |
| 101 | 85 | } |
| 86 | + QtUtils::writeFile(file, lines); | |
| 102 | 87 | } |
| 103 | 88 | }; |
| 104 | 89 | ... | ... |