├── .gitignore ├── 3rdparty ├── FaceTracker │ ├── CLM.cc │ ├── CLM.h │ ├── COPYRIGHT │ ├── FCheck.cc │ ├── FCheck.h │ ├── FDet.cc │ ├── FDet.h │ ├── IO.cc │ ├── IO.h │ ├── Patch.cc │ ├── Patch.h │ ├── README │ ├── Tracker.cc │ ├── Tracker.h │ ├── _PAW.cc │ ├── _PAW.h │ ├── _PDM.cc │ └── _PDM.h └── OpenFace │ ├── Copyright.txt │ ├── FaceAnalyser │ ├── AU_predictors │ │ ├── AU_all_best.txt │ │ ├── AU_all_static.txt │ │ ├── svm_combined │ │ │ ├── AU_10_dynamic.dat │ │ │ ├── AU_10_static.dat │ │ │ ├── AU_12_dynamic.dat │ │ │ ├── AU_12_static.dat │ │ │ ├── AU_14_dynamic.dat │ │ │ ├── AU_14_static.dat │ │ │ ├── AU_15_dynamic.dat │ │ │ ├── AU_15_static.dat │ │ │ ├── AU_17_dynamic.dat │ │ │ ├── AU_17_static.dat │ │ │ ├── AU_1_dynamic.dat │ │ │ ├── AU_1_static.dat │ │ │ ├── AU_20_dynamic.dat │ │ │ ├── AU_20_static.dat │ │ │ ├── AU_23_dynamic.dat │ │ │ ├── AU_23_static.dat │ │ │ ├── AU_25_dynamic.dat │ │ │ ├── AU_25_static.dat │ │ │ ├── AU_26_dynamic.dat │ │ │ ├── AU_26_static.dat │ │ │ ├── AU_28_dynamic.dat │ │ │ ├── AU_28_static.dat │ │ │ ├── AU_2_dynamic.dat │ │ │ ├── AU_2_static.dat │ │ │ ├── AU_45_dynamic.dat │ │ │ ├── AU_45_static.dat │ │ │ ├── AU_4_dynamic.dat │ │ │ ├── AU_4_static.dat │ │ │ ├── AU_5_dynamic.dat │ │ │ ├── AU_5_static.dat │ │ │ ├── AU_6_dynamic.dat │ │ │ ├── AU_6_static.dat │ │ │ ├── AU_7_dynamic.dat │ │ │ ├── AU_7_static.dat │ │ │ ├── AU_9_dynamic.dat │ │ │ └── AU_9_static.dat │ │ └── svr_combined │ │ │ ├── AU_10_static_intensity_comb.dat │ │ │ ├── AU_12_static_intensity_comb.dat │ │ │ ├── AU_14_static_intensity.dat │ │ │ ├── AU_15_dynamic_intensity_comb.dat │ │ │ ├── AU_15_static_intensity_comb.dat │ │ │ ├── AU_17_dynamic_intensity_comb.dat │ │ │ ├── AU_17_static_intensity_comb.dat │ │ │ ├── AU_1_dynamic_intensity_comb.dat │ │ │ ├── AU_1_static_intensity.dat │ │ │ ├── AU_20_dynamic_intensity.dat │ │ │ ├── AU_20_static_intensity.dat │ │ │ ├── AU_23_dynamic_intensity_comb.dat │ │ │ ├── AU_23_static_intensity_comb.dat │ │ │ ├── AU_25_dynamic_intensity_comb.dat │ │ │ ├── AU_25_static_intensity.dat │ │ │ ├── AU_26_dynamic_intensity_comb.dat │ │ │ ├── AU_26_static_intensity_comb.dat │ │ │ ├── AU_2_dynamic_intensity_comb.dat │ │ │ ├── AU_2_static_intensity_comb.dat │ │ │ ├── AU_45_dynamic_intensity_comb.dat │ │ │ ├── AU_45_static_intensity_comb.dat │ │ │ ├── AU_4_static_intensity_comb.dat │ │ │ ├── AU_5_dynamic_intensity.dat │ │ │ ├── AU_5_static_intensity.dat │ │ │ ├── AU_6_static_intensity_comb.dat │ │ │ ├── AU_7_static_intensity_comb.dat │ │ │ ├── AU_9_dynamic_intensity.dat │ │ │ └── AU_9_static_intensity.dat │ ├── CMakeLists.txt │ ├── FaceAnalyser.vcxproj │ ├── FaceAnalyser.vcxproj.filters │ ├── include │ │ ├── FaceAnalyser.h │ │ ├── Face_utils.h │ │ ├── GazeEstimation.h │ │ ├── SVM_dynamic_lin.h │ │ ├── SVM_static_lin.h │ │ ├── SVR_dynamic_lin_regressors.h │ │ └── SVR_static_lin_regressors.h │ └── src │ │ ├── FaceAnalyser.cpp │ │ ├── Face_utils.cpp │ │ ├── GazeEstimation.cpp │ │ ├── SVM_dynamic_lin.cpp │ │ ├── SVM_static_lin.cpp │ │ ├── SVR_dynamic_lin_regressors.cpp │ │ └── SVR_static_lin_regressors.cpp │ ├── LandmarkDetector │ ├── CMakeLists.txt │ ├── LandmarkDetector.vcxproj │ ├── LandmarkDetector.vcxproj.filters │ ├── include │ │ ├── CCNF_patch_expert.h │ │ ├── LandmarkCoreIncludes.h │ │ ├── LandmarkDetectionValidator.h │ │ ├── LandmarkDetectorFunc.h │ │ ├── LandmarkDetectorModel.h │ │ ├── LandmarkDetectorParameters.h │ │ ├── LandmarkDetectorUtils.h │ │ ├── PAW.h │ │ ├── PDM.h │ │ ├── Patch_experts.h │ │ ├── SVR_patch_expert.h │ │ └── stdafx.h │ ├── model │ │ ├── clm_general.txt │ │ ├── clm_wild.txt │ │ ├── clnf_general.txt │ │ ├── clnf_wild.txt │ │ ├── detection_validation │ │ │ ├── validator_cnn.txt │ │ │ └── validator_general_68.txt │ │ ├── haarAlign.txt │ │ ├── main_clm_general.txt │ │ ├── main_clm_wild.txt │ │ ├── main_clnf_general.txt │ │ ├── main_clnf_wild.txt │ │ ├── model_eye │ │ │ ├── clnf_left_synth.txt │ │ │ ├── clnf_right_synth.txt │ │ │ ├── main_clnf_synth_left.txt │ │ │ ├── main_clnf_synth_right.txt │ │ │ ├── patch_experts │ │ │ │ ├── ccnf_patches_1.00_synth_lid_.txt │ │ │ │ ├── ccnf_patches_1.50_synth_lid_.txt │ │ │ │ ├── left_ccnf_patches_1.00_synth_lid_.txt │ │ │ │ └── left_ccnf_patches_1.50_synth_lid_.txt │ │ │ └── pdms │ │ │ │ ├── pdm_28_eye_3D_closed.txt │ │ │ │ └── pdm_28_l_eye_3D_closed.txt │ │ ├── model_inner │ │ │ ├── clnf_inner.txt │ │ │ ├── main_clnf_inner.txt │ │ │ ├── patch_experts │ │ │ │ └── ccnf_patches_1.00_inner.txt │ │ │ └── pdms │ │ │ │ └── pdm_51_inner.txt │ │ ├── patch_experts │ │ │ ├── ccnf_patches_0.25_general.txt │ │ │ ├── ccnf_patches_0.25_wild.txt │ │ │ ├── ccnf_patches_0.35_general.txt │ │ │ ├── ccnf_patches_0.35_wild.txt │ │ │ ├── ccnf_patches_0.5_general.txt │ │ │ ├── ccnf_patches_0.5_wild.txt │ │ │ ├── ccnf_patches_1_wild.txt │ │ │ ├── svr_patches_0.25_general.txt │ │ │ ├── svr_patches_0.25_wild.txt │ │ │ ├── svr_patches_0.35_general.txt │ │ │ ├── svr_patches_0.35_wild.txt │ │ │ ├── svr_patches_0.5_general.txt │ │ │ └── svr_patches_0.5_wild.txt │ │ ├── pdms │ │ │ ├── In-the-wild_aligned_PDM_68.txt │ │ │ └── Multi-PIE_aligned_PDM_68.txt │ │ ├── tris_68.txt │ │ └── tris_68_full.txt │ └── src │ │ ├── CCNF_patch_expert.cpp │ │ ├── LandmarkDetectionValidator.cpp │ │ ├── LandmarkDetectorFunc.cpp │ │ ├── LandmarkDetectorModel.cpp │ │ ├── LandmarkDetectorParameters.cpp │ │ ├── LandmarkDetectorUtils.cpp │ │ ├── PAW.cpp │ │ ├── PDM.cpp │ │ ├── Patch_experts.cpp │ │ ├── SVR_patch_expert.cpp │ │ └── stdafx.cpp │ ├── OpenFace-license.txt │ └── README.md ├── LICENSE ├── README.md ├── assets ├── 1.wmv ├── face.con ├── face.tracker ├── face.tri ├── face2.tracker ├── people │ ├── angelina-jolie.jpg │ ├── fan-bingbing.jpg │ ├── huang-bo.jpg │ ├── obama.jpg │ ├── tom-cruise.jpg │ └── will-smith.jpg └── shader │ ├── basic.vert │ ├── clone.frag │ └── maskBlur.frag ├── doc ├── movie-mode.jpg └── tom-cruise.jpg ├── include ├── Resources.h └── item.def ├── ref └── FaceLandmarkVid.cpp ├── resources ├── CinderApp.icns ├── CinderApp_ios.png └── cinder_app_icon.ico ├── src ├── BaseFaceTracker.cpp ├── BaseFaceTracker.h ├── Clone.cpp ├── Clone.h ├── FaceVFXApp.cpp ├── JasonFaceTracker.cpp ├── JasonFaceTracker.h ├── OpenFaceTracker.cpp └── OpenFaceTracker.h ├── vs2015 ├── FaceVFX.sln ├── FaceVFX.vcxproj ├── FaceVFX.vcxproj.filters └── Resources.rc ├── xcode ├── FaceVFX.xcodeproj │ └── project.pbxproj ├── FaceVFX_Prefix.pch └── Info.plist └── xcode_ios ├── FaceVFX.xcodeproj └── project.pbxproj ├── FaceVFX_Prefix.pch ├── Images.xcassets └── LaunchImage.launchimage │ ├── Contents.json │ ├── Default-568h@2x.png │ ├── Default-667@2x.png │ └── Default-736h@3x~iphone.png ├── Info.plist └── LaunchScreen.xib /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Compiled Dynamic libraries 8 | *.so 9 | *.dylib 10 | 11 | # Compiled Static libraries 12 | *.lai 13 | *.la 14 | *.a 15 | 16 | # Executables 17 | # *.exe 18 | *.out 19 | *.app 20 | 21 | # Auto-generated files 22 | /.project 23 | /bin 24 | /build 25 | /3rdparty/lua/src/luaconf.h 26 | /3rdparty/blendish/blender_icons.svg 27 | .hg_archival.txt 28 | *.hgignore 29 | /vc2013/Debug 30 | /vc2013/Release 31 | /vc2013/*.suo 32 | /vc2013/*.opensdf 33 | /vc2013/*.sdf 34 | /assets/MiniConfig.xml 35 | 36 | ## Build generated 37 | build/ 38 | DerivedData/ 39 | *.xcworkspace 40 | 41 | ## Various settings 42 | *.pbxuser 43 | !default.pbxuser 44 | *.mode1v3 45 | !default.mode1v3 46 | *.mode2v3 47 | !default.mode2v3 48 | *.perspectivev3 49 | !default.perspectivev3 50 | xcuserdata/ 51 | 52 | ## Other 53 | *.moved-aside 54 | *.xccheckout 55 | -------------------------------------------------------------------------------- /3rdparty/FaceTracker/CLM.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2010, Jason Mora Saragih, all rights reserved. 3 | // 4 | // This file is part of FaceTracker. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // 9 | // * The software is provided under the terms of this licence stricly for 10 | // academic, non-commercial, not-for-profit purposes. 11 | // * Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions (licence) and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above copyright 14 | // notice, this list of conditions (licence) and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * The name of the author may not be used to endorse or promote products 18 | // derived from this software without specific prior written permission. 19 | // * As this software depends on other libraries, the user must adhere to 20 | // and keep in place any licencing terms of those libraries. 21 | // * Any publications arising from the use of this software, including but 22 | // not limited to academic journal and conference publications, technical 23 | // reports and manuals, must cite the following work: 24 | // 25 | // J. M. Saragih, S. Lucey, and J. F. Cohn. Face Alignment through 26 | // Subspace Constrained Mean-Shifts. International Conference of Computer 27 | // Vision (ICCV), September, 2009. 28 | // 29 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 30 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 32 | // EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 34 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 35 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 36 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 38 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | /////////////////////////////////////////////////////////////////////////////// 40 | #ifndef __CLM_h_ 41 | #define __CLM_h_ 42 | #include "_PDM.h" 43 | #include "Patch.h" 44 | #include 45 | namespace FACETRACKER 46 | { 47 | //=========================================================================== 48 | /** 49 | A Constrained Local Model 50 | */ 51 | class CLM{ 52 | public: 53 | PDM _pdm; /**< 3D Shape model */ 54 | cv::Mat _plocal;/**< local parameters */ 55 | cv::Mat _pglobl;/**< global parameters */ 56 | cv::Mat _refs; /**< Reference shape */ 57 | std::vector _cent; /**< Centers/view (Euler) */ 58 | std::vector _visi; /**< Visibility for each view */ 59 | std::vector > _patch; /**< Patches/point/view */ 60 | 61 | CLM(){;} 62 | CLM(const char* fname){this->Load(fname);} 63 | CLM(PDM &s,cv::Mat &r, std::vector &c, 64 | std::vector &v,std::vector > &p){ 65 | this->Init(s,r,c,v,p); 66 | } 67 | CLM& operator=(CLM const&rhs); 68 | inline int nViews(){return _patch.size();} 69 | int GetViewIdx(); 70 | void Load(const char* fname); 71 | void Save(const char* fname); 72 | void Write(std::ofstream &s); 73 | void Read(std::ifstream &s,bool readType = true); 74 | void Init(PDM &s,cv::Mat &r, std::vector &c, 75 | std::vector &v,std::vector > &p); 76 | void Fit(cv::Mat im, std::vector &wSize, 77 | int nIter = 10,double clamp = 3.0,double fTol = 0.0); 78 | private: 79 | cv::Mat cshape_,bshape_,oshape_,ms_,u_,g_,J_,H_; 80 | std::vector prob_,pmem_,wmem_; 81 | void Optimize(int idx,int wSize,int nIter, 82 | double fTol,double clamp,bool rigid); 83 | }; 84 | //=========================================================================== 85 | } 86 | #endif 87 | -------------------------------------------------------------------------------- /3rdparty/FaceTracker/COPYRIGHT: -------------------------------------------------------------------------------- 1 | FaceTracker Licence 2 | ------------------- 3 | (Academic, non-commercial, not-for-profit licence) 4 | 5 | Copyright (c) 2010 Jason Mora Saragih 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are met: 10 | 11 | * The software is provided under the terms of this licence stricly for 12 | academic, non-commercial, not-for-profit purposes. 13 | * Redistributions of source code must retain the above copyright notice, 14 | this list of conditions (licence) and the following disclaimer. 15 | * Redistributions in binary form must reproduce the above copyright 16 | notice, this list of conditions (licence) and the following disclaimer 17 | in the documentation and/or other materials provided with the 18 | distribution. 19 | * The name of the author may not be used to endorse or promote products 20 | derived from this software without specific prior written permission. 21 | * As this software depends on other libraries, the user must adhere to and 22 | keep in place any licencing terms of those libraries. 23 | * Any publications arising from the use of this software, including but 24 | not limited to academic journal and conference publications, technical 25 | reports and manuals, must cite the following work: 26 | 27 | J. M. Saragih, S. Lucey, and J. F. Cohn. Face Alignment through Subspace 28 | Constrained Mean-Shifts. International Journal of Computer Vision 29 | (ICCV), September, 2009. 30 | 31 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 32 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 33 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 34 | EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 35 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 36 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 38 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 39 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 40 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | -------------------------------------------------------------------------------- /3rdparty/FaceTracker/FCheck.cc: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2010, Jason Mora Saragih, all rights reserved. 3 | // 4 | // This file is part of FaceTracker. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // 9 | // * The software is provided under the terms of this licence stricly for 10 | // academic, non-commercial, not-for-profit purposes. 11 | // * Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions (licence) and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above copyright 14 | // notice, this list of conditions (licence) and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * The name of the author may not be used to endorse or promote products 18 | // derived from this software without specific prior written permission. 19 | // * As this software depends on other libraries, the user must adhere to 20 | // and keep in place any licencing terms of those libraries. 21 | // * Any publications arising from the use of this software, including but 22 | // not limited to academic journal and conference publications, technical 23 | // reports and manuals, must cite the following work: 24 | // 25 | // J. M. Saragih, S. Lucey, and J. F. Cohn. Face Alignment through 26 | // Subspace Constrained Mean-Shifts. International Conference of Computer 27 | // Vision (ICCV), September, 2009. 28 | // 29 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 30 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 32 | // EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 34 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 35 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 36 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 38 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | /////////////////////////////////////////////////////////////////////////////// 40 | #include "FCheck.h" 41 | using namespace FACETRACKER; 42 | using namespace std; 43 | //=========================================================================== 44 | FCheck& FCheck::operator= (FCheck const& rhs) 45 | { 46 | this->_b = rhs._b; this->_w = rhs._w.clone(); this->_paw = rhs._paw; 47 | crop_.create(_paw._mask.rows,_paw._mask.cols,CV_8U); 48 | vec_.create(_paw._nPix,1,CV_64F); return *this; 49 | } 50 | //=========================================================================== 51 | void FCheck::Init(double b, cv::Mat &w, PAW &paw) 52 | { 53 | assert((w.type() == CV_64F) && (w.rows == paw._nPix)); 54 | _b = b; _w = w.clone(); _paw = paw; 55 | crop_.create(_paw._mask.rows,_paw._mask.cols,CV_8U); 56 | vec_.create(_paw._nPix,1,CV_64F); return; 57 | } 58 | //=========================================================================== 59 | void FCheck::Load(const char* fname) 60 | { 61 | ifstream s(fname); assert(s.is_open()); this->Read(s); s.close(); return; 62 | } 63 | //=========================================================================== 64 | void FCheck::Save(const char* fname) 65 | { 66 | ofstream s(fname); assert(s.is_open()); this->Write(s);s.close(); return; 67 | } 68 | //=========================================================================== 69 | void FCheck::Write(ofstream &s) 70 | { 71 | s << IO::FCHECK << " " << _b << " "; 72 | IO::WriteMat(s,_w); _paw.Write(s); return; 73 | } 74 | //=========================================================================== 75 | void FCheck::Read(ifstream &s,bool readType) 76 | { 77 | if(readType){int type; s >> type; assert(type == IO::FCHECK);} 78 | s >> _b; IO::ReadMat(s,_w); _paw.Read(s); 79 | crop_.create(_paw._mask.rows,_paw._mask.cols,CV_8U); 80 | vec_.create(_paw._nPix,1,CV_64F); return; 81 | } 82 | //=========================================================================== 83 | bool FCheck::Check(cv::Mat &im,cv::Mat &s) 84 | { 85 | assert((im.type() == CV_8U) && (s.type() == CV_64F) && 86 | (s.rows/2 == _paw.nPoints()) && (s.cols == 1)); 87 | _paw.Crop(im,crop_,s); 88 | if((vec_.rows!=_paw._nPix)||(vec_.cols!=1))vec_.create(_paw._nPix,1,CV_64F); 89 | int i,j,w = crop_.cols,h = crop_.rows; 90 | cv::MatIterator_ vp = vec_.begin(); 91 | cv::MatIterator_ cp = crop_.begin(); 92 | cv::MatIterator_ mp = _paw._mask.begin(); 93 | for(i=0;i 0)return true; else return false; 97 | } 98 | //=========================================================================== 99 | //=========================================================================== 100 | //=========================================================================== 101 | //=========================================================================== 102 | //=========================================================================== 103 | //=========================================================================== 104 | //=========================================================================== 105 | //=========================================================================== 106 | //=========================================================================== 107 | //=========================================================================== 108 | void MFCheck::Load(const char* fname) 109 | { 110 | ifstream s(fname); assert(s.is_open()); this->Read(s); s.close(); return; 111 | } 112 | //=========================================================================== 113 | void MFCheck::Save(const char* fname) 114 | { 115 | ofstream s(fname); assert(s.is_open()); this->Write(s);s.close(); return; 116 | } 117 | //=========================================================================== 118 | void MFCheck::Write(ofstream &s) 119 | { 120 | s << IO::MFCHECK << " " << _fcheck.size() << " "; 121 | for(int i = 0; i < (int)_fcheck.size(); i++)_fcheck[i].Write(s); return; 122 | } 123 | //=========================================================================== 124 | void MFCheck::Read(ifstream &s,bool readType) 125 | { 126 | if(readType){int type; s >> type; assert(type == IO::MFCHECK);} 127 | int n; s >> n; _fcheck.resize(n); 128 | for(int i = 0; i < n; i++)_fcheck[i].Read(s); return; 129 | } 130 | //=========================================================================== 131 | bool MFCheck::Check(int idx,cv::Mat &im,cv::Mat &s) 132 | { 133 | assert((idx >= 0) && (idx < (int)_fcheck.size())); 134 | return _fcheck[idx].Check(im,s); 135 | } 136 | //=========================================================================== 137 | -------------------------------------------------------------------------------- /3rdparty/FaceTracker/FCheck.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2010, Jason Mora Saragih, all rights reserved. 3 | // 4 | // This file is part of FaceTracker. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // 9 | // * The software is provided under the terms of this licence stricly for 10 | // academic, non-commercial, not-for-profit purposes. 11 | // * Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions (licence) and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above copyright 14 | // notice, this list of conditions (licence) and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * The name of the author may not be used to endorse or promote products 18 | // derived from this software without specific prior written permission. 19 | // * As this software depends on other libraries, the user must adhere to 20 | // and keep in place any licencing terms of those libraries. 21 | // * Any publications arising from the use of this software, including but 22 | // not limited to academic journal and conference publications, technical 23 | // reports and manuals, must cite the following work: 24 | // 25 | // J. M. Saragih, S. Lucey, and J. F. Cohn. Face Alignment through 26 | // Subspace Constrained Mean-Shifts. International Conference of Computer 27 | // Vision (ICCV), September, 2009. 28 | // 29 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 30 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 32 | // EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 34 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 35 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 36 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 38 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | /////////////////////////////////////////////////////////////////////////////// 40 | #ifndef __FCheck_h_ 41 | #define __FCheck_h_ 42 | #include "_PAW.h" 43 | #include 44 | namespace FACETRACKER 45 | { 46 | //=========================================================================== 47 | /** 48 | Checks for Tracking Failure 49 | */ 50 | class FCheck{ 51 | public: 52 | PAW _paw; /**< Piecewise affine warp */ 53 | double _b; /**< SVM bias */ 54 | cv::Mat _w; /**< SVM gain */ 55 | 56 | FCheck(){;} 57 | FCheck(const char* fname){this->Load(fname);} 58 | FCheck(double b, cv::Mat &w, PAW &paw){this->Init(b,w,paw);} 59 | FCheck& operator=(FCheck const&rhs); 60 | void Init(double b, cv::Mat &w, PAW &paw); 61 | void Load(const char* fname); 62 | void Save(const char* fname); 63 | void Write(std::ofstream &s); 64 | void Read(std::ifstream &s,bool readType = true); 65 | bool Check(cv::Mat &im,cv::Mat &s); 66 | 67 | private: 68 | cv::Mat crop_,vec_; 69 | }; 70 | //=========================================================================== 71 | /** 72 | Checks for Multiview Tracking Failure 73 | */ 74 | class MFCheck{ 75 | public: 76 | std::vector _fcheck; /**< FCheck for each view */ 77 | 78 | MFCheck(){;} 79 | MFCheck(const char* fname){this->Load(fname);} 80 | MFCheck(std::vector &fcheck){this->Init(fcheck);} 81 | MFCheck& operator=(MFCheck const&rhs){ 82 | this->_fcheck = rhs._fcheck; return *this; 83 | } 84 | void Init(std::vector &fcheck){_fcheck = fcheck;} 85 | void Load(const char* fname); 86 | void Save(const char* fname); 87 | void Write(std::ofstream &s); 88 | void Read(std::ifstream &s,bool readType = true); 89 | bool Check(int idx,cv::Mat &im,cv::Mat &s); 90 | }; 91 | //=========================================================================== 92 | } 93 | #endif 94 | -------------------------------------------------------------------------------- /3rdparty/FaceTracker/FDet.cc: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2010, Jason Mora Saragih, all rights reserved. 3 | // 4 | // This file is part of FaceTracker. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // 9 | // * The software is provided under the terms of this licence stricly for 10 | // academic, non-commercial, not-for-profit purposes. 11 | // * Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions (licence) and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above copyright 14 | // notice, this list of conditions (licence) and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * The name of the author may not be used to endorse or promote products 18 | // derived from this software without specific prior written permission. 19 | // * As this software depends on other libraries, the user must adhere to 20 | // and keep in place any licencing terms of those libraries. 21 | // * Any publications arising from the use of this software, including but 22 | // not limited to academic journal and conference publications, technical 23 | // reports and manuals, must cite the following work: 24 | // 25 | // J. M. Saragih, S. Lucey, and J. F. Cohn. Face Alignment through 26 | // Subspace Constrained Mean-Shifts. International Conference of Computer 27 | // Vision (ICCV), September, 2009. 28 | // 29 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 30 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 32 | // EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 34 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 35 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 36 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 38 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | /////////////////////////////////////////////////////////////////////////////// 40 | #include "FDet.h" 41 | 42 | using namespace FACETRACKER; 43 | using namespace std; 44 | //=========================================================================== 45 | FDet::~FDet() 46 | { 47 | if(storage_ != NULL)cvReleaseMemStorage(&storage_); 48 | if(_cascade != NULL)cvReleaseHaarClassifierCascade(&_cascade); 49 | } 50 | //=========================================================================== 51 | FDet& FDet::operator= (FDet const& rhs) 52 | { 53 | this->_min_neighbours = rhs._min_neighbours; 54 | this->_min_size = rhs._min_size; 55 | this->_img_scale = rhs._img_scale; 56 | this->_scale_factor = rhs._scale_factor; 57 | if(storage_ != NULL)cvReleaseMemStorage(&storage_); 58 | storage_ = cvCreateMemStorage(0); 59 | this->_cascade = rhs._cascade; 60 | this->small_img_ = rhs.small_img_.clone(); return *this; 61 | } 62 | //=========================================================================== 63 | void FDet::Init(const char* fname, 64 | const double img_scale, 65 | const double scale_factor, 66 | const int min_neighbours, 67 | const int min_size) 68 | { 69 | if(!(_cascade = (CvHaarClassifierCascade*)cvLoad(fname,0,0,0))){ 70 | printf("ERROR(%s,%d) : Failed loading classifier cascade!\n", 71 | __FILE__,__LINE__); abort(); 72 | } 73 | storage_ = cvCreateMemStorage(0); 74 | _img_scale = img_scale; 75 | _scale_factor = scale_factor; 76 | _min_neighbours = min_neighbours; 77 | _min_size = min_size; return; 78 | } 79 | //=========================================================================== 80 | cv::Rect FDet::Detect(cv::Mat im) 81 | { 82 | assert(im.type() == CV_8U); 83 | cv::Mat gray; int i,maxv; cv::Rect R; 84 | int w = cvRound(im.cols/_img_scale); 85 | int h = cvRound(im.rows/_img_scale); 86 | if((small_img_.rows!=h) || (small_img_.cols!=w))small_img_.create(h,w,CV_8U); 87 | if(im.channels() == 1)gray = im; 88 | else{gray=cv::Mat(im.rows,im.cols,CV_8U);cv::cvtColor(im,gray,CV_BGR2GRAY);} 89 | cv::resize(gray,small_img_,cv::Size(w,h),0,0,CV_INTER_LINEAR); 90 | cv::equalizeHist(small_img_,small_img_); 91 | cvClearMemStorage(storage_); IplImage simg = small_img_; 92 | CvSeq* obj = cvHaarDetectObjects(&simg,_cascade,storage_, 93 | _scale_factor,_min_neighbours,0, 94 | cv::Size(_min_size,_min_size)); 95 | if(obj->total == 0)return cv::Rect(0,0,0,0); 96 | for(i = 0,maxv = 0; i < obj->total; i++){ 97 | CvRect* r = (CvRect*)cvGetSeqElem(obj,i); 98 | if(i == 0 || maxv < r->width*r->height){ 99 | maxv = r->width*r->height; R.x = r->x*_img_scale; R.y = r->y*_img_scale; 100 | R.width = r->width*_img_scale; R.height = r->height*_img_scale; 101 | } 102 | } 103 | cvRelease((void**)(&obj)); return R; 104 | } 105 | //=========================================================================== 106 | void FDet::Load(const char* fname) 107 | { 108 | ifstream s(fname); assert(s.is_open()); this->Read(s); s.close(); return; 109 | } 110 | //=========================================================================== 111 | void FDet::Save(const char* fname) 112 | { 113 | ofstream s(fname); assert(s.is_open()); this->Write(s);s.close(); return; 114 | } 115 | //=========================================================================== 116 | void FDet::Write(ofstream &s) 117 | { 118 | int i,j,k,l; 119 | s << IO::FDET << " " 120 | << _min_neighbours << " " 121 | << _min_size << " " 122 | << _img_scale << " " 123 | << _scale_factor << " " 124 | << _cascade->count << " " 125 | << _cascade->orig_window_size.width << " " 126 | << _cascade->orig_window_size.height << " "; 127 | for(i = 0; i < _cascade->count; i++){ 128 | s << _cascade->stage_classifier[i].parent << " " 129 | << _cascade->stage_classifier[i].next << " " 130 | << _cascade->stage_classifier[i].child << " " 131 | << _cascade->stage_classifier[i].threshold << " " 132 | << _cascade->stage_classifier[i].count << " "; 133 | for(j = 0; j < _cascade->stage_classifier[i].count; j++){ 134 | CvHaarClassifier* classifier = 135 | &_cascade->stage_classifier[i].classifier[j]; 136 | s << classifier->count << " "; 137 | for(k = 0; k < classifier->count; k++){ 138 | s << classifier->threshold[k] << " " 139 | << classifier->left[k] << " " 140 | << classifier->right[k] << " " 141 | << classifier->alpha[k] << " " 142 | << classifier->haar_feature[k].tilted << " "; 143 | for(l = 0; l < CV_HAAR_FEATURE_MAX; l++){ 144 | s << classifier->haar_feature[k].rect[l].weight << " " 145 | << classifier->haar_feature[k].rect[l].r.x << " " 146 | << classifier->haar_feature[k].rect[l].r.y << " " 147 | << classifier->haar_feature[k].rect[l].r.width << " " 148 | << classifier->haar_feature[k].rect[l].r.height << " "; 149 | } 150 | } 151 | s << classifier->alpha[classifier->count] << " "; 152 | } 153 | }return; 154 | } 155 | //=========================================================================== 156 | void FDet::Read(ifstream &s,bool readType) 157 | { 158 | int i,j,k,l,n,m; 159 | if(readType){int type; s >> type; assert(type == IO::FDET);} 160 | s >> _min_neighbours >> _min_size >> _img_scale >> _scale_factor >> n; 161 | m = sizeof(CvHaarClassifierCascade)+n*sizeof(CvHaarStageClassifier); 162 | storage_ = cvCreateMemStorage(0); 163 | _cascade = (CvHaarClassifierCascade*)cvAlloc(m); 164 | memset(_cascade,0,m); 165 | _cascade->stage_classifier = (CvHaarStageClassifier*)(_cascade + 1); 166 | _cascade->flags = CV_HAAR_MAGIC_VAL; 167 | _cascade->count = n; 168 | s >> _cascade->orig_window_size.width >> _cascade->orig_window_size.height; 169 | for(i = 0; i < n; i++){ 170 | s >> _cascade->stage_classifier[i].parent 171 | >> _cascade->stage_classifier[i].next 172 | >> _cascade->stage_classifier[i].child 173 | >> _cascade->stage_classifier[i].threshold 174 | >> _cascade->stage_classifier[i].count; 175 | _cascade->stage_classifier[i].classifier = 176 | (CvHaarClassifier*)cvAlloc(_cascade->stage_classifier[i].count* 177 | sizeof(CvHaarClassifier)); 178 | for(j = 0; j < _cascade->stage_classifier[i].count; j++){ 179 | CvHaarClassifier* classifier = 180 | &_cascade->stage_classifier[i].classifier[j]; 181 | s >> classifier->count; 182 | classifier->haar_feature = (CvHaarFeature*) 183 | cvAlloc(classifier->count*(sizeof(CvHaarFeature) + 184 | sizeof(float) + sizeof(int) + sizeof(int))+ 185 | (classifier->count+1)*sizeof(float)); 186 | classifier->threshold = 187 | (float*)(classifier->haar_feature+classifier->count); 188 | classifier->left = (int*)(classifier->threshold + classifier->count); 189 | classifier->right = (int*)(classifier->left + classifier->count); 190 | classifier->alpha = (float*)(classifier->right + classifier->count); 191 | for(k = 0; k < classifier->count; k++){ 192 | s >> classifier->threshold[k] 193 | >> classifier->left[k] 194 | >> classifier->right[k] 195 | >> classifier->alpha[k] 196 | >> classifier->haar_feature[k].tilted; 197 | for(l = 0; l < CV_HAAR_FEATURE_MAX; l++){ 198 | s >> classifier->haar_feature[k].rect[l].weight 199 | >> classifier->haar_feature[k].rect[l].r.x 200 | >> classifier->haar_feature[k].rect[l].r.y 201 | >> classifier->haar_feature[k].rect[l].r.width 202 | >> classifier->haar_feature[k].rect[l].r.height; 203 | } 204 | } 205 | s >> classifier->alpha[classifier->count]; 206 | } 207 | }return; 208 | } 209 | //=========================================================================== 210 | -------------------------------------------------------------------------------- /3rdparty/FaceTracker/FDet.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2010, Jason Mora Saragih, all rights reserved. 3 | // 4 | // This file is part of FaceTracker. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // 9 | // * The software is provided under the terms of this licence stricly for 10 | // academic, non-commercial, not-for-profit purposes. 11 | // * Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions (licence) and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above copyright 14 | // notice, this list of conditions (licence) and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * The name of the author may not be used to endorse or promote products 18 | // derived from this software without specific prior written permission. 19 | // * As this software depends on other libraries, the user must adhere to 20 | // and keep in place any licencing terms of those libraries. 21 | // * Any publications arising from the use of this software, including but 22 | // not limited to academic journal and conference publications, technical 23 | // reports and manuals, must cite the following work: 24 | // 25 | // J. M. Saragih, S. Lucey, and J. F. Cohn. Face Alignment through 26 | // Subspace Constrained Mean-Shifts. International Conference of Computer 27 | // Vision (ICCV), September, 2009. 28 | // 29 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 30 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 32 | // EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 34 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 35 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 36 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 38 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | /////////////////////////////////////////////////////////////////////////////// 40 | #ifndef __FDet_h_ 41 | #define __FDet_h_ 42 | 43 | #include "IO.h" 44 | #include "opencv2/objdetect/objdetect_c.h" 45 | 46 | namespace FACETRACKER 47 | { 48 | //=========================================================================== 49 | /** 50 | A wrapper for OpenCV's face detector 51 | */ 52 | class FDet{ 53 | public: 54 | int _min_neighbours; /**< see OpenCV documentation */ 55 | int _min_size; /**< ... */ 56 | double _img_scale; /**< ... */ 57 | double _scale_factor; /**< ... */ 58 | CvHaarClassifierCascade* _cascade; /**< ... */ 59 | 60 | FDet(){storage_=NULL;_cascade=NULL;} 61 | FDet(const char* fname){this->Load(fname);} 62 | FDet(const char* cascFile, 63 | const double img_scale = 1.3, 64 | const double scale_factor = 1.1, 65 | const int min_neighbours = 2, 66 | const int min_size = 30){ 67 | this->Init(cascFile,img_scale,scale_factor,min_neighbours,min_size); 68 | } 69 | ~FDet(); 70 | FDet& operator=(FDet const&rhs); 71 | void Init(const char* fname, 72 | const double img_scale = 1.3, 73 | const double scale_factor = 1.1, 74 | const int min_neighbours = 2, 75 | const int min_size = 30); 76 | cv::Rect Detect(cv::Mat im); 77 | void Load(const char* fname); 78 | void Save(const char* fname); 79 | void Write(std::ofstream &s); 80 | void Read(std::ifstream &s,bool readType = true); 81 | 82 | private: 83 | cv::Mat small_img_; CvMemStorage* storage_; 84 | }; 85 | //=========================================================================== 86 | } 87 | #endif 88 | -------------------------------------------------------------------------------- /3rdparty/FaceTracker/IO.cc: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2010, Jason Mora Saragih, all rights reserved. 3 | // 4 | // This file is part of FaceTracker. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // 9 | // * The software is provided under the terms of this licence stricly for 10 | // academic, non-commercial, not-for-profit purposes. 11 | // * Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions (licence) and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above copyright 14 | // notice, this list of conditions (licence) and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * The name of the author may not be used to endorse or promote products 18 | // derived from this software without specific prior written permission. 19 | // * As this software depends on other libraries, the user must adhere to 20 | // and keep in place any licencing terms of those libraries. 21 | // * Any publications arising from the use of this software, including but 22 | // not limited to academic journal and conference publications, technical 23 | // reports and manuals, must cite the following work: 24 | // 25 | // J. M. Saragih, S. Lucey, and J. F. Cohn. Face Alignment through 26 | // Subspace Constrained Mean-Shifts. International Conference of Computer 27 | // Vision (ICCV), September, 2009. 28 | // 29 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 30 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 32 | // EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 34 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 35 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 36 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 38 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | /////////////////////////////////////////////////////////////////////////////// 40 | #include "IO.h" 41 | #include 42 | using namespace FACETRACKER; 43 | using namespace std; 44 | //=========================================================================== 45 | void IO::ReadMat(ifstream& s,cv::Mat &M) 46 | { 47 | int r,c,t; s >> r >> c >> t; 48 | M = cv::Mat(r,c,t); 49 | switch(M.type()){ 50 | case CV_64FC1: 51 | { 52 | cv::MatIterator_ i1 = M.begin(),i2 = M.end(); 53 | while(i1 != i2)s >> *i1++; 54 | }break; 55 | case CV_32FC1: 56 | { 57 | cv::MatIterator_ i1 = M.begin(),i2 = M.end(); 58 | while(i1 != i2)s >> *i1++; 59 | }break; 60 | case CV_32SC1: 61 | { 62 | cv::MatIterator_ i1 = M.begin(),i2 = M.end(); 63 | while(i1 != i2)s >> *i1++; 64 | }break; 65 | case CV_8UC1: 66 | { 67 | cv::MatIterator_ i1 = M.begin(),i2 = M.end(); 68 | while(i1 != i2)s >> *i1++; 69 | }break; 70 | default: 71 | printf("ERROR(%s,%d) : Unsupported Matrix type %d!\n", 72 | __FILE__,__LINE__,M.type()); abort(); 73 | }return; 74 | } 75 | //=========================================================================== 76 | void IO::WriteMat(ofstream& s,cv::Mat &M) 77 | { 78 | s << M.rows << " " << M.cols << " " << M.type() << " "; 79 | switch(M.type()){ 80 | case CV_64FC1: 81 | { 82 | cv::MatIterator_ i1 = M.begin(),i2 = M.end(); 83 | while(i1 != i2)s << *i1++ << " "; 84 | }break; 85 | case CV_32FC1: 86 | { 87 | cv::MatIterator_ i1 = M.begin(),i2 = M.end(); 88 | while(i1 != i2)s << *i1++ << " "; 89 | }break; 90 | case CV_32SC1: 91 | { 92 | cv::MatIterator_ i1 = M.begin(),i2 = M.end(); 93 | while(i1 != i2)s << *i1++ << " "; 94 | }break; 95 | case CV_8UC1: 96 | { 97 | cv::MatIterator_ i1 = M.begin(),i2 = M.end(); 98 | while(i1 != i2)s << *i1++ << " "; 99 | }break; 100 | default: 101 | printf("ERROR(%s,%d) : Unsupported Matrix type %d!\n", 102 | __FILE__,__LINE__,M.type()); abort(); 103 | }return; 104 | } 105 | //=========================================================================== 106 | cv::Mat IO::LoadCon(const char* fname) 107 | { 108 | int i,n; char str[256]; char c; fstream file(fname,fstream::in); 109 | if(!file.is_open()){ 110 | printf("ERROR(%s,%d) : Failed opening file %s for reading\n", 111 | __FILE__,__LINE__,fname); abort(); 112 | } 113 | while(1){file >> str; if(strncmp(str,"n_connections:",14) == 0)break;} 114 | file >> n; cv::Mat con(2,n,CV_32S); 115 | while(1){file >> c; if(c == '{')break;} 116 | for(i = 0; i < n; i++)file >> con.at(0,i) >> con.at(1,i); 117 | file.close(); return con; 118 | } 119 | //============================================================================= 120 | cv::Mat IO::LoadTri(const char* fname) 121 | { 122 | int i,n; char str[256]; char c; fstream file(fname,fstream::in); 123 | if(!file.is_open()){ 124 | printf("ERROR(%s,%d) : Failed opening file %s for reading\n", 125 | __FILE__,__LINE__,fname); abort(); 126 | } 127 | while(1){file >> str; if(strncmp(str,"n_tri:",6) == 0)break;} 128 | file >> n; cv::Mat tri(n,3,CV_32S); 129 | while(1){file >> c; if(c == '{')break;} 130 | for(i = 0; i < n; i++) 131 | file >> tri.at(i,0) >> tri.at(i,1) >> tri.at(i,2); 132 | file.close(); return tri; 133 | } 134 | //=========================================================================== 135 | -------------------------------------------------------------------------------- /3rdparty/FaceTracker/IO.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2010, Jason Mora Saragih, all rights reserved. 3 | // 4 | // This file is part of FaceTracker. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // 9 | // * The software is provided under the terms of this licence stricly for 10 | // academic, non-commercial, not-for-profit purposes. 11 | // * Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions (licence) and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above copyright 14 | // notice, this list of conditions (licence) and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * The name of the author may not be used to endorse or promote products 18 | // derived from this software without specific prior written permission. 19 | // * As this software depends on other libraries, the user must adhere to 20 | // and keep in place any licencing terms of those libraries. 21 | // * Any publications arising from the use of this software, including but 22 | // not limited to academic journal and conference publications, technical 23 | // reports and manuals, must cite the following work: 24 | // 25 | // J. M. Saragih, S. Lucey, and J. F. Cohn. Face Alignment through 26 | // Subspace Constrained Mean-Shifts. International Conference of Computer 27 | // Vision (ICCV), September, 2009. 28 | // 29 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 30 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 32 | // EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 34 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 35 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 36 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 38 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | /////////////////////////////////////////////////////////////////////////////// 40 | #ifndef __IO_h_ 41 | #define __IO_h_ 42 | 43 | #include "opencv2/core/core_c.h" 44 | #include "opencv2/highgui/highgui_c.h" 45 | #include "opencv2/imgproc/imgproc_c.h" 46 | #include "opencv2/imgproc.hpp" 47 | 48 | #include 49 | namespace FACETRACKER 50 | { 51 | //=========================================================================== 52 | /** 53 | Input-output Operations 54 | */ 55 | class IO{ 56 | public: 57 | enum{PDM = 0,PAW,PATCH,MPATCH,CLM,FDET,FCHECK,MFCHECK,TRACKER}; 58 | static void ReadMat(std::ifstream& s,cv::Mat &M); 59 | static void WriteMat(std::ofstream& s,cv::Mat &M); 60 | static cv::Mat LoadCon(const char* fname); 61 | static cv::Mat LoadTri(const char* fname); 62 | }; 63 | //=========================================================================== 64 | } 65 | #endif 66 | -------------------------------------------------------------------------------- /3rdparty/FaceTracker/Patch.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2010, Jason Mora Saragih, all rights reserved. 3 | // 4 | // This file is part of FaceTracker. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // 9 | // * The software is provided under the terms of this licence stricly for 10 | // academic, non-commercial, not-for-profit purposes. 11 | // * Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions (licence) and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above copyright 14 | // notice, this list of conditions (licence) and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * The name of the author may not be used to endorse or promote products 18 | // derived from this software without specific prior written permission. 19 | // * As this software depends on other libraries, the user must adhere to 20 | // and keep in place any licencing terms of those libraries. 21 | // * Any publications arising from the use of this software, including but 22 | // not limited to academic journal and conference publications, technical 23 | // reports and manuals, must cite the following work: 24 | // 25 | // J. M. Saragih, S. Lucey, and J. F. Cohn. Face Alignment through 26 | // Subspace Constrained Mean-Shifts. International Conference of Computer 27 | // Vision (ICCV), September, 2009. 28 | // 29 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 30 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 32 | // EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 34 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 35 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 36 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 38 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | /////////////////////////////////////////////////////////////////////////////// 40 | #ifndef __Patch_h_ 41 | #define __Patch_h_ 42 | #include "IO.h" 43 | namespace FACETRACKER 44 | { 45 | //=========================================================================== 46 | /** 47 | A Patch Expert 48 | */ 49 | class Patch{ 50 | public: 51 | int _t; /**< Type of patch (0=raw,1=grad,2=lbp) */ 52 | double _a; /**< scaling */ 53 | double _b; /**< bias */ 54 | cv::Mat _W; /**< Gain */ 55 | 56 | Patch(){;} 57 | Patch(const char* fname){this->Load(fname);} 58 | Patch(int t,double a,double b,cv::Mat &W){this->Init(t,a,b,W);} 59 | Patch& operator=(Patch const&rhs); 60 | inline int w(){return _W.cols;} 61 | inline int h(){return _W.rows;} 62 | void Load(const char* fname); 63 | void Save(const char* fname); 64 | void Write(std::ofstream &s); 65 | void Read(std::ifstream &s,bool readType = true); 66 | void Init(int t, double a, double b, cv::Mat &W); 67 | void Response(cv::Mat &im,cv::Mat &resp); 68 | 69 | private: 70 | cv::Mat im_,res_; 71 | }; 72 | //=========================================================================== 73 | /** 74 | A Multi-patch Expert 75 | */ 76 | class MPatch{ 77 | public: 78 | int _w,_h; /**< Width and height of patch */ 79 | std::vector _p; /**< List of patches */ 80 | 81 | MPatch(){;} 82 | MPatch(const char* fname){this->Load(fname);} 83 | MPatch(std::vector &p){this->Init(p);} 84 | MPatch& operator=(MPatch const&rhs); 85 | inline int nPatch(){return _p.size();} 86 | void Load(const char* fname); 87 | void Save(const char* fname); 88 | void Write(std::ofstream &s); 89 | void Read(std::ifstream &s,bool readType = true); 90 | void Init(std::vector &p); 91 | void Response(cv::Mat &im,cv::Mat &resp); 92 | 93 | private: 94 | cv::Mat res_; 95 | }; 96 | //=========================================================================== 97 | } 98 | #endif 99 | -------------------------------------------------------------------------------- /3rdparty/FaceTracker/README: -------------------------------------------------------------------------------- 1 | ============================================== 2 | FaceTracker: A Real-time Face Tracking System 3 | ============================================== 4 | Jason Mora Saragih (April, 2010) 5 | 6 | 7 | Installation 8 | ============ 9 | 10 | NOTE: These instructions are for compiling the code on OS X only. Compilation 11 | on other Unix-type architectures should be similar. 12 | 13 | a. Download the latest version of OpenCV-2.*: 14 | > svn co https://code.ros.org/svn/opencv/trunk/opencv 15 | 16 | b. Follow the installation instructions for OpenCV from: 17 | http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port 18 | Compile and install OpenCV to OPENCV_DIR (i.e some arbitrary local 19 | directory). 20 | 21 | c. Uncompress the FaceTracker code: 22 | > tar xzvf FaceTracker.tar.gz 23 | This will uncompress a number of subdirectories within 24 | the root directory: 25 | - src (contains all source code) 26 | - model (contains a pre-trained tracking model) 27 | - bin (will contain the executable after building) 28 | 29 | d. In the Makefile located in the root directory of the FaceTracker code, 30 | change the OPECV_PATH variable to the directory where OpenCV was installed 31 | (note: default installation directory is /usr/local ). 32 | 33 | e. Build the system: 34 | > make 35 | 36 | f. The executable `face_tracker' can be found in the `bin' subdirectory. 37 | 38 | 39 | `face_tracker' Usage 40 | ===================== 41 | 42 | Usage: face_tracker [options] 43 | Options: 44 | -m : Tracker model (default: ../model/face2.tracker) 45 | -c : Connectivity (default: ../model/face.con) 46 | -t : Triangulation (default: ../model/face.tri) 47 | -s : Image scaling (default: 1) 48 | -d : Frames/detections (default: -1) 49 | --check : Automatic checking for failure 50 | --help : Print help 51 | -? : Print help 52 | 53 | -------------------------------------------------------------------------------- /3rdparty/FaceTracker/Tracker.cc: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2010, Jason Mora Saragih, all rights reserved. 3 | // 4 | // This file is part of FaceTracker. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // 9 | // * The software is provided under the terms of this licence stricly for 10 | // academic, non-commercial, not-for-profit purposes. 11 | // * Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions (licence) and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above copyright 14 | // notice, this list of conditions (licence) and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * The name of the author may not be used to endorse or promote products 18 | // derived from this software without specific prior written permission. 19 | // * As this software depends on other libraries, the user must adhere to 20 | // and keep in place any licencing terms of those libraries. 21 | // * Any publications arising from the use of this software, including but 22 | // not limited to academic journal and conference publications, technical 23 | // reports and manuals, must cite the following work: 24 | // 25 | // J. M. Saragih, S. Lucey, and J. F. Cohn. Face Alignment through 26 | // Subspace Constrained Mean-Shifts. International Conference of Computer 27 | // Vision (ICCV), September, 2009. 28 | // 29 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 30 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 32 | // EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 34 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 35 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 36 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 38 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | /////////////////////////////////////////////////////////////////////////////// 40 | #include "Tracker.h" 41 | #define db at 42 | #define TSCALE 0.3 43 | using namespace FACETRACKER; 44 | using namespace std; 45 | //=========================================================================== 46 | void Tracker::Init(CLM &clm,FDet &fdet,MFCheck &fcheck, 47 | cv::Mat &rshape,cv::Scalar &simil) 48 | { 49 | _clm = clm; _fdet = fdet; _fcheck = fcheck; 50 | _rshape = rshape.clone(); _simil = simil; 51 | _shape.create(2*_clm._pdm.nPoints(),1,CV_64F); 52 | _rect.x = 0; _rect.y = 0; _rect.width = 0; _rect.height = 0; 53 | _frame = -1; _clm._pdm.Identity(_clm._plocal,_clm._pglobl); 54 | return; 55 | } 56 | //=========================================================================== 57 | void Tracker::Load(const char* fname) 58 | { 59 | ifstream s(fname); assert(s.is_open()); this->Read(s); s.close(); return; 60 | } 61 | //=========================================================================== 62 | void Tracker::Save(const char* fname) 63 | { 64 | ofstream s(fname); assert(s.is_open()); this->Write(s);s.close(); return; 65 | } 66 | //=========================================================================== 67 | void Tracker::Write(ofstream &s) 68 | { 69 | s << IO::TRACKER << " "; _clm.Write(s); _fdet.Write(s); _fcheck.Write(s); 70 | IO::WriteMat(s,_rshape); 71 | s << _simil[0] << " " << _simil[1] << " " 72 | << _simil[2] << " " << _simil[3] << " "; return; 73 | } 74 | //=========================================================================== 75 | void Tracker::Read(ifstream &s,bool readType) 76 | { 77 | if(readType){int type; s >> type; assert(type == IO::TRACKER);} 78 | _clm.Read(s); _fdet.Read(s); _fcheck.Read(s); IO::ReadMat(s,_rshape); 79 | s >> _simil[0] >> _simil[1] >> _simil[2] >> _simil[3]; 80 | _shape.create(2*_clm._pdm.nPoints(),1,CV_64F); 81 | _rect.x = 0; _rect.y = 0; _rect.width = 0; _rect.height = 0; 82 | _frame = -1; _clm._pdm.Identity(_clm._plocal,_clm._pglobl); return; 83 | } 84 | //=========================================================================== 85 | int Tracker::Track(cv::Mat im,vector &wSize, const int fpd, 86 | const int nIter, const double clamp,const double fTol, 87 | const bool fcheck) 88 | { 89 | assert(im.type() == CV_8U); 90 | if(im.channels() == 1)gray_ = im; 91 | else{ 92 | if((gray_.rows != im.rows) || (gray_.cols != im.cols)) 93 | gray_.create(im.rows,im.cols,CV_8U); 94 | cv::cvtColor(im,gray_,CV_BGR2GRAY); 95 | } 96 | bool gen,rsize=true; cv::Rect R; 97 | if((_frame < 0) || (fpd >= 0 && fpd < _frame)){ 98 | _frame = 0; R = _fdet.Detect(gray_); gen = true; 99 | }else{R = this->ReDetect(gray_); gen = false;} 100 | if((R.width == 0) || (R.height == 0)){_frame = -1; return -1;} 101 | _frame++; 102 | if(gen){ 103 | this->InitShape(R,_shape); 104 | _clm._pdm.CalcParams(_shape,_clm._plocal,_clm._pglobl); 105 | }else{ 106 | double tx = R.x - _rect.x,ty = R.y - _rect.y; 107 | _clm._pglobl.db(4,0) += tx; _clm._pglobl.db(5,0) += ty; rsize = false; 108 | } 109 | _clm.Fit(gray_,wSize,nIter,clamp,fTol); 110 | _clm._pdm.CalcShape2D(_shape,_clm._plocal,_clm._pglobl); 111 | if(fcheck){if(!_fcheck.Check(_clm.GetViewIdx(),gray_,_shape))return -1;} 112 | _rect = this->UpdateTemplate(gray_,_shape,rsize); 113 | if((_rect.width == 0) || (_rect.height == 0))return -1; else return 0; 114 | } 115 | //=========================================================================== 116 | void Tracker::InitShape(cv::Rect &r,cv::Mat &shape) 117 | { 118 | assert((shape.rows == _rshape.rows) && (shape.cols == _rshape.cols) && 119 | (shape.type() == CV_64F)); 120 | int i,n = _rshape.rows/2; double a,b,tx,ty; 121 | a = r.width*cos(_simil[1])*_simil[0] + 1; 122 | b = r.width*sin(_simil[1])*_simil[0]; 123 | tx = r.x + r.width/2 + r.width *_simil[2]; 124 | ty = r.y + r.height/2 + r.height*_simil[3]; 125 | cv::MatIterator_ sx = _rshape.begin(); 126 | cv::MatIterator_ sy = _rshape.begin()+n; 127 | cv::MatIterator_ dx = shape.begin(); 128 | cv::MatIterator_ dy = shape.begin()+n; 129 | for(i = 0; i < n; i++,++sx,++sy,++dx,++dy){ 130 | *dx = a*(*sx) - b*(*sy) + tx; *dy = b*(*sx) + a*(*sy) + ty; 131 | }return; 132 | } 133 | //=========================================================================== 134 | cv::Rect Tracker::ReDetect(cv::Mat &im) 135 | { 136 | int x,y; float v,vb=-2; 137 | int ww = im.cols,hh = im.rows; 138 | int w = TSCALE*ww-temp_.cols+1,h = TSCALE*hh-temp_.rows+1; 139 | if((small_.rows != TSCALE*hh) || (small_.cols != TSCALE*ww)) 140 | small_.create(TSCALE*hh,TSCALE*ww,CV_8U); 141 | cv::resize(im,small_,cv::Size(TSCALE*ww,TSCALE*hh),0,0,CV_INTER_LINEAR); 142 | if((ncc_.rows != h) || (ncc_.cols != w))ncc_.create(h,w,CV_32F); 143 | IplImage im_o = small_,temp_o = temp_,ncc_o = ncc_; 144 | cvMatchTemplate(&im_o,&temp_o,&ncc_o,CV_TM_CCOEFF_NORMED); 145 | cv::MatIterator_ p = ncc_.begin(); cv::Rect R; 146 | R.width = temp_.cols; R.height = temp_.rows; 147 | for(y = 0; y < h; y++){ 148 | for(x = 0; x < w; x++){ 149 | v = *p++; if(v > vb){vb = v; R.x = x; R.y = y;} 150 | } 151 | } 152 | R.x *= 1.0/TSCALE; R.y *= 1.0/TSCALE; 153 | R.width *= 1.0/TSCALE; R.height *= 1.0/TSCALE; return R; 154 | } 155 | //=========================================================================== 156 | cv::Rect Tracker::UpdateTemplate(cv::Mat &im,cv::Mat &s,bool rsize) 157 | { 158 | int i,n = s.rows/2; double vx,vy; 159 | cv::MatIterator_ x = s.begin(),y = s.begin()+n; 160 | double xmax=*x,ymax=*y,xmin=*x,ymin=*y; 161 | for(i = 0; i < n; i++){ 162 | vx = *x++; vy = *y++; 163 | xmax = std::max(xmax,vx); ymax = std::max(ymax,vy); 164 | xmin = std::min(xmin,vx); ymin = std::min(ymin,vy); 165 | } 166 | if((xmin < 0) || (ymin < 0) || (xmax >= im.cols) || (ymax >= im.rows) || 167 | cvIsNaN(xmin) || cvIsInf(xmin) || cvIsNaN(xmax) || cvIsInf(xmax) || 168 | cvIsNaN(ymin) || cvIsInf(ymin) || cvIsNaN(ymax) || cvIsInf(ymax)) 169 | return cv::Rect(0,0,0,0); 170 | else{ 171 | xmin *= TSCALE; ymin *= TSCALE; xmax *= TSCALE; ymax *= TSCALE; 172 | cv::Rect R = cv::Rect(std::floor(xmin),std::floor(ymin), 173 | std::ceil(xmax-xmin),std::ceil(ymax-ymin)); 174 | int ww = im.cols,hh = im.rows; 175 | if(rsize){ 176 | if((small_.rows != TSCALE*hh) || (small_.cols != TSCALE*ww)) 177 | small_.create(TSCALE*hh,TSCALE*ww,CV_8U); 178 | cv::resize(im,small_,cv::Size(TSCALE*ww,TSCALE*hh),0,0,CV_INTER_LINEAR); 179 | } 180 | temp_ = small_(R).clone(); 181 | R.x *= 1.0/TSCALE; R.y *= 1.0/TSCALE; 182 | R.width *= 1.0/TSCALE; R.height *= 1.0/TSCALE; return R; 183 | } 184 | } 185 | //=========================================================================== 186 | -------------------------------------------------------------------------------- /3rdparty/FaceTracker/Tracker.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2010, Jason Mora Saragih, all rights reserved. 3 | // 4 | // This file is part of FaceTracker. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // 9 | // * The software is provided under the terms of this licence stricly for 10 | // academic, non-commercial, not-for-profit purposes. 11 | // * Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions (licence) and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above copyright 14 | // notice, this list of conditions (licence) and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * The name of the author may not be used to endorse or promote products 18 | // derived from this software without specific prior written permission. 19 | // * As this software depends on other libraries, the user must adhere to 20 | // and keep in place any licencing terms of those libraries. 21 | // * Any publications arising from the use of this software, including but 22 | // not limited to academic journal and conference publications, technical 23 | // reports and manuals, must cite the following work: 24 | // 25 | // J. M. Saragih, S. Lucey, and J. F. Cohn. Face Alignment through 26 | // Subspace Constrained Mean-Shifts. International Conference of Computer 27 | // Vision (ICCV), September, 2009. 28 | // 29 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 30 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 32 | // EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 34 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 35 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 36 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 38 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | /////////////////////////////////////////////////////////////////////////////// 40 | #ifndef __Tracker_h_ 41 | #define __Tracker_h_ 42 | #include "CLM.h" 43 | #include "FDet.h" 44 | #include "FCheck.h" 45 | namespace FACETRACKER 46 | { 47 | //=========================================================================== 48 | /** 49 | Face Tracker 50 | */ 51 | class Tracker{ 52 | public: 53 | CLM _clm; /**< Constrained Local Model */ 54 | FDet _fdet; /**< Face Detector */ 55 | int64 _frame; /**< Frame number since last detection */ 56 | MFCheck _fcheck; /**< Failure checker */ 57 | cv::Mat _shape; /**< Current shape */ 58 | cv::Mat _rshape; /**< Reference shape */ 59 | cv::Rect _rect; /**< Detected rectangle */ 60 | cv::Scalar _simil; /**< Initialization similarity */ 61 | 62 | /** NULL constructor */ 63 | Tracker(){;} 64 | 65 | /** Constructor from model file */ 66 | Tracker(const char* fname){this->Load(fname);} 67 | 68 | /** Constructor from components */ 69 | Tracker(CLM &clm,FDet &fdet,MFCheck &fcheck, 70 | cv::Mat &rshape,cv::Scalar &simil){ 71 | this->Init(clm,fdet,fcheck,rshape,simil); 72 | } 73 | /** 74 | Track model in current frame 75 | @param im Image containing face 76 | @param wSize List of search window sizes (set from large to small) 77 | @param fpd Number of frames between detections (-1: never) 78 | @param nIter Maximum number of optimization steps to perform. 79 | @param clamp Shape model parameter clamping factor (in standard dev's) 80 | @param fTol Convergence tolerance of optimization 81 | @param fcheck Check if tracking succeeded? 82 | @return -1 on failure, 0 otherwise. 83 | */ 84 | int Track(cv::Mat im,std::vector &wSize, 85 | const int fpd =-1, 86 | const int nIter = 10, 87 | const double clamp = 3.0, 88 | const double fTol = 0.01, 89 | const bool fcheck = true); 90 | 91 | /** Reset frame number (will perform detection in next image) */ 92 | inline void FrameReset(){_frame = -1;} 93 | 94 | /** Load tracker from model file */ 95 | void Load(const char* fname); 96 | 97 | /** Save tracker to model file */ 98 | void Save(const char* fname); 99 | 100 | /** Write tracker to file stream */ 101 | void Write(std::ofstream &s); 102 | 103 | /** Read tracking from file stream */ 104 | void Read(std::ifstream &s,bool readType = true); 105 | 106 | private: 107 | cv::Mat gray_,temp_,ncc_,small_; 108 | void Init(CLM &clm,FDet &fdet,MFCheck &fcheck, 109 | cv::Mat &rshape,cv::Scalar &simil); 110 | void InitShape(cv::Rect &r,cv::Mat &shape); 111 | cv::Rect ReDetect(cv::Mat &im); 112 | cv::Rect UpdateTemplate(cv::Mat &im,cv::Mat &s,bool rsize); 113 | }; 114 | //=========================================================================== 115 | } 116 | #endif 117 | -------------------------------------------------------------------------------- /3rdparty/FaceTracker/_PAW.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2010, Jason Mora Saragih, all rights reserved. 3 | // 4 | // This file is part of FaceTracker. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // 9 | // * The software is provided under the terms of this licence stricly for 10 | // academic, non-commercial, not-for-profit purposes. 11 | // * Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions (licence) and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above copyright 14 | // notice, this list of conditions (licence) and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * The name of the author may not be used to endorse or promote products 18 | // derived from this software without specific prior written permission. 19 | // * As this software depends on other libraries, the user must adhere to 20 | // and keep in place any licencing terms of those libraries. 21 | // * Any publications arising from the use of this software, including but 22 | // not limited to academic journal and conference publications, technical 23 | // reports and manuals, must cite the following work: 24 | // 25 | // J. M. Saragih, S. Lucey, and J. F. Cohn. Face Alignment through 26 | // Subspace Constrained Mean-Shifts. International Conference of Computer 27 | // Vision (ICCV), September, 2009. 28 | // 29 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 30 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 32 | // EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 34 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 35 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 36 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 38 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | /////////////////////////////////////////////////////////////////////////////// 40 | #ifndef __PAW_h_ 41 | #define __PAW_h_ 42 | #include "IO.h" 43 | namespace FACETRACKER 44 | { 45 | //=========================================================================== 46 | /** 47 | A Piecewise Affine Warp 48 | */ 49 | class PAW{ 50 | public: 51 | int _nPix; /**< Number of pixels */ 52 | double _xmin; /**< Minimum x-coord for src */ 53 | double _ymin; /**< Minimum y-coord for src */ 54 | cv::Mat _src; /**< Source points */ 55 | cv::Mat _dst; /**< destination points */ 56 | cv::Mat _tri; /**< Triangulation */ 57 | cv::Mat _tridx; /**< Triangle for each valid pixel */ 58 | cv::Mat _mask; /**< Valid region mask */ 59 | cv::Mat _coeff; /**< affine coeffs for all triangles */ 60 | cv::Mat _alpha; /**< matrix of (c,x,y) coeffs for alpha */ 61 | cv::Mat _beta; /**< matrix of (c,x,y) coeffs for alpha */ 62 | cv::Mat _mapx; /**< x-destination of warped points */ 63 | cv::Mat _mapy; /**< y-destination of warped points */ 64 | 65 | PAW(){;} 66 | PAW(const char* fname){this->Load(fname);} 67 | PAW(cv::Mat &src,cv::Mat &tri){this->Init(src,tri);} 68 | PAW& operator=(PAW const&rhs); 69 | inline int nPoints(){return _src.rows/2;} 70 | inline int nTri(){return _tri.rows;} 71 | inline int Width(){return _mask.cols;} 72 | inline int Height(){return _mask.rows;} 73 | void Load(const char* fname); 74 | void Save(const char* fname); 75 | void Write(std::ofstream &s); 76 | void Read(std::ifstream &s,bool readType = true); 77 | void Init(cv::Mat &src,cv::Mat &tri); 78 | void Crop(cv::Mat &src, cv::Mat &dst,cv::Mat &s); 79 | 80 | private: 81 | void CalcCoeff(); 82 | void WarpRegion(cv::Mat &mapx,cv::Mat &mapy); 83 | }; 84 | //=========================================================================== 85 | } 86 | #endif 87 | -------------------------------------------------------------------------------- /3rdparty/FaceTracker/_PDM.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2010, Jason Mora Saragih, all rights reserved. 3 | // 4 | // This file is part of FaceTracker. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // 9 | // * The software is provided under the terms of this licence stricly for 10 | // academic, non-commercial, not-for-profit purposes. 11 | // * Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions (licence) and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above copyright 14 | // notice, this list of conditions (licence) and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * The name of the author may not be used to endorse or promote products 18 | // derived from this software without specific prior written permission. 19 | // * As this software depends on other libraries, the user must adhere to 20 | // and keep in place any licencing terms of those libraries. 21 | // * Any publications arising from the use of this software, including but 22 | // not limited to academic journal and conference publications, technical 23 | // reports and manuals, must cite the following work: 24 | // 25 | // J. M. Saragih, S. Lucey, and J. F. Cohn. Face Alignment through 26 | // Subspace Constrained Mean-Shifts. International Conference of Computer 27 | // Vision (ICCV), September, 2009. 28 | // 29 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 30 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 32 | // EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 34 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 35 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 36 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 38 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | /////////////////////////////////////////////////////////////////////////////// 40 | #ifndef __PDM_h_ 41 | #define __PDM_h_ 42 | #include "IO.h" 43 | namespace FACETRACKER 44 | { 45 | //=========================================================================== 46 | /** 47 | A 3D Point Distribution Model 48 | */ 49 | class PDM{ 50 | public: 51 | cv::Mat _V; /**< basis of variation */ 52 | cv::Mat _E; /**< vector of eigenvalues (row vector) */ 53 | cv::Mat _M; /**< mean 3D shape vector [x1,..,xn,y1,...yn] */ 54 | 55 | PDM(){;} 56 | PDM(const char* fname){this->Load(fname);} 57 | PDM(cv::Mat &M,cv::Mat &V,cv::Mat &E){this->Init(M,V,E);} 58 | PDM& operator=(PDM const&rhs); 59 | inline int nPoints(){return _M.rows/3;} 60 | inline int nModes(){return _V.cols;} 61 | inline double Var(int i){assert(i<_E.cols); return _E.at(0,i);} 62 | void Load(const char* fname); 63 | void Save(const char* fname); 64 | void Write(std::ofstream &s); 65 | void Read(std::ifstream &s,bool readType = true); 66 | void Clamp(cv::Mat &p,double c); 67 | void Init(cv::Mat &M,cv::Mat &V,cv::Mat &E); 68 | void Identity(cv::Mat &plocal,cv::Mat &pglobl); 69 | void CalcShape3D(cv::Mat &s,cv::Mat &plocal); 70 | void CalcShape2D(cv::Mat &s,cv::Mat &plocal,cv::Mat &pglobl); 71 | void CalcParams(cv::Mat &s,cv::Mat &plocal,cv::Mat &pglobl); 72 | void CalcRigidJacob(cv::Mat &plocal,cv::Mat &pglobl,cv::Mat &Jacob); 73 | void CalcJacob(cv::Mat &plocal,cv::Mat &pglobl,cv::Mat &Jacob); 74 | void CalcReferenceUpdate(cv::Mat &dp,cv::Mat &plocal,cv::Mat &pglobl); 75 | void ApplySimT(double a,double b,double tx,double ty,cv::Mat &pglobl); 76 | 77 | private: 78 | cv::Mat S_,R_,s_,P_,Px_,Py_,Pz_,R1_,R2_,R3_; 79 | }; 80 | //=========================================================================== 81 | } 82 | #endif 83 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/Copyright.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/Copyright.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/AU_all_best.txt: -------------------------------------------------------------------------------- 1 | svm_combined/AU_1_dynamic.dat AU01 2 | svm_combined/AU_2_dynamic.dat AU02 3 | svm_combined/AU_4_static.dat AU04 4 | svm_combined/AU_5_static.dat AU05 5 | svm_combined/AU_6_static.dat AU06 6 | svm_combined/AU_7_static.dat AU07 7 | svm_combined/AU_9_dynamic.dat AU09 8 | svm_combined/AU_10_static.dat AU10 9 | svm_combined/AU_12_static.dat AU12 10 | svm_combined/AU_14_static.dat AU14 11 | svm_combined/AU_15_dynamic.dat AU15 12 | svm_combined/AU_17_dynamic.dat AU17 13 | svm_combined/AU_20_dynamic.dat AU20 14 | svm_combined/AU_23_static.dat AU23 15 | svm_combined/AU_25_dynamic.dat AU25 16 | svm_combined/AU_26_dynamic.dat AU26 17 | svm_combined/AU_28_static.dat AU28 18 | svm_combined/AU_45_dynamic.dat AU45 19 | svr_combined/AU_1_dynamic_intensity_comb.dat AU01 20 | svr_combined/AU_2_dynamic_intensity_comb.dat AU02 21 | svr_combined/AU_4_static_intensity_comb.dat AU04 22 | svr_combined/AU_5_dynamic_intensity.dat AU05 23 | svr_combined/AU_6_static_intensity_comb.dat AU06 24 | svr_combined/AU_7_static_intensity_comb.dat AU07 25 | svr_combined/AU_9_dynamic_intensity.dat AU09 26 | svr_combined/AU_10_static_intensity_comb.dat AU10 27 | svr_combined/AU_12_static_intensity_comb.dat AU12 28 | svr_combined/AU_14_static_intensity.dat AU14 29 | svr_combined/AU_15_dynamic_intensity_comb.dat AU15 30 | svr_combined/AU_17_dynamic_intensity_comb.dat AU17 31 | svr_combined/AU_20_dynamic_intensity.dat AU20 32 | svr_combined/AU_23_dynamic_intensity_comb.dat AU23 33 | svr_combined/AU_25_dynamic_intensity_comb.dat AU25 34 | svr_combined/AU_26_dynamic_intensity_comb.dat AU26 35 | svr_combined/AU_45_dynamic_intensity_comb.dat AU45 -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/AU_all_static.txt: -------------------------------------------------------------------------------- 1 | svm_combined/AU_1_static.dat AU01 2 | svm_combined/AU_2_static.dat AU02 3 | svm_combined/AU_4_static.dat AU04 4 | svm_combined/AU_5_static.dat AU05 5 | svm_combined/AU_6_static.dat AU06 6 | svm_combined/AU_7_static.dat AU07 7 | svm_combined/AU_9_static.dat AU09 8 | svm_combined/AU_10_static.dat AU10 9 | svm_combined/AU_12_static.dat AU12 10 | svm_combined/AU_14_static.dat AU14 11 | svm_combined/AU_15_static.dat AU15 12 | svm_combined/AU_17_static.dat AU17 13 | svm_combined/AU_20_static.dat AU20 14 | svm_combined/AU_23_static.dat AU23 15 | svm_combined/AU_25_static.dat AU25 16 | svm_combined/AU_26_static.dat AU26 17 | svm_combined/AU_28_static.dat AU28 18 | svm_combined/AU_45_static.dat AU45 19 | svr_combined/AU_1_static_intensity.dat AU01 20 | svr_combined/AU_2_static_intensity_comb.dat AU02 21 | svr_combined/AU_4_static_intensity_comb.dat AU04 22 | svr_combined/AU_5_static_intensity.dat AU05 23 | svr_combined/AU_6_static_intensity_comb.dat AU06 24 | svr_combined/AU_7_static_intensity_comb.dat AU07 25 | svr_combined/AU_9_static_intensity.dat AU09 26 | svr_combined/AU_10_static_intensity_comb.dat AU10 27 | svr_combined/AU_12_static_intensity_comb.dat AU12 28 | svr_combined/AU_14_static_intensity.dat AU14 29 | svr_combined/AU_15_static_intensity_comb.dat AU15 30 | svr_combined/AU_17_static_intensity_comb.dat AU17 31 | svr_combined/AU_20_static_intensity.dat AU20 32 | svr_combined/AU_23_static_intensity_comb.dat AU23 33 | svr_combined/AU_25_static_intensity.dat AU25 34 | svr_combined/AU_26_static_intensity_comb.dat AU26 35 | svr_combined/AU_45_static_intensity_comb.dat AU45 -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_10_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_10_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_10_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_10_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_12_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_12_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_12_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_12_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_14_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_14_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_14_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_14_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_15_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_15_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_15_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_15_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_17_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_17_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_17_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_17_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_1_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_1_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_1_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_1_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_20_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_20_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_20_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_20_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_23_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_23_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_23_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_23_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_25_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_25_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_25_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_25_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_26_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_26_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_26_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_26_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_28_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_28_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_28_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_28_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_2_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_2_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_2_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_2_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_45_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_45_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_45_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_45_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_4_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_4_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_4_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_4_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_5_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_5_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_5_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_5_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_6_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_6_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_6_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_6_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_7_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_7_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_7_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_7_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_9_dynamic.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_9_dynamic.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_9_static.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svm_combined/AU_9_static.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_10_static_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_10_static_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_12_static_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_12_static_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_14_static_intensity.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_14_static_intensity.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_15_dynamic_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_15_dynamic_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_15_static_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_15_static_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_17_dynamic_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_17_dynamic_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_17_static_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_17_static_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_1_dynamic_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_1_dynamic_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_1_static_intensity.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_1_static_intensity.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_20_dynamic_intensity.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_20_dynamic_intensity.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_20_static_intensity.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_20_static_intensity.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_23_dynamic_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_23_dynamic_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_23_static_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_23_static_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_25_dynamic_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_25_dynamic_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_25_static_intensity.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_25_static_intensity.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_26_dynamic_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_26_dynamic_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_26_static_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_26_static_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_2_dynamic_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_2_dynamic_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_2_static_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_2_static_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_45_dynamic_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_45_dynamic_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_45_static_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_45_static_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_4_static_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_4_static_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_5_dynamic_intensity.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_5_dynamic_intensity.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_5_static_intensity.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_5_static_intensity.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_6_static_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_6_static_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_7_static_intensity_comb.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_7_static_intensity_comb.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_9_dynamic_intensity.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_9_dynamic_intensity.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_9_static_intensity.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/AU_predictors/svr_combined/AU_9_static_intensity.dat -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #TBB library 2 | include_directories(${TBB_ROOT_DIR}/include) 3 | 4 | include_directories(${BOOST_INCLUDE_DIR}) 5 | 6 | SET(SOURCE 7 | src/Face_utils.cpp 8 | src/FaceAnalyser.cpp 9 | src/SVM_dynamic_lin.cpp 10 | src/SVM_static_lin.cpp 11 | src/SVR_dynamic_lin_regressors.cpp 12 | src/SVR_static_lin_regressors.cpp 13 | src/GazeEstimation.cpp 14 | ) 15 | 16 | SET(HEADERS 17 | include/Face_utils.h 18 | include/FaceAnalyser.h 19 | include/SVM_dynamic_lin.h 20 | include/SVM_static_lin.h 21 | include/SVR_dynamic_lin_regressors.h 22 | include/SVR_static_lin_regressors.h 23 | include/GazeEstimation.h 24 | ) 25 | 26 | include_directories(./include) 27 | include_directories(${FACEANALYSER_SOURCE_DIR}/include) 28 | include_directories(../LandmarkDetector/include) 29 | 30 | add_library( FaceAnalyser ${SOURCE} ${HEADERS}) 31 | 32 | install (TARGETS FaceAnalyser DESTINATION lib) 33 | install (FILES ${HEADERS} DESTINATION include/OpenFace) 34 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/FaceAnalyser.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | Header Files 35 | 36 | 37 | Header Files 38 | 39 | 40 | 41 | 42 | Source Files 43 | 44 | 45 | Source Files 46 | 47 | 48 | Source Files 49 | 50 | 51 | Source Files 52 | 53 | 54 | Source Files 55 | 56 | 57 | Source Files 58 | 59 | 60 | Source Files 61 | 62 | 63 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/include/FaceAnalyser.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/include/FaceAnalyser.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/include/Face_utils.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/include/Face_utils.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/include/GazeEstimation.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/include/GazeEstimation.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/include/SVM_dynamic_lin.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/include/SVM_dynamic_lin.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/include/SVM_static_lin.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/include/SVM_static_lin.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/include/SVR_dynamic_lin_regressors.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/include/SVR_dynamic_lin_regressors.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/include/SVR_static_lin_regressors.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/include/SVR_static_lin_regressors.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/src/FaceAnalyser.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/src/FaceAnalyser.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/src/Face_utils.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/src/Face_utils.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/src/GazeEstimation.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/src/GazeEstimation.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/src/SVM_dynamic_lin.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/src/SVM_dynamic_lin.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/src/SVM_static_lin.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/src/SVM_static_lin.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/src/SVR_dynamic_lin_regressors.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/src/SVR_dynamic_lin_regressors.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/FaceAnalyser/src/SVR_static_lin_regressors.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/FaceAnalyser/src/SVR_static_lin_regressors.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #TBB library 2 | include_directories(${TBB_ROOT_DIR}/include) 3 | 4 | include_directories(${BOOST_INCLUDE_DIR}) 5 | 6 | SET(SOURCE 7 | src/CCNF_patch_expert.cpp 8 | src/LandmarkDetectionValidator.cpp 9 | src/LandmarkDetectorFunc.cpp 10 | src/LandmarkDetectorModel.cpp 11 | src/LandmarkDetectorUtils.cpp 12 | src/LandmarkDetectorParameters.cpp 13 | src/Patch_experts.cpp 14 | src/PAW.cpp 15 | src/PDM.cpp 16 | src/SVR_patch_expert.cpp 17 | src/stdafx.cpp 18 | ) 19 | 20 | SET(HEADERS 21 | include/CCNF_patch_expert.h 22 | include/LandmarkCoreIncludes.h 23 | include/LandmarkDetectionValidator.h 24 | include/LandmarkDetectorFunc.h 25 | include/LandmarkDetectorModel.h 26 | include/LandmarkDetectorParameters.h 27 | include/LandmarkDetectorUtils.h 28 | include/Patch_experts.h 29 | include/PAW.h 30 | include/PDM.h 31 | include/SVR_patch_expert.h 32 | include/stdafx.h 33 | ) 34 | 35 | include_directories(./include) 36 | include_directories(${LandmarkDetector_SOURCE_DIR}/include) 37 | 38 | add_library( LandmarkDetector ${SOURCE} ${HEADERS} ) 39 | 40 | install (TARGETS LandmarkDetector DESTINATION lib) 41 | install (FILES ${HEADERS} DESTINATION include/OpenFace) 42 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/LandmarkDetector.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | source 6 | 7 | 8 | source 9 | 10 | 11 | source 12 | 13 | 14 | source 15 | 16 | 17 | source 18 | 19 | 20 | source 21 | 22 | 23 | source 24 | 25 | 26 | source 27 | 28 | 29 | source 30 | 31 | 32 | source 33 | 34 | 35 | source 36 | 37 | 38 | 39 | 40 | headers 41 | 42 | 43 | headers 44 | 45 | 46 | headers 47 | 48 | 49 | headers 50 | 51 | 52 | headers 53 | 54 | 55 | headers 56 | 57 | 58 | headers 59 | 60 | 61 | headers 62 | 63 | 64 | headers 65 | 66 | 67 | headers 68 | 69 | 70 | headers 71 | 72 | 73 | headers 74 | 75 | 76 | 77 | 78 | {75157eb9-2d21-482a-a1e2-e3e4100fffd7} 79 | 80 | 81 | {f50f893d-a6b2-4e45-8f94-529042834e49} 82 | 83 | 84 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/include/CCNF_patch_expert.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/include/CCNF_patch_expert.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/include/LandmarkCoreIncludes.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/include/LandmarkCoreIncludes.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/include/LandmarkDetectionValidator.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/include/LandmarkDetectionValidator.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/include/LandmarkDetectorFunc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/include/LandmarkDetectorFunc.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/include/LandmarkDetectorModel.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2017, Carnegie Mellon University and University of Cambridge, 3 | // all rights reserved. 4 | // 5 | // ACADEMIC OR NON-PROFIT ORGANIZATION NONCOMMERCIAL RESEARCH USE ONLY 6 | // 7 | // BY USING OR DOWNLOADING THE SOFTWARE, YOU ARE AGREEING TO THE TERMS OF THIS LICENSE AGREEMENT. 8 | // IF YOU DO NOT AGREE WITH THESE TERMS, YOU MAY NOT USE OR DOWNLOAD THE SOFTWARE. 9 | // 10 | // License can be found in OpenFace-license.txt 11 | // 12 | // * Any publications arising from the use of this software, including but 13 | // not limited to academic journal and conference publications, technical 14 | // reports and manuals, must cite at least one of the following works: 15 | // 16 | // OpenFace: an open source facial behavior analysis toolkit 17 | // Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency 18 | // in IEEE Winter Conference on Applications of Computer Vision, 2016 19 | // 20 | // Rendering of Eyes for Eye-Shape Registration and Gaze Estimation 21 | // Erroll Wood, Tadas Baltrušaitis, Xucong Zhang, Yusuke Sugano, Peter Robinson, and Andreas Bulling 22 | // in IEEE International. Conference on Computer Vision (ICCV), 2015 23 | // 24 | // Cross-dataset learning and person-speci?c normalisation for automatic Action Unit detection 25 | // Tadas Baltrušaitis, Marwa Mahmoud, and Peter Robinson 26 | // in Facial Expression Recognition and Analysis Challenge, 27 | // IEEE International Conference on Automatic Face and Gesture Recognition, 2015 28 | // 29 | // Constrained Local Neural Fields for robust facial landmark detection in the wild. 30 | // Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency. 31 | // in IEEE Int. Conference on Computer Vision Workshops, 300 Faces in-the-Wild Challenge, 2013. 32 | // 33 | /////////////////////////////////////////////////////////////////////////////// 34 | 35 | #ifndef __LANDMARK_DETECTOR_MODEL_h_ 36 | #define __LANDMARK_DETECTOR_MODEL_h_ 37 | 38 | // OpenCV dependencies 39 | #include "opencv2/core/core.hpp" 40 | #include "opencv2/objdetect.hpp" 41 | 42 | // dlib dependencies for face detection 43 | //#include 44 | //#include 45 | 46 | #include "PDM.h" 47 | #include "Patch_experts.h" 48 | #include "LandmarkDetectionValidator.h" 49 | #include "LandmarkDetectorParameters.h" 50 | 51 | using namespace std; 52 | 53 | namespace LandmarkDetector 54 | { 55 | 56 | // A main class containing all the modules required for landmark detection 57 | // Face shape model 58 | // Patch experts 59 | // Optimization techniques 60 | class CLNF{ 61 | 62 | public: 63 | 64 | //=========================================================================== 65 | // Member variables that contain the model description 66 | 67 | // The linear 3D Point Distribution Model 68 | PDM pdm; 69 | // The set of patch experts 70 | Patch_experts patch_experts; 71 | 72 | // The local and global parameters describing the current model instance (current landmark detections) 73 | 74 | // Local parameters describing the non-rigid shape 75 | cv::Mat_ params_local; 76 | 77 | // Global parameters describing the rigid shape [scale, euler_x, euler_y, euler_z, tx, ty] 78 | cv::Vec6d params_global; 79 | 80 | // A collection of hierarchical CLNF models that can be used for refinement 81 | vector hierarchical_models; 82 | vector hierarchical_model_names; 83 | vector>> hierarchical_mapping; 84 | vector hierarchical_params; 85 | 86 | //==================== Helpers for face detection and landmark detection validation ========================================= 87 | 88 | // Haar cascade classifier for face detection 89 | cv::CascadeClassifier face_detector_HAAR; 90 | string face_detector_location; 91 | 92 | // A HOG SVM-struct based face detector 93 | //dlib::frontal_face_detector face_detector_HOG; 94 | 95 | 96 | // Validate if the detected landmarks are correct using an SVR regressor 97 | DetectionValidator landmark_validator; 98 | 99 | // Indicating if landmark detection succeeded (based on SVR validator) 100 | bool detection_success; 101 | 102 | // Indicating if the tracking has been initialised (for video based tracking) 103 | bool tracking_initialised; 104 | 105 | // The actual output of the regressor (-1 is perfect detection 1 is worst detection) 106 | double detection_certainty; 107 | 108 | // Indicator if eye model is there for eye detection 109 | bool eye_model; 110 | 111 | // the triangulation per each view (for drawing purposes only) 112 | vector > triangulations; 113 | 114 | //=========================================================================== 115 | // Member variables that retain the state of the tracking (reflecting the state of the lastly tracked (detected) image 116 | 117 | // Lastly detect 2D model shape [x1,x2,...xn,y1,...yn] 118 | cv::Mat_ detected_landmarks; 119 | 120 | // The landmark detection likelihoods (combined and per patch expert) 121 | double model_likelihood; 122 | cv::Mat_ landmark_likelihoods; 123 | 124 | // Keeping track of how many frames the tracker has failed in so far when tracking in videos 125 | // This is useful for knowing when to initialise and reinitialise tracking 126 | int failures_in_a_row; 127 | 128 | // A template of a face that last succeeded with tracking (useful for large motions in video) 129 | cv::Mat_ face_template; 130 | 131 | // Useful when resetting or initialising the model closer to a specific location (when multiple faces are present) 132 | cv::Point_ preference_det; 133 | 134 | // A default constructor 135 | CLNF(); 136 | 137 | // Constructor from a model file 138 | CLNF(string fname); 139 | 140 | // Copy constructor (makes a deep copy of the detector) 141 | CLNF(const CLNF& other); 142 | 143 | // Assignment operator for lvalues (makes a deep copy of the detector) 144 | CLNF & operator= (const CLNF& other); 145 | 146 | // Empty Destructor as the memory of every object will be managed by the corresponding libraries (no pointers) 147 | ~CLNF(){} 148 | 149 | // Move constructor 150 | CLNF(const CLNF&& other); 151 | 152 | // Assignment operator for rvalues 153 | CLNF & operator= (const CLNF&& other); 154 | 155 | // Does the actual work - landmark detection 156 | bool DetectLandmarks(const cv::Mat_ &image, FaceModelParameters& params); 157 | 158 | // Gets the shape of the current detected landmarks in camera space (given camera calibration) 159 | // Can only be called after a call to DetectLandmarksInVideo or DetectLandmarksInImage 160 | cv::Mat_ GetShape(double fx, double fy, double cx, double cy) const; 161 | 162 | // A utility bounding box function 163 | cv::Rect_ GetBoundingBox() const; 164 | 165 | // Reset the model (useful if we want to completelly reinitialise, or we want to track another video) 166 | void Reset(); 167 | 168 | // Reset the model, choosing the face nearest (x,y) where x and y are between 0 and 1. 169 | void Reset(double x, double y); 170 | 171 | // Reading the model in 172 | void Read(string name); 173 | 174 | // Helper reading function 175 | void Read_CLNF(string clnf_location); 176 | 177 | private: 178 | 179 | // the speedup of RLMS using precalculated KDE responses (described in Saragih 2011 RLMS paper) 180 | map > kde_resp_precalc; 181 | 182 | // The model fitting: patch response computation and optimisation steps 183 | bool Fit(const cv::Mat_& intensity_image, const std::vector& window_sizes, const FaceModelParameters& parameters); 184 | 185 | // Mean shift computation that uses precalculated kernel density estimators (the one actually used) 186 | void NonVectorisedMeanShift_precalc_kde(cv::Mat_& out_mean_shifts, const vector >& patch_expert_responses, const cv::Mat_ &dxs, const cv::Mat_ &dys, int resp_size, float a, int scale, int view_id, map >& mean_shifts); 187 | 188 | // The actual model optimisation (update step), returns the model likelihood 189 | double NU_RLMS(cv::Vec6d& final_global, cv::Mat_& final_local, const vector >& patch_expert_responses, const cv::Vec6d& initial_global, const cv::Mat_& initial_local, 190 | const cv::Mat_& base_shape, const cv::Matx22d& sim_img_to_ref, const cv::Matx22f& sim_ref_to_img, int resp_size, int view_idx, bool rigid, int scale, cv::Mat_& landmark_lhoods, const FaceModelParameters& parameters); 191 | 192 | // Generating the weight matrix for the Weighted least squares 193 | void GetWeightMatrix(cv::Mat_& WeightMatrix, int scale, int view_id, const FaceModelParameters& parameters); 194 | 195 | //======================================================= 196 | // Legacy functions that are not used at the moment 197 | //======================================================= 198 | 199 | // Mean shift computation 200 | void NonVectorisedMeanShift(cv::Mat_& out_mean_shifts, const vector >& patch_expert_responses, const cv::Mat_ &dxs, const cv::Mat_ &dys, int resp_size, double a, int scale, int view_id); 201 | 202 | // A vectorised version of mean shift (Not actually used) 203 | void VectorisedMeanShift(cv::Mat_& meanShifts, const vector >& patch_expert_responses, const cv::Mat_ &iis, const cv::Mat_ &jjs, const cv::Mat_ &dxs, const cv::Mat_ &dys, const cv::Size patchSize, double sigma, int scale, int view_id); 204 | 205 | }; 206 | //=========================================================================== 207 | } 208 | #endif 209 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/include/LandmarkDetectorParameters.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/include/LandmarkDetectorParameters.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/include/LandmarkDetectorUtils.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/include/LandmarkDetectorUtils.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/include/PAW.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/include/PAW.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/include/PDM.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/include/PDM.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/include/Patch_experts.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/include/Patch_experts.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/include/SVR_patch_expert.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/include/SVR_patch_expert.h -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/include/stdafx.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2017, Carnegie Mellon University and University of Cambridge, 3 | // all rights reserved. 4 | // 5 | // ACADEMIC OR NON-PROFIT ORGANIZATION NONCOMMERCIAL RESEARCH USE ONLY 6 | // 7 | // BY USING OR DOWNLOADING THE SOFTWARE, YOU ARE AGREEING TO THE TERMS OF THIS LICENSE AGREEMENT. 8 | // IF YOU DO NOT AGREE WITH THESE TERMS, YOU MAY NOT USE OR DOWNLOAD THE SOFTWARE. 9 | // 10 | // License can be found in OpenFace-license.txt 11 | // 12 | 13 | // Precompiled headers stuff 14 | 15 | #ifndef __STDAFX_h_ 16 | #define __STDAFX_h_ 17 | 18 | // OpenCV includes 19 | #include "opencv2/core/core.hpp" 20 | #include "opencv2/imgproc.hpp" 21 | #include "opencv2/objdetect.hpp" 22 | #include "opencv2/calib3d.hpp" 23 | #include "opencv2/imgcodecs.hpp" 24 | #include "opencv2/highgui/highgui.hpp" 25 | 26 | // IplImage stuff 27 | #include "opencv2/core/core_c.h" 28 | #include "opencv2/imgproc/imgproc_c.h" 29 | 30 | // C++ stuff 31 | #include 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | #include 38 | #include 39 | 40 | #define _USE_MATH_DEFINES 41 | #include 42 | 43 | // Boost stuff 44 | #include "cinder/Filesystem.h" 45 | 46 | template 47 | class LambdaBody : public cv::ParallelLoopBody { 48 | public: 49 | typedef _Function function_type; 50 | typedef const _Function const_function_type; 51 | 52 | inline LambdaBody(const_function_type& body) : 53 | _body(body) 54 | {} 55 | 56 | inline void operator() (const cv::Range & range) const 57 | { 58 | this->_body(range); 59 | } 60 | private: 61 | const_function_type _body; 62 | }; 63 | 64 | template 65 | inline void parallel_for(const cv::Range& range, const _Function& body, const double& nstride = -1.) 66 | { 67 | cv::parallel_for_(range, LambdaBody<_Function>(body), nstride); 68 | } 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/clm_general.txt: -------------------------------------------------------------------------------- 1 | PDM pdms/In-the-wild_aligned_PDM_68.txt 2 | Triangulations tris_68.txt 3 | PatchesIntensity patch_experts/svr_patches_0.25_general.txt 4 | PatchesIntensity patch_experts/svr_patches_0.35_general.txt 5 | PatchesIntensity patch_experts/svr_patches_0.5_general.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/clm_wild.txt: -------------------------------------------------------------------------------- 1 | PDM pdms/In-the-wild_aligned_PDM_68.txt 2 | Triangulations tris_68.txt 3 | PatchesIntensity patch_experts/svr_patches_0.25_wild.txt 4 | PatchesIntensity patch_experts/svr_patches_0.35_wild.txt 5 | PatchesIntensity patch_experts/svr_patches_0.5_wild.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/clnf_general.txt: -------------------------------------------------------------------------------- 1 | PDM pdms/In-the-wild_aligned_PDM_68.txt 2 | Triangulations tris_68.txt 3 | PatchesCCNF patch_experts/ccnf_patches_0.25_general.txt 4 | PatchesCCNF patch_experts/ccnf_patches_0.35_general.txt 5 | PatchesCCNF patch_experts/ccnf_patches_0.5_general.txt 6 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/clnf_wild.txt: -------------------------------------------------------------------------------- 1 | PDM pdms/In-the-wild_aligned_PDM_68.txt 2 | Triangulations tris_68.txt 3 | PatchesCCNF patch_experts/ccnf_patches_0.25_wild.txt 4 | PatchesCCNF patch_experts/ccnf_patches_0.35_wild.txt 5 | PatchesCCNF patch_experts/ccnf_patches_0.5_wild.txt 6 | PatchesCCNF patch_experts/ccnf_patches_1_wild.txt 7 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/detection_validation/validator_cnn.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/model/detection_validation/validator_cnn.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/detection_validation/validator_general_68.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/model/detection_validation/validator_general_68.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/haarAlign.txt: -------------------------------------------------------------------------------- 1 | 3 2 | 4 3 | 6 4 | 1.000000 0.000000 0.000000 0.000000 5 | 0.000000 1.000000 0.000000 0.000000 6 | 0.055858 0.229781 0.871248 0.892778 7 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/main_clm_general.txt: -------------------------------------------------------------------------------- 1 | LandmarkDetector clm_general.txt 2 | FaceDetConversion haarAlign.txt 3 | DetectionValidator detection_validation/validator_cnn.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/main_clm_wild.txt: -------------------------------------------------------------------------------- 1 | LandmarkDetector clm_wild.txt 2 | FaceDetConversion haarAlign.txt 3 | DetectionValidator detection_validation/validator_cnn.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/main_clnf_general.txt: -------------------------------------------------------------------------------- 1 | LandmarkDetector clnf_general.txt 2 | LandmarkDetector_part model_inner/main_clnf_inner.txt inner 17 0 18 1 19 2 20 3 21 4 22 5 23 6 24 7 25 8 26 9 27 10 28 11 29 12 30 13 31 14 32 15 33 16 34 17 35 18 36 19 37 20 38 21 39 22 40 23 41 24 42 25 43 26 44 27 45 28 46 29 47 30 48 31 49 32 50 33 51 34 52 35 53 36 54 37 55 38 56 39 57 40 58 41 59 42 60 43 61 44 62 45 63 46 64 47 65 48 66 49 67 50 3 | LandmarkDetector_part model_eye/main_clnf_synth_left.txt left_eye_28 36 8 37 10 38 12 39 14 40 16 41 18 4 | LandmarkDetector_part model_eye/main_clnf_synth_right.txt right_eye_28 42 8 43 10 44 12 45 14 46 16 47 18 5 | FaceDetConversion haarAlign.txt 6 | DetectionValidator detection_validation/validator_cnn.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/main_clnf_wild.txt: -------------------------------------------------------------------------------- 1 | LandmarkDetector clnf_wild.txt 2 | LandmarkDetector_part model_eye/main_clnf_synth_left.txt left_eye_28 36 8 37 10 38 12 39 14 40 16 41 18 3 | LandmarkDetector_part model_eye/main_clnf_synth_right.txt right_eye_28 42 8 43 10 44 12 45 14 46 16 47 18 4 | FaceDetConversion haarAlign.txt 5 | DetectionValidator detection_validation/validator_cnn.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/model_eye/clnf_left_synth.txt: -------------------------------------------------------------------------------- 1 | PDM pdms/pdm_28_l_eye_3D_closed.txt 2 | PatchesCCNF patch_experts/left_ccnf_patches_1.00_synth_lid_.txt 3 | PatchesCCNF patch_experts/left_ccnf_patches_1.50_synth_lid_.txt 4 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/model_eye/clnf_right_synth.txt: -------------------------------------------------------------------------------- 1 | PDM pdms/pdm_28_eye_3D_closed.txt 2 | PatchesCCNF patch_experts/ccnf_patches_1.00_synth_lid_.txt 3 | PatchesCCNF patch_experts/ccnf_patches_1.50_synth_lid_.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/model_eye/main_clnf_synth_left.txt: -------------------------------------------------------------------------------- 1 | LandmarkDetector clnf_left_synth.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/model_eye/main_clnf_synth_right.txt: -------------------------------------------------------------------------------- 1 | LandmarkDetector clnf_right_synth.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/model_eye/patch_experts/ccnf_patches_1.00_synth_lid_.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/model/model_eye/patch_experts/ccnf_patches_1.00_synth_lid_.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/model_eye/patch_experts/ccnf_patches_1.50_synth_lid_.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/model/model_eye/patch_experts/ccnf_patches_1.50_synth_lid_.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/model_eye/patch_experts/left_ccnf_patches_1.00_synth_lid_.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/model/model_eye/patch_experts/left_ccnf_patches_1.00_synth_lid_.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/model_eye/patch_experts/left_ccnf_patches_1.50_synth_lid_.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/model/model_eye/patch_experts/left_ccnf_patches_1.50_synth_lid_.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/model_eye/pdms/pdm_28_eye_3D_closed.txt: -------------------------------------------------------------------------------- 1 | # The mean values of the components (in mm) 2 | 84 3 | 1 4 | 6 5 | -6.346689 6 | -4.802645 7 | -0.689206 8 | 3.584030 9 | 5.513861 10 | 3.969817 11 | -0.143620 12 | -4.705906 13 | -10.151100 14 | -7.784450 15 | -4.315176 16 | 0.286655 17 | 4.895108 18 | 8.614140 19 | 11.209605 20 | 8.705321 21 | 5.165718 22 | 1.065652 23 | -3.271212 24 | -7.250731 25 | -2.195097 26 | -0.324358 27 | 1.476467 28 | 2.152288 29 | 1.307482 30 | -0.562884 31 | -2.363439 32 | -3.039631 33 | -0.630295 34 | -4.947588 35 | -6.865877 36 | -5.261457 37 | -1.074175 38 | 3.243115 39 | 5.161403 40 | 3.911768 41 | 2.351440 42 | -0.095726 43 | -1.959374 44 | -2.862675 45 | -2.316547 46 | -1.049970 47 | 0.957222 48 | 2.555497 49 | 3.410716 50 | 3.797180 51 | 3.755154 52 | 3.510297 53 | 1.231211 54 | 1.933679 55 | 1.093865 56 | -0.796012 57 | -2.628691 58 | -3.330879 59 | -2.491440 60 | -0.601842 61 | -0.509775 62 | 0.210152 63 | 0.641715 64 | 0.532111 65 | -0.054457 66 | -0.774384 67 | -1.205947 68 | -0.879208 69 | 1.060595 70 | -0.440952 71 | -1.721653 72 | -2.100358 73 | -0.796095 74 | 1.616596 75 | 4.283196 76 | 1.517115 77 | -0.872711 78 | -2.176368 79 | -2.010491 80 | -0.559696 81 | 0.173887 82 | 0.125369 83 | 0.313958 84 | 0.629133 85 | 0.886248 86 | 0.934736 87 | 0.746213 88 | 0.431068 89 | # The principal components (eigenvectors) of identity or combined identity and expression model 90 | 84 91 | 10 92 | 6 93 | -0.153386 0.025177 -0.054841 0.047942 0.005828 0.082724 0.142441 0.013459 0.069592 -0.174858 94 | -0.134498 0.018961 -0.050725 0.046303 0.080169 -0.085614 0.141365 -0.000051 0.047046 -0.145781 95 | -0.130919 -0.001976 -0.015781 0.021780 0.107202 -0.203982 0.058147 -0.013939 -0.001668 -0.032456 96 | -0.144747 -0.025369 0.029522 -0.011262 0.071090 -0.203042 -0.058466 -0.020071 -0.048015 0.098735 97 | -0.167881 -0.037515 0.058646 -0.033467 -0.007013 -0.083344 -0.140162 -0.014855 -0.064846 0.170941 98 | -0.186769 -0.031299 0.054529 -0.031829 -0.081354 0.084994 -0.139085 -0.001345 -0.042300 0.141864 99 | -0.190348 -0.010362 0.019585 -0.007306 -0.108386 0.203362 -0.055867 0.012543 0.006414 0.028538 100 | -0.171298 0.014498 -0.028042 0.026941 -0.077441 0.217018 0.062715 0.021341 0.053763 -0.101612 101 | 0.207372 0.062591 -0.119437 -0.054907 0.076820 -0.048100 -0.135908 -0.057742 -0.004103 -0.009908 102 | 0.225329 0.015439 -0.023166 -0.064446 -0.087217 -0.069482 -0.099691 0.249926 0.080107 0.028214 103 | 0.234134 -0.004997 0.053270 -0.057837 -0.186495 -0.082705 -0.126911 0.442421 0.063530 0.192235 104 | 0.232555 -0.003035 0.055702 -0.033152 -0.076396 -0.011744 -0.117545 0.262249 -0.015413 0.155968 105 | 0.213285 0.008939 0.034917 0.022841 0.034538 0.123140 -0.030932 0.037313 -0.101512 -0.081439 106 | 0.184330 0.002781 0.040384 0.080832 0.080460 0.115659 0.055044 0.080257 -0.058662 -0.101912 107 | 0.152472 -0.045932 0.082773 0.055658 0.007529 0.054010 0.199419 0.134126 0.101864 -0.104416 108 | 0.165398 -0.018683 0.044018 0.098351 -0.012939 -0.024937 0.134807 -0.069897 -0.073109 0.022702 109 | 0.184402 -0.009464 0.017039 0.048177 -0.004151 -0.026121 0.058695 -0.257197 -0.110822 -0.032434 110 | 0.200832 0.002349 -0.027929 -0.031359 0.014172 -0.005684 0.042899 -0.435980 -0.098097 -0.013502 111 | 0.207618 0.029961 -0.076210 -0.091900 0.049907 -0.030279 0.028983 -0.273244 0.042669 0.005952 112 | 0.207309 0.052291 -0.099881 -0.114814 0.132728 -0.038736 -0.063320 -0.127790 0.094419 -0.019914 113 | -0.149017 0.002774 -0.012207 0.018561 -0.033647 0.104700 0.125446 0.043084 -0.148359 0.076732 114 | -0.154866 -0.007385 0.008461 0.004109 -0.049639 0.092397 -0.026746 0.005949 0.022710 0.000382 115 | -0.153118 -0.016465 0.024583 -0.006636 -0.037945 0.028369 -0.160085 -0.033318 0.184813 -0.078178 116 | -0.144797 -0.019145 0.026714 -0.007369 -0.005424 -0.049859 -0.196430 -0.051719 0.243027 -0.113007 117 | -0.134779 -0.013860 0.013609 0.002322 0.028876 -0.096467 -0.114542 -0.038469 0.163204 -0.083593 118 | -0.128933 -0.003706 -0.007052 0.016750 0.044871 -0.084172 0.037576 -0.001329 -0.007933 -0.007089 119 | -0.130680 0.005372 -0.023172 0.027479 0.033190 -0.020171 0.170867 0.037942 -0.170086 0.071581 120 | -0.138999 0.008057 -0.025308 0.028236 0.000666 0.058065 0.207285 0.056337 -0.228233 0.106257 121 | -0.003984 -0.167992 0.019345 -0.008099 -0.110167 0.218829 -0.066444 0.011530 0.007137 0.033605 122 | 0.007213 -0.135126 -0.025388 0.056689 -0.092686 0.189792 0.024499 -0.006388 0.086896 -0.029308 123 | 0.017817 -0.117497 -0.053283 0.089178 -0.015735 0.045359 0.106064 -0.023203 0.119076 -0.070549 124 | 0.021618 -0.125432 -0.048000 0.070337 0.075609 -0.129863 0.130471 -0.029065 0.084827 -0.065960 125 | 0.016389 -0.154283 -0.012634 0.011202 0.127838 -0.233231 0.083422 -0.020541 0.004212 -0.018229 126 | 0.005192 -0.187148 0.032099 -0.053586 0.110358 -0.204194 -0.007521 -0.002624 -0.075546 0.044685 127 | -0.005412 -0.204777 0.059994 -0.086075 0.033407 -0.059761 -0.089086 0.014191 -0.107727 0.085926 128 | -0.010850 -0.196699 0.059026 -0.068250 -0.066030 0.122601 -0.115358 0.019806 -0.069346 0.083334 129 | -0.074908 0.222322 -0.128680 0.106279 0.515992 -0.037382 -0.166184 0.282250 -0.092724 -0.029211 130 | -0.049636 0.264882 0.162264 0.120013 0.170250 -0.115936 0.057634 0.079663 0.011493 -0.053341 131 | -0.020457 0.260307 0.347209 0.044215 -0.051959 -0.147993 0.103852 -0.081857 -0.000604 -0.087831 132 | 0.008466 0.249892 0.434476 -0.046985 -0.170644 -0.092034 0.008838 -0.087026 -0.030030 0.019115 133 | 0.031496 0.229386 0.360031 -0.050497 -0.104395 0.079803 -0.054671 -0.073899 -0.062985 -0.023917 134 | 0.046520 0.191125 0.186443 0.028729 0.050283 0.218925 -0.101211 0.048101 -0.011525 -0.043765 135 | 0.051597 0.123490 -0.100835 0.113633 0.277072 0.404462 -0.158693 -0.089593 -0.059518 -0.031557 136 | 0.031390 0.166293 -0.221317 0.010778 -0.065560 0.197405 -0.013358 -0.038202 0.028971 0.015787 137 | 0.007963 0.191505 -0.289781 -0.098710 -0.251918 0.026406 0.025857 -0.011773 0.026086 0.020397 138 | -0.015936 0.203274 -0.317303 -0.176584 -0.301025 -0.090120 0.038670 -0.012354 -0.000247 -0.036027 139 | -0.039475 0.208053 -0.288236 -0.127299 -0.178571 -0.148602 0.040236 0.004113 -0.004457 -0.016551 140 | -0.061014 0.208181 -0.221481 -0.003480 0.048193 -0.126544 0.030670 0.093612 -0.016308 -0.019164 141 | -0.002022 -0.169263 0.029080 -0.021466 -0.029459 0.025877 -0.142794 -0.034375 0.183570 -0.078222 142 | -0.000300 -0.172691 0.031731 -0.029747 0.010395 -0.055596 -0.169946 -0.050038 0.239789 -0.125691 143 | 0.004235 -0.165003 0.019162 -0.015569 0.044130 -0.113124 -0.088548 -0.042014 0.167473 -0.083327 144 | 0.008925 -0.150706 -0.001258 0.012743 0.051988 -0.113014 0.053667 -0.014997 0.008933 0.024161 145 | 0.011023 -0.138177 -0.017566 0.038590 0.029375 -0.055348 0.173359 0.015191 -0.142999 0.133883 146 | 0.009301 -0.134752 -0.020213 0.046851 -0.010464 0.026098 0.200464 0.030859 -0.199272 0.181460 147 | 0.004768 -0.142435 -0.007651 0.032701 -0.044203 0.083633 0.119139 0.022826 -0.126885 0.138947 148 | 0.000078 -0.156729 0.012766 0.004408 -0.052075 0.083550 -0.023030 -0.004196 0.031710 0.031351 149 | 0.128814 0.003571 0.003480 -0.114195 0.042965 0.013538 0.081206 0.030733 0.036469 -0.042832 150 | 0.084713 0.044573 0.016014 -0.075237 -0.003338 -0.037950 0.095804 -0.008646 0.106748 0.104806 151 | -0.014166 0.059774 0.028433 -0.073564 -0.028456 -0.056347 0.078713 -0.035782 0.114925 0.182190 152 | -0.109902 0.040269 0.033462 -0.110156 -0.017675 -0.030878 0.039946 -0.034778 0.056210 0.143990 153 | -0.146414 -0.002516 0.028155 -0.163578 0.022690 0.023539 0.002211 -0.006223 -0.035002 0.012582 154 | -0.102313 -0.043518 0.015622 -0.202536 0.068994 0.075027 -0.012387 0.033157 -0.105281 -0.135056 155 | -0.003434 -0.058719 0.003203 -0.204209 0.094112 0.093425 0.004704 0.060292 -0.113458 -0.212440 156 | 0.099074 -0.043950 -0.000509 -0.171174 0.086675 0.069487 0.039093 0.061946 -0.059545 -0.184463 157 | -0.054913 -0.004523 0.015086 0.231138 -0.115127 0.082549 0.124313 -0.000052 0.180789 0.076509 158 | -0.038477 -0.010328 -0.025919 0.225952 -0.098722 -0.012521 -0.024397 -0.078886 -0.051188 -0.094188 159 | -0.015599 -0.034327 -0.050684 0.208434 -0.145282 -0.134450 -0.225097 -0.057805 -0.253738 -0.159062 160 | 0.013759 -0.046657 -0.031453 0.191733 -0.202303 -0.154083 -0.244663 -0.006407 -0.264460 -0.184882 161 | 0.039393 -0.033167 -0.026588 0.194395 -0.163302 -0.053331 -0.095733 0.027393 -0.169484 -0.254320 162 | 0.055992 -0.018520 -0.024499 0.236434 -0.057326 -0.072106 -0.011848 0.151259 -0.049264 -0.117501 163 | 0.068631 -0.013724 0.027292 0.231437 -0.037554 0.034751 0.337456 0.134888 0.312055 -0.132196 164 | 0.056256 0.022936 -0.019524 0.146331 0.032207 -0.007908 -0.035410 -0.090636 -0.012725 0.205397 165 | 0.042182 0.043848 -0.041760 0.116811 0.078314 0.051616 -0.106453 -0.228687 0.036561 0.260986 166 | 0.019928 0.055883 -0.059556 0.147688 0.109694 0.020391 -0.066574 -0.102694 0.128555 0.213173 167 | -0.009409 0.051946 -0.050194 0.162935 0.085636 -0.028224 -0.126599 0.046702 0.099383 0.240695 168 | -0.036452 0.030786 -0.028097 0.176770 -0.015768 0.029793 -0.046117 0.020525 0.047330 0.165226 169 | 0.034441 -0.022881 0.015629 -0.156918 0.055237 0.036211 0.045403 0.038219 -0.063438 -0.053697 170 | -0.007396 -0.031398 0.017754 -0.172866 0.059650 0.047306 0.028721 0.038858 -0.090778 -0.069213 171 | -0.050587 -0.024716 0.023247 -0.172154 0.048419 0.037544 0.009258 0.022863 -0.065299 -0.050654 172 | -0.069827 -0.006750 0.028891 -0.155196 0.028124 0.012648 -0.001577 -0.000397 -0.001922 -0.008919 173 | -0.053849 0.011973 0.031379 -0.131930 0.010655 -0.012793 0.002562 -0.017294 0.062223 0.031533 174 | -0.012020 0.020487 0.029254 -0.115987 0.006243 -0.023880 0.019242 -0.017932 0.089559 0.047033 175 | 0.031165 0.013807 0.023762 -0.116702 0.017473 -0.014122 0.038694 -0.001937 0.064074 0.028511 176 | 0.050412 -0.004156 0.018118 -0.133655 0.037766 0.010766 0.049531 0.021320 0.000702 -0.013208 177 | # The variances of the components (eigenvalues) of identity or combined identity and expression model 178 | 1 179 | 10 180 | 6 181 | 111.570907 32.910130 22.463857 3.183176 1.531432 1.381999 0.770569 0.635129 0.500532 0.422800 182 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/model_eye/pdms/pdm_28_l_eye_3D_closed.txt: -------------------------------------------------------------------------------- 1 | # The mean values of the components (in mm) 2 | 84 3 | 1 4 | 6 5 | -5.513861 6 | -3.584030 7 | 0.689206 8 | 4.802645 9 | 6.346689 10 | 4.705906 11 | 0.143620 12 | -3.969817 13 | -11.209605 14 | -8.614140 15 | -4.895108 16 | -0.286655 17 | 4.315176 18 | 7.784450 19 | 10.151100 20 | 7.250731 21 | 3.271212 22 | -1.065652 23 | -5.165718 24 | -8.705321 25 | -1.476467 26 | 0.324358 27 | 2.195097 28 | 3.039631 29 | 2.363439 30 | 0.562884 31 | -1.307482 32 | -2.152288 33 | -1.074175 34 | -5.261457 35 | -6.865877 36 | -4.947588 37 | -0.630295 38 | 3.911768 39 | 5.161403 40 | 3.243115 41 | 0.957222 42 | -1.049970 43 | -2.316547 44 | -2.862675 45 | -1.959374 46 | -0.095726 47 | 2.351440 48 | 3.510297 49 | 3.755154 50 | 3.797180 51 | 3.410716 52 | 2.555497 53 | 1.093865 54 | 1.933679 55 | 1.231211 56 | -0.601842 57 | -2.491440 58 | -3.330879 59 | -2.628691 60 | -0.796012 61 | -0.054457 62 | 0.532111 63 | 0.641715 64 | 0.210152 65 | -0.509775 66 | -0.879208 67 | -1.205947 68 | -0.774384 69 | 4.283196 70 | 1.616596 71 | -0.796095 72 | -2.100358 73 | -1.721653 74 | -0.440952 75 | 1.060595 76 | -0.559696 77 | -2.010491 78 | -2.176368 79 | -0.872711 80 | 1.517115 81 | 0.313958 82 | 0.125369 83 | 0.173887 84 | 0.431068 85 | 0.746213 86 | 0.934736 87 | 0.886248 88 | 0.629133 89 | # The principal components (eigenvectors) of identity or combined identity and expression model 90 | 84 91 | 10 92 | 6 93 | 0.167881 0.037515 -0.058646 0.033467 0.007013 0.083344 0.140162 0.014855 0.064846 -0.170941 94 | 0.144747 0.025369 -0.029522 0.011262 -0.071090 0.203042 0.058466 0.020071 0.048015 -0.098735 95 | 0.130919 0.001976 0.015781 -0.021780 -0.107202 0.203982 -0.058147 0.013939 0.001668 0.032456 96 | 0.134498 -0.018961 0.050725 -0.046303 -0.080169 0.085614 -0.141365 0.000051 -0.047046 0.145781 97 | 0.153386 -0.025177 0.054841 -0.047942 -0.005828 -0.082724 -0.142441 -0.013459 -0.069592 0.174858 98 | 0.171298 -0.014498 0.028042 -0.026941 0.077441 -0.217018 -0.062715 -0.021341 -0.053763 0.101612 99 | 0.190348 0.010362 -0.019585 0.007306 0.108386 -0.203362 0.055867 -0.012543 -0.006414 -0.028538 100 | 0.186769 0.031299 -0.054529 0.031829 0.081354 -0.084994 0.139085 0.001345 0.042300 -0.141864 101 | -0.152472 0.045932 -0.082773 -0.055658 -0.007529 -0.054010 -0.199419 -0.134126 -0.101864 0.104416 102 | -0.184330 -0.002781 -0.040384 -0.080832 -0.080460 -0.115659 -0.055044 -0.080257 0.058662 0.101912 103 | -0.213285 -0.008939 -0.034917 -0.022841 -0.034538 -0.123140 0.030932 -0.037313 0.101512 0.081439 104 | -0.232555 0.003035 -0.055702 0.033152 0.076396 0.011744 0.117545 -0.262249 0.015413 -0.155968 105 | -0.234134 0.004997 -0.053270 0.057837 0.186495 0.082705 0.126911 -0.442421 -0.063530 -0.192235 106 | -0.225329 -0.015439 0.023166 0.064446 0.087217 0.069482 0.099691 -0.249926 -0.080107 -0.028214 107 | -0.207372 -0.062591 0.119437 0.054907 -0.076820 0.048100 0.135908 0.057742 0.004103 0.009908 108 | -0.207309 -0.052291 0.099881 0.114814 -0.132728 0.038736 0.063320 0.127790 -0.094419 0.019914 109 | -0.207618 -0.029961 0.076210 0.091900 -0.049907 0.030279 -0.028983 0.273244 -0.042669 -0.005952 110 | -0.200832 -0.002349 0.027929 0.031359 -0.014172 0.005684 -0.042899 0.435980 0.098097 0.013502 111 | -0.184402 0.009464 -0.017039 -0.048177 0.004151 0.026121 -0.058695 0.257197 0.110822 0.032434 112 | -0.165398 0.018683 -0.044018 -0.098351 0.012939 0.024937 -0.134807 0.069897 0.073109 -0.022702 113 | 0.153118 0.016465 -0.024583 0.006636 0.037945 -0.028369 0.160085 0.033318 -0.184813 0.078178 114 | 0.154866 0.007385 -0.008461 -0.004109 0.049639 -0.092397 0.026746 -0.005949 -0.022710 -0.000382 115 | 0.149017 -0.002774 0.012207 -0.018561 0.033647 -0.104700 -0.125446 -0.043084 0.148359 -0.076732 116 | 0.138999 -0.008057 0.025308 -0.028236 -0.000666 -0.058065 -0.207285 -0.056337 0.228233 -0.106257 117 | 0.130680 -0.005372 0.023172 -0.027479 -0.033190 0.020171 -0.170867 -0.037942 0.170086 -0.071581 118 | 0.128933 0.003706 0.007052 -0.016750 -0.044871 0.084172 -0.037576 0.001329 0.007933 0.007089 119 | 0.134779 0.013860 -0.013609 -0.002322 -0.028876 0.096467 0.114542 0.038469 -0.163204 0.083593 120 | 0.144797 0.019145 -0.026714 0.007369 0.005424 0.049859 0.196430 0.051719 -0.243027 0.113007 121 | 0.016389 -0.154283 -0.012634 0.011202 0.127838 -0.233231 0.083422 -0.020541 0.004212 -0.018229 122 | 0.021618 -0.125432 -0.048000 0.070337 0.075609 -0.129863 0.130471 -0.029065 0.084827 -0.065960 123 | 0.017817 -0.117497 -0.053283 0.089178 -0.015735 0.045359 0.106064 -0.023203 0.119076 -0.070549 124 | 0.007213 -0.135126 -0.025388 0.056689 -0.092686 0.189792 0.024499 -0.006388 0.086896 -0.029308 125 | -0.003984 -0.167992 0.019345 -0.008099 -0.110167 0.218829 -0.066444 0.011530 0.007137 0.033605 126 | -0.010850 -0.196699 0.059026 -0.068250 -0.066030 0.122601 -0.115358 0.019806 -0.069346 0.083334 127 | -0.005412 -0.204777 0.059994 -0.086075 0.033407 -0.059761 -0.089086 0.014191 -0.107727 0.085926 128 | 0.005192 -0.187148 0.032099 -0.053586 0.110358 -0.204194 -0.007521 -0.002624 -0.075546 0.044685 129 | 0.051597 0.123490 -0.100835 0.113633 0.277072 0.404462 -0.158693 -0.089593 -0.059518 -0.031557 130 | 0.046520 0.191125 0.186443 0.028729 0.050283 0.218925 -0.101211 0.048101 -0.011525 -0.043765 131 | 0.031496 0.229386 0.360031 -0.050497 -0.104395 0.079803 -0.054671 -0.073899 -0.062985 -0.023917 132 | 0.008466 0.249892 0.434476 -0.046985 -0.170644 -0.092034 0.008838 -0.087026 -0.030030 0.019115 133 | -0.020457 0.260307 0.347209 0.044215 -0.051959 -0.147993 0.103852 -0.081857 -0.000604 -0.087831 134 | -0.049636 0.264882 0.162264 0.120013 0.170250 -0.115936 0.057634 0.079663 0.011493 -0.053341 135 | -0.074908 0.222322 -0.128680 0.106279 0.515992 -0.037382 -0.166184 0.282250 -0.092724 -0.029211 136 | -0.061014 0.208181 -0.221481 -0.003480 0.048193 -0.126544 0.030670 0.093612 -0.016308 -0.019164 137 | -0.039475 0.208053 -0.288236 -0.127299 -0.178571 -0.148602 0.040236 0.004113 -0.004457 -0.016551 138 | -0.015936 0.203274 -0.317303 -0.176584 -0.301025 -0.090120 0.038670 -0.012354 -0.000247 -0.036027 139 | 0.007963 0.191505 -0.289781 -0.098710 -0.251918 0.026406 0.025857 -0.011773 0.026086 0.020397 140 | 0.031390 0.166293 -0.221317 0.010778 -0.065560 0.197405 -0.013358 -0.038202 0.028971 0.015787 141 | 0.004235 -0.165003 0.019162 -0.015569 0.044130 -0.113124 -0.088548 -0.042014 0.167473 -0.083327 142 | -0.000300 -0.172691 0.031731 -0.029747 0.010395 -0.055596 -0.169946 -0.050038 0.239789 -0.125691 143 | -0.002022 -0.169263 0.029080 -0.021466 -0.029459 0.025877 -0.142794 -0.034375 0.183570 -0.078222 144 | 0.000078 -0.156729 0.012766 0.004408 -0.052075 0.083550 -0.023030 -0.004196 0.031710 0.031351 145 | 0.004768 -0.142435 -0.007651 0.032701 -0.044203 0.083633 0.119139 0.022826 -0.126885 0.138947 146 | 0.009301 -0.134752 -0.020213 0.046851 -0.010464 0.026098 0.200464 0.030859 -0.199272 0.181460 147 | 0.011023 -0.138177 -0.017566 0.038590 0.029375 -0.055348 0.173359 0.015191 -0.142999 0.133883 148 | 0.008925 -0.150706 -0.001258 0.012743 0.051988 -0.113014 0.053667 -0.014997 0.008933 0.024161 149 | -0.146414 -0.002516 0.028155 -0.163578 0.022690 0.023539 0.002211 -0.006223 -0.035002 0.012582 150 | -0.109902 0.040269 0.033462 -0.110156 -0.017675 -0.030878 0.039946 -0.034778 0.056210 0.143990 151 | -0.014166 0.059774 0.028433 -0.073564 -0.028456 -0.056347 0.078713 -0.035782 0.114925 0.182190 152 | 0.084713 0.044573 0.016014 -0.075237 -0.003338 -0.037950 0.095804 -0.008646 0.106748 0.104806 153 | 0.128814 0.003571 0.003480 -0.114195 0.042965 0.013538 0.081206 0.030733 0.036469 -0.042832 154 | 0.099074 -0.043950 -0.000509 -0.171174 0.086675 0.069487 0.039093 0.061946 -0.059545 -0.184463 155 | -0.003434 -0.058719 0.003203 -0.204209 0.094112 0.093425 0.004704 0.060292 -0.113458 -0.212440 156 | -0.102313 -0.043518 0.015622 -0.202536 0.068994 0.075027 -0.012387 0.033157 -0.105281 -0.135056 157 | 0.068631 -0.013724 0.027292 0.231437 -0.037554 0.034751 0.337456 0.134888 0.312055 -0.132196 158 | 0.055992 -0.018520 -0.024499 0.236434 -0.057326 -0.072106 -0.011848 0.151259 -0.049264 -0.117501 159 | 0.039393 -0.033167 -0.026588 0.194395 -0.163302 -0.053331 -0.095733 0.027393 -0.169484 -0.254320 160 | 0.013759 -0.046657 -0.031453 0.191733 -0.202303 -0.154083 -0.244663 -0.006407 -0.264460 -0.184882 161 | -0.015599 -0.034327 -0.050684 0.208434 -0.145282 -0.134450 -0.225097 -0.057805 -0.253738 -0.159062 162 | -0.038477 -0.010328 -0.025919 0.225952 -0.098722 -0.012521 -0.024397 -0.078886 -0.051188 -0.094188 163 | -0.054913 -0.004523 0.015086 0.231138 -0.115127 0.082549 0.124313 -0.000052 0.180789 0.076509 164 | -0.036452 0.030786 -0.028097 0.176770 -0.015768 0.029793 -0.046117 0.020525 0.047330 0.165226 165 | -0.009409 0.051946 -0.050194 0.162935 0.085636 -0.028224 -0.126599 0.046702 0.099383 0.240695 166 | 0.019928 0.055883 -0.059556 0.147688 0.109694 0.020391 -0.066574 -0.102694 0.128555 0.213173 167 | 0.042182 0.043848 -0.041760 0.116811 0.078314 0.051616 -0.106453 -0.228687 0.036561 0.260986 168 | 0.056256 0.022936 -0.019524 0.146331 0.032207 -0.007908 -0.035410 -0.090636 -0.012725 0.205397 169 | -0.050587 -0.024716 0.023247 -0.172154 0.048419 0.037544 0.009258 0.022863 -0.065299 -0.050654 170 | -0.007396 -0.031398 0.017754 -0.172866 0.059650 0.047306 0.028721 0.038858 -0.090778 -0.069213 171 | 0.034441 -0.022881 0.015629 -0.156918 0.055237 0.036211 0.045403 0.038219 -0.063438 -0.053697 172 | 0.050412 -0.004156 0.018118 -0.133655 0.037766 0.010766 0.049531 0.021320 0.000702 -0.013208 173 | 0.031165 0.013807 0.023762 -0.116702 0.017473 -0.014122 0.038694 -0.001937 0.064074 0.028511 174 | -0.012020 0.020487 0.029254 -0.115987 0.006243 -0.023880 0.019242 -0.017932 0.089559 0.047033 175 | -0.053849 0.011973 0.031379 -0.131930 0.010655 -0.012793 0.002562 -0.017294 0.062223 0.031533 176 | -0.069827 -0.006750 0.028891 -0.155196 0.028124 0.012648 -0.001577 -0.000397 -0.001922 -0.008919 177 | # The variances of the components (eigenvalues) of identity or combined identity and expression model 178 | 1 179 | 10 180 | 6 181 | 111.570907 32.910130 22.463857 3.183176 1.531432 1.381999 0.770569 0.635129 0.500532 0.422800 182 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/model_inner/clnf_inner.txt: -------------------------------------------------------------------------------- 1 | PDM pdms/pdm_51_inner.txt 2 | PatchesCCNF patch_experts/ccnf_patches_1.00_inner.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/model_inner/main_clnf_inner.txt: -------------------------------------------------------------------------------- 1 | LandmarkDetector clnf_inner.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/model_inner/patch_experts/ccnf_patches_1.00_inner.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/model/model_inner/patch_experts/ccnf_patches_1.00_inner.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/patch_experts/ccnf_patches_0.25_general.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/model/patch_experts/ccnf_patches_0.25_general.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/patch_experts/ccnf_patches_0.25_wild.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/model/patch_experts/ccnf_patches_0.25_wild.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/patch_experts/ccnf_patches_0.35_general.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/model/patch_experts/ccnf_patches_0.35_general.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/patch_experts/ccnf_patches_0.35_wild.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/model/patch_experts/ccnf_patches_0.35_wild.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/patch_experts/ccnf_patches_0.5_general.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/model/patch_experts/ccnf_patches_0.5_general.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/patch_experts/ccnf_patches_0.5_wild.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/model/patch_experts/ccnf_patches_0.5_wild.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/patch_experts/ccnf_patches_1_wild.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/model/patch_experts/ccnf_patches_1_wild.txt -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/tris_68.txt: -------------------------------------------------------------------------------- 1 | # Number of triangulations 2 | 7 3 | # Triangulation 1 4 | # triangulation 5 | 97 6 | 3 7 | 4 8 | 58 67 59 9 | 60 49 48 10 | 58 59 6 11 | 34 52 35 12 | 44 45 25 13 | 39 40 29 14 | 37 18 36 15 | 27 42 22 16 | 23 44 24 17 | 41 36 1 18 | 50 62 51 19 | 56 65 66 20 | 57 58 7 21 | 64 53 63 22 | 28 27 39 23 | 52 34 51 24 | 54 14 35 25 | 29 42 28 26 | 19 20 24 27 | 35 15 46 28 | 37 19 18 29 | 36 0 1 30 | 18 17 36 31 | 37 20 19 32 | 38 20 37 33 | 21 20 38 34 | 21 38 39 35 | 24 44 25 36 | 30 34 35 37 | 21 39 27 38 | 28 42 27 39 | 39 29 28 40 | 29 30 35 41 | 31 30 29 42 | 30 33 34 43 | 31 29 40 44 | 36 17 0 45 | 41 31 40 46 | 31 32 30 47 | 31 41 1 48 | 49 31 48 49 | 48 2 3 50 | 67 60 59 51 | 4 48 3 52 | 5 48 4 53 | 6 59 5 54 | 59 48 5 55 | 60 48 59 56 | 7 58 6 57 | 61 49 60 58 | 58 66 67 59 | 31 2 48 60 | 31 50 32 61 | 1 2 31 62 | 61 50 49 63 | 52 62 63 64 | 50 31 49 65 | 34 33 51 66 | 51 62 52 67 | 32 50 51 68 | 50 61 62 69 | 63 53 52 70 | 54 55 11 71 | 57 8 9 72 | 66 58 57 73 | 8 57 7 74 | 56 57 9 75 | 66 57 56 76 | 10 56 9 77 | 55 56 10 78 | 53 54 35 79 | 53 35 52 80 | 12 54 11 81 | 55 10 11 82 | 65 56 55 83 | 64 55 54 84 | 65 55 64 85 | 54 53 64 86 | 12 13 54 87 | 14 54 13 88 | 15 35 14 89 | 47 35 46 90 | 33 32 51 91 | 30 32 33 92 | 29 35 47 93 | 15 45 46 94 | 22 21 27 95 | 20 21 23 96 | 43 23 22 97 | 29 47 42 98 | 23 21 22 99 | 24 20 23 100 | 22 42 43 101 | 23 43 44 102 | 45 16 26 103 | 15 16 45 104 | 25 45 26 105 | # Triangulation 2 106 | # triangulation 107 | 97 108 | 3 109 | 4 110 | 58 67 59 111 | 60 49 48 112 | 58 59 6 113 | 34 52 35 114 | 44 45 25 115 | 39 40 29 116 | 37 18 36 117 | 27 42 22 118 | 23 44 24 119 | 41 36 1 120 | 50 62 51 121 | 56 65 66 122 | 57 58 7 123 | 64 53 63 124 | 28 27 39 125 | 52 34 51 126 | 54 14 35 127 | 29 42 28 128 | 19 20 24 129 | 35 15 46 130 | 37 19 18 131 | 36 0 1 132 | 18 17 36 133 | 37 20 19 134 | 38 20 37 135 | 21 20 38 136 | 21 38 39 137 | 24 44 25 138 | 30 34 35 139 | 21 39 27 140 | 28 42 27 141 | 39 29 28 142 | 29 30 35 143 | 31 30 29 144 | 30 33 34 145 | 31 29 40 146 | 36 17 0 147 | 41 31 40 148 | 31 32 30 149 | 31 41 1 150 | 49 31 48 151 | 48 2 3 152 | 67 60 59 153 | 4 48 3 154 | 5 48 4 155 | 6 59 5 156 | 59 48 5 157 | 60 48 59 158 | 7 58 6 159 | 61 49 60 160 | 58 66 67 161 | 31 2 48 162 | 31 50 32 163 | 1 2 31 164 | 61 50 49 165 | 52 62 63 166 | 50 31 49 167 | 34 33 51 168 | 51 62 52 169 | 32 50 51 170 | 50 61 62 171 | 63 53 52 172 | 54 55 11 173 | 57 8 9 174 | 66 58 57 175 | 8 57 7 176 | 56 57 9 177 | 66 57 56 178 | 10 56 9 179 | 55 56 10 180 | 53 54 35 181 | 53 35 52 182 | 12 54 11 183 | 55 10 11 184 | 65 56 55 185 | 64 55 54 186 | 65 55 64 187 | 54 53 64 188 | 12 13 54 189 | 14 54 13 190 | 15 35 14 191 | 47 35 46 192 | 33 32 51 193 | 30 32 33 194 | 29 35 47 195 | 15 45 46 196 | 22 21 27 197 | 20 21 23 198 | 43 23 22 199 | 29 47 42 200 | 23 21 22 201 | 24 20 23 202 | 22 42 43 203 | 23 43 44 204 | 45 16 26 205 | 15 16 45 206 | 25 45 26 207 | # Triangulation 3 208 | # triangulation 209 | 82 210 | 3 211 | 4 212 | 58 67 59 213 | 60 49 48 214 | 58 59 6 215 | 34 52 35 216 | 44 45 25 217 | 39 40 29 218 | 37 18 36 219 | 27 42 22 220 | 23 44 24 221 | 41 36 1 222 | 50 62 51 223 | 56 65 66 224 | 57 58 7 225 | 64 53 63 226 | 28 27 39 227 | 52 34 51 228 | 29 42 28 229 | 19 20 24 230 | 37 19 18 231 | 36 0 1 232 | 18 17 36 233 | 37 20 19 234 | 38 20 37 235 | 21 20 38 236 | 21 38 39 237 | 24 44 25 238 | 30 34 35 239 | 21 39 27 240 | 28 42 27 241 | 39 29 28 242 | 31 30 29 243 | 30 33 34 244 | 31 29 40 245 | 36 17 0 246 | 41 31 40 247 | 31 32 30 248 | 31 41 1 249 | 49 31 48 250 | 48 2 3 251 | 67 60 59 252 | 4 48 3 253 | 5 48 4 254 | 6 59 5 255 | 59 48 5 256 | 60 48 59 257 | 7 58 6 258 | 61 49 60 259 | 58 66 67 260 | 31 2 48 261 | 31 50 32 262 | 1 2 31 263 | 61 50 49 264 | 52 62 63 265 | 50 31 49 266 | 34 33 51 267 | 51 62 52 268 | 32 50 51 269 | 50 61 62 270 | 63 53 52 271 | 57 8 9 272 | 66 58 57 273 | 8 57 7 274 | 56 57 9 275 | 66 57 56 276 | 53 35 52 277 | 65 56 55 278 | 64 55 54 279 | 65 55 64 280 | 54 53 64 281 | 47 35 46 282 | 33 32 51 283 | 30 32 33 284 | 15 45 46 285 | 22 21 27 286 | 20 21 23 287 | 43 23 22 288 | 29 47 42 289 | 23 21 22 290 | 24 20 23 291 | 22 42 43 292 | 23 43 44 293 | 25 45 26 294 | # Triangulation 4 295 | # triangulation 296 | 31 297 | 3 298 | 4 299 | 58 67 59 300 | 58 59 6 301 | 37 18 36 302 | 41 36 1 303 | 50 62 51 304 | 57 58 7 305 | 37 19 18 306 | 36 0 1 307 | 18 17 36 308 | 37 20 19 309 | 38 20 37 310 | 31 30 29 311 | 31 29 40 312 | 36 17 0 313 | 41 31 40 314 | 31 41 1 315 | 49 31 48 316 | 48 2 3 317 | 4 48 3 318 | 5 48 4 319 | 6 59 5 320 | 59 48 5 321 | 7 58 6 322 | 58 66 67 323 | 31 2 48 324 | 1 2 31 325 | 61 50 49 326 | 50 31 49 327 | 50 61 62 328 | 66 58 57 329 | 8 57 7 330 | # Triangulation 5 331 | # triangulation 332 | 97 333 | 3 334 | 4 335 | 58 67 59 336 | 60 49 48 337 | 58 59 6 338 | 34 52 35 339 | 44 45 25 340 | 39 40 29 341 | 37 18 36 342 | 27 42 22 343 | 23 44 24 344 | 41 36 1 345 | 50 62 51 346 | 56 65 66 347 | 57 58 7 348 | 64 53 63 349 | 28 27 39 350 | 52 34 51 351 | 54 14 35 352 | 29 42 28 353 | 19 20 24 354 | 35 15 46 355 | 37 19 18 356 | 36 0 1 357 | 18 17 36 358 | 37 20 19 359 | 38 20 37 360 | 21 20 38 361 | 21 38 39 362 | 24 44 25 363 | 30 34 35 364 | 21 39 27 365 | 28 42 27 366 | 39 29 28 367 | 29 30 35 368 | 31 30 29 369 | 30 33 34 370 | 31 29 40 371 | 36 17 0 372 | 41 31 40 373 | 31 32 30 374 | 31 41 1 375 | 49 31 48 376 | 48 2 3 377 | 67 60 59 378 | 4 48 3 379 | 5 48 4 380 | 6 59 5 381 | 59 48 5 382 | 60 48 59 383 | 7 58 6 384 | 61 49 60 385 | 58 66 67 386 | 31 2 48 387 | 31 50 32 388 | 1 2 31 389 | 61 50 49 390 | 52 62 63 391 | 50 31 49 392 | 34 33 51 393 | 51 62 52 394 | 32 50 51 395 | 50 61 62 396 | 63 53 52 397 | 54 55 11 398 | 57 8 9 399 | 66 58 57 400 | 8 57 7 401 | 56 57 9 402 | 66 57 56 403 | 10 56 9 404 | 55 56 10 405 | 53 54 35 406 | 53 35 52 407 | 12 54 11 408 | 55 10 11 409 | 65 56 55 410 | 64 55 54 411 | 65 55 64 412 | 54 53 64 413 | 12 13 54 414 | 14 54 13 415 | 15 35 14 416 | 47 35 46 417 | 33 32 51 418 | 30 32 33 419 | 29 35 47 420 | 15 45 46 421 | 22 21 27 422 | 20 21 23 423 | 43 23 22 424 | 29 47 42 425 | 23 21 22 426 | 24 20 23 427 | 22 42 43 428 | 23 43 44 429 | 45 16 26 430 | 15 16 45 431 | 25 45 26 432 | # Triangulation 6 433 | # triangulation 434 | 82 435 | 3 436 | 4 437 | 58 67 59 438 | 60 49 48 439 | 34 52 35 440 | 44 45 25 441 | 39 40 29 442 | 37 18 36 443 | 27 42 22 444 | 23 44 24 445 | 41 36 1 446 | 50 62 51 447 | 56 65 66 448 | 57 58 7 449 | 64 53 63 450 | 28 27 39 451 | 52 34 51 452 | 54 14 35 453 | 29 42 28 454 | 19 20 24 455 | 35 15 46 456 | 37 19 18 457 | 18 17 36 458 | 37 20 19 459 | 38 20 37 460 | 21 20 38 461 | 21 38 39 462 | 24 44 25 463 | 30 34 35 464 | 21 39 27 465 | 28 42 27 466 | 39 29 28 467 | 29 30 35 468 | 30 33 34 469 | 41 31 40 470 | 31 32 30 471 | 67 60 59 472 | 60 48 59 473 | 61 49 60 474 | 58 66 67 475 | 31 50 32 476 | 61 50 49 477 | 52 62 63 478 | 50 31 49 479 | 34 33 51 480 | 51 62 52 481 | 32 50 51 482 | 50 61 62 483 | 63 53 52 484 | 54 55 11 485 | 57 8 9 486 | 66 58 57 487 | 8 57 7 488 | 56 57 9 489 | 66 57 56 490 | 10 56 9 491 | 55 56 10 492 | 53 54 35 493 | 53 35 52 494 | 12 54 11 495 | 55 10 11 496 | 65 56 55 497 | 64 55 54 498 | 65 55 64 499 | 54 53 64 500 | 12 13 54 501 | 14 54 13 502 | 15 35 14 503 | 47 35 46 504 | 33 32 51 505 | 30 32 33 506 | 29 35 47 507 | 15 45 46 508 | 22 21 27 509 | 20 21 23 510 | 43 23 22 511 | 29 47 42 512 | 23 21 22 513 | 24 20 23 514 | 22 42 43 515 | 23 43 44 516 | 45 16 26 517 | 15 16 45 518 | 25 45 26 519 | # Triangulation 7 520 | # triangulation 521 | 31 522 | 3 523 | 4 524 | 44 45 25 525 | 23 44 24 526 | 56 65 66 527 | 54 14 35 528 | 35 15 46 529 | 24 44 25 530 | 29 30 35 531 | 52 62 63 532 | 51 62 52 533 | 63 53 52 534 | 54 55 11 535 | 57 8 9 536 | 56 57 9 537 | 66 57 56 538 | 10 56 9 539 | 55 56 10 540 | 53 54 35 541 | 53 35 52 542 | 12 54 11 543 | 55 10 11 544 | 65 56 55 545 | 12 13 54 546 | 14 54 13 547 | 15 35 14 548 | 47 35 46 549 | 29 35 47 550 | 15 45 46 551 | 23 43 44 552 | 45 16 26 553 | 15 16 45 554 | 25 45 26 555 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/model/tris_68_full.txt: -------------------------------------------------------------------------------- 1 | 111 2 | 3 3 | 4 4 | 58 67 59 5 | 60 49 48 6 | 58 59 6 7 | 34 52 35 8 | 44 45 25 9 | 39 40 29 10 | 37 18 36 11 | 27 42 22 12 | 23 44 24 13 | 41 36 1 14 | 50 62 51 15 | 56 65 66 16 | 57 58 7 17 | 64 53 63 18 | 28 27 39 19 | 52 34 51 20 | 54 14 35 21 | 29 42 28 22 | 19 20 24 23 | 35 15 46 24 | 37 19 18 25 | 36 0 1 26 | 18 17 36 27 | 37 20 19 28 | 38 20 37 29 | 21 20 38 30 | 21 38 39 31 | 24 44 25 32 | 30 34 35 33 | 21 39 27 34 | 28 42 27 35 | 39 29 28 36 | 29 30 35 37 | 31 30 29 38 | 30 33 34 39 | 31 29 40 40 | 36 17 0 41 | 41 31 40 42 | 31 32 30 43 | 31 41 1 44 | 49 31 48 45 | 48 2 3 46 | 67 60 59 47 | 4 48 3 48 | 5 48 4 49 | 6 59 5 50 | 59 48 5 51 | 60 48 59 52 | 7 58 6 53 | 61 49 60 54 | 58 66 67 55 | 31 2 48 56 | 31 50 32 57 | 1 2 31 58 | 61 50 49 59 | 52 62 63 60 | 50 31 49 61 | 34 33 51 62 | 51 62 52 63 | 32 50 51 64 | 50 61 62 65 | 63 53 52 66 | 54 55 11 67 | 57 8 9 68 | 66 58 57 69 | 8 57 7 70 | 56 57 9 71 | 66 57 56 72 | 10 56 9 73 | 55 56 10 74 | 53 54 35 75 | 53 35 52 76 | 12 54 11 77 | 55 10 11 78 | 65 56 55 79 | 64 55 54 80 | 65 55 64 81 | 54 53 64 82 | 12 13 54 83 | 14 54 13 84 | 15 35 14 85 | 47 35 46 86 | 33 32 51 87 | 30 32 33 88 | 29 35 47 89 | 15 45 46 90 | 22 21 27 91 | 20 21 23 92 | 43 23 22 93 | 29 47 42 94 | 23 21 22 95 | 24 20 23 96 | 22 42 43 97 | 23 43 44 98 | 45 16 26 99 | 15 16 45 100 | 25 45 26 101 | 41 36 37 102 | 40 41 37 103 | 38 40 37 104 | 39 40 38 105 | 47 42 43 106 | 46 47 43 107 | 46 43 44 108 | 45 46 44 109 | 67 60 61 110 | 66 67 61 111 | 62 66 61 112 | 65 66 62 113 | 63 65 62 114 | 64 65 63 -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/src/CCNF_patch_expert.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/src/CCNF_patch_expert.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/src/LandmarkDetectionValidator.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/src/LandmarkDetectionValidator.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/src/LandmarkDetectorFunc.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/src/LandmarkDetectorFunc.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/src/LandmarkDetectorParameters.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/src/LandmarkDetectorParameters.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/src/LandmarkDetectorUtils.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/src/LandmarkDetectorUtils.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/src/PAW.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/src/PAW.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/src/PDM.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/src/PDM.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/src/Patch_experts.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/src/Patch_experts.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/src/SVR_patch_expert.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/3rdparty/OpenFace/LandmarkDetector/src/SVR_patch_expert.cpp -------------------------------------------------------------------------------- /3rdparty/OpenFace/LandmarkDetector/src/stdafx.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2017, Carnegie Mellon University and University of Cambridge, 3 | // all rights reserved. 4 | // 5 | // ACADEMIC OR NON-PROFIT ORGANIZATION NONCOMMERCIAL RESEARCH USE ONLY 6 | // 7 | // BY USING OR DOWNLOADING THE SOFTWARE, YOU ARE AGREEING TO THE TERMS OF THIS LICENSE AGREEMENT. 8 | // IF YOU DO NOT AGREE WITH THESE TERMS, YOU MAY NOT USE OR DOWNLOAD THE SOFTWARE. 9 | // 10 | // License can be found in OpenFace-license.txt 11 | // 12 | #include "stdafx.h" -------------------------------------------------------------------------------- /3rdparty/OpenFace/OpenFace-license.txt: -------------------------------------------------------------------------------- 1 | OPENFACE 2 | SOFTWARE LICENSE AGREEMENT 3 | ACADEMIC OR NON-PROFIT ORGANIZATION NONCOMMERCIAL RESEARCH USE ONLY 4 | 5 | BY USING OR DOWNLOADING THE SOFTWARE, YOU ARE AGREEING TO THE TERMS OF THIS LICENSE AGREEMENT. IF YOU DO NOT AGREE WITH THESE TERMS, YOU MAY NOT USE OR DOWNLOAD THE SOFTWARE. 6 | 7 | This is a license agreement ("Agreement") between your academic institution or non-profit organization or self (called "Licensee" or "You" in this Agreement) and Carnegie Mellon University (called "Licensor" in this Agreement). All rights not specifically granted to you in this Agreement are reserved for Licensor. 8 | 9 | RESERVATION OF OWNERSHIP AND GRANT OF LICENSE: 10 | Licensor retains exclusive ownership of any copy of the Software (as defined below) licensed under this Agreement and hereby grants to Licensee a personal, non-exclusive, non-transferable license to use the Software for noncommercial research purposes, without the right to sublicense, pursuant to the terms and conditions of this Agreement. As used in this Agreement, the term "Software" means (i) the actual copy of all or any portion of code for program routines made accessible to Licensee by Licensor pursuant to this Agreement, inclusive of backups, updates, and/or merged copies permitted hereunder or subsequently supplied by Licensor, including all or any file structures, programming instructions, user interfaces and screen formats and sequences as well as any and all documentation and instructions related to it, and (ii) all or any derivatives and/or modifications created or made by You to any of the items specified in (i). 11 | 12 | CONFIDENTIALITY: Licensee acknowledges that the Software is proprietary to Licensor, and as such, Licensee agrees to receive all such materials in confidence and use the Software only in accordance with the terms of this Agreement. Licensee agrees to use reasonable effort to protect the Software from unauthorized use, reproduction, distribution, or publication. 13 | 14 | COPYRIGHT: The Software is owned by Licensor and is protected by United 15 | States copyright laws and applicable international treaties and/or conventions. 16 | 17 | PERMITTED USES: The Software may be used for your own noncommercial internal research purposes. You understand and agree that Licensor is not obligated to implement any suggestions and/or feedback you might provide regarding the Software, but to the extent Licensor does so, you are not entitled to any compensation related thereto. 18 | 19 | DERIVATIVES: You may create derivatives of or make modifications to the Software, however, You agree that all and any such derivatives and modifications will be owned by Licensor and become a part of the Software licensed to You under this Agreement. You may only use such derivatives and modifications for your own noncommercial internal research purposes, and you may not otherwise use, distribute or copy such derivatives and modifications in violation of this Agreement. You must provide to Licensor one copy of all such derivatives and modifications in a recognized electronic format by way of electronic mail sent to Tadas Baltrusaitis at tadyla@gmail.com within thirty (30) days of the publication date of any publication that relates to any such derivatives or modifications. You understand that Licensor is not obligated to distribute or otherwise make available any derivatives or modifications provided by You. 20 | 21 | BACKUPS: If Licensee is an organization, it may make that number of copies of the Software necessary for internal noncommercial use at a single site within its organization provided that all information appearing in or on the original labels, including the copyright and trademark notices are copied onto the labels of the copies. 22 | 23 | USES NOT PERMITTED: You may not distribute, copy or use the Software except as explicitly permitted herein. Licensee has not been granted any trademark license as part of this Agreement and may not use the name or mark "OPENFACE", "Carnegie Mellon" or any renditions thereof without the prior written permission of Licensor. 24 | 25 | You may not sell, rent, lease, sublicense, lend, time-share or transfer, in whole or in part, or provide third parties access to prior or present versions (or any parts thereof) of the Software. 26 | 27 | ASSIGNMENT: You may not assign this Agreement or your rights hereunder without the prior written consent of Licensor. Any attempted assignment without such consent shall be null and void. 28 | 29 | TERM: The term of the license granted by this Agreement is from Licensee's acceptance of this Agreement by clicking "I Agree" below or by using the Software until terminated as provided below. 30 | 31 | The Agreement automatically terminates without notice if you fail to comply with any provision of this Agreement. Licensee may terminate this Agreement by ceasing using the Software. Upon any termination of this Agreement, Licensee will delete any and all copies of the Software. You agree that all provisions which operate to protect the proprietary rights of Licensor shall remain in force should breach occur and that the obligation of confidentiality described in this Agreement is binding in perpetuity and, as such, survives the term of the Agreement. 32 | 33 | FEE: Provided Licensee abides completely by the terms and conditions of this Agreement, there is no fee due to Licensor for Licensee's use of the Software in accordance with this Agreement. 34 | 35 | DISCLAIMER OF WARRANTIES: THE SOFTWARE IS PROVIDED "AS-IS" WITHOUT WARRANTY OF ANY KIND INCLUDING ANY WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE OR PURPOSE OR OF NON-INFRINGEMENT. LICENSEE BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF THE SOFTWARE AND RELATED MATERIALS. 36 | 37 | SUPPORT AND MAINTENANCE: No Software support or training by the Licensor is provided as part of this Agreement. 38 | 39 | EXCLUSIVE REMEDY AND LIMITATION OF LIABILITY: To the maximum extent permitted under applicable law, Licensor shall not be liable for direct, indirect, special, incidental, or consequential damages or lost profits related to Licensee's use of and/or inability to use the Software, even if Licensor is advised of the possibility of such damage. 40 | 41 | EXPORT REGULATION: Licensee agrees to comply with any and all applicable 42 | U.S. export control laws, regulations, and/or other laws related to embargoes and sanction programs administered by the Office of Foreign Assets Control. 43 | 44 | SEVERABILITY: If any provision(s) of this Agreement shall be held to be invalid, illegal, or unenforceable by a court or other tribunal of competent jurisdiction, the validity, legality and enforceability of the remaining provisions shall not in any way be affected or impaired thereby. 45 | 46 | NO IMPLIED WAIVERS: No failure or delay by Licensor in enforcing any right or remedy under this Agreement shall be construed as a waiver of any future or other exercise of such right or remedy by Licensor. 47 | 48 | GOVERNING LAW: This Agreement shall be construed and enforced in accordance with the laws of the Commonwealth of Pennsylvania without reference to conflict of laws principles. You consent to the personal jurisdiction of the courts of this County and waive their rights to venue outside of Allegheny County, Pennsylvania. 49 | 50 | ENTIRE AGREEMENT AND AMENDMENTS: This Agreement constitutes the sole and entire agreement between Licensee and Licensor as to the matter set forth herein and supersedes any previous agreements, understandings, and arrangements between the parties relating hereto. 51 | -------------------------------------------------------------------------------- /3rdparty/OpenFace/README.md: -------------------------------------------------------------------------------- 1 | # OpenFace: an open source facial behavior analysis toolkit 2 | 3 | [![Build Status](https://travis-ci.org/TadasBaltrusaitis/OpenFace.svg?branch=master)](https://travis-ci.org/TadasBaltrusaitis/OpenFace) 4 | [![Build status](https://ci.appveyor.com/api/projects/status/8msiklxfbhlnsmxp/branch/master?svg=true)](https://ci.appveyor.com/project/TadasBaltrusaitis/openface/branch/master) 5 | 6 | Over the past few years, there has been an increased interest in automatic facial behavior analysis and understanding. We present OpenFace – an open source tool intended for computer vision and machine learning researchers, affective computing community and people interested in building interactive applications based on facial behavior analysis. OpenFace is the first open source tool capable of facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation. The computer vision algorithms which represent the core of OpenFace demonstrate state-of-the-art results in all of the above mentioned tasks. Furthermore, our tool is capable of real-time performance and is able to run from a simple webcam without any specialist hardware. 7 | 8 | The code was written mainly by Tadas Baltrusaitis during his time at the Language Technologies Institute at the Carnegie Mellon University; Computer Laboratory, University of Cambridge; and Institute for Creative Technologies, University of Southern California. 9 | 10 | Special thanks goes to Louis-Philippe Morency and his MultiComp Lab at Institute for Creative Technologies for help in writing and testing the code, and Erroll Wood for the gaze estimation work. 11 | 12 | ## WIKI 13 | **For instructions of how to install/compile/use the project please see [WIKI](https://github.com/TadasBaltrusaitis/OpenFace/wiki)** 14 | 15 | More details about the project - http://www.cl.cam.ac.uk/research/rainbow/projects/openface/ 16 | 17 | ## Functionality 18 | 19 | The system is capable of performing a number of facial analysis tasks: 20 | 21 | - Facial Landmark Detection 22 | 23 | ![Sample facial landmark detection image](https://github.com/TadasBaltrusaitis/OpenFace/blob/master/imgs/multi_face_img.png) 24 | 25 | - Facial Landmark and head pose tracking (links to YouTube videos) 26 | 27 | Multiple Face Tracking 28 | Multiple Face Tracking 29 | 30 | - Facial Action Unit Recognition 31 | 32 | 33 | 34 | - Gaze tracking (image of it in action) 35 | 36 | 37 | 38 | - Facial Feature Extraction (aligned faces and HOG features) 39 | 40 | ![Sample aligned face and HOG image](https://github.com/TadasBaltrusaitis/OpenFace/blob/master/imgs/appearance.png) 41 | 42 | ## Citation 43 | 44 | If you use any of the resources provided on this page in any of your publications we ask you to cite the following work and the work for a relevant submodule you used. 45 | 46 | #### Overall system 47 | 48 | **OpenFace: an open source facial behavior analysis toolkit** 49 | Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency, 50 | in *IEEE Winter Conference on Applications of Computer Vision*, 2016 51 | 52 | #### Facial landmark detection and tracking 53 | 54 | **Constrained Local Neural Fields for robust facial landmark detection in the wild** 55 | Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency. 56 | in IEEE Int. *Conference on Computer Vision Workshops, 300 Faces in-the-Wild Challenge*, 2013. 57 | 58 | #### Eye gaze tracking 59 | 60 | **Rendering of Eyes for Eye-Shape Registration and Gaze Estimation** 61 | Erroll Wood, Tadas Baltrušaitis, Xucong Zhang, Yusuke Sugano, Peter Robinson, and Andreas Bulling 62 | in *IEEE International. Conference on Computer Vision (ICCV)*, 2015 63 | 64 | #### Facial Action Unit detection 65 | 66 | **Cross-dataset learning and person-specific normalisation for automatic Action Unit detection** 67 | Tadas Baltrušaitis, Marwa Mahmoud, and Peter Robinson 68 | in *Facial Expression Recognition and Analysis Challenge*, 69 | *IEEE International Conference on Automatic Face and Gesture Recognition*, 2015 70 | 71 | # Copyright 72 | 73 | Copyright can be found in the Copyright.txt 74 | 75 | You have to respect boost, TBB, dlib, and OpenCV licenses. 76 | 77 | # Commercial license 78 | 79 | For inquiries about the commercial licensing of the OpenFace toolkit please contact innovation@cmu.edu 80 | 81 | # Final remarks 82 | 83 | I did my best to make sure that the code runs out of the box but there are always issues and I would be grateful for your understanding that this is research code and not full fledged product. However, if you encounter any problems/bugs/issues please contact me on github or by emailing me at Tadas.Baltrusaitis@cl.cam.ac.uk for any bug reports/questions/suggestions. 84 | 85 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 OpenAVR 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FaceVFX 2 | 3 | Experimental project to showcase realtime face swap effects. 4 | 5 | Supported platforms 6 | 7 | * Windows 8 | * OSX 9 | * iOS 10 | 11 | Depends on 12 | 13 | * [Cinder](https://github.com/cinder/Cinder) as the cross-platform creative coding framework. 14 | * [Cinder-OpenCV3](https://github.com/cinder/Cinder-OpenCV3) for Computer Vision routines. 15 | * [Cinder-VNM](https://github.com/vnm-interactive/Cinder-VNM) for my own utilities based on Cinder. 16 | * Jason Saragih's FaceTracker library, self-contained in the project. 17 | * [Cinder-ImGui](https://github.com/vnm-interactive/Cinder-ImGui) for cross-platform GUI. 18 | 19 | Layout of the project and its dependency 20 | 21 | Cinder/ 22 | blocks/ 23 | Cinder-ImGui/ 24 | Cinder-OpenCV3/ 25 | Cinder-VNM/ 26 | include/ 27 | src/ 28 | FaceVFX/ 29 | 30 | 31 | Tools used during development 32 | 33 | * apitrace 34 | * glintercept 35 | * Very Sleepy 36 | 37 | ------------------- 38 | 39 | ### Photo mode (Tom Cruise) 40 | 41 | ![](https://raw.githubusercontent.com/OpenAVR/face-swapper/master/doc/tom-cruise.jpg) 42 | 43 | ### Movie mode 44 | 45 | ![](https://raw.githubusercontent.com/OpenAVR/face-swapper/master/doc/movie-mode.jpg) 46 | -------------------------------------------------------------------------------- /assets/1.wmv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/assets/1.wmv -------------------------------------------------------------------------------- /assets/face.con: -------------------------------------------------------------------------------- 1 | n_connections: 61 2 | { 3 | 0 1 4 | 1 2 5 | 2 3 6 | 3 4 7 | 4 5 8 | 5 6 9 | 6 7 10 | 7 8 11 | 8 9 12 | 9 10 13 | 10 11 14 | 11 12 15 | 12 13 16 | 13 14 17 | 14 15 18 | 15 16 19 | 17 18 20 | 18 19 21 | 19 20 22 | 20 21 23 | 22 23 24 | 23 24 25 | 24 25 26 | 25 26 27 | 27 28 28 | 28 29 29 | 29 30 30 | 31 32 31 | 32 33 32 | 33 34 33 | 34 35 34 | 36 37 35 | 37 38 36 | 38 39 37 | 39 40 38 | 40 41 39 | 41 36 40 | 42 43 41 | 43 44 42 | 44 45 43 | 45 46 44 | 46 47 45 | 47 42 46 | 48 49 47 | 49 50 48 | 50 51 49 | 51 52 50 | 52 53 51 | 53 54 52 | 54 55 53 | 55 56 54 | 56 57 55 | 57 58 56 | 58 59 57 | 59 48 58 | 60 65 59 | 60 61 60 | 61 62 61 | 62 63 62 | 63 64 63 | 64 65 64 | } 65 | -------------------------------------------------------------------------------- /assets/face.tri: -------------------------------------------------------------------------------- 1 | n_tri: 91 2 | { 3 | 20 21 23 4 | 21 22 23 5 | 0 1 36 6 | 15 16 45 7 | 0 17 36 8 | 16 26 45 9 | 17 18 37 10 | 25 26 44 11 | 17 36 37 12 | 26 44 45 13 | 18 19 38 14 | 24 25 43 15 | 18 37 38 16 | 25 43 44 17 | 19 20 38 18 | 23 24 43 19 | 20 21 39 20 | 22 23 42 21 | 20 38 39 22 | 23 42 43 23 | 21 22 27 24 | 21 27 39 25 | 22 27 42 26 | 27 28 42 27 | 27 28 39 28 | 28 42 47 29 | 28 39 40 30 | 1 36 41 31 | 15 45 46 32 | 1 2 41 33 | 14 15 46 34 | 28 29 40 35 | 28 29 47 36 | 2 40 41 37 | 14 46 47 38 | 2 29 40 39 | 14 29 47 40 | 2 3 29 41 | 13 14 29 42 | 29 30 31 43 | 29 30 35 44 | 3 29 31 45 | 13 29 35 46 | 30 32 33 47 | 30 33 34 48 | 30 31 32 49 | 30 34 35 50 | 3 4 31 51 | 12 13 35 52 | 4 5 48 53 | 11 12 54 54 | 5 6 48 55 | 10 11 54 56 | 6 48 59 57 | 10 54 55 58 | 6 7 59 59 | 9 10 55 60 | 7 58 59 61 | 9 55 56 62 | 8 57 58 63 | 8 56 57 64 | 7 8 58 65 | 8 9 56 66 | 4 31 48 67 | 12 35 54 68 | 31 48 49 69 | 35 53 54 70 | 31 49 50 71 | 35 52 53 72 | 31 32 50 73 | 34 35 52 74 | 32 33 50 75 | 33 34 52 76 | 33 50 51 77 | 33 51 52 78 | 48 49 60 79 | 49 60 50 80 | 50 60 61 81 | 50 51 61 82 | 51 52 61 83 | 61 62 52 84 | 52 53 62 85 | 53 54 62 86 | 54 55 63 87 | 55 56 63 88 | 56 63 64 89 | 56 57 64 90 | 64 65 57 91 | 57 58 65 92 | 58 59 65 93 | 48 59 65 94 | } 95 | -------------------------------------------------------------------------------- /assets/people/angelina-jolie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/assets/people/angelina-jolie.jpg -------------------------------------------------------------------------------- /assets/people/fan-bingbing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/assets/people/fan-bingbing.jpg -------------------------------------------------------------------------------- /assets/people/huang-bo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/assets/people/huang-bo.jpg -------------------------------------------------------------------------------- /assets/people/obama.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/assets/people/obama.jpg -------------------------------------------------------------------------------- /assets/people/tom-cruise.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/assets/people/tom-cruise.jpg -------------------------------------------------------------------------------- /assets/people/will-smith.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/assets/people/will-smith.jpg -------------------------------------------------------------------------------- /assets/shader/basic.vert: -------------------------------------------------------------------------------- 1 | uniform mat4 ciModelViewProjection; 2 | uniform mat3 ciNormalMatrix; 3 | 4 | in vec4 ciPosition; 5 | in vec2 ciTexCoord0; 6 | in vec3 ciNormal; 7 | in vec4 ciColor; 8 | 9 | out highp vec2 TexCoord; 10 | out lowp vec4 Color; 11 | out highp vec3 Normal; 12 | 13 | void main( void ) 14 | { 15 | gl_Position = ciModelViewProjection * ciPosition; 16 | Color = ciColor; 17 | TexCoord = ciTexCoord0; 18 | Normal = ciNormalMatrix * ciNormal; 19 | } 20 | -------------------------------------------------------------------------------- /assets/shader/clone.frag: -------------------------------------------------------------------------------- 1 | #ifdef GL_ES 2 | precision mediump float; 3 | #endif 4 | 5 | uniform sampler2D src, srcBlur, dstBlur; 6 | uniform ivec2 ciWindowSize; 7 | 8 | in highp vec2 TexCoord; 9 | out highp vec4 Color; 10 | 11 | void main() { 12 | vec4 srcColorBlur = texture(srcBlur, TexCoord); 13 | if(srcColorBlur.a > 0.) { 14 | vec3 srcColor = texture(src, TexCoord).rgb; 15 | vec3 dstColorBlur = texture(dstBlur, TexCoord).rgb; 16 | vec3 offset = (dstColorBlur.rgb - srcColorBlur.rgb); 17 | Color = vec4(srcColor + offset, 1.); 18 | } else { 19 | Color = vec4(0.); 20 | } 21 | } -------------------------------------------------------------------------------- /assets/shader/maskBlur.frag: -------------------------------------------------------------------------------- 1 | #ifdef GL_ES 2 | precision mediump float; 3 | #endif 4 | 5 | uniform sampler2D tex, mask; 6 | uniform vec2 direction; 7 | uniform int strength; 8 | uniform ivec2 ciWindowSize; 9 | 10 | in highp vec2 TexCoord; 11 | out highp vec4 Color; 12 | 13 | void main() { 14 | vec2 dir = direction / vec2(ciWindowSize); 15 | vec4 sum = texture(tex, TexCoord); 16 | int i; 17 | for(i = 1; i < strength; i++) { 18 | vec2 curOffset = float(i) * dir; 19 | vec4 leftMask = texture(mask, TexCoord - curOffset); 20 | vec4 rightMask = texture(mask, TexCoord + curOffset); 21 | bool valid = leftMask.r == 1. && rightMask.r == 1.; 22 | if(valid) { 23 | sum += 24 | texture(tex, TexCoord + curOffset) + 25 | texture(tex, TexCoord - curOffset); 26 | } else { 27 | break; 28 | } 29 | } 30 | int samples = 1 + (i - 1) * 2; 31 | Color = sum / float(samples); 32 | } -------------------------------------------------------------------------------- /doc/movie-mode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/doc/movie-mode.jpg -------------------------------------------------------------------------------- /doc/tom-cruise.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/doc/tom-cruise.jpg -------------------------------------------------------------------------------- /include/Resources.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "cinder/CinderResources.h" 3 | 4 | //#define RES_MY_RES CINDER_RESOURCE( ../resources/, image_name.png, 128, IMAGE ) 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /include/item.def: -------------------------------------------------------------------------------- 1 | GROUP_DEF(Base) 2 | ITEM_DEF(int, APP_W, 800) 3 | ITEM_DEF(int, APP_H, 480) 4 | ITEM_DEF(int, CAM_W, 640) 5 | ITEM_DEF(int, CAM_H, 480) 6 | 7 | GROUP_DEF(Vfx) 8 | ITEM_DEF(bool, CAM_FLIP, true) 9 | ITEM_DEF(bool, OFFLINE_VISIBLE, false) 10 | ITEM_DEF(bool, VFX_VISIBLE, true) 11 | ITEM_DEF(bool, WIREFRAME_MODE, false) 12 | ITEM_DEF(bool, MOVIE_MODE, false) 13 | ITEM_DEF(string, MOVIE_PATH, "tutorial_part5_02.mov") 14 | ITEM_DEF(int, DEVICE_ID, 0) 15 | ITEM_DEF(int, PEOPLE_ID, 0) 16 | ITEM_DEF(int, FPS, 0) 17 | 18 | -------------------------------------------------------------------------------- /ref/FaceLandmarkVid.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/ref/FaceLandmarkVid.cpp -------------------------------------------------------------------------------- /resources/CinderApp.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/resources/CinderApp.icns -------------------------------------------------------------------------------- /resources/CinderApp_ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/resources/CinderApp_ios.png -------------------------------------------------------------------------------- /resources/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/resources/cinder_app_icon.ico -------------------------------------------------------------------------------- /src/BaseFaceTracker.cpp: -------------------------------------------------------------------------------- 1 | #include "BaseFaceTracker.h" 2 | #include "JasonFaceTracker.h" 3 | #include "OpenFaceTracker.h" 4 | 5 | namespace jing 6 | { 7 | using namespace std; 8 | using namespace ci; 9 | 10 | BaseFaceTrackerRef BaseFaceTracker::create(Option option) 11 | { 12 | BaseFaceTracker* tracker = nullptr; 13 | 14 | if (option.method == "JasonFaceTracker") 15 | { 16 | auto ciTracker = new ciFaceTracker; 17 | ciTracker->setRescale(option.scale); 18 | 19 | tracker = ciTracker; 20 | } 21 | else if (option.method == "OpenFaceTracker") 22 | { 23 | auto openFaceTracker = new OpenFaceTracker; 24 | 25 | tracker = openFaceTracker; 26 | } 27 | else 28 | { 29 | throw ci::Exception("Unknown method"); 30 | } 31 | 32 | auto trackerRef = BaseFaceTrackerRef(tracker); 33 | trackerRef->setup(); 34 | 35 | return trackerRef; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/BaseFaceTracker.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include "cinder/TriMesh.h" 6 | 7 | namespace jing 8 | { 9 | typedef std::shared_ptr BaseFaceTrackerRef; 10 | 11 | struct Option 12 | { 13 | Option() 14 | { 15 | method = "JasonFaceTracker"; 16 | scale = 1.0f; 17 | } 18 | 19 | std::string method; 20 | float scale; 21 | }; 22 | 23 | struct BaseFaceTracker 24 | { 25 | static BaseFaceTrackerRef create(Option option = Option()); 26 | virtual bool update(const ci::Surface& surface) = 0; 27 | virtual void reset() = 0; 28 | virtual int size() const = 0; 29 | virtual bool getFound() const = 0; 30 | virtual ci::vec3 getImagePoint(int i) const = 0; 31 | virtual ci::TriMesh getImageMesh() const = 0; 32 | virtual const ci::vec2 getImageSize() const = 0; 33 | virtual void addTriangleIndices(ci::TriMesh& mesh) const = 0; 34 | private: 35 | virtual void setup() = 0; 36 | }; 37 | 38 | } -------------------------------------------------------------------------------- /src/Clone.cpp: -------------------------------------------------------------------------------- 1 | #include "Clone.h" 2 | #include "cinder/app/App.h" 3 | #include "cinder/gl/draw.h" 4 | #include "cinder/gl/scoped.h" 5 | #include "cinder/gl/shader.h" 6 | 7 | #include "Cinder-VNM/include/AssetManager.h" 8 | 9 | using namespace ci; 10 | 11 | void Clone::setup(int width, int height) 12 | { 13 | gl::Fbo::Format fboFormat; 14 | fboFormat.enableDepthBuffer(false); 15 | 16 | mBufferFbo = gl::Fbo::create(width, height, fboFormat); 17 | mSrcBlurFbo = gl::Fbo::create(width, height, fboFormat); 18 | mDstBlurFbo = gl::Fbo::create(width, height, fboFormat); 19 | 20 | mMaskBlurShader = am::glslProg("shader/basic.vert", "shader/maskBlur.frag"); 21 | mMaskBlurShader->uniform("tex", 1); 22 | mMaskBlurShader->uniform("mask", 2); 23 | 24 | mCloneShader = am::glslProg("shader/basic.vert", "shader/clone.frag"); 25 | mCloneShader->uniform("src", 1); 26 | mCloneShader->uniform("srcBlur", 2); 27 | mCloneShader->uniform("dstBlur", 3); 28 | 29 | mStrength = 0; 30 | } 31 | 32 | void Clone::maskedBlur(gl::TextureRef tex, gl::TextureRef mask, gl::FboRef result) 33 | { 34 | gl::ScopedTextureBind t2(mask, 2); 35 | gl::ScopedGlslProg glsl(mMaskBlurShader); 36 | 37 | { 38 | gl::ScopedFramebuffer fbo(mBufferFbo); 39 | gl::clear(ColorA::black(), false); 40 | gl::ScopedTextureBind t1(tex, 1); 41 | mMaskBlurShader->uniform("direction", vec2(1, 0)); 42 | gl::drawSolidRect(tex->getBounds()); 43 | } 44 | 45 | { 46 | gl::ScopedFramebuffer fbo(result); 47 | gl::clear(ColorA::black(), false); 48 | gl::ScopedTextureBind t1(mBufferFbo->getColorTexture(), 1); 49 | mMaskBlurShader->uniform("direction", vec2(0, 1)); 50 | gl::drawSolidRect(tex->getBounds()); 51 | } 52 | } 53 | 54 | void Clone::setStrength(int strength) 55 | { 56 | mStrength = strength; 57 | } 58 | 59 | void Clone::update(gl::TextureRef src, gl::TextureRef dst, gl::TextureRef mask) 60 | { 61 | mMaskBlurShader->uniform("strength", mStrength); 62 | 63 | maskedBlur(src, mask, mSrcBlurFbo); 64 | maskedBlur(dst, mask, mDstBlurFbo); 65 | 66 | { 67 | gl::ScopedFramebuffer fbo(mBufferFbo); 68 | gl::ScopedBlendAlpha blend; 69 | gl::ScopedGlslProg glslTexOnly(gl::getStockShader(gl::ShaderDef().texture())); 70 | gl::draw(dst); 71 | 72 | gl::ScopedGlslProg glsl(mCloneShader); 73 | gl::ScopedTextureBind t1(src, 1); 74 | gl::ScopedTextureBind t2(mSrcBlurFbo->getColorTexture(), 2); 75 | gl::ScopedTextureBind t3(mDstBlurFbo->getColorTexture(), 3); 76 | gl::drawSolidRect(src->getBounds()); 77 | } 78 | } 79 | 80 | gl::Texture2dRef Clone::getResultTexture() 81 | { 82 | return mBufferFbo->getColorTexture(); 83 | } 84 | -------------------------------------------------------------------------------- /src/Clone.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "cinder/gl/Texture.h" 4 | #include "cinder/gl/GlslProg.h" 5 | #include "cinder/gl/Fbo.h" 6 | 7 | class Clone { 8 | public: 9 | void setup(int width, int height); 10 | void setStrength(int strength); 11 | void update(ci::gl::TextureRef src, ci::gl::TextureRef dst, ci::gl::TextureRef mask); 12 | ci::gl::Texture2dRef getResultTexture(); 13 | 14 | protected: 15 | void maskedBlur(ci::gl::TextureRef tex, ci::gl::TextureRef mask, ci::gl::FboRef result); 16 | ci::gl::FboRef mBufferFbo, mSrcBlurFbo, mDstBlurFbo; 17 | ci::gl::GlslProgRef mMaskBlurShader, mCloneShader; 18 | int mStrength; 19 | }; -------------------------------------------------------------------------------- /src/JasonFaceTracker.h: -------------------------------------------------------------------------------- 1 | /* 2 | ofxFaceTracker provides an interface to Jason Saragih's FaceTracker library. 3 | 4 | getImagePoint()/getImageMesh() are in image space. This means that all the 5 | points will line up with the pixel coordinates of the image you fed into 6 | ofxFaceTracker. 7 | 8 | getObjectPoint()/getObjectMesh() are in 3d object space. This is a product of 9 | the mean mesh with only the expression applied. There is no rotation or 10 | translation applied to the object space. 11 | 12 | getMeanObjectPoint()/getMeanObjectMesh() are also in 3d object space. However, 13 | there is no expression applied to the mesh. 14 | */ 15 | 16 | // Ported to Cinder version by 17 | // vinjn (vinjn.z@gmail.com) 18 | 19 | #pragma once 20 | 21 | #include "cinder/TriMesh.h" 22 | #include "cinder/PolyLine.h" 23 | #include "../3rdparty/FaceTracker/Tracker.h" 24 | #include "BaseFaceTracker.h" 25 | 26 | namespace cinder { 27 | typedef PolyLineT PolyLine3; 28 | } 29 | 30 | namespace jing 31 | { 32 | class ciFaceTracker : public BaseFaceTracker { 33 | public: 34 | ciFaceTracker(); 35 | void setup() override; 36 | bool update(const ci::Surface& surface) override; 37 | 38 | void draw() const; 39 | void reset() override; 40 | 41 | int size() const override; 42 | bool getFound() const override; 43 | bool getVisibility(int i) const; 44 | 45 | std::vector getImagePoints() const; 46 | std::vector getObjectPoints() const; 47 | std::vector getMeanObjectPoints() const; 48 | 49 | //(x,y) ~ [0,width) X [0,height) 50 | ci::vec3 getImagePoint(int i) const override; 51 | ci::vec3 getObjectPoint(int i) const; 52 | ci::vec3 getMeanObjectPoint(int i) const; 53 | 54 | ci::TriMesh getImageMesh() const override; 55 | ci::TriMesh getObjectMesh() const; 56 | ci::TriMesh getMeanObjectMesh() const; 57 | 58 | const cv::Mat& getObjectPointsMat() const; 59 | const ci::vec2 getImageSize() const override; 60 | 61 | void addTriangleIndices(ci::TriMesh& mesh) const override; 62 | 63 | ci::vec2 getPosition() const; 64 | float getScale() const; 65 | ci::vec3 getOrientation() const; 66 | ci::mat4 getRotationMatrix() const; 67 | 68 | enum Direction { 69 | FACING_FORWARD, 70 | FACING_LEFT, FACING_RIGHT, 71 | FACING_UNKNOWN 72 | }; 73 | Direction getDirection() const; 74 | 75 | enum Feature { 76 | LEFT_EYEBROW, RIGHT_EYEBROW, 77 | LEFT_EYE, RIGHT_EYE, 78 | LEFT_JAW, RIGHT_JAW, JAW, 79 | OUTER_MOUTH, INNER_MOUTH 80 | }; 81 | ci::PolyLine3 getImageFeature(Feature feature) const; 82 | ci::PolyLine3 getObjectFeature(Feature feature) const; 83 | ci::PolyLine3 getMeanObjectFeature(Feature feature) const; 84 | 85 | enum Gesture { 86 | MOUTH_WIDTH, MOUTH_HEIGHT, 87 | LEFT_EYEBROW_HEIGHT, RIGHT_EYEBROW_HEIGHT, 88 | LEFT_EYE_OPENNESS, RIGHT_EYE_OPENNESS, 89 | JAW_OPENNESS, 90 | NOSTRIL_FLARE 91 | }; 92 | float getGesture(Gesture gesture) const; 93 | 94 | void setRescale(float rescale); 95 | void setIterations(int iterations); 96 | void setClamp(float clamp); 97 | void setTolerance(float tolerance); 98 | void setAttempts(int attempts); 99 | void setUseInvisible(bool useInvisible); 100 | 101 | protected: 102 | ci::TriMesh getMesh(const std::vector& points) const; 103 | ci::TriMesh getMesh(const std::vector& points) const; 104 | 105 | void updateObjectPoints(); 106 | 107 | static std::vector getFeatureIndices(Feature feature); 108 | ci::PolyLine3 getFeature(Feature feature, const std::vector& points) const; 109 | 110 | bool mIsFailed; 111 | int mCurrentView; 112 | 113 | bool mFailCheck; 114 | float mRescale; 115 | int mFrameSkip; 116 | 117 | std::vector wSize1, wSize2; 118 | int mIterations; 119 | int mAttempts; 120 | double mClamp, mTolerance; 121 | bool mUseInvisible; 122 | 123 | FACETRACKER::Tracker mTracker; 124 | cv::Mat mTri, mCon; 125 | 126 | cv::Mat mIm, mGray; 127 | cv::Mat mObjectPoints; 128 | ci::vec2 mImgSize; 129 | }; 130 | 131 | } -------------------------------------------------------------------------------- /src/OpenFaceTracker.cpp: -------------------------------------------------------------------------------- 1 | #include "OpenFaceTracker.h" 2 | #include "../3rdparty/OpenFace/LandmarkDetector/include/LandmarkCoreIncludes.h" 3 | 4 | namespace jing 5 | { 6 | bool OpenFaceTracker::update(const ci::Surface& surface) 7 | { 8 | return false; 9 | } 10 | 11 | void OpenFaceTracker::reset() 12 | { 13 | 14 | } 15 | 16 | int OpenFaceTracker::size() const 17 | { 18 | return 0; 19 | } 20 | 21 | bool OpenFaceTracker::getFound() const 22 | { 23 | return false; 24 | } 25 | 26 | ci::vec3 OpenFaceTracker::getImagePoint(int i) const 27 | { 28 | return{}; 29 | } 30 | 31 | ci::TriMesh OpenFaceTracker::getImageMesh() const 32 | { 33 | return{}; 34 | } 35 | 36 | const ci::vec2 OpenFaceTracker::getImageSize() const 37 | { 38 | return{}; 39 | } 40 | 41 | void OpenFaceTracker::addTriangleIndices(ci::TriMesh& mesh) const 42 | { 43 | 44 | } 45 | 46 | void OpenFaceTracker::setup() 47 | { 48 | //LandmarkDetector::FaceModelParameters det_parameters(arguments); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/OpenFaceTracker.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include "cinder/TriMesh.h" 6 | #include "BaseFaceTracker.h" 7 | 8 | namespace jing 9 | { 10 | struct OpenFaceTracker : public BaseFaceTracker 11 | { 12 | virtual bool update(const ci::Surface& surface); 13 | virtual void reset(); 14 | virtual int size() const; 15 | virtual bool getFound() const; 16 | virtual ci::vec3 getImagePoint(int i) const; 17 | virtual ci::TriMesh getImageMesh() const; 18 | virtual const ci::vec2 getImageSize() const; 19 | virtual void addTriangleIndices(ci::TriMesh& mesh) const; 20 | private: 21 | virtual void setup(); 22 | }; 23 | } -------------------------------------------------------------------------------- /vs2015/FaceVFX.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29519.87 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FaceVFX", "FaceVFX.vcxproj", "{FEBA1BC7-4A0A-4389-9D01-D087DC2D31B3}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Release|x64 = Release|x64 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {FEBA1BC7-4A0A-4389-9D01-D087DC2D31B3}.Debug|x64.ActiveCfg = Debug|x64 15 | {FEBA1BC7-4A0A-4389-9D01-D087DC2D31B3}.Debug|x64.Build.0 = Debug|x64 16 | {FEBA1BC7-4A0A-4389-9D01-D087DC2D31B3}.Release|x64.ActiveCfg = Release|x64 17 | {FEBA1BC7-4A0A-4389-9D01-D087DC2D31B3}.Release|x64.Build.0 = Release|x64 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {3795BA5A-23B1-4EE5-9DD9-71EAE7D4C920} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /vs2015/Resources.rc: -------------------------------------------------------------------------------- 1 | #include "../include/Resources.h" 2 | 3 | 1 ICON "..\\resources\\cinder_app_icon.ico" 4 | -------------------------------------------------------------------------------- /xcode/FaceVFX_Prefix.pch: -------------------------------------------------------------------------------- 1 | #if defined( __cplusplus ) 2 | #include "cinder/Cinder.h" 3 | 4 | #include "cinder/app/App.h" 5 | 6 | #include "cinder/gl/gl.h" 7 | 8 | #include "cinder/CinderMath.h" 9 | #include "cinder/Matrix.h" 10 | #include "cinder/Vector.h" 11 | #include "cinder/Quaternion.h" 12 | #endif 13 | -------------------------------------------------------------------------------- /xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | CinderApp.icns 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSHumanReadableCopyright 28 | Copyright © 2015 __MyCompanyName__. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /xcode_ios/FaceVFX_Prefix.pch: -------------------------------------------------------------------------------- 1 | #if defined( __cplusplus ) 2 | #include "cinder/Cinder.h" 3 | 4 | #include "cinder/app/App.h" 5 | 6 | #include "cinder/gl/gl.h" 7 | 8 | #include "cinder/CinderMath.h" 9 | #include "cinder/Matrix.h" 10 | #include "cinder/Vector.h" 11 | #include "cinder/Quaternion.h" 12 | #endif -------------------------------------------------------------------------------- /xcode_ios/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "8.0", 8 | "subtype" : "736h", 9 | "filename" : "Default-736h@3x~iphone.png", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "orientation" : "landscape", 14 | "idiom" : "iphone", 15 | "extent" : "full-screen", 16 | "minimum-system-version" : "8.0", 17 | "subtype" : "736h", 18 | "scale" : "3x" 19 | }, 20 | { 21 | "extent" : "full-screen", 22 | "idiom" : "iphone", 23 | "subtype" : "667h", 24 | "filename" : "Default-667@2x.png", 25 | "minimum-system-version" : "8.0", 26 | "orientation" : "portrait", 27 | "scale" : "2x" 28 | }, 29 | { 30 | "orientation" : "portrait", 31 | "idiom" : "iphone", 32 | "extent" : "full-screen", 33 | "minimum-system-version" : "7.0", 34 | "scale" : "2x" 35 | }, 36 | { 37 | "extent" : "full-screen", 38 | "idiom" : "iphone", 39 | "subtype" : "retina4", 40 | "filename" : "Default-568h@2x.png", 41 | "minimum-system-version" : "7.0", 42 | "orientation" : "portrait", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "orientation" : "portrait", 47 | "idiom" : "ipad", 48 | "extent" : "full-screen", 49 | "minimum-system-version" : "7.0", 50 | "scale" : "1x" 51 | }, 52 | { 53 | "orientation" : "landscape", 54 | "idiom" : "ipad", 55 | "extent" : "full-screen", 56 | "minimum-system-version" : "7.0", 57 | "scale" : "1x" 58 | }, 59 | { 60 | "orientation" : "portrait", 61 | "idiom" : "ipad", 62 | "extent" : "full-screen", 63 | "minimum-system-version" : "7.0", 64 | "scale" : "2x" 65 | }, 66 | { 67 | "orientation" : "landscape", 68 | "idiom" : "ipad", 69 | "extent" : "full-screen", 70 | "minimum-system-version" : "7.0", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "orientation" : "portrait", 75 | "idiom" : "iphone", 76 | "extent" : "full-screen", 77 | "scale" : "1x" 78 | }, 79 | { 80 | "orientation" : "portrait", 81 | "idiom" : "iphone", 82 | "extent" : "full-screen", 83 | "scale" : "2x" 84 | }, 85 | { 86 | "orientation" : "portrait", 87 | "idiom" : "iphone", 88 | "extent" : "full-screen", 89 | "filename" : "Default-568h@2x.png", 90 | "subtype" : "retina4", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "orientation" : "portrait", 95 | "idiom" : "ipad", 96 | "extent" : "to-status-bar", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "orientation" : "portrait", 101 | "idiom" : "ipad", 102 | "extent" : "to-status-bar", 103 | "scale" : "2x" 104 | } 105 | ], 106 | "info" : { 107 | "version" : 1, 108 | "author" : "xcode" 109 | } 110 | } -------------------------------------------------------------------------------- /xcode_ios/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/xcode_ios/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /xcode_ios/Images.xcassets/LaunchImage.launchimage/Default-667@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/xcode_ios/Images.xcassets/LaunchImage.launchimage/Default-667@2x.png -------------------------------------------------------------------------------- /xcode_ios/Images.xcassets/LaunchImage.launchimage/Default-736h@3x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jing-interactive/FaceVFX/ebeb27828c32d72c4a4c26c42d65cf4732f73f23/xcode_ios/Images.xcassets/LaunchImage.launchimage/Default-736h@3x~iphone.png -------------------------------------------------------------------------------- /xcode_ios/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIcons 14 | 15 | CFBundlePrimaryIcon 16 | 17 | CFBundleIconFiles 18 | 19 | 20 | CinderApp_ios.png 21 | 22 | UIPrerenderedIcon 23 | 24 | 25 | 26 | CFBundleIdentifier 27 | $(PRODUCT_BUNDLE_IDENTIFIER) 28 | CFBundleInfoDictionaryVersion 29 | 6.0 30 | CFBundleName 31 | ${PRODUCT_NAME} 32 | CFBundlePackageType 33 | APPL 34 | CFBundleShortVersionString 35 | 1.0 36 | CFBundleSignature 37 | ???? 38 | CFBundleVersion 39 | 1 40 | LSRequiresIPhoneOS 41 | 42 | NSMainNibFile 43 | 44 | NSMainNibFile~ipad 45 | 46 | UILaunchStoryboardName 47 | LaunchScreen.xib 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | 52 | UISupportedInterfaceOrientations~ipad 53 | 54 | UIInterfaceOrientationPortrait 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /xcode_ios/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | --------------------------------------------------------------------------------