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.48k stars 291 forks source link

Bug in data loading #92

Closed xianyongqin closed 3 years ago

xianyongqin commented 3 years ago

There is a potential bug at line 82-101 of im2mesh/data/fields.py. Line 82 assumes that "glob" returns a SORTED list of image file names. Line 87 and line 100-101 then use a given "idx_img" to read an image from the list and its corresponding camera parameters. However, the issue is that the file list obtained by "glob" is not SORTED. This will result in unaligned input image and camera parameters. This bug does not affect occupancy network because it does not use camera parameters. But this bug leads to wrong results for pixel2mesh.

m-niemeyer commented 3 years ago

Thanks @xianyongqin, it seems like for us they were sorted, but it is true that this does not have to be the case. I added a files.sort() now. This might be relevant for the pixel2mesh training loss issue. Thanks!