Knowing Human Weight from A Single Image
Body weight as one of the biometric traits has been studied in both the forensic and medical domains. However, estimating weight directly from 2D images is particularly challenging, since the visual inspection is rather sensitive to the distance between the subject and camera, even for the frontal view images. In this case, the widely used Body Mass Index (BMI) which is associated with body height and weight can be employed as a measure of weight to indicate the health conditions. Previous works on the estimation of BMI have predominantly focused on using multiple 2D images, 3D images, or facial images, however, these cues are not always available. To address this issue, we explore the feasibility of obtaining BMI from a single 2D body image with a dual-branch regression framework proposed in this work. More specifically, the framework comprises an anthropometric feature computation branch and a deep learning-based feature extraction branch. One aggregation layer maps all the features to an estimated BMI value. In addition, a new public 2Dimage-to-BMI dataset is collected and released to facilitate the study, which contains 4189 images (1477 males and 2712 females) from around 3000 subjects with the attributes including gender, age, height, and weight. Extensive experiments confirm that the proposed framework combining anthropometric features and deep features outperforms the single-type feature approaches in most cases on BMI estimation.
Install
Our code is tested with PyTorch 1.4.0, CUDA 10.0 and Python 3.6. It may work with other versions.
You will need to install some python dependencies.
You will need to install some python dependencies(either conda install
or pip install
)
scikit-learn
scipy
tensorboardX
opencv-python
pandas
We use the pretrained model in detectron2, so you need to install the project following their installation instructions.
The Pos2Seg model, Human Parse model and deep feature extracted model are stored in google drive, you can download them and put them in current directory.
Dataset
You can download the dataset from the BaiduNetDisk, the code is FVL1
, or from the Google Drive.
Testing
You can easily get the test result by running
python Regression.py
Results
Reference
If you find this project useful, we would be grateful if you cite this paper:
@article{attentionguid,
author = {Zhi Jin, Junjia Huang, Wenjin Wang, Aolin Xiong, Xiaojun Tan},
journal = {IEEE Transactions on Multimedia (TMM)},
title = {Estimating Human Weight from A Single Image},
year = {2022}
License
This repository is released under the MIT License as found in the LICENSE file. Code in this repo is for non-commercial use only.