Skip to content

metrics.py points cannot contain NaN #6

@melinawdh

Description

@melinawdh

Hi,

Thanks for the great work!

I set everything up and was also able to run the network training. However, when I try to test the networks and calculate the metrics, I always get the error, that there are points with NaN values - this is the case for inferences on a model I trained myself with the provided code and data, as well as for the model that was provided (PointNet_Model).

Upon inspection it seems like the gt_rest_verts are fine, but something may go wrong in the projection step. Any pointers as to why this happens would be greatly appreciated.

(bodymap-env) ~/codeBodyMap/BodyMAP/scripts$ python metrics.py --files_dir /codeBodyMap/PMM_exps/normal/BodyMAP_PointNet_Model/inferences --save_path /codeBodyMap/PMM_exps/normal/BodyMAP_PointNet_Model/metrics
cover strs:   0%|                                                                                                                                                                                                | 0/3 [00:00<?, ?it/s]
SLP uncover dpx (990, 64, 27, 1) 100.0 ddx (990, 128, 54, 1) dy (990, 162) data_pmap (990, 6890) data_verts (990, 6890, 3) data names (990,)
uncover data:   0%|                                                                                                                                                                                            | 0/990 [00:01<?, ?it/s]
cover strs:   0%|                                                                                                                                                                                                | 0/3 [00:42<?, ?it/s]
Traceback (most recent call last):
  File "/BodyMAP/scripts/metrics.py", line 308, in <module>
    gt_height, gt_chest, gt_waist, gt_hips = compute_anatomy(gt_rest_verts)
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/BodyMAP/scripts/metrics.py", line 255, in compute_anatomy
    peri = compute_peripheries(triangles)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/BodyMAP/scripts/metrics.py", line 240, in compute_peripheries
    hull = ConvexHull(points_in_plane)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "scipy/spatial/_qhull.pyx", line 2492, in scipy.spatial._qhull.ConvexHull.__init__
  File "scipy/spatial/_qhull.pyx", line 284, in scipy.spatial._qhull._Qhull.__init__
ValueError: Points cannot contain NaN

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions