nkolot / GraphCMR

Repository for the paper "Convolutional Mesh Regression for Single-Image Human Shape Reconstruction"
BSD 3-Clause "New" or "Revised" License
426 stars 67 forks source link

Train the graph adjacency matrix? #14

Closed sheoranhimansh closed 5 years ago

sheoranhimansh commented 5 years ago

Hi, In your code, you are loading the precomputed graph adjacency matrix and upsampling/downsampling matrices. Is there a way to train it? Can you please tell how did you compute both of them?

nkolot commented 5 years ago

The upsampling and downsampling were precomputed following the same procedure as in here. For the graph adjacency matrix, it is generated using the faces of the SMPL model. The code for that is here.

The adjacency matrix is not trainable. We use a shape with a fixed topology, so we kept the adjacency matrix fixed. If for some reason you want to make it trainable, there are some PyTorch limitations concerning sparse tensors and thus it might not be feasible to have a trainable sparse tensor. Of course you could make it dense, but then the operations will become slower and also it will consume significantly more memory.