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.94k stars 1.85k forks source link

Ubuntu 16.04, two .a files were built under /usr/local/bin ? #48

Closed jiapei100 closed 7 years ago

jiapei100 commented 8 years ago

Cheers Pei

TadasBaltrusaitis commented 8 years ago

I'm not exactly sure what you mean? Can you clarify the question?

jiapei100 commented 8 years ago

CMU and Cambridge are terrific... OpenFace is terrific -- just tested...

Two issues:

Please refer to http://www.visionopen.com/questions/RepositoryInfo.png

After successfully having OpenFace installed on my Ubuntu 16.04,

  1. why it is NOT installing .so files, but only .a files? I prefer the dynamic link, instead of the static link.
  2. why those two .a files are installed into /usr/local/bin, instead of /usr/local/lib ?

Two questions:

  1. what's the relationship between your https://github.com/TadasBaltrusaitis/OpenFace/ and this python code https://github.com/cmusatyalab/openface ?
  2. I used to do something about ASM/AAM, please refer to http://www.visionopen.com/members/jiapei/, that's why I'm deeply attracted by your project. Any plan for the next step?

Cheers Pei

Temigo commented 8 years ago

Any place for me to configure building dynamic link?

For building shared instead of static libraries, you should replace the STATIC tag by SHARED in the CMakeLists.txt.

Any place for me to specify building into /usr/local/lib ?

You can edit the CMakeLists.txt of the libraries/executables you're interested in. Specifically in the line install ( TARGETS FaceLandmarkVidMulti DESTINATION bin) (for instance) I guess you should replace bin with lib. The executables might better go into /usr/local/bin/ and the libraries into /user/local/lib/, though.

@TadasBaltrusaitis : I also wonder whether there is a reason for building static libraries instead of shared ones ? I wasn't able to use the API with static libraries, and the executables work well with shared libraries (also on Ubuntu).

TadasBaltrusaitis commented 8 years ago

@jiapei100 To answer your questions:

  1. They are related by name only. Just a coincidence of two projects sharing a name and working on faces, my approach is intended more for facial behavior, theirs is specifically for face recognition.
  2. I am still planning on extending the accuracy of landmark detection, action unit recognition and gaze estimation. I have a number of ideas for them, but they are currently at prototype stage.

@Temigo There is no particular technical reason I decided to go with static rather than shared libraries. As the project was originally based on a Visual Studio one, using static libraries was a bit easier.

benbuleong commented 7 years ago

Hi @TadasBaltrusaitis, I have built a Docker image that allows users of OpenFace on Ubuntu 16.04 to skip installation and use the binaries straightaway. Doing this because we have a couple of machines in our lab and going through the installation on each will take a lot of efforts. I think it is also good for results replicability.Perhaps, this is useful for anyone who wants to try out the feature extraction quickly?

TadasBaltrusaitis commented 7 years ago

Hi @benbuleong , that's great news! I'm sure it will be very useful to a lot of people. Do you mind if I advertise it in the readme and the wiki?

RomainSabathe commented 7 years ago

Thank you very much @benbuleong, that was really helpful! Don't forget to use the -q option when running a command, otherwise it won't work within the container.

benbuleong commented 7 years ago

@TadasBaltrusaitis, sorry for the late reply. Sure, please go ahead if you think it benefits users of OpenFace.

@RomainSabathe, you are welcome. Yes, the -q option should be used. sshfs is also installed in the image. That means, we can use OpenFace on a server to extract features from videos hosted another server (avoid copying for thousands of videos). I am sharing this simple bash script in case people find it useful, too.

#!/bin/bash

USER=XXX
MACHINE=YYY
SERVER_DATA_DIR=PATH_TO_VIDEOS_DIRECTORY
DOCKER_DATA_DIR=LOCALLY_MAPPED_DATA_FROM_SERVER

mkdir -p $DOCKER_DATA_DIR

sshfs -o idmap=user $USER@$MACHINE:$SERVER_DATA_DIR $DOCKER_DATA_DIR

./FeatureExtraction -q -f $DOCKER_DATA_DIR/TEST_VIDEO.mp4 -outroot $DOCKER_DATA_DIR -of TEST_VIDEO.features