Texture loading and rendering in ShapeNetCore and R2N2 data loaders

Summary:
- Add support for loading textures from ShapeNet Obj files as a texture atlas.
- Support textured rendering of shapenet models

Reviewed By: gkioxari

Differential Revision: D23141143

fbshipit-source-id: 26eb81758d4cdbd6d820b072b58f5c6c08cb90bc
This commit is contained in:
Nikhila Ravi
2020-08-21 20:41:07 -07:00
committed by Facebook GitHub Bot
parent 90f6a005b0
commit 778383eef7
7 changed files with 134 additions and 48 deletions

View File

@@ -22,6 +22,7 @@ from torch.utils.data import DataLoader
# Set the SHAPENET_PATH to the local path to the dataset
SHAPENET_PATH = None
VERSION = 1
# If DEBUG=True, save out images generated in the tests for debugging.
# All saved images have prefix DEBUG_
DEBUG = False
@@ -55,7 +56,7 @@ class TestShapenetCore(TestCaseMixin, unittest.TestCase):
self.assertTrue("Version number must be either 1 or 2." in str(err.exception))
# Load ShapeNetCore without specifying any particular categories.
shapenet_dataset = ShapeNetCore(SHAPENET_PATH)
shapenet_dataset = ShapeNetCore(SHAPENET_PATH, version=VERSION)
# Count the number of grandchildren directories (which should be equal to
# the total number of objects in the dataset) by walking through the given