Healthcare-Robotics / bodies-at-rest

Code + Data for CVPR 2020 oral paper "Bodies at Rest: 3D Human Pose and Shape Estimation from a Pressure Image using Synthetic Data."
Other
62 stars 8 forks source link

Image files from *.p files #8

Closed padmalcom closed 1 year ago

padmalcom commented 1 year ago

Hi, first of all thank you for your work.

I'm not surer how to extract the actual real images (png, jpg ...) from the *.p files. Can you help me here?

henryclever commented 1 year ago

Hi,

Thank you for your inquiry - happy to assist.

The .p files are read in a number of different scripts I provided. .p is a "pickle" file, which stores python objects. I just took a look at one of the scripts that reads the images, viz_synth_cvpr_release.py. This imports an image reader function from the library script tensorprep_lib_br.py, which reads the image data on lines 65-73. I believe each image is encoded in the images key of the object dict as a 1728 length vector of floats -- the pressure values --, which can then be reshaped into images of size 64 x 27.

Does this make sense?

-Henry

padmalcom commented 1 year ago

Hi Henry, thanks for the quick answer. I think I can work with that! Jonas