sha2nkt / moyo_toolkit

This is a repository for download, preprocessing, visualizing, running evaluations on the MOYO dataset.
Other
77 stars 5 forks source link

marker_positions and mat_size for calculating CoP #8

Closed yufu-liu closed 1 year ago

yufu-liu commented 1 year ago

Hi, After knowing the betas (shape) can lead to considerable error for calculating CoM, I think calculating CoP has the same situation. Besides, I found the function evaluate_pressure (in biomech_eval_utils.py) and the function stability_error (in stability_metrics.py) are different for calculating CoP (cos). The main difference is using marker_positions and mat_size to get vertices_hd_relative.

I also did an experiment that comparing both CoP errors on MOYO dataset, like an example below.

  • V-template with marker_positions and mat_size: 0.027, 0.027, 0.026, 0.046, ...
  • betas=zeros with marker_positions and mat_size: 0.051, 0.051, 0.050, 0.051, ...
  • betas=zeros without marker_positions and mat_size: 0.308 0.307, 0.306, 0.393, ...

I don't know if marker_positions and mat_size actually lead to this large error, please correct me. If my result is correct, is it still able to adapt CoP to other datasets without marker_positions and mat_size?

sha2nkt commented 1 year ago

Hi,

The mat_size and marker_positions are only used to bring the mesh vertices and predicted CoP in the mat's local frame of reference. This is because our ground-truth CoP from the pressure mat is in the mat's local frame of reference. We need to make both of them consistent in order to compare accuracy of our predictions.

If you are using another dataset, you will need a way to similarly bring the predicted CoP in the same frame of reference as the GT CoP. However, if you don't care about the GT CoP, then you don't need this step.

The key idea is to keep everything consistent in terms of the frame of reference. Hope this helps.

yufu-liu commented 1 year ago

Hi, thanks for your thorough explaination!

To my understanding, the calculated CoP without mat_size and marker_positions is like a relative version of GT CoP (Maybe a bias between CoP and GT CoP).

So if I want to adapt CoP and stability loss to train my HMR model, the model can still learn the information/feature from calculating CoP and stability loss without mat_size and marker_positions, right?

sha2nkt commented 1 year ago

Yes, it will work as long as the frame of reference is consistent.

yufu-liu commented 1 year ago

I really appreciate your help!