Pytorch3d: Error when loading ShapeNet

Created on 10 Nov 2020  ยท  3Comments  ยท  Source: facebookresearch/pytorch3d

โ“ Questions on how to use PyTorch3D

NOTE: Please look at the existing list of Issues tagged with the label 'question](https://github.com/facebookresearch/pytorch3d/issues?q=label%3Aquestion) or ['how-to. Only open a new issue if you cannot find an answer there.

Also note the following:

  1. If you encountered any errors or unexpected issues while using PyTorch3D and need help resolving them,
    please use the "Bugs / Unexpected behaviors" issue template.

  2. We do not answer general machine learning / computer vision questions that are not specific to
    PyTorch3D, such as how a model works or what algorithm/methods can be
    used to achieve X.

I'm following the tutorial and getting and error when trying to load ShapeNet:
FileNotFoundError: [Errno 2] No such file or directory: '/home/camilo/anaconda3/envs/pytorch3d/lib/python3.8/site-packages/pytorch3d/datasets/shapenet/shapenet_synset_dict_v1.json'

# Setup
if torch.cuda.is_available():
    device = torch.device("cuda:0")
    torch.cuda.set_device(device)
else:
    device = torch.device("cpu")

SHAPENET_PATH = '/media/capcarde/shapenet/ShapeNetCore.v1'
shapenet_dataset = ShapeNetCore(SHAPENET_PATH)
installation

Most helpful comment

The missing file is here: https://github.com/facebookresearch/pytorch3d/tree/master/pytorch3d/datasets/shapenet
A quick fix would be to just added it to your site-packages (where the error is saying the file is missing) - same problem came up for me.

All 3 comments

The missing file is here: https://github.com/facebookresearch/pytorch3d/tree/master/pytorch3d/datasets/shapenet
A quick fix would be to just added it to your site-packages (where the error is saying the file is missing) - same problem came up for me.

dear @elcronos, as mentioned by @alexisbdr,
You should take shapenet_synset_dict_v1.json from that location

Screenshot from 2020-11-12 19-05-58
and add here home/camilo/anaconda3/envs/pytorch3d/lib/python3.8/site-packages/pytorch3d/datasets/shapenet/for you.
Make sure it is in envs
Let me know if you need further assistance or feel free to close the issue.

Thanks @alexisbdr and @albertotono. I was able to solve my problem with that dataset doing what you suggested. However, I'm leaving this issue open until is fixed in the installation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shersoni610 picture shersoni610  ยท  3Comments

MarkTension picture MarkTension  ยท  3Comments

ldepn picture ldepn  ยท  3Comments

NotAnyMike picture NotAnyMike  ยท  3Comments

TSKongLingwei picture TSKongLingwei  ยท  3Comments