Skip to content

HandongHCI/ModifiedHumanShape

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modified MPII's Human Shape (updated: January 2018)

Please refer the discription and source code of the original Human Shape from MPII's website and GitHub.

Related publication: Pishchulin, L., Wuhrer, S., Helten, T., Theobalt, C., and Schiele, B. (2015). Building Statistical Shape Spaces for 3D Human Modeling. ArXiv (read)

Installation guideline for the modified MPII's Human Shape

  1. The original MPII's Human Shape algorithm uses a well-known optimization library, L-BFGS-B, which was initially(?) developed based on Fortran language. To use Fortran language directly in Matlab, we need 'Intel Visual Fortran Compiler' which is not for free (price: 400 USD per year). Thanks to Dr. Stephen Becker, a professor at University of Colorado at Boulder, I could use the L-BFGS-B algorithm without purchasing the Intel Visual Fortran Compiler. Instead of using the L-BFGS-B included in MPII's source code, I used Dr. Becker's C-based L-BFGS-B library (with the mex compiler for Matlab), which is shared through Matlab FileExchange and Github. Dr. Becker's L-BFGS-B is included in my modified Human Shape, so you don't need to get it.

  2. Clone or download the modified MPII's Human Shape from my GitHub.

  3. Install Microsoft Visual Studio Pro 2017. It should be the Professional version, not the Community version. When you install the Visual Studio Pro 2017, VC++ 2017 toolset and Windows 10 SDK should be checked.

  4. In Matlab, run compile_mex.m located in the folder \external\lbfgsb_C\Matlab, which is Dr. Becker's work.

  5. In Matlab, go to the folder same to where demo.m locates. Then, copy and paste the following code in the Matlab command line.

    mex -output shapepose.mexw64 -Ishapemodel\lib\nr\ -Ishapemodel\lib\include\ "shapemodel\shapepose.cpp" "shapemodel\Show.cpp" "shapemodel\NMath.cpp" "shapemodel\NRBM.cpp" "shapemodel\paramMap.cpp" "shapemodel\CTMesh-30DOF.cpp"
    
  6. Copy and paste the following code in the Matlab command line, too.

    mex -largeArrayDims -output rigidAlign.mexw64 -Imatlabroot\extern\include\ "evaluation\statQuality\rigidAlign.cpp" "evaluation\statQuality\GeneralizedProcrustes.cpp" -Lmatlabroot\extern\lib\win64\microsoft\ -llibmwblas.lib -llibmwlapack.lib
    
    mex -largeArrayDims -output ErrorEvaluation.mexw64 -Imatlabroot\extern\include\ "evaluation\statQuality\ErrorEvaluation.cpp" "evaluation\statQuality\GaussVector.cpp" "evaluation\statQuality\patternRecognitionPCA.cpp" "evaluation\statQuality\UnsupervisedLearning.cpp" "evaluation\statQuality\Mle.cpp" -Lmatlabroot\extern\lib\win64\microsoft\ -llibmwblas.lib -llibmwlapack.lib
    
  7. Get necessary models (approx. 1.8 GB) from http://humanshape.mpi-inf.mpg.de/. These are necessary to run the code. Put the unzipped models in \experiments\models\, then edit p.modelInDir variable in fitting\expParams.m to point one of the models (e.g., models/caesar, but it is already set in the modification of Human Shape).

  8. Run demo.m.

Notes

  1. fitting\NRD.m file has been revised to use Dr. Becker's L-BFGS-B.

  2. In fitting\getOptionsOptimizer.m, options.UseParallel = 1; is added to run the Matlab optimization with Parallel Computing Toolbox in order to increase the calculation speed. If you don't have this toolbox, please delete or comment this line, or make the value 0 (options.UseParallel = 0;).

To-do

  1. Change of the template model (fullbody, also hand) with different landmark sets.

Q&A

Dr. Wonsup Lee (W (dot) Lee (at) Handong (dot) edu) at Handong Global University GitHub: https://handonghci.github.io/WonsupLee/ ResearchGate: https://www.researchgate.net/profile/Wonsup_Lee

About

3D Human Shape Models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 66.6%
  • C 22.1%
  • MATLAB 10.0%
  • Objective-C 1.1%
  • Makefile 0.2%