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

Pix2Mesh:Evaluation Metrics are difficult to improve #80

Open Ray-tju opened 3 years ago

Ray-tju commented 3 years ago

Visualizing Saving checkpoint 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 438/438 [02:54<00:00, 2.51it/s] Validation metric (chamfer): 0.0085 [Epoch 218] it=550040, loss=23.5803 [Epoch 218] it=550080, loss=23.4854 [Epoch 218] it=550120, loss=24.6864 [Epoch 218] it=550160, loss=26.4946 [Epoch 218] it=550200, loss=22.0666 [Epoch 218] it=550240, loss=17.3520 [Epoch 218] it=550280, loss=26.5700 [Epoch 218] it=550320, loss=22.5845 [Epoch 218] it=550360, loss=26.3020 [Epoch 218] it=550400, loss=26.8065 [Epoch 218] it=550440, loss=21.6374 [Epoch 218] it=550480, loss=23.5920 [Epoch 218] it=550520, loss=25.2067 [Epoch 218] it=550560, loss=23.4582 [Epoch 218] it=550600, loss=25.1905 [Epoch 218] it=550640, loss=33.1308 [Epoch 218] it=550680, loss=19.8145 [Epoch 218] it=550720, loss=20.7750 [Epoch 218] it=550760, loss=17.7780 [Epoch 218] it=550800, loss=26.0422 [Epoch 218] it=550840, loss=24.2604 [Epoch 218] it=550880, loss=24.1736 [Epoch 219] it=550920, loss=21.2279 [Epoch 219] it=550960, loss=22.9792 [Epoch 219] it=551000, loss=19.5233 Saving checkpoint [Epoch 219] it=551040, loss=19.6820 [Epoch 219] it=551080, loss=24.0150 [Epoch 219] it=551120, loss=25.1643 [Epoch 219] it=551160, loss=21.5849 [Epoch 219] it=551200, loss=19.0913 [Epoch 219] it=551240, loss=25.0197

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

Ray-tju 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

dataloder中没有读取到voxel文件,把这个代码改成 def get_data_fields(mode, cfg): ''' Returns the data fields.

Args:
    mode (str): the mode which is used
    cfg (dict): imported yaml config
'''
points_transform = data.SubsamplePoints(cfg['data']['points_subsample'])
with_transforms = cfg['model']['use_camera']

fields = {}
fields['points'] = data.PointsField(
    cfg['data']['points_file'], points_transform,
    with_transforms=with_transforms,
    unpackbits=cfg['data']['points_unpackbits'],
)

if mode in ('val', 'test'):
    points_iou_file = cfg['data']['points_iou_file']
    voxels_file = cfg['data']['voxels_file']
    if points_iou_file is not None:
        fields['points_iou'] = data.PointsField(
            points_iou_file,
            with_transforms=with_transforms,
            unpackbits=cfg['data']['points_unpackbits'],
        )
    if voxels_file is not None:
        fields['voxels'] = data.VoxelsField(voxels_file)

return fields