zengyh1900 / 3D-Human-Body-Shape

[ICIMCS'2017] Official Code for 3D Human Body Reshaping with Anthropometric Modeling
https://doi.org/10.1007/978-981-10-8530-7_10
MIT License
340 stars 105 forks source link

Fix for latest FancyImpute(MICE) version - 2021 #36

Closed AlyanQ closed 2 years ago

AlyanQ commented 2 years ago

If you install and try to run this repo in 2021, you will get errors for FancyImpute and the MICE imputer module. FancyImputer's MICE imputer has been deprecated and been merged into sci-kit learns Iterative Imputer and some of the syntax relating to the module has changed as well. This is the current fix to get it to work correctly.

In line https://github.com/1900zyh/3D-Human-Body-Shape/blob/1c71ea7f19fb87a0881d51415b4344a904ed01eb/src/reshaper.py#L4

#from fancyimpute import MICE
from fancyimpute import IterativeImputer as MICE

In line https://github.com/1900zyh/3D-Human-Body-Shape/blob/1c71ea7f19fb87a0881d51415b4344a904ed01eb/src/reshaper.py#L120

#tmp = solver.complete(tmp)
tmp = solver.fit_transform(tmp)

Hope this is useful to someone.

lyz2 commented 2 years ago

Hello,Do you know how to get the.the body_control_points.txt?How to manually draw definitions in a template?

AlyanQ commented 2 years ago

@lyz2 I don't know how they have calculated the measurement control points in the body_control_points.txt file. I can assume they had a different tool like blender or AutoCAD, perhaps Unity? Something to render the 3D obj file and manually place points on it to get the measurement points. If I was in your position I would try to load an .obj file in either blender or unity and try to draw the control points manually.
Let me know how it goes.

lyz2 commented 2 years ago

@ AlyanQ Thank you for your advice. I'll try. I have another question. Can you get other dimensions by clicking prediction and entering only height and weight?

AlyanQ commented 2 years ago

@lyz2 Do you mean the other dimensions already in the demo.py program? Yes you only need to enter height and weight and it predicts the rest of the dimensions, quite accurate for general purposes as well.
For other dimensions not in the program, you might have to modify the imputing function in the reshaper.py file

okomenchuk commented 2 years ago

Hey! Thanks for your advice! Can you tell me what P2M means in the code? How to generate it?