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

Error on running on subset of Shapenet Dataset #48

Open 1995YogeshSharma opened 4 years ago

1995YogeshSharma commented 4 years ago

Hi, I picked out two classes of Shapenet pre-processed data and placed it in a custom folder maintaining directory structure. I want to run the point cloud -> mesh generation on this network. But, when I run python generate.py configs/pointcloud/onet_pretrained.yaml I get following error Screenshot from 2020-01-18 01-56-15

Any help is appreciated!

rahulvenkk commented 4 years ago

I faced the same issue. It turns out that in im2mesh/core.py, lines 90-93

self.models += [
                {'category': c, 'model': m}
                for m in models_c 
            ]

models_c sometimes contains the empty string ''. This cause the dataloader to fail towards the end. Changing it to this made it work.

self.models += [
                {'category': c, 'model': m}
                for m in models_c if m!=''
            ]