Anthropometric measurement extraction
Accurately obtaining human body measurements from a single image is a challenging task. This repository provides the source code and associated files for a system that leverages computer vision and 3D modeling techniques to achieve precise body part measurements.
The system utilizes OpenCV and TensorFlow for advanced image processing, keypoint detection, and 3D reconstruction. By analyzing a single image of a human subject, it identifies key points and reconstructs a 3D model. This model enables accurate measurements of various body parts, including arm length, waist circumference, and hip width, with results provided in centimeters.
Built on top of the HMR model, this solution serves as a robust starting point for researchers and developers working in this domain. The code has been tested with TensorFlow 1.13.1 for compatibility and reliability.
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>