YoungXIAO13 / PoseFromShape

(BMVC 2019) PyTorch implementation of Paper "Pose from Shape: Deep Pose Estimation for Arbitrary 3D Objects"
http://imagine.enpc.fr/~xiaoy/PoseFromShape/
MIT License
170 stars 34 forks source link

virtualscanner output #21

Closed mmahdavian closed 4 years ago

mmahdavian commented 4 years ago

Hi

I am trying to make point clouds from ObjectNet3D dataset, but I am getting an error:


ObjectNet3D/CAD/obj/aeroplane/01.obj done! Time: 1186065
Traceback (most recent call last):

  File "/home/mohammad/anaconda3/envs/PoseFromShape/lib/python3.6/shutil.py", line 550, in move
    os.rename(src, real_dst)

FileNotFoundError: [Errno 2] No such file or directory: 'ObjectNet3D/CAD/obj/aeroplane/01.ply' -> 'ObjectNet3D/pointcloud/aeroplane/01/sampled.ply'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/home/mohammad/Mohammad_ws/PoseFromShape/data/point_cloud.py", line 78, in <module>
    ply_path = sample_point_cloud_from_obj(args.virtualscanner, model_path, example_dir)

  File "/home/mohammad/Mohammad_ws/PoseFromShape/data/point_cloud.py", line 23, in sample_point_cloud_from_obj
    shutil.move(ply, ply_dest)

  File "/home/mohammad/anaconda3/envs/PoseFromShape/lib/python3.6/shutil.py", line 564, in move
    copy_function(src, real_dst)

  File "/home/mohammad/anaconda3/envs/PoseFromShape/lib/python3.6/shutil.py", line 263, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)

  File "/home/mohammad/anaconda3/envs/PoseFromShape/lib/python3.6/shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:

FileNotFoundError: [Errno 2] No such file or directory: 'ObjectNet3D/CAD/obj/aeroplane/01.ply'

I tried to find the reason. I think currently virtualscanner outputs file in .points format. But it needs to be .ply format. Is that correct? If yes do you know how can I solve the problem? And if no do you know what might be causing the error?

Thank You

YoungXIAO13 commented 4 years ago

Hi,

Yes, the virtualscanner is used to generate point clouds from .obj files to .ply files.

I think the first check to do is to verify is there any file generated by virtualscanner. You should see an executable file in O-CNN/virtual_scanner/build/virtualscanner after finished the compilation of O-CNN/virtual_scanner, and you can run the command #path_to_this_executable_file model.obj 10 with model.obj being the path to an obj file. If this failed, you may need to check whether the compilation is correctly done. Otherwise, you need another way to generate point clouds using the 3D CAD models.

mmahdavian commented 4 years ago

Hi. Yes it generates a file but with .points format. Do you know any other options for generating .ply files?

Thank you

YoungXIAO13 commented 4 years ago

Hi, I've pushed the virtual_scanner and you can check how to use it in ./data/virtual_scanner

mmahdavian commented 4 years ago

Thanks