Closed joerowelll closed 2 years ago
Did you manage to get this resolved? It is indeed confusing
Do you understand the parse?
Basically what's the point of the data_dir and the input_ply_file? everything else is good but those two arguments seem to be the same?
In onSurPrior.py#L777
point_sparse = np.load(a.data_dir + a.input_ply_file + '.npz')['pointcloud_s']
This need npz file, but I don't know how to convert the ply file to npz.
How do you solve the problem? Could you please share the ply and npz file?
Ah yep, that solved it, thanks!
That's awesome.
But how to solve my problem? Do you have npz and ply file?
I have this ply file, https://qndkppmmrjbidgjntwgt.supabase.co/storage/v1/object/public/3d-models/items/test/55c820a2-e5d3-455a-b678-8e76e2.ply?t=2023-02-02T08%3A20%3A54.699Z (sparse point cloud, 4k generated by point-e)
I don't have an npz atm but you can use https://pypi.org/project/pyntcloud/ to convert that into an NPZ.
.npz does not need to be prepared by the user, it will be automatically generated in '--data_dir' folder after the program is executed
but why my program doesn't automatically generate the npz file.
I run the following command.(I didn't train the model, I use your pretrain model, so I change OnSurfacePrior.py#775 to saver.restore(sess, a.out_dir + 'model-10201')
, and the following --out_dir ./pre_train_model
)
python onSurPrior.py --data_dir ./data/ --out_dir ./pre_train_model/ --CUDA 0 --INPUT_NUM 500 --epoch 30000 --input_ply_file input.ply --test
But I got error
Traceback (most recent call last):
File "onSurPrior.py", line 779, in <module>
point_sparse = np.load(a.data_dir + a.input_ply_file + '.npz')['pointcloud_s']
File "/home/pi/anaconda3/envs/tf/lib/python3.6/site-packages/numpy/lib/npyio.py", line 416, in load
fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: './data/input.ply.npz'
The data folder only have input.ply file.
I modified some of the code to make it automatically generate .npz file, please update it.
I am trying to run the pretrained model on a .ply file with the --test command, and I am getting the error:
when running
--data_dir is the directory with input.ply (brighton.ply)
--out_dir is the empty directory you want output in
--input_ply_file brighton.ply (with or without full path?)
Is this correct? I am a little confused as to the parsed arguments and which should be which.
System Ubuntu 18.04 No GPU