Anthropometric measurement extraction
Getting human body measurements from image is a very hard problem. This repository contains the source code and related files for a system that uses computer vision and 3D modeling techniques to accurately measure various body parts of a human subject.
The system is built on top of the OpenCV and Tensorflow libraries, which provide powerful tools for image processing, feature detection, and 3D reconstruction. It takes single image as input of a human subject and extracts key points. These key points are then used to build a 3D model of the subject, which can be used to precisely measure different body parts such as arm length, waist circumference, and hip width. This repository provides a starting solution for any one who is working in this domain. All meausrements are in centimeters. 3D reconstruction is done using HMR. Tested on tensorflow==1.13.1.
Type the following command on the terminal to download pre-trained model
wget https://people.eecs.berkeley.edu/~kanazawa/cachedir/hmr/models.tar.gz && tar -xf models.tar.gz
and save it in 'models' folder.
Download CustomBodyPoints text file and place it in the data folder.
pip install -r requirements.txt
or
pip3 install -r requirements.txt
A Jupyter notebook has been added and updated for those who quickly want to get inference without much hassle. Simply change the path to your input image. Thanks to Hamza Khalil for adding this notebook.
python3 inference.py -i <path to Image1> -ht <height in cm>