Giter VIP home page Giter VIP logo

Comments (8)

uricamic avatar uricamic commented on May 20, 2024

Hi @junsa,

unfortunately I do not have access to any windows computer now. I have never tried with MSVS 2015, however it compiled with 2013 without bigger problems.
Just a quick check, do you have BUILD_SHARED_LIBS set to ON and have you tried to compile each target in the solution separately?

from clandmark.

junsa avatar junsa commented on May 20, 2024

Hello @uricamic,
Thank you for your quick reply!
Since I installed based on installation for windows, BUILD_SHARED_LIBS was ON and I tried to compile each target in the solution separately.
However, I couldn't.

Also, I tried to install for my ubuntu 14.04 LTS.
The install succeeded and I wrote a small code using qtcreator as shown in below.
However, the qtcreator says error: undefined reference to clandmark::Flandmark::getInstanceOf(char const*, bool)'.
What should I do?

`#include <opencv2/objdetect/objdetect.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>

#include
#include
#include <stdio.h>

#include "Flandmark.h"
#include "CSparseLBPFeatures.h"
#include "CTimer.h"
#include "CFeaturePool.h"
#include "CSparseLBPFeatures.h"
#include "helpers.h"

#define SHOW_WINDOWS

using namespace std;
using namespace cv;
using namespace clandmark;

char modelList[][1024] = {
"JOINT_MV_AFLW_SPLIT_1_-profile.xml",
"JOINT_MV_AFLW_SPLIT_1_-30deg.xml",
"JOINT_MV_AFLW_SPLIT_1_frontal.xml",
"JOINT_MV_AFLW_SPLIT_1_30deg.xml",
"JOINT_MV_AFLW_SPLIT_1_profile.xml",
};

char views[][20] = {
"-profile",
"-half-profile",
"frontal",
"half-profile",
"profile",
};

const int PHIS = 5;

int main(int argc, char *argv[])
{

string modelDir = argv[1];  // path to directory containing flandmark model XML files (assuming the path is given as a first argument)

Flandmark *flandmarkPool[PHIS]; // pool of Flandmark instances

// initialize flandmark instances
for (int i=0; i < PHIS; ++i)
{
   flandmarkPool[i] = Flandmark::getInstanceOf(string(modelDir+modelList[i]).c_str());

  if (!flandmarkPool[i])
  {
    cerr << "Couldn't create instance of flandmark with model " << modelList[i] << endl;
    return -1;
  }
}

return 0;

}`

Below code is my project file in the qtcreator.
`INCLUDEPATH += /usr/local/include/opencv
INCLUDEPATH += /home/user/clandmark/libclandmark
INCLUDEPATH += /home/user/clandmark/3rd_party/CImg-1.5.6
INCLUDEPATH += /home/user/clandmark/3rd_party/rapidxml-1.13
INCLUDEPATH += /home/user/clandmark/3rd_party/CImg-1.5.6/plugins

LIBS += -L/usr/local/lib -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core -lopencv_hal`

Thank you and sorry I'm not good in English.

from clandmark.

uricamic avatar uricamic commented on May 20, 2024

Hi @junsa,

you forgot to add -lflandmark -lclandmark to LIBS, as well as the path to the directory where you have them (-L). Then it should work without problems.

The other way how to use the library in external project is to use CMake, see #44 for details.

The compilation on windows can be tricky sometimes, however on linux and mac it works without troubles.

from clandmark.

junsa avatar junsa commented on May 20, 2024

Hello @uricamic,

I could build!!
Thank you for your advice!!

However, an example code, which is clandmark/examples/static_input.cpp, outputs incorrect results as shown in attached images.
I used a haarcascade_frontalface_alt.xml and flandmark_model.xml in clandmark/data.
I don't change the code of the static_input.cpp.
Is there anything I have to do?

Thank you and sorry for many questions.

result

result

from clandmark.

uricamic avatar uricamic commented on May 20, 2024

Hi @junsa,

the flandmark_model.xml is not compatible with this code example. You could use it, but it would require changes of the example (not to use CFeaturePool and detect_optimized).

However, you can use this example with different models, such as CDPM.xml and FDPM.xml or any of the INDEPENDENT_MV and JOINT_MV models. All models are available for download here .

from clandmark.

junsa avatar junsa commented on May 20, 2024

Hello @uricamic,

I have confirmed CDPM.xml can correctly obtain facial landmarks!!
Thank you very much!!

from clandmark.

uricamic avatar uricamic commented on May 20, 2024

Hi @junsa,

happy to hear that.
If you are interested in landmark localization precision, please bear on mind, that it is intended to be used in combination with FDPM.xml forming the C2F-DPM detector as described in our paper and also that is has limitations regarding the yaw angle of the head - it works best for the near-frontal head poses, i.e. in the yaw range of roughly (-15, 15) degrees.

from clandmark.

junsa avatar junsa commented on May 20, 2024

Hello @uricamic,

Thank you for your advice.
I have understood your mention and I'm now reading your paper.

I'm looking forward to reading your new paper!!!
Thank you, from Japan!!

from clandmark.

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.