Update src/models/lrm_mesh.py
Browse files- src/models/lrm_mesh.py +5 -2
src/models/lrm_mesh.py
CHANGED
@@ -78,9 +78,12 @@ class PRM(nn.Module):
|
|
78 |
samples_per_ray=rendering_samples_per_ray,
|
79 |
)
|
80 |
|
81 |
-
def init_flexicubes_geometry(self, device, fovy=50.0):
|
82 |
camera = PerspectiveCamera(fovy=fovy, device=device)
|
83 |
-
|
|
|
|
|
|
|
84 |
self.geometry = FlexiCubesGeometry(
|
85 |
grid_res=self.grid_res,
|
86 |
scale=self.grid_scale,
|
|
|
78 |
samples_per_ray=rendering_samples_per_ray,
|
79 |
)
|
80 |
|
81 |
+
def init_flexicubes_geometry(self, device, fovy=50.0, use_renderer=True):
|
82 |
camera = PerspectiveCamera(fovy=fovy, device=device)
|
83 |
+
if use_renderer:
|
84 |
+
renderer = NeuralRender(device, camera_model=camera)
|
85 |
+
else:
|
86 |
+
renderer = None
|
87 |
self.geometry = FlexiCubesGeometry(
|
88 |
grid_res=self.grid_res,
|
89 |
scale=self.grid_scale,
|