bninopaul bninopaul - 1 year ago 410
Python Question

Trouble Installing OpenFace in Python

I am new to deeplearning and face recognition. After searching, I found this python package about deeplearning applied to face recognition called OpenFace. From its documentation, I think it is build on top of Torch for the neural nets computation.

I want to install the package in a virtual environment, so basically these are steps I made:

  1. brew install the necessary system requirements: bash,coreutils,curl,findutils,opencv, python and boost-python

  2. Make a virtual environment and install dlib, numpy, scipy, pandas, scikit-learn, scikit-image

  3. Cloned the openface github repository

  4. Install Torch

    curl -s | bash
    git clone torch --recursive
    cd torch
    source install/bin/torch-activate
    luarocks install csvigo
    luarocks install dpnn
    luarocks install nn

  5. cd to cloned openface repo and run
    python install

However when I run python:

>>>import openface

I get:

Segmentation Fault: 11

How do I fix this? Also, are there any other tutorials for using openface?
How to properly install OpenFace?

Answer Source

As I posted in the comments, this segfault was caused by compiling dlib with one Python version and running it with another. This was resolved by manually installing dlib rather than using their pip package.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download