Commit 068b72adcc909b6f18817a5dc67a6cee3f73db84

Authored by Scott Klum
1 parent 12b2b4d3

Remember to save both files plz

Showing 1 changed file with 6 additions and 6 deletions
openbr/openbr_plugin.cpp
@@ -387,7 +387,7 @@ TemplateList TemplateList::fromGallery(const br::File &gallery) @@ -387,7 +387,7 @@ TemplateList TemplateList::fromGallery(const br::File &gallery)
387 387
388 const int crossValidate = gallery.get<int>("crossValidate"); 388 const int crossValidate = gallery.get<int>("crossValidate");
389 389
390 - if (gallery.getBool("leaveOneOut")) { 390 + if (gallery.getBool("leaveOneImageOut")) {
391 QStringList labels; 391 QStringList labels;
392 for (int i=newTemplates.size()-1; i>=0; i--) { 392 for (int i=newTemplates.size()-1; i>=0; i--) {
393 newTemplates[i].file.set("Index", i+templates.size()); 393 newTemplates[i].file.set("Index", i+templates.size());
@@ -406,11 +406,11 @@ TemplateList TemplateList::fromGallery(const br::File &amp;gallery) @@ -406,11 +406,11 @@ TemplateList TemplateList::fromGallery(const br::File &amp;gallery)
406 // Extend the gallery for each partition 406 // Extend the gallery for each partition
407 for (int j=0; j<labelIndices.size(); j++) { 407 for (int j=0; j<labelIndices.size(); j++) {
408 for (int k=0; k<crossValidate; k++) { 408 for (int k=0; k<crossValidate; k++) {
409 - Template leaveOneOutTemplate = newTemplates[labelIndices[j]];  
410 - if (k!=leaveOneOutTemplate.file.get<int>("Partition")) {  
411 - leaveOneOutTemplate.file.set("Partition", k);  
412 - leaveOneOutTemplate.file.set("testOnly", true);  
413 - newTemplates.insert(i+1,leaveOneOutTemplate); 409 + Template leaveOneImageOutTemplate = newTemplates[labelIndices[j]];
  410 + if (k!=leaveOneImageOutTemplate.file.get<int>("Partition")) {
  411 + leaveOneImageOutTemplate.file.set("Partition", k);
  412 + leaveOneImageOutTemplate.file.set("testOnly", true);
  413 + newTemplates.insert(i+1,leaveOneImageOutTemplate);
414 } 414 }
415 } 415 }
416 } 416 }