patrikhuber / superviseddescent

C++11 implementation of the supervised descent optimisation method
http://patrikhuber.github.io/superviseddescent/
Apache License 2.0
402 stars 188 forks source link

Learning the bias B_k #60

Closed oftenliu closed 5 years ago

oftenliu commented 5 years ago

Hi Patrik,

       //regressors.hpp:345
    bool learn(cv::Mat data, cv::Mat labels) override
    {
        cv::Mat x = solver.solve(data, labels, regulariser);
        this->x = x;
        return true; // see todo above
    };

in the paper,we need to learn the $R_k,B_k$, but the solver return only a Mat, how to understand the differnce?

Thanks!

patrikhuber commented 5 years ago

Hi @oftenliu,

The $B_k$ is the bias, and it is appended to the data matrix as an additional row (or column, forgot which one it is in the code). If you follow the code, you'll see it. It's a standard method when doing linear regression.

oftenliu commented 5 years ago

oh, i‘m clear now, and i have some other questiones about face aligmnet, may i send them to you by email? my email is 1992often@gmail.com. would appreciate it very much if you could help me

patrikhuber commented 5 years ago

If it is relevant to this repository and the actual algorithm, please post it here on the GitHub issues. However, the GitHub issues are for issues or unclarity about the code here, and not for face alignment or beginner questions. It is very likely those would not be answered. You would probably be much better off posting your questions to a more appropriate website like StackExchange (computer vision sub-page or something like that), /r/computervision, or something along those lines.

oftenliu commented 5 years ago

oh! ok,Patrick, thank you very much . another question, i train the sdm model on the ibug-lfpw, ibug, ibug-afw, 300-W, and ibug-helen-tr, when training , i use four regressor and your mean file , but the finnal residual is 2.1 is right??

patrikhuber commented 5 years ago

I don't remember the magnitude of the final residual values, but it's best if you just test the resulting models on some standardised landmark detection benchmark.