MCPcopy Create free account
hub / github.com/biometrics/openbr / train

Method train

openbr/plugins/core/loadstore.cpp:80–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 }
79
80 void train(const QList<TemplateList> &data)
81 {
82 if (QFileInfo(getFileName()).exists())
83 return;
84
85 transform->train(data);
86
87 qDebug("Storing %s", qPrintable(fileName));
88 QtUtils::BlockCompression compressedOut;
89 QFile fout(fileName);
90 QtUtils::touchDir(fout);
91 compressedOut.setBasis(&fout);
92
93 QDataStream stream(&compressedOut);
94 QString desc = transform->description();
95
96 if (!compressedOut.open(QFile::WriteOnly))
97 qFatal("Failed to open %s for writing.", qPrintable(file));
98
99 stream << desc;
100 transform->store(stream);
101 compressedOut.close();
102 }
103
104 void project(const Template &src, Template &dst) const
105 {

Callers

nothing calls this directly

Calls 7

touchDirFunction · 0.85
setBasisMethod · 0.80
trainMethod · 0.45
descriptionMethod · 0.45
openMethod · 0.45
storeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected