Open jjjphysics opened 8 years ago
Hi @jjjphysics,
the .lib files are produced only when BUILD_SHARED_LIBS
are set to FALSE
.
Hi @uricamic, thanks for the advise! now I get both .lib file and .dll file. However, when I run the compile_mex.m file I get an error using mex like this
did you know what's the problem?
Hi @jjjphysics,
I cannot read complete error message, but it seems CLandmarkConfig.h
is missing in the libclandmark directory. Try to search for it, it should have been generated somewhere, and copy it to the folder. It should help.
However, I should admit I did not encounter such a problem, when I was building it on windows.
HI @uricamic The ClandmarkConfig.h I have found some where else and copy to the directory. However, this time another message come, I think i definitely have do something wrong, below:
Thanks very much for your help! Do you have compiled matlab file of Clandmark file?
These look weird, I have never tried to compile it on Windows 10, but I guess that shouldn't be a problem. Have you tried to compile the C++ examples and run them? It is not directly connected to your problem with mex files compilation, but if it does not work, then it is an indicator that the problem is really elsewhere...
@uricamic Yes, the example is didn't work at all. When I double click static_input.exe just flash at shut down nothing come out. So what probably the problem is?
@jjjphysics,
you have to run it from command line and add the required arguments.
@uricamic I try to type the code static _input.exe CDPM.xml face.jpg but there is no file CDPM.xml can you have some explanation of the screen shot of installation on windows at http://cmp.felk.cvut.cz/~uricamic/clandmark/index.php?page=installation#install_windows I think maybe is some compiling problem about VS2015? Can you have some easy using package? Thanks very much for your help!
Hi @jjjphysics,
you can download CDPM.xml as well as other models from the website, section downloads. If this code example works, it means that library was successfully compiled so we can focus on what is the problem with mex compilation.
Hi @uricamic I tried it fail like this:
so it is the problem of VS2013? or system?
Thanks!
The usage line is telling you what arguments are needed. You are missing there the path to the haarcascade (the folder containing it) before CDPM.xml
Hi @uricamic Thanks for your advise! right now I can load the flandmark model but it still error like this
Thanks!
Hi @jjjphysics,
I am sorry, the path to the haarcascade fodler has to end with "\" otherwise in the code the incorrect path is produced and the cascade is then not loaded (that is what produces this error message). However, it seems that the library is compiled successfully, since the Flandmark
was created.
If you need the MATLAB mex files, you can find them compiled here
Hi @uricamic , Thank you very much for you help it works! see as below but the face center is so far away seems
by the way how do I use the compiled matlab file?
Thank you very much!
Hi @jjjphysics,
if you mean the blue point then it is actually not a center of the face. It inherits the old code for 8 landmarks, where the first landmark was the one corresponding to the face center, so in the picture blue is just the first landmark in the sequence.
To use the mex-files, please check the code snippets on the project homepage.
Btw this example proofs that you successfully compiled the library, so the problem is in the mex compilation. If the precompiled version does not work for you, we will have to check what is wrong in your case...
@jjjphysics Hi,I met the same question with you,but I do not find the CLandmarkConfig.h,could you tell me which place do you find?
@happygao I solve this problem by finding the file some where else and copy to the require place. However, after this problem there are some other problems. Finally, I use the compiled version here https://github.com/AmlFawzy/clandmark
@jjjphysics Thank you very much. I find the file, but there are many other questions with me.I am the beginner of this knowledge. Could you tell me the step of the produce? I have no ideas to do it.
Hi @happygao,
have you done the cmake configuration procedure? The CLandmarkConfig.h
is generated during it somewhere (depending on your system), you can then just search for it within your CLandmark folder.
And do you need just the C++ library, or would you like to use MATLAB or Python interface?
@uricamic I would like to use MATLAB or Python interface, and I find the file and have done cmake. This is the first time I contact the Clandmark, could you tell me the steps of the procedure please? Thanks.
Hi @happygao,
what operating system do you have and what is your intended application? If I remember correctly, the Python interface was so far tested only on linux and Mac. The learning scripts are available only for MATLAB so far, though.
If you have compiled CLandmark successfully (you can e.g. try to compile also the C++ examples and run them to check this), next step would be to compile the interface. The procedure depends on the operating system - on linux and Mac it is possible directly from CMake, on windows it is easier to use the compile_mex.m
script.
@uricamic Thank you very much. I have Windows and Linux, I make it on Linux all the time. I want to use in Fae Alignment. Now I have a try to do by your step.
@uricamic Now I complied on Window 10, CMake Error: File C:/Users/dell/Desktop/clandmark-master(1)/clandmark-master/data/flandmark_model.xml does not exist. I donot find the reason why happend this.
Hi @happygao,
it seems there are some issues with CMake and Windows 10. You can try to compile the library without C++ examples, by turning BUILD_CPP_EXAMPLES
OFF
. Then the CMake won't try to copy that .xml file. Or you can simply comment out the lines 47 - 49 in the main CMakeLists.txt file.
@jjjphysics Hi, I used the program which you give me. But when I complied it,the flandmark when build ,it came out "LINK : fatal error LNK1104: 无法打开文件“Debug\clandmark.lib”. I donot know the problem how to solve it. Please help me solve it. Thanks.
Hello, @uricamic ,I met a question" error C3861:"log2":could not find identifer. " when I build the C++ examples. Could you tell me how to solve this problem?
Hi @happygao,
sorry for that, I always forget to add the header files which are standardly found in linux, but missing in windows. You can solve this issue either by defining the log2 for yourself (see e.g. this or by doing some other workaround. I will fix this in the repository soon (after I return from vacation).
@uricamic Iam sorry to interrupt when you are in holiday. I will wait you that fix the repository.Thank you.
Thankyou. @uricamic .The log2 problem has solved.But when build the flandmark, it happens "could not open ..\libclandmark\Debug\flandmark.lib". I see the file, it find no file in it. what problem causes this ?
Hi @happygao,
I am not sure what you mean by "I see the file, it find no file in it" ? If you mean that the flandmark.lib
is missing in the ..\libclandmark\Debug\
folder, then check whether flandmark.dll
is present. If so, you just need to change BUILD_SHARED_LIBS
to OFF
and compile again. After this step the .lib
files should be also produced.
Btw, I strongly recommend to compile the library in Release
mode, for performance reasons.
compiling issue when i compiling flandmark i must have file clandmark.lib, however I only have clandmark.dll didn't have clandmark.lib file. And at last fail all the compiling.