SelfReconCode
SelfReconCode copied to clipboard
Bug in save_debug with pytorch3D 0.6.2
Geat work! The performance is really impressive!
I have struggled to install the old version of pytorch3D (0.4.0) but failed. Therefore, I made some change to the source code of pytorch3D 0.6.2 to make the training run sucessfully.
File "train.py", line 167, in <module>
loss=optNet(outs,sample_pix_num,ratio,frame_ids,debug_root)
File "/home/yusun/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/yusun/data_drive/existing_works/SelfReconCode/model/network.py", line 506, in forward
self.save_debug(oldTmpVs,self.Tmpfs,defMeshes,self.deformer.defs[0].offset.view(N,-1,3).detach(),masks,gtMs,mgtMs,gtCs,batch_inds,row_inds,col_inds,initTmpPs,[d_cond.detach(),[poses.detach(),trans.detach()]],rendcond,ratio)
File "/home/yusun/data_drive/existing_works/SelfReconCode/model/network.py", line 385, in save_debug
defMeshes=Meshes(verts=[vs for vs in torch.split(TmpVs[None,:,:].expand(N,-1,3)+offset,1)],faces=[Tmpfs for _ in range(N)],textures=TexturesVertex([torch.ones_like(TmpVs) for _ in range(N)]))
File "/home/yusun/anaconda3/envs/icon/lib/python3.8/site-packages/pytorch3d-0.6.2-py3.8-linux-x86_64.egg/pytorch3d/structures/meshes.py", line 436, in __init__
raise ValueError(msg)
ValueError: Textures do not match the dimensions of Meshes.
But there is a bug when running into save_debug.
I suppose that fixing this bug, then we can use pytorch3D 0.6.2 as the default installation version, which is way more convenient to install.
Looking forward to your reply!
The API has some changes for higher versions and I do not check it carefully, you can try to update it by yourself. Feel free to propose a pull request.