KeyError Traceback (most recent call last)
<ipython-input-20-1daf13c71fa1> in <module>()
----> 1 verts = torch.Tensor(pointcloud['verts']).to(device)
2 rgb = torch.Tensor(pointcloud['rgb']).to(device)
3
4 point_cloud = Pointclouds(points=[verts], features=[rgb])
/usr/local/lib/python3.6/dist-packages/numpy/lib/npyio.py in __getitem__(self, key)
264 return self.zip.read(key)
265 else:
--> 266 raise KeyError("%s is not a file in the archive" % key)
267
268
**KeyError: 'verts is not a file in the archive'**
I am creating Pytorch3d datastructure Pointclouds
from pytorch3d.structures import Pointclouds
#import all the others
# Set paths
DATA_DIR = "./data"
obj_filename = os.path.join(DATA_DIR, "/content/drive/My Drive/Datasets/StructureNET/partnethiergeo/chair_geo/173.npz")
# Load point cloud
pointcloud = np.load(obj_filename)
verts = torch.Tensor(pointcloud['verts']).to(device)
rgb = torch.Tensor(pointcloud['rgb']).to(device)
point_cloud = Pointclouds(points=[verts], features=[rgb])
I was wondering if the file .npz are normal pointclouds or they are different, and why I am receiving that error? any suggestions how to visualize that pointcloud in Colab?
Awesome project, thank you so much
I am creating Pytorch3d datastructure Pointclouds
I was wondering if the file .npz are normal pointclouds or they are different, and why I am receiving that error? any suggestions how to visualize that pointcloud in Colab?