Giter VIP home page Giter VIP logo

linear-3d-humans's Introduction

Linear Regression vs. Deep Learning: A Simple Yet Effective Baseline for Human Body Measurement

We show that the simple linear regression model performs comparably to the state-of-the-art for the task of human body measurement. The input to the model only consists of the information that a person can self-estimate, such as height and weight. The simplicity of the proposed regression model makes it perfectly suitable as a baseline in addition to the convenience for applications such as the virtual try-on. To improve the repeatability of the results of our baseline and the competing methods, we provide guidelines toward standardized body measurement estimation. An overview of our approach can be summarized in an image:

https://github.com/kristijanbartol/linear-3d-humans/blob/master/assets/overview.png

Citation

The code is a supplementary for our journal paper. Please cite it in your research:

@article{Bartol:Linear-3D-Humans, 
    title={Linear Regression vs. Deep Learning: A Simple Yet Effective Baseline for Human Body Measurement}, 
    volume={22}, 
    ISSN={1424-8220}, 
    url={http://dx.doi.org/10.3390/s22051885}, 
    DOI={10.3390/s22051885}, 
    number={5}, 
    journal={Sensors}, 
    publisher={MDPI AG}, 
    author={Bartol, Kristijan and Bojanić, David and Petković, Tomislav and Peharec, Stanislav and Pribanić, Tomislav}, 
    year={2022}, 
    month={Feb}, 
    pages={1885} 
}

Installation

To install the required packages, please create new virtual environment and use requirements.txt (for simplicitly, I dumped all currently installed packages to requirements.txt). In the future, will provide more accurate installation instruction.

Prepare the data

To prepare (generate) training and validation data, run with these sample arguments:

python3 generate.py --name my-dataset \\
    --model smpl \\
    --male 10000 \\
    --female 10000

Fitting / Training

To fit the model, run the main.py:

python3 main.py --data_root data/ \\
    --dataset_name nomo \\
    --features baseline \\
    --target measurements \\
    --gender male \\
    --height_noise 0.01 \\
    --weight_noise 1.5 \\
    --num_interaction 2

How to run

To run the demo with a rudimentary Python visualization:

python3 demo.py

The expected input/output:

Enter your gender ([male, female]):male
Enter your height [in meters] and weight [in kg]: 1.72 65
head_circumference: 55.32cm
neck_circumference: 37.31cm
shoulder_to_crotch: 64.38cm
chest_circumference: 89.44cm
waist_circumference: 84.36cm
hip_circumference: 92.78cm
wrist_circumference: 16.26cm
bicep_circumference: 28.05cm
forearm_circumference: 26.33cm
arm_length: 50.94cm
inside_leg_length: 73.44cm
thigh_circumference: 56.03cm
calf_circumference: 34.45cm
ankle_circumference: 21.23cm
shoulder_breadth: 35.31cm

screenshot

Updates / Work-In-Progress

  • Prepare rudimentary demo

  • Clean the code (v0.1)

  • Prepare-the-training-data instructions

  • Finish the documentation

  • Provide inference scripts and instructions

  • Check issue #1

  • Create a simple Python UI (v0.2)

  • Add source code of the Kivy mobile that uses the fitted coefficients

License

Software Copyright License for non-commercial scientific research purposes. Please read carefully the terms and conditions and any accompanying documentation before you download and/or use the SMPL-X/SMPLify-X model, data and software, (the "Model & Software"), including 3D meshes, blend weights, blend shapes, textures, software, scripts, and animations. By downloading and/or using the Model & Software (including downloading, cloning, installing, and any other use of this github repository), you acknowledge that you have read these terms and conditions, understand them, and agree to be bound by them. If you do not agree with these terms and conditions, you must not download and/or use the Model & Software. Any infringement of the terms of this agreement will automatically terminate your rights under this License.

Acknowledgments

linear-3d-humans's People

Contributors

dimtzionas avatar kristijanbartol avatar mohamedhassanmus avatar nkolot avatar otaheri avatar vchoutas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

linear-3d-humans's Issues

Inconsistent height estimates

Thanks for making your project available and so easy to use!

I played a bit around with your demo and found some inconsistencies with the estimations:
I used your demo inputs: male -> 1.72 65 and got as SMPL shape estimation:

[ 1.05071094  0.72027541  0.2989638   0.05701623  0.07447251 -0.09911867
  0.07585485 -0.05481659 -0.00452416  0.11355854]

However, when I use a larger person: male -> 1.83 74 I get the following SMPL shape estimation:

[-0.2499936   1.10689084  0.38673149  0.10451252  0.08272817 -0.12257114
  0.04098995 -0.08785101 -0.03187838  0.10152087]

As the first principle component (kind of) represents body height it seems that the second person estimation is much smaller then the first one, even though the second person is more than 10cm taller:

frame00000
In the above image the blue skeleton represents the 1.83m tall person while the red skeleton represents the 1.72m tall person (same pose for the two given shape parameters).

Interestingly, if one uses: male -> 1.80 50 one gets the following shape:

[ 0.52775807  2.48606748  0.51797164  0.17677026  0.05246255 -0.41012379
  0.03961402 -0.1975367  -0.00779281  0.17064792]

while when selecting male -> 1.80 100 one gets:

[-0.45392014 -0.95924672  0.15785673 -0.02097742  0.11747412  0.27203582
  0.0648735   0.07791602 -0.04637479  0.01784527]

which is weird considering that both persons have the same body height.

Is there anything I am doing wrong? I simply print shape_params (

shape_params = h * shape_coefs[:, 0] + w * shape_coefs[:, 1] + shape_coefs[:, 2]
)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.