chenzhaiyu / points2poly

Reconstructing compact building models from point clouds using deep implicit fields [ISPRS 2022]

Home Page:https://github.com/chenzhaiyu/points2poly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find 05_query_pts folder

Rifahaziz opened this issue · comments

Hi, for the custom dataset, from my point clouds I am able to create the npy files. Would you be able to explain how the folder 05_query_pts should be created? make_pc_dataset.py only creates the .npy and .xyz.npy files. How would I create the files in the folder 05_query_pts? When I run reconstruct.py, it cannot find 05_query_pts folder.
Thank you.

Hi @Rifahaziz, when you run reconstruct.py, the folder 05_query_pts will be automatically created by the following lines:

create_query_points(cell_complex,
filepath_query=(filepath.parent.parent / '05_query_pts' / filepath.name).with_suffix(
'.ply.npy'),

Did you make sure write permission is OK?

Hi @chenzhaiyu , it was able to write the other files, but for some reason I am getting this:

Random Seed: 40938661
getting information for 3 shapes
Error executing job with overrides: ['dataset_name=ngpdata2', 'model_name=helsinki_fullview']
Traceback (most recent call last):
File "/home/raziz/points2poly/reconstruct.py", line 73, in reconstruct_full
infer_sdf(cfg)
File "/home/raziz/points2poly/utils.py", line 183, in infer_sdf
points_to_surf_eval.points_to_surf_eval(cfg)
File "/home/raziz/points2poly/points2surf/source/points_to_surf_eval.py", line 335, in points_to_surf_eval
dataset = make_dataset(train_opt=train_opt, eval_opt=eval_opt)
File "/home/raziz/points2poly/points2surf/source/points_to_surf_eval.py", line 107, in make_dataset
dataset = data_loader.PointcloudPatchDataset(
File "/home/raziz/points2poly/points2surf/source/data_loader.py", line 313, in init
query_dist = np.load(query_dist_filename)
File "/home/raziz/anaconda3/envs/p2p/envs/psage/lib/python3.9/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: '/home/raziz/points2poly/datasets/ngpdata2/05_query_pts/4.ply.npy'

Am I messing something up here?
Thank you.

It looks already explained with the FileNotFoundError: does the path /home/raziz/points2poly/datasets/ngpdata2/05_query_pts/4.ply.npy exist on your device?

This is the issue, this folder (05_query_pts) is not being created, hence not being found. When I run reconstruct.py, it looks for the folder 05_query_pts without creating it.

Oh of course, I see now. Somehow the following line is not working on your side:

filepath_query.parent.mkdir(parents=True, exist_ok=True)

What will happen if you try to manually create the folder 05_query_pts before running reconstruct.py?

Yes, I can create the folder but there is no file inside it, eventually returning an error saying that the folder is empty.

If you were able to run the provided demo, which also creates 05_query_pts on the fly, then I suspect something wrong with your point clouds. Have you checked that cells were indeed created from the point clouds (or whether they are None, which results in queries being None, hence nothing being created)?

The npy files have float32 values. They are all different shapes, is that a problem? I was able to successfully run the demo helsinki data without a problem. Does it have to be a minimum of 6 point clouds by any chance? I was trying with 3. I will run it with a different dataset and see if the problem persists. Thank you so much for your help!

Having different shapes is not a problem. There is no minimum quantity as well. Maybe also worth checking if the filenames are correct: those in testset.txt should correspond to those in the subfolders. Let me know if you find something :)