eth-ait / dip18

Deep Inertial Poser: Learning to Reconstruct Human Pose from Sparse Inertial Measurements in Real Time
GNU General Public License v3.0
141 stars 47 forks source link

Data synthesis is too slow #13

Closed karlind closed 3 years ago

karlind commented 3 years ago

Data synthesis takes a long time to finish. I try to process AMASS dataset, it costs several days to finish. Even using multiprocessing, it needs days to finish. global_rigid_transformation takes too much time. Is there any tricks to accelerate data synthesis? Thanks in advance.

YinghaoHuang91 commented 3 years ago

Hi by default Chumpy also supports differentiation for optimization. I think you can change the code from Chumpy to Numpy to speed it up. It should be straightforward since Chumpy and Numpy share almost all the major functions in the script.

Another thing you can try is to discard non-selected vertices at an early stage. Now the chosen vertices are preserved after all the vertices are computed: https://github.com/eth-ait/dip18/blob/917e6199ffa5eabed2cc8790c6bcd8337f369c3e/data_synthesis/genSynData.py#L95. You can dive into the _vertscore function inside lbs.py to do the modification.

kaufManu commented 3 years ago

To add to @YinghaoHuang91's answer: At the time we developed this, the "only" SMPL model available was the one using Chumpy. Nowadays, there's implementations in PyTorch (https://github.com/nghorbani/human_body_prior), which allows you to batch several sequences together and process them on the GPU. While this requires re-writing the processing script a bit, it should considerably speed things up.

karlind commented 3 years ago

Thanks for the reply, it helps a lot. I will look at the work mentioned.