Commit
·
b3b8cf5
1
Parent(s):
82982c9
Update default device setting to CPU in FlexiCubesGeometry and FlexiCubes classes for improved compatibility across systems without GPU support.
Browse files- util/flexicubes.py +2 -2
- util/flexicubes_geometry.py +1 -1
util/flexicubes.py
CHANGED
@@ -25,7 +25,7 @@ class FlexiCubes:
|
|
25 |
PyTorch tensors on the specified device.
|
26 |
|
27 |
Attributes:
|
28 |
-
device (str): Specifies the computational device (default is "
|
29 |
dmc_table (torch.Tensor): Dual Marching Cubes (DMC) table that encodes the edges
|
30 |
associated with each dual vertex in 256 Marching Cubes (MC) configurations.
|
31 |
num_vd_table (torch.Tensor): Table holding the number of dual vertices in each of
|
@@ -64,7 +64,7 @@ class FlexiCubes:
|
|
64 |
The scale of weights in FlexiCubes. Should be between 0 and 1.
|
65 |
"""
|
66 |
|
67 |
-
def __init__(self, device="
|
68 |
|
69 |
self.device = device
|
70 |
self.dmc_table = torch.tensor(dmc_table, dtype=torch.long, device=device, requires_grad=False)
|
|
|
25 |
PyTorch tensors on the specified device.
|
26 |
|
27 |
Attributes:
|
28 |
+
device (str): Specifies the computational device (default is "cpu").
|
29 |
dmc_table (torch.Tensor): Dual Marching Cubes (DMC) table that encodes the edges
|
30 |
associated with each dual vertex in 256 Marching Cubes (MC) configurations.
|
31 |
num_vd_table (torch.Tensor): Table holding the number of dual vertices in each of
|
|
|
64 |
The scale of weights in FlexiCubes. Should be between 0 and 1.
|
65 |
"""
|
66 |
|
67 |
+
def __init__(self, device="cpu", qef_reg_scale=1e-3, weight_scale=0.99):
|
68 |
|
69 |
self.device = device
|
70 |
self.dmc_table = torch.tensor(dmc_table, dtype=torch.long, device=device, requires_grad=False)
|
util/flexicubes_geometry.py
CHANGED
@@ -31,7 +31,7 @@ def get_center_boundary_index(grid_res, device):
|
|
31 |
###############################################################################
|
32 |
class FlexiCubesGeometry(object):
|
33 |
def __init__(
|
34 |
-
self, grid_res=64, scale=2.0, device='
|
35 |
render_type='neural_render', args=None):
|
36 |
super(FlexiCubesGeometry, self).__init__()
|
37 |
self.grid_res = grid_res
|
|
|
31 |
###############################################################################
|
32 |
class FlexiCubesGeometry(object):
|
33 |
def __init__(
|
34 |
+
self, grid_res=64, scale=2.0, device='cpu', renderer=None,
|
35 |
render_type='neural_render', args=None):
|
36 |
super(FlexiCubesGeometry, self).__init__()
|
37 |
self.grid_res = grid_res
|