Skip to content

Fix dataloading for .xyz files#8

Open
Linusnie wants to merge 1 commit intomabaorui:masterfrom
Linusnie:fix-xyz
Open

Fix dataloading for .xyz files#8
Linusnie wants to merge 1 commit intomabaorui:masterfrom
Linusnie:fix-xyz

Conversation

@Linusnie
Copy link

@Linusnie Linusnie commented Feb 4, 2024

Hi, first off thanks for sharing this implementation, it's very convenient to get started with!

I encountered a bug that that prevents .xyz files from being loaded, this 1-line commit should fix it

To reproduce just add an .xyz file to the data folder (in my case 3DBenchy.xyz) and run python run.py --conf ./confs/npull.conf --dir benchy --dataname 3DBenchy_test. The output I get is:

Data not found. Processing data...
Traceback (most recent call last):
  File "/home/linus/workspace/NeuralPull-Pytorch/run.py", line 190, in <module>
    runner = Runner(args, args.conf, args.mode)
  File "/home/linus/workspace/NeuralPull-Pytorch/run.py", line 38, in __init__
    self.dataset_np = DatasetNP(self.conf['dataset'], args.dataname)
  File "/home/linus/workspace/NeuralPull-Pytorch/models/dataset.py", line 85, in __init__
    process_data(self.data_dir, dataname)
  File "/home/linus/workspace/NeuralPull-Pytorch/models/dataset.py", line 24, in process_data
    pointcloud = np.load(os.path.join(data_dir, dataname)) + '.xyz'
  File "/home/linus/workspace/NeuralPull-Pytorch/venv-np/lib/python3.10/site-packages/numpy/lib/npyio.py", line 405, in load
    fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: 'data/3DBenchy'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant