OpenFace in a Raspberry Pi 3 (ARM)

3,919 views
Skip to first unread message

Gorka

unread,
May 9, 2016, 4:52:49 PM5/9/16
to CMU-OpenFace
Hi,

First of all thank you guys for this incredible open source project!
I've been using it on my Macbook and it works really well. Now I have a project where I need to make it run on a Raspberry Pi 3 with an ARMv8 processor. I already got Docker setup but I was not able, although I tried in many different ways, to make it run with the "bamos/openface" image. The SO is Raspbian Jessie (based on Debian Jessie) and the Docker version is 1.10.3.

Could you please help making this work on the Pi?

Thank you a lot for your time!
Regards,
Gorka

Gorka

unread,
May 9, 2016, 6:06:13 PM5/9/16
to CMU-OpenFace
I also tried building it from the repository as described in the Setup Guide, but I got an "exec format error", the same I get if I use the "bamos/openface" image and try to run it.

P.S.: I mistyped Operating System. I wrote SO where I wanted to write OS.

Thank you!
Gorka

Brandon Amos

unread,
May 10, 2016, 4:27:31 AM5/10/16
to CMU-OpenFace
Hi Gorka, since I built the Docker container on x86, it contains
some x86-specific code that won't execute on ARM.
I recommend:

  1. Try to build the Docker container from scratch, which will require
  re-building the base opencv-dlib-torch image. If you don't change the base
  image you're still pulling in compiled x86 code.
 
  First build:

  Then change the FROM to that container and build:

  2. Build the dependencies from scratch for ARM, not using Docker.

-Brandon.

Gorka

unread,
May 10, 2016, 4:45:47 AM5/10/16
to CMU-OpenFace
Hi Brandon,
Thank you a lot for your help! I will try it in a few hours.

Thank you!
Gorka

Gorka

unread,
May 10, 2016, 1:44:31 PM5/10/16
to CMU-OpenFace
Hi Brandon,

I changed the "opencv-dlib-torch.Dockerfile" to be built from the "resin/rpi-raspbian" image and it was all ok for like 3 hours until it started compiling OpenCV and it threw many errors related to H264, MPEG-2, etc. Do you know what may be causing it?

Thank you a lot!
Regards,
Gorka

basni...@gmail.com

unread,
Jun 15, 2016, 11:41:51 AM6/15/16
to CMU-OpenFace
Hi all,

I am also trying to get OpenFace to work on a Raspberry PI 3.

Did you succeed? If yes, could you please share how you did it and how the performance is.


Best, Bas

YC

unread,
Jul 20, 2016, 4:29:05 AM7/20/16
to CMU-OpenFace
Have you installed the related packages? For example:
sudo apt-get -qq install libopencv-dev build-essential checkinstall cmake pkg-config yasm libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils ffmpeg cmake qt5-default checkinstall

nitish bhardwaj

unread,
Jul 26, 2016, 7:09:04 AM7/26/16
to CMU-OpenFace
Hi,

Has anyone successfully installed Torch on PI ?

Please check the issue at https://github.com/torch/nn/issues/803 

Vijayenthiran

unread,
Jul 28, 2016, 2:01:26 AM7/28/16
to CMU-OpenFace
Hi,
Did you tried installing directly without using the docker? I was able to successfully setup and run open face in odroid-xu4.
Message has been deleted

borch...@gmail.com

unread,
Sep 12, 2016, 5:32:26 PM9/12/16
to CMU-OpenFace
Hello,

someone was finally able to docker built for Raspberry 3?


Thanks
.axel
Message has been deleted

William Chen

unread,
Sep 14, 2016, 3:38:36 PM9/14/16
to CMU-OpenFace
Hi,

I compiled the Dlib, which was used for detection and landmark generation for open face, on the Pi 3 B. Immediately, I noticed a huge performance drop compared to the version I compiled on x86. Processing a 500 by 375 image will take approximately 16 s on the Pi ARM chip (1.2 GHz) compared to ~ 300 ms on the intel x86 chip (2.8 GHz). Then I compare Dlib on two CPUs has similar clock speed (x86 vs ARM) at about 540 MHz. x86 finished it in 400 ms where as ARM took about 90 s on a same resolution image.

I've read somewhere that we need to enable SIMD instructions on the ARMv8 chip. Just wondering if there is anyone has done that before.
Message has been deleted

joov

unread,
Dec 6, 2016, 12:04:13 AM12/6/16
to CMU-OpenFace
Docker Image is joov/rpi-openface

fatih şerefli

unread,
Jan 23, 2017, 6:30:27 AM1/23/17
to CMU-OpenFace
Hello Vijayenthiran
i am trying instal openc face on Odroid ux4 can you help me about this subject ?
i would be glade


28 Temmuz 2016 Perşembe 09:01:26 UTC+3 tarihinde Vijayenthiran yazdı:
Message has been deleted

Estérfano Emanoel Marques Lopes

unread,
May 17, 2017, 8:27:45 AM5/17/17
to CMU-OpenFace
Has someone get results? I have trying for a week extract the landmarks points from a face, but dlib give me a ARM error, more specific something about 64 bits.

I'm trying on a Raspberry Pi 3 Model B. Someone get success on this try?

Igor Moiseev

unread,
Jun 15, 2017, 6:01:33 AM6/15/17
to CMU-OpenFace
It is a bit late, but currently it was solved within dlib library. Here is the key comment https://github.com/davisking/dlib/issues/557#issuecomment-298230416
Reply all
Reply to author
Forward
0 new messages