Commit 253d8f6183ea6392138c88b070ba27990ddf2607

Authored by Josh Klontz
1 parent dc2f8017

.db seed can now be train/test string instead of integer, misc .db cleanup

Showing 1 changed file with 4 additions and 8 deletions
openbr/plugins/gallery.cpp
... ... @@ -687,7 +687,9 @@ class dbGallery : public Gallery
687 687 if (!subset.isEmpty()) {
688 688 const QStringList &words = subset.split(":");
689 689 QtUtils::checkArgsSize("Input", words, 2, 4);
690   - seed = QtUtils::toInt(words[0]);
  690 + if (words[0] == "train") seed = 0;
  691 + else if (words[0] == "test" ) seed = 1;
  692 + else seed = QtUtils::toInt(words[0]);
691 693 if (words[1].startsWith('{') && words[1].endsWith('}')) {
692 694 foreach (const QString &regexp, words[1].mid(1, words[1].size()-2).split(","))
693 695 metadataFields.append(QRegExp(regexp));
... ... @@ -813,16 +815,10 @@ class googleGallery : public Gallery
813 815 return templates;
814 816 }
815 817  
816   - void write(const Template &t)
  818 + void write(const Template &)
817 819 {
818   - (void) t;
819 820 qFatal("Not supported.");
820 821 }
821   -
822   - void init()
823   - {
824   - //
825   - }
826 822 };
827 823  
828 824 BR_REGISTER(Gallery, googleGallery)
... ...