hrastnik / FaceSwap

Real-time FaceSwap application built with OpenCV and dlib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build for macOS

shaunharker opened this issue · comments

macOS installation

Here was a build on macOS Sierra 10.12.6. Dependencies were installed using the Homebrew package manager.

brew install lapack
brew install openblas
brew install opencv
brew install dlib --with-openblas
git clone https://github.com/hrastnik/FaceSwap.git
cd FaceSwap
wget http://sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2
bunzip2 *.bz2
ln -s /usr/local/share/opencv/haarcascades/haarcascade_frontalface_default.xml .
export PKG_CONFIG_PATH=/usr/local/opt/lapack/lib/pkgconfig:/usr/local/opt/openblas/lib/pkgconfig:$PKG_CONFIG_PATH
g++ -std=c++1y *.cpp $(pkg-config --libs opencv lapack openblas) -ldlib
mkdir bin
mv a.out bin
cd bin
./a.out

Thanks for the installation. When I run "g++ -std=c++1y *.cpp $(pkg-config --libs opencv lapack openblas) -ldlib", I got "MacdeMacBook-Pro:FaceSwap mac$ g++ -std=c++1y *.cpp $(pkg-config --libs opencv lapack openblas) -ldlib
In file included from FaceDetectorAndTracker.cpp:1:
./FaceDetectorAndTracker.h:3:10: fatal error: 'opencv2/core/core.hpp' file not found
#include <opencv2/core/core.hpp>
^
1 error generated.
In file included from FaceSwapper.cpp:1:
./FaceSwapper.h:3:10: fatal error: 'opencv2/imgproc/imgproc.hpp' file not found
#include <opencv2/imgproc/imgproc.hpp>
^
1 error generated.
main.cpp:1:10: fatal error: 'opencv2/highgui/highgui.hpp' file not found
#include <opencv2/highgui/highgui.hpp>
^
1 error generated."

What should I do? Can I get any advice? Thanks again.

You should make sure you have OpenCV installed before running that command.