-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling for an ARM architecture #86
Comments
I have not tried to work on ARM architectures myself, but I believe you will need to recompile everything for ARM as well, including dlib. |
Thanks for the reply @TadasBaltrusaitis, will do that. |
Hey ! I have recompiled everything on ARM, including Boost but for dlib I just got libopenblas-dev and liblapack-dev, still I get this error while compiling fatal error: error in backend: IO failure on output stream. Should I compile dlib from sources instead ? |
Hi, I do believe you would have to recompile the dlib library from source for ARM. Also, don't forget to compile the OpenCV library from source using CMake. Let us know how you get on, good luck. There is a guide on how to compile dlib from source in the dlib repo: https://github.com/davisking/dlib |
Thanks Wajahat for the quick answer ! Sorry if the question is basic but I Or should I download, uncompress and compile in a specific location ? Thanks in advance ! |
Oh.. on other note.. when I tried to compile with cmake I got this other error.. [ 92%] Linking CXX executable ../../bin/FaceLandmarkImg |
You're right the README in the repo does highlight how to compile the examples but you can compile the entire library in the same way from source. What variables are you setting when you call cmake? Have you set CMAKE_BUILD_TYPE to release? Also, you will need to use some additional variables to compile for ARM, find more information under this link: http://www.vtk.org/Wiki/CMake_Cross_Compiling |
Here is a good guide for compiling dlib from source on Linux: https://aleen42.gitbooks.io/personalwiki/content/qa/dlibonlinux.html |
Yes, for openFace I used the release value for BUILD_TYPE and thanks for the reference. I have had seen those instructions but I see that the guy uncompressed the whole library under a directory lib within the application directory together with the source code, that is why I couldn't figure out where should I have to do that in this case.. Have in mind that this is a linking problem and not a compilation one. |
Hi, I did replace various SSE options with -mfpu=neon and -funsafe-math-optimizations in CMakeLists.txt The examples work well, but the performance is really poor. With a 480p webcam I get maybe 2 fps peak in the multiple face example in perfect conditions, but it keeps on staggering for extended periods of longer than 1 second, especially when it cannot see a face. What could be the cause of such staggering? |
Hi, Great news on getting it to work on Raspberry Pi. From your description it sounds like the face detection is the expensive step. You could try switching to using OpenCV face detector which is faster but less accurate, you would need to set: You can also switch to a simpler landmark detection module which is faster but again less accurate, to do this you can pass This might make the tracking faster. |
Hi, BTW, the Neon patch by @fastfastball that I'm talking about is https://github.com/fastfastball/arm_neon_for_dlib_simd |
@svofski I also need build it on Android, May I ask you to share your modified source code that can run on Android? or diff patch file? thanks |
Hi, How you compiled the openface in raspberry pi 3 ? I have already dlib and opencv working on the raspberry pi 3. linking stage it gave error : ../../lib/local/LandmarkDetector/libLandmarkDetector.a(LandmarkDetectionValidator.cpp.o):(.rodata+0xf0): undefined reference to `typeinfo for tbb::task' |
@svofski I would also be super interested in seeing exactly how you got OpenFace working on the Raspberry Pi! Perhaps even your disk image if that is cool... |
the key is the installing TBB correctly (compiling). super adventure :) I suggest : https://www.theimpossiblecode.com/blog/intel-tbb-on-raspberry-pi/ |
@MyraBaba @markchrisallen sorry guys but I didn't document my build. It wasn't really performing very well on Rpi3, so I steered somewhere else. This build, with the entire environment, is long gone. I do not remember any particular difficulties making it work though. I had to manually compile ffmpeg with its dependencies, same for TBB. Then of course make sure that cmake picks up all the right libraries for OpenFace. I never tested OpenFace with an actual camera, I used an mp4 stream. |
Amazing thanks, quite new to all of this but I will keep on trying! |
I compiled OpenFace for aarm64 and I created a container that it's available at: If you want how I compile the OpenFace for Arm just check this Dockerfile. |
Hi, I wanted to see what the performance is like on an ARM architecture, I wanted to test it on an Intel computer stick, I have compiled OpenCV from source for ARM and have changed the dependencies accordingly, I am still running into issues, is there any good guides out there for building projects for ARM architecture. Also, will I have to recompile dlib for ARM too?
The text was updated successfully, but these errors were encountered: