
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. brew install lapack brew install openblas brew install opencv brew install dlib -with-openblas git clone cd FaceSwap wget bunzip2 *.bz2 ln -s /usr/local/share/opencv/haarcascades/haarcascade_frontalface_default.xml. Special thanks to for providing the build commands. g++ -std=c++1y *.cpp $(pkg-config -libs opencv lapack) -ldlib. If you want to run this on Ubuntu 16.04 run this set of commands: sudo apt install libopencv-dev liblapack-dev libdlib-dev wget bunzip2 *.bz2 ln -s /usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml. h files from this projectĬopy haarcascade_frontalface_default.xml from OpenCV sources/data/haarcascades directory to project directoryĭownload shape_predictor_68_face_landmarks.dat from and place in project directoryĪfter that FaceSwap should work. Right click Header Files in the Solution Explorer
Right click Source Files in the Solution Explorer
In the Additional Dependencies add "opencv_world320.lib". In the Additional Dependencies add "opencv_world320d.lib"Ĭhange the Configuration in the top left to "Release" and repeat. In the panel on the left choose Linker>Input. Note the path might be different if you have different architecture or VS version. In the Additional Library Directories add "D:\opencv\opencv\build\圆4\vc14\lib".
In the panel on the left choose Linker>General. Note the path might be different if you have different dlib version. In the Additional Include Directories field add two directories:.
In the property window make sure the selected Configuration in the top left is "Debug" and Platform is "圆4". In the active solution platform select 圆4. Right click MyProject and choose PropertiesĬlick the "Configuration Manager." button in the top left corner In Visual Studio open the Solution Explorer window Make sure the "Debug" solution configuration is selected Extract the downloaded zip file to a directory (for example D:\dlib)ĭownload and install Visual Studio 2015 or later versionsĬreate new empty project and name it something (for example MyProject). Run the downloaded OpenCV executable file and select a directory to extract the OpenCV library (for example D:\opencv).