Skip to content

maatici/Hand-Landmarks-Detector

Repository files navigation

Hand Landmarks Detector for Hand Analysis

Hand research is one of the hot topics and currently there exists a number of works in literature that investigate the correlation between digit ratio (2D:4D) and some other traits of a person. Main objective of this project is detecting the hand and calculating the ratios used for hand analysis automatically. For this, I have designed models that detect the hand box and 9 landmarks of the hand in jpg/png images.

Installing

This project is developed on Ubuntu 16.04 by using:

  1. OpenCV 3.3
  2. Dlib 19.7

You can follow the instructions here to install OpenCV. After successful installation of OpenCV;

Download Dlib from here

Download files from this repository and edit CmakeLists.txt according to your Dlib directory

Open a terminal and change the directory to this repository and run following commands:

mkdir build
cd build
cmake ..
cmake --build . --config Release
cd ..
./build/handDetectionExample path/to/hand/images
./build/handLandmarkDetectionExample path/to/hand/images

License

The handTrainer.cpp and handLandmarkTrainer.cpp files are allowed to use in any way that Dlib License permits. Please note that these trainer files just show my optimized parameters and are only useful if you prepare your own dataset. The files apart from the handTrainer.cpp and handLandmarkTrainer.cpp are only allowed for academic use. I trained the HandDetector.svm and Hand_9_Landmarks_Detector.dat models by using the images from datasets 11K Hands, The NUS hand posture datasets I & II and MOHI. Therefore usage of models are also subject to permissions of owners of these datasets.