Giter Club home page Giter Club logo

Comments (6)

TadasBaltrusaitis avatar TadasBaltrusaitis commented on June 29, 2024 1

It is very likely that the tracking would be faster with fewer points being tracked, but it might become a bit less accurate.

Another way to speed up the model is to perform fewer scales when tracking and looking at smaller window sizes. Try playing around with window_sizes_small and window_sizes_init in the LandmarkDetectorParameters, changing window_sizes_small will allow you to control how many scales are run during the tracking and how big is the region of interest.

Thanks,
Tadas

from openface.

enznear avatar enznear commented on June 29, 2024

Thank you for your helpful comment!
I appreciate it.

from openface.

Spatiumensura avatar Spatiumensura commented on June 29, 2024

Could you please describe the meaning of the parameters, window_sizes_small and window_sizes_init, in more detail? How do they relate to the number of scales and the size of the ROI?

Per default the parameters are

window_sizes_init.at(0) = 11;
window_sizes_init.at(1) = 9;
window_sizes_init.at(2) = 7;
window_sizes_init.at(3) = 5;/

window_sizes_small[0] = 0;
window_sizes_small[1] = 9;
window_sizes_small[2] = 7;
window_sizes_small[3] = 0;

Is there a special reason to use this ordering, [0,9,7,9], for the window_sizes_small parameters?

Many Thanks!

from openface.

TadasBaltrusaitis avatar TadasBaltrusaitis commented on June 29, 2024

Each of the numbers in window_sizes_small and window_sizes_init describes the search area (region of interest in pixels, e.g. 11x11).

The vector describes the regions of interest for each scale, so for example of the current windows are set to window_sizes_init, then the algorithm will search an area of 11x11 for scale 1, area of 9x9 for scale 2, area of 7x7 for scale 3, and finally area of 5x5 at scale 4.

In case the window size is set to 0 (as is the case for window_sizes_small in scales 1 and 4), that scale will be skipped. That means the algorithm will only look at a 9x9 area for scale 2 and a 7x7 for scale 3.

Hope this helps.

Thanks,
Tadas

from openface.

Spatiumensura avatar Spatiumensura commented on June 29, 2024

Many thanks for the explanation! This helps a lot, but what is meant with "scale 1" or "scale 2"? Where are the scale pyramids defined? Or is it just sampling every pixel (scale = 1), every second (scale = 2) ... ?

from openface.

TadasBaltrusaitis avatar TadasBaltrusaitis commented on June 29, 2024

OpenFace performs landmark detection through 4 pyramid scales, each patch expert is trained to deal with face images of a particular size/scale. The area of interest for each patch expert (centered around current best landmark eztimate) is actually resized and in-plane rotation corrected using bilinear interpolation instead of just pixel resampling. This is done in the following call in PatchExperts.cpp:
cv::warpAffine(grayscale_image, area_of_interest, sim, area_of_interest.size(), cv::WARP_INVERSE_MAP + CV_INTER_LINEAR);

from openface.

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.