Moving the setting of the classifier path before initializing the classifiers

This commit is contained in:
Umang Mehta 2018-11-16 12:44:22 -05:00
parent 24bfb33862
commit 1f9873eeda
2 changed files with 4 additions and 4 deletions

View file

@ -113,11 +113,11 @@ int main(int argsc, char ** argsv)
frameDetector = make_shared<FrameDetector>(buffer_length, process_framerate, nFaces, (affdex::FaceDetectorMode) faceDetectorMode); // Init the FrameDetector Class frameDetector = make_shared<FrameDetector>(buffer_length, process_framerate, nFaces, (affdex::FaceDetectorMode) faceDetectorMode); // Init the FrameDetector Class
//Initialize detectors //Initialize detectors
frameDetector->setClassifierPath(DATA_FOLDER);
frameDetector->setDetectAllEmotions(true); frameDetector->setDetectAllEmotions(true);
frameDetector->setDetectAllExpressions(true); frameDetector->setDetectAllExpressions(true);
frameDetector->setDetectAllEmojis(true); frameDetector->setDetectAllEmojis(true);
frameDetector->setDetectAllAppearances(true); frameDetector->setDetectAllAppearances(true);
frameDetector->setClassifierPath(DATA_FOLDER);
frameDetector->setImageListener(listenPtr.get()); frameDetector->setImageListener(listenPtr.get());
frameDetector->setFaceListener(faceListenPtr.get()); frameDetector->setFaceListener(faceListenPtr.get());
frameDetector->setProcessStatusListener(videoListenPtr.get()); frameDetector->setProcessStatusListener(videoListenPtr.get());

View file

@ -135,11 +135,11 @@ int main(int argsc, char ** argsv)
std::cout << "Face detector mode set to: " << mode << std::endl; std::cout << "Face detector mode set to: " << mode << std::endl;
shared_ptr<PlottingImageListener> listenPtr(new PlottingImageListener(csvFileStream, draw_display)); shared_ptr<PlottingImageListener> listenPtr(new PlottingImageListener(csvFileStream, draw_display));
detector->setClassifierPath(DATA_FOLDER);
detector->setDetectAllEmotions(true); detector->setDetectAllEmotions(true);
detector->setDetectAllExpressions(true); detector->setDetectAllExpressions(true);
detector->setDetectAllEmojis(true); detector->setDetectAllEmojis(true);
detector->setDetectAllAppearances(true); detector->setDetectAllAppearances(true);
detector->setClassifierPath(DATA_FOLDER);
detector->setImageListener(listenPtr.get()); detector->setImageListener(listenPtr.get());