autonomousvision / occupancy_networks

This repository contains the code for the paper "Occupancy Networks - Learning 3D Reconstruction in Function Space"
https://avg.is.tuebingen.mpg.de/publications/occupancy-networks
MIT License
1.49k stars 291 forks source link

About 3D-r2n2 and pixel2mesh implementation problem #79

Open zyz-notebooks opened 3 years ago

zyz-notebooks commented 3 years ago

hi, when I trying to train 3D-r2n2 and pixel2mesh pixel2mesh implementation, I have the following problems

1 python train.py configs/img/pixel2mesh.yaml

Visualizing Traceback (most recent call last): File "train.py", line 135, in trainer.visualize(data_vis) File "/home/zyz/Project/occupancy_networks/im2mesh/pix2mesh/training.py", line 287, in visualize points_out = common.transform_points_back(pred_vertices_3, world_mat) File "/home/zyz/Project/occupancy_networks/im2mesh/common.py", line 228, in transform_points_back points_out = points_out @ b_inv(R.transpose(1, 2)) File "/home/zyz/Project/occupancy_networks/im2mesh/common.py", line 209, in b_inv binv, = torch.gesv(eye, b_mat) AttributeError: module 'torch' has no attribute 'gesv'

2 python train.py configs/img/r2n2.yaml Total number of parameters: 16680001 [Epoch 00] it=000, loss=0.7573 Visualizing Traceback (most recent call last): File "train.py", line 135, in trainer.visualize(data_vis) File "/home/zyz/Project/occupancy_networks/im2mesh/r2n2/training.py", line 106, in visualize occ = data.get('voxels').to(device) AttributeError: 'NoneType' object has no attribute 'to'

you have encountered this problem? I am looking forward to your help

Bingoang commented 2 years ago

@zyz-1998 Hi, have you solved the problem2? I'm meeting the same problem

hummat commented 2 years ago

Hi, for r2n2, try adding

voxels_file = cfg['data']['voxels_file']
if voxels_file is not None:
    fields['voxels'] = data.VoxelsField(voxels_file)

at the end get_data_fields (so after line 95) of occupancy_networks/im2mesh/r2n2/config.py.

Bingoang commented 2 years ago

@hummat Wow, thank you so much! I follow your tips and it works now!