TadasBaltrusaitis / OpenFace

OpenFace – a state-of-the art tool intended for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation.
Other
6.84k stars 1.84k forks source link

make error in ubuntu 14.04 instalation #457

Closed elahia closed 6 years ago

elahia commented 6 years ago

Hi, I checked in other issues, there was not such an error so i create a new one,

i tried to install openface on my ubuntu 14,04 by running ./download_model.sh and ./install.sh

every thing goes well but in making time i got two errors (see attache please),

So how can i fix it? Regards, screenshot from 2018-05-25 14 10 43

fxfactorial commented 6 years ago

scroll up and find the real error

TadasBaltrusaitis commented 6 years ago

The screenshot you attached only includes the warnings, but not the actual compilation error.

elahia commented 6 years ago

Hi, Sorry my bad, I found following errors:

cannot convert 'const dlib::blas_bindings::CBLAS_ORDER' to 'CBLAS_ORDER' for argument '1' to 'void cblas_strsm(CBLAS_ORDER, CBLAS_SIDE, CBLAS_UPLO, CBLAS_TRANSPOSE, CBLAS_DIAG, blasint, blasint, float, const float, blasint, float, blasint)' cblas_strsm(Order, Side, Uplo, TransA, Diag, M, N, alpha, A, lda, B, ldb);

cannot convert 'const dlib::blas_bindings::CBLAS_ORDER' to 'CBLAS_ORDER' for argument '1' to 'void cblas_dtrsm(CBLAS_ORDER, CBLAS_SIDE, CBLAS_UPLO, CBLAS_TRANSPOSE, CBLAS_DIAG, blasint, blasint, double, const double, blasint, double, blasint)' cblas_dtrsm(Order, Side, Uplo, TransA, Diag, M, N, alpha, A, lda, B, ldb);

screenshot from 2018-05-29 10 58 06

elahia commented 6 years ago

@TadasBaltrusaitis @fxfactorial
Hey guys, I'm really in rush and confused!

Would you please help me through using openface on ubuntu 14,04. i found 2 pages and i followed both, but in both of them I failed!

first: this which caused two errors which i send you by the screenshot

then i tried for this which continued with no error and i think now openface is installed but when i tried to test it, it causes to following error:

Traceback (most recent call last): File "./demos/classifier.py", line 293, in <module> infer(args, args.multi) File "./demos/classifier.py", line 177, in infer (le, clf) = pickle.load(f) File "/usr/lib/python2.7/pickle.py", line 1378, in load return Unpickler(file).load() File "/usr/lib/python2.7/pickle.py", line 858, in load dispatch[key](self) File "/usr/lib/python2.7/pickle.py", line 1090, in load_global klass = self.find_class(module, name) File "/usr/lib/python2.7/pickle.py", line 1126, in find_class klass = getattr(mod, name) AttributeError: 'module' object has no attribute '_passthrough_scorer'

So would you please help me to fix it, it's the last thing i have to do to complete my prj.

Regards

TadasBaltrusaitis commented 6 years ago

Hi, I am not sure how python ends up being called. There is no python interface in OpenFace. The second link you sent is a different OpenFace project, which is intended for face recognition.

How were you testing it? What command did you execute?

For the error you are encountering I have not seen it before, can you try following the installation steps in the instructions (https://github.com/TadasBaltrusaitis/OpenFace/wiki/Unix-Installation#dependency-installation) rather than using ./install.sh?

elahia commented 6 years ago

Dear Tadas, thank you so much for your response i used that link but i will try it for one more time,

I'm so sorry to say it, but i hope it helps others and improves the project, actually, i think the instructions about installing on ubuntu are a bit unclear! different pages (maybe with different purposes) but similar names, somewhere titles are not in correct format and subsections are equal or bolder than the main section, somewhere it mentioned installing opencv2 but another place opencv3 (if for different purposes we need different versions it is not mentioned), these make it a bit unclear especially for beginners to ubuntu! and i think its worth enough to update these tiny points!

again i apologize, just for helping...

On Thu, May 31, 2018 at 6:57 PM, Tadas Baltrusaitis < notifications@github.com> wrote:

Hi, I am not sure how python ends up being called. There is no python interface in OpenFace. The second link you sent is a different OpenFace project, which is intended for face recognition.

How were you testing it? What command did you execute?

For the error you are encountering I have not seen it before, can you try following the installation steps in the instructions (https://github.com/ TadasBaltrusaitis/OpenFace/wiki/Unix-Installation#dependency-installation) rather than using ./install.sh?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/TadasBaltrusaitis/OpenFace/issues/457#issuecomment-393600788, or mute the thread https://github.com/notifications/unsubscribe-auth/ANcDWAFqbRR_GxLflNkp0OPx10hN5Lecks5t4CEFgaJpZM4UN50Y .

fxfactorial commented 6 years ago

@TadasBaltrusaitis I'll go ahead and try and make a docker image to make this easier for beginners.

elahia commented 6 years ago

@fxfactorial It would be great, thanks

elahia commented 6 years ago

@TadasBaltrusaitis I tried the link and both compilers, same errors appeared!

already i test it by: ./demos/classifier.py infer models/openface/celeb-classifier.nn4.small2.v1.pkl ./images/examples/carell.jpg

TadasBaltrusaitis commented 6 years ago

@elahia , the code example for testing you are using is not part of this OpenFace, I believe it is from another project (https://github.com/cmusatyalab/openface).

Apologies for the lack of clarity in the instructions. I would love to improve them. Any particular parts that are difficult to follow or unclear? If you would provide the exact bits that are unclear I will change them.

elahia commented 6 years ago

@TadasBaltrusaitis thank you for your reply, as you said i shouldn't test it with that command. i focused on the errors of _cannot convert 'const dlib::blas_bindings::CBLAS_ORDER' to 'CBLAS_ORDER' for argument '1' to 'void cblas_strsm_ i searched and found this, so i tried to update my cmake and now it is 3.11.3 but still the errors come up. as commands are straightforward and ran without error how can i be sure my system didn't mix up, version of dependencies are fine, and so on?


thank you for consideration, i think most confusing part is these two pages: 1 2 maybe in their root, an explanation is needed why you separate them and what is the relation between them and what is the purpose of each one ...

and on the other hand a bit more explanation about openface-master! when we can use it ...

except for this fundamental point, others are really tiny, something like:

updating the title of the subsections of compilers: Ubuntu gcc compiler instructions(for linux 14.04) Ubuntu clang compiler instructions (for linux 15.10) (although you mentioned it at the top of the page, when you are copy pasting commands my you forget about it and after encountering similar commands you pay attention to what is going on)

as i was not logged in as root, make -j2 works with sudo, so general form may be better

and also test it with subsection is really fine but may a separate subsection be better

With best regards

TadasBaltrusaitis commented 6 years ago

Hi the second page you link to is not part of this OpenFace project, so does not apply, you should only follow the instructions in https://github.com/TadasBaltrusaitis/OpenFace/wiki/Unix-Installation

The other project is developed by different people and is only related to this OpenFace by name and the fact that it is on faces (but for face recognition and not face behavior analysis)

I will update the wiki to explain more clearly separate instructions for clang and for gcc.

What do you mean by more explanation about openface-master?

fxfactorial commented 6 years ago

@elahia Look at https://github.com/TadasBaltrusaitis/OpenFace/pull/469 to land, its a docker container you can run.

Check out:

https://hub.docker.com/r/algebr/openface/

nishagandhi commented 6 years ago

Hi @elahia, Were you able to find the solution to the errors you posted above? I am facing a similar error while installing OpenFace.

elahia commented 6 years ago

Hi @Nisha, No i couldn't solve the problem. Wish you could....

On Wed, Jun 20, 2018 at 6:06 PM, Nisha Gandhi notifications@github.com wrote:

Hi @elahia https://github.com/elahia, Were you able to find the solution to the errors you posted above? I am facing a similar error while installing OpenFace.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TadasBaltrusaitis/OpenFace/issues/457#issuecomment-398805413, or mute the thread https://github.com/notifications/unsubscribe-auth/ANcDWE7CSaIr6nQ6AFfb8VFfjUozUVsNks5t-nLtgaJpZM4UN50Y .

nishagandhi commented 6 years ago

Okay @elahia sure I will let you know in case I find a solution

nishagandhi commented 6 years ago

Hi @elahia , I could solve the above error by adding the following line in CMakeLists.txt: set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lopenblas")

muhammadfraz commented 6 years ago

I solved this issue, but hit another after doing that, however, I found a workaround to that and manage to build it successfully.

Now to solve this problem, the issue apparently is that dlib header files are not liking being included after blas headers. In order to fix that, go to the file as pointed in your error message: lib/local/LandmarkDetector/include/stdafx.h

Move the lines that are including dlib header files:

#include <dlib/image_processing/frontal_face_detector.h>
#include <dlib/opencv.h> 

before these lines:

#include <cblas.h>
#include <f77blas.h>

There are a few other header files that require this change, you'll find them as you'll try building it a few times, make this change to all of those files and you'll be fine.

The build went through this problem but failed with some other linking problem close to 100%, that could be an issue to my local machine setup and might work for you. I haven't dig in to yet.

My initial thought is that these issues have emerged after the author tried to fix OSX support. Now the workaround to this issue is to go back a few commits and everything builds and works seamlessly.

Just checkout the commit hash: 92770ee, and follow the build process. It builds and works without a problem.

elahia commented 6 years ago

@nishagandhi @muhammadfraz Good job guys, thanks to share, but i went through half the way, i remember some other errors too, finally i used openface on windows

TadasBaltrusaitis commented 6 years ago

Should be fixed now, re-open if the issue still persists.