Difference between revisions of "Openface: Instalasi di Ubuntu 18.04 Desktop"

From OnnoWiki
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
  
==Instalasi Ubuntu==
+
Untuk instalasi di Ubuntu, akan membutuhkan
 
 
Membutuhkan
 
  
 
* gcc
 
* gcc
Line 15: Line 13:
 
* boost
 
* boost
  
Instalasi dependency
+
==Instalasi dependency==
  
 
  sudo su
 
  sudo su
Line 22: Line 20:
 
  git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev \
 
  git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev \
 
  python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev \
 
  python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev \
  libtiff-dev libdc1394-22-dev checkinstall
+
  libtiff-dev libdc1394-22-dev checkinstall unzip \
 
+
  llvm clang libc++-dev libc++abi-dev libboost-all-dev
  apt -y install llvm clang libc++-dev libc++abi-dev
 
 
 
 
 
Instalasi OpenCV
 
 
 
cd /usr/local/src
 
wget https://github.com/opencv/opencv/archive/3.4.1.zip
 
sudo unzip 3.4.1.zip
 
cd opencv-3.4.1
 
mkdir build
 
cd build
 
 
 
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_SHARED_LIBS=OFF ..
 
make -j2
 
sudo make install
 
 
 
Instalasi boost
 
 
 
sudo apt-get install libboost-all-dev
 
 
 
==Install LLVM, Clang & libc++ ==
 
 
 
apt update
 
 
 
 
    Get Boost 1.61.0:
 
 
 
    5.1 Install boost dependency:
 
 
 
    sudo apt-get install libbz2-dev
 
 
 
    5.2 Get the boost source:
 
 
 
    Download boost_1_61_0.tar.bz2.
 
 
 
    In the directory where you want to put the boost installation, execute:
 
 
 
    tar --bzip2 -xf /path/to/boost_1_61_0.tar.bz2
 
 
 
    5.3 Build and install:
 
 
 
    cd path/to/boost_1_61_0
 
    ./bootstrap.sh --with-toolset=clang --prefix=/usr/local
 
    ./b2 toolset=clang cxxflags="-std=c++11 -stdlib=libc++ -I/usr/include/libcxxabi" linkflags="-stdlib=libc++" --prefix=/usr/local -j 10 define=BOOST_SYSTEM_NO_DEPRECATED stage release
 
    sudo ./b2 install toolset=clang cxxflags="-std=c++11 -stdlib=libc++" linkflags="-stdlib=libc++" --prefix=/usr/local
 
 
 
  
 
==Instalasi OpenFace==
 
==Instalasi OpenFace==
Line 76: Line 28:
 
  git clone https://github.com/TadasBaltrusaitis/OpenFace.git
 
  git clone https://github.com/TadasBaltrusaitis/OpenFace.git
 
  cd OpenFace
 
  cd OpenFace
  mkdir build
+
  chmod +x download_models.sh
  cd build
+
  ./download_models.sh
  cmake -D CMAKE_BUILD_TYPE=RELEASE ..
+
  ./install.sh
make
 
 
 
 
 
 
 
make
 
  
        Ubuntu 15.10
+
'''NOTE:''' libjasper kayanya bermasalah di ubuntu 18.04 ... semoga nantinya bisa solved
 
 
cmake -D CMAKE_CXX_COMPILER=clang++ -D CMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++ -I/usr/include/libcxxabi" -D CMAKE_EXE_LINKER_FLAGS="-std=c++11 -stdlib=libc++ -lc++abi" -D CMAKE_BUILD_TYPE=RELEASE ..
 
 
 
make
 
  
 
==Test==
 
==Test==
Line 108: Line 51:
  
 
  ./bin/FeatureExtraction -verbose -f "../samples/default.wmv"
 
  ./bin/FeatureExtraction -verbose -f "../samples/default.wmv"
 
 
  
 
==Referensi==
 
==Referensi==
  
 
* https://github.com/TadasBaltrusaitis/OpenFace/wiki/Unix-Installation
 
* https://github.com/TadasBaltrusaitis/OpenFace/wiki/Unix-Installation

Latest revision as of 12:21, 22 May 2018

Sumber:


Untuk instalasi di Ubuntu, akan membutuhkan

  • gcc
  • clang
  • cmake
  • opencv
  • tbb
  • boost

Instalasi dependency

sudo su
apt update
apt -y install build-essential cmake libopenblas-dev liblapack-dev \
git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev \
python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev \
libtiff-dev libdc1394-22-dev checkinstall unzip \
llvm clang libc++-dev libc++abi-dev libboost-all-dev

Instalasi OpenFace

cd /usr/local/src
git clone https://github.com/TadasBaltrusaitis/OpenFace.git
cd OpenFace
chmod +x download_models.sh 
./download_models.sh
./install.sh

NOTE: libjasper kayanya bermasalah di ubuntu 18.04 ... semoga nantinya bisa solved

Test

for videos:

./bin/FaceLandmarkVid -f "../samples/changeLighting.wmv" -f "../samples/2015-10-15-15-14.avi"

for images:

./bin/FaceLandmarkImg -fdir "../samples/" -wild

for multiple faces in videos:

./bin/FaceLandmarkVidMulti -f ../samples/multi_face.avi

for feature extraction (facial landmarks, head pose, AUs, gaze and HOG and similarity aligned faces):

./bin/FeatureExtraction -verbose -f "../samples/default.wmv"

Referensi