mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 22:30:35 +08:00
Test rendering models for R2N2
Summary: Adding a render function for R2N2. Reviewed By: nikhilaravi Differential Revision: D22230228 fbshipit-source-id: a9f588ddcba15bb5d8be1401f68d730e810b4251
This commit is contained in:
committed by
Facebook GitHub Bot
parent
49b4ce1acc
commit
5636eb6152
@@ -64,6 +64,7 @@ class R2N2(ShapeNetBase):
|
||||
continue
|
||||
|
||||
synset_set.add(synset)
|
||||
self.synset_starts[synset] = len(self.synset_ids)
|
||||
models = split_dict[synset].keys()
|
||||
for model in models:
|
||||
# Examine if the given model is present in the ShapeNetCore path.
|
||||
@@ -78,6 +79,7 @@ class R2N2(ShapeNetBase):
|
||||
continue
|
||||
self.synset_ids.append(synset)
|
||||
self.model_ids.append(model)
|
||||
self.synset_lens[synset] = len(self.synset_ids) - self.synset_starts[synset]
|
||||
|
||||
# Examine if all the synsets in the standard R2N2 mapping are present.
|
||||
# Update self.synset_inv so that it only includes the loaded categories.
|
||||
|
||||
@@ -34,7 +34,7 @@ class ShapeNetBase(torch.utils.data.Dataset):
|
||||
self.synset_starts = {}
|
||||
self.synset_lens = {}
|
||||
self.shapenet_dir = ""
|
||||
self.model_dir = ""
|
||||
self.model_dir = "model.obj"
|
||||
|
||||
def __len__(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user