Giter VIP home page Giter VIP logo

Comments (6)

patrikhuber avatar patrikhuber commented on August 26, 2024

Hi,

The mean face can be calculated in a few different ways - for example, one can align the training landmark coordinates using Procrustes (center them, scale, rotate...). But for this case, it's actually sufficient to just calculate the mean of the landmarks of a few hundred images, and you'll have a pretty good mean face.

If you look at examples/landmark_detection.cpp, you can just use cv::mean to calculate the mean of trainingLandmarks. As mentioned above, make sure you use enough images (i.e. more than the 5 in the data/ folder).

from superviseddescent.

yxswjtu avatar yxswjtu commented on August 26, 2024

Thank you for your answer!I used cv::mean to calculate the mean of landmarks,but the result is not so satisfied!I found the data in the mean_ibug_lfpw_68.txt is already normalized,could you please describe the detailed steps in your code?

from superviseddescent.

yxswjtu avatar yxswjtu commented on August 26, 2024

Hi, Patrik Huber,I solved my problems using Procrustes analysis.Thank you for your suggestions!

发自我的 iPad

在 2015年2月7日,05:26,Patrik Huber [email protected] 写道:

Hi,

The mean face can be calculated in a few different ways - for example, one can align the training landmark coordinates using Procrustes (center them, scale, rotate...). But for this case, it's actually sufficient to just calculate the mean of the landmarks of a few hundred images, and you'll have a pretty good mean face.

If you look at https://github.com/patrikhuber/superviseddescent/blob/master/examples/landmark_detection.cpp, you can just use cv::mean to calculate the mean of trainingLandmarks. As mentioned above, make sure you use enough images (i.e. more than the 5 in the data/ folder).


Reply to this email directly or view it on GitHub.

from superviseddescent.

patrikhuber avatar patrikhuber commented on August 26, 2024

Hi,

I'm surprised your result was not satisfying - did you use enough (a few hundred) images, as I suggested?
The normalisation I used in mean_ibug_lfpw_68.txt was just a simple scaling into a [-1, +1] x [-1, +1] box - and I determined the scale factor by using the face box from a face detector and then calculating the optimal scale factor at training time (imagine different face detectors output different face box sizes - one might be trained on only a narrow view of the face, another one might have a box around the whole head).

I will put the code of our full landmark detection online soon, so all these steps will be retraceable.

I'm glad you could solve your issue!

from superviseddescent.

songminglong avatar songminglong commented on August 26, 2024

Hi, I just run your program with data in the project(5 images and its pts file), then I put these in command line:./landmark_detection -d path-to-traindataset -m path-to-meanfile -f path-to-harrcascade...but I have waited for two hours , and no results output! I want to know how many times the train-step needed? Thanks for your reply!

from superviseddescent.

patrikhuber avatar patrikhuber commented on August 26, 2024

Hi Xiao-Hu,
Sorry for the late reply, I was actually working on an update regarding this! I've just updated the library, it'll run much faster now. If you run ./landmark_detection ... again, it should finish in a few minutes now.

If you additionally compile with -fopenmp (/openmp on VS), it will be even faster and finish in a few seconds.

Let me know if you have any further problems.

PS: Next time, open a new issue, instead of replying in a closed issue - it will get done much faster :-)

from superviseddescent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.