DavidBoja / SMPL-Anthropometry

Measure the SMPL body model
MIT License
160 stars 22 forks source link

Getting weight measurement #15

Closed longphamkhac closed 3 months ago

longphamkhac commented 9 months ago

Thanks for your outstanding works!!!! Given 3d human mesh, I want to output the body measurement, for instance height and weight. I see that your work can output the height but how about the body's weight?

DavidBoja commented 9 months ago

Hi,

the body weight is a bit tricky, but it can be approximated with the volume of the mesh. You can take a look at this paper and read the discussion.

The paper has the appropriate code here. They use the trimesh package to estimate the weight here.

Hope this helps.

longphamkhac commented 9 months ago

Thanks for your patient reply!! I will look at the paper that you mentioned. And do you have any suggestions about the image person'pose to get the most resonable body measurement such as height?

DavidBoja commented 9 months ago

You mean getting the height of a person from an image?

There are works that estimate measurements from images. You can take a look here for an overview of 2D methods or in the paper I already sent you, or search for a newer review paper.

I think that the current state of the art model is SHAPY which uses the SMPL body model to get the measurements.

longphamkhac commented 9 months ago

Exactly what I mean!!! Thank you so much!!

Daniil-Osokin commented 8 months ago

@DavidBoja Thanks for the great repo! Can you please help to understand how the real person height is predicted with the SMPL? I mean networks take the image crop of specific size, e.g. 224x224, so whether person height is, it will take the same size in this crop. Why the predicted height will differ for different persons?

DavidBoja commented 8 months ago

Hi @Daniil-Osokin i presume that these networks implicitly learn the scale of things, i.e. the measurements / height of a person.

If you had camera that is fixed in space and took an image of a person looking at the camera whose height you knew - then you could map the number of pixels that correspond to the height in the image (you could find the number of pixels from the top of the head to the middle point of the heels for example) to the persons real height. This way you could know how to estimate the height of a person given their image from that specific camera fixed in a single position.

I think the networks do a very similar thing, but since they are much more capable, they can estimate the height of people in different poses. The biggest issue here is that they still expect to get the image from a camera fixed in a single position (the same one they were trained on) even if they take out a crop - because this is the only way to really learn the scale of things. To try and mitigate this problem, I know some works jitter the camera position so the network becomes more robust to these camera changes and could potentially generalize onto a different camera setup.

In the end, giving the model a different camera setup somewhat works, but it doesn't need to work, if you understand what I'm trying to say.

Hope this helps.

Daniil-Osokin commented 8 months ago

Many thanks for the detailed answer! I was confused by the results comparison in the SHAPY paper. They measure error in millimeters (!), even for person height, however have no camera parameters and depth to get the scale: shapy_results I get it, it is just some regressed value by the network. Thanks again for the clarifications :+1:

longphamkhac commented 8 months ago

Sorry for bothering you again, unfortunately, I cannot use SHAPY due to its license. So do you have any alternative solutions for generating realistic 3d body shape and body measurements? Many thanks!!!!!!

rshtern commented 8 months ago

Thank you for this great work. can you explain how can I use SMPL-Anthropometry to measure a body from an image? do I need to create a SMPLX model first? what is the correct flow? Thanks

Daniil-Osokin commented 8 months ago

@longphamkhac Hi! You can use any other method from the table above. Or give a try HMR2.0, it has MIT license.

Daniil-Osokin commented 8 months ago

@rshtern Hi! Yes, first you need the SMPL/SMPLX model of interesting subject (need to run some human body pose estimation model), then you can use this repo to handy measure model parameters.

urebahmed commented 8 months ago

Capture review this issue ........is there any solution ?

DavidBoja commented 8 months ago

Hi @urebahmed I am not sure what exactly is the problem here. I don't know what dictionary is changing its size, but are you sure it is a part of this repo code?