elliottwu / unsup3d

(CVPR'20 Oral) Unsupervised Learning of Probably Symmetric Deformable 3D Objects from Images in the Wild
MIT License
1.19k stars 192 forks source link

Render is too slow in 512×512 resolution #37

Closed YunjieYu closed 3 years ago

YunjieYu commented 3 years ago

Hi! Thank you very much for such a great work!

I'm trying to train a network in the size of 512×512. However, the time for a single forward propagation (batch size = 8) is too long (~60.12s). Furthermore, I find that the time is mainly spent on rendering the reconstructed depth map (~59.98s). I want to know what causes the rendering to be so slow.

Again thank you for your work and code, looking forward to your reply :>.

elliottwu commented 3 years ago

Hi,

The way we render the depth maps is by converting them into meshes - creating two triangles for every four adjacent pixels. A 512x512 depth map will result in over 500k triangles, which is not the most efficient representation. So you might need to switch to another more compact representation, like directly using meshes, or find a way to prune the triangles, for such a high resolution.

YunjieYu commented 3 years ago

Thank you very much for your valuable suggestions! I will try it.