biometrics / openbr

Open Source Biometrics, Face Recognition
www.openbiometrics.org
Other
2.85k stars 773 forks source link

Failed to load stasm cascade in FaceRecognition Algorithm #570

Closed BrandonYuen closed 9 months ago

BrandonYuen commented 4 years ago

Hi,

When I try to follow the the Face Recognition tutorial with the command: br -algorithm FaceRecognition -compare ../data/pic1.jpg ../data/pic2.jpg

I get an error from the stasm.cpp code:

Set algorithm to FaceRecognition
Comparing ../data/pic1.jpg and ../data/Recnition/pic2.jpg
Enrolling ../data/pic1.jpg to pic1cshRcs.mem
Fatal: Failed to load Stasm Cascade
  SDK Path: /usr/local
  File: 
  Function: 
  Line: 0
Abort trap: 6

It is probably something with this piece of code:

private:
    StasmCascadeClassifier *make() const
    {
        StasmCascadeClassifier *stasmCascade = new StasmCascadeClassifier();
        if (!stasmCascade->load(Globals->sdkPath.toStdString() + "/share/openbr/models/"))
            qFatal("Failed to load Stasm Cascade");
        return stasmCascade;
    }
};

I can't find any related issues on this and hope someone could help me out a bit. I'm a beginner when it comes to openbr and opencv.