Reputation: 21
I'm trying to build OpenBR, I followed the steps on http://openbiometrics.org/docs/install/#windows but I get stuck on this. The first time I used nmake, I got to 19%. Last week it worked on another computer (thesame compiler, cmd, ...). It broke down now I have to rebuild it. I've been looking for over 15 hours now.
C:\openbr\build-msvc2013>nmake
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
[ 2%] Built target models
[ 3%] Automatic moc for target openbr
[ 3%] Built target openbr_automoc
[ 4%] Building CXX object openbr/CMakeFiles/openbr.dir/plugins/classification/cascade_classifier.cpp.obj
cascade_classifier.cpp
C:\openbr\openbr\plugins\classification\cascade_classifier.cpp(229) : error C2660: 'br::Classifier::train' : function does not take 1 arguments
NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~2.0\VC\bin\X86_AM~1\cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
This is the part where it goes wrong:
void train(const TemplateList &data)
{
foreach (const Template &t, data)
t.file.get<float>("Label") == 1.0f ? posImages.append(t) : negImages.append(t);
qDebug() << "Total images:" << data.size()
<< "\nTotal positive images:" << posImages.size()
<< "\nTotal negative images:" << negImages.size();
posIndices = Common::RandSample(posImages.size(), posImages.size(), true);
negIndices = Common::RandSample(negImages.size(), negImages.size(), true);
stages.reserve(numStages);
for (int i = 0; i < numStages; i++) {
qDebug() << "===== TRAINING" << i << "stage =====";
qDebug() << "<BEGIN";
Classifier *next_stage = Classifier::make(stageDescription, NULL);
stages.append(next_stage);
float currFAR = getSamples();
if (currFAR < maxFAR && !requireAllStages) {
qDebug() << "FAR is below required level! Terminating early";
return;
}
stages.last()->train(posSamples + negSamples);
qDebug() << "END>";
}
}
This is the whole file: https://github.com/biometrics/openbr/blob/master/openbr/plugins/classification/cascade_classifier.cpp
Upvotes: 2
Views: 408