4 min readfrom Machine Learning

8 inputs → 58 body params: putting a body-model forward pass inside the training loss [P]

Small MLP (2 layers × 256 units, ~85 KB) that accurately predicts 58 Anny body-shape parameters from 8 questionnaire inputs: height, weight, gender, body shape, build, belly, cup size, ancestry. Trains in ~120 minutes on a laptop. Architecturally boring — the loss is the interesting part.

Results (female / male, held-out synthetic test set):

Female Male
Height MAE (mean / p95) 0.3 / 0.8 cm 0.3 / 0.8 cm
Mass MAE (mean / p95) 0.4 / 1.0 kg 0.5 / 1.2 kg
Bust / Waist / Hips MAE (mean) 2.7 / 4.0 / 3.3 cm 4.9 / 4.3 / 3.3 cm

For reference: Bartol et al. (2022)'s h+w linear regression is ~7 cm BWH MAE on the same set (our inspiration). Our own photo pipeline (SAM 3D BodyMHR → Anny + tuning, avoids SMPL entirely for license reasons) lands 5–8 cm BWH on real people. Questionnaire beats photo because the input space contains information (body shape, build) that single-image HMR smooths away.

The trick. The user gives us exact height and weight — the generated body has to match those, not just be close on average. Mass isn't one of the 58 params; it's a consequence of volume, which comes out of the body model's forward pass.

So we put the forward pass inside the loss. MLP outputs → Anny blendshapes → vertices → volume → predicted mass and height, backprop through all of it. Anny is autograd-friendly out of the box: blendshapes are linear, volume is a sum of signed tetrahedra. Standard PyTorch, no custom backward.

Sketch:

```python params = mlp(questionnaire) # 58 Anny shape params verts = anny.forward(params) # blendshapes → mesh (linear, differentiable) vol = signed_tetrahedra_volume(verts) # differentiable mass = vol * density(body_fat(params), gender) # Siri two-component model height = verts[top].y - verts[bottom].y waist = iso_8559_plane_sweep(verts, "waist") # from clad-body

loss = mse(params, params_target) \ + λ_m * (mass - mass_target)2 \ + λ_h * (height - height_target)2 \ + λ_w * (waist - waist_target)**2 ```

Ridge (as baseline) hits 3.9 kg mean mass MAE (p95 9.7, max 16 kg on heavy bodies) because it predicts each of the 58 params independently and small errors compound through volume. MLP with the physics-aware loss: 0.3 kg mean, p95 under 1 kg. ~10× from the loss, not the architecture.

Most of the accuracy work happened before training, not inside it. The loss is the trick, but what makes the numbers tight is getting the anthropometry right first like measurement conventions and mass calculation. Without that upstream work no loss function would have saved us.

Measurements. Neither Anny nor MHR ship with a measurement library. You get a mesh with 14–18K vertices and no standard way to extract waist circumference. We built ISO 8559-1 plane-sweep circumferences, landmark detection, contour separation - clad-body (Apache 2.0). This is what the loss actually computes against, without it the physics-aware loss has nothing to anchor to.

Mass. Anny's default uses a single density of 980 kg/m³ which is internet-average human density. It sits between two distinct conventions: whole-body density (~985 kg/m³, lungs included, what dunking someone in a tank gives you) and tissue-only density (~1030–1080 kg/m³, what fat-vs-muscle composition actually gives you). We switched to per-gender tissue densities derived from body-fat percentage. Lean bodies gained up to 1 kg, soft bodies lost up to 2 - the difference between matching the scale and being systematically off for anyone not shaped like the average.

Honest limits. 1.3 cm waist-MAE theoretical floor from ~50 continuous blendshapes no question maps to. Statistical model = population-average body for your inputs, not yours. Real-people validation among our friends gives quite good results.

References and implementation:

Happy to discuss

submitted by /u/clad_you
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#natural language processing for spreadsheets
#generative AI for data analysis
#Excel alternatives for data analysis
#rows.com
#financial modeling with spreadsheets
#real-time data collaboration
#no-code spreadsheet solutions
#real-time collaboration
#machine learning in spreadsheet applications
#automated anomaly detection
#loss function
#body parameters
#MLP
#anthropometry
#forward pass
#Anny blendshapes
#input questionnaire
#mean absolute error
#height prediction
#differentiable