Spaces:
Running
on
Zero
Running
on
Zero
Update src/pixel3dmm/tracking/tracker.py
Browse files
src/pixel3dmm/tracking/tracker.py
CHANGED
@@ -128,12 +128,17 @@ if COMPILE:
|
|
128 |
|
129 |
|
130 |
class Tracker(object):
|
131 |
-
def __init__(self, config, flame_module,
|
132 |
device='cuda:0',
|
133 |
):
|
134 |
self.config = config
|
135 |
self.flame = flame_module
|
136 |
-
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
self.config = config
|
139 |
self.device = device
|
@@ -253,9 +258,8 @@ class Tracker(object):
|
|
253 |
self.opt_post = torch.compile(self.opt_post)
|
254 |
self.actual_smooth = torch.compile(self.actual_smooth)
|
255 |
|
256 |
-
|
257 |
self.renderer = self.diff_renderer # already global
|
258 |
-
|
259 |
|
260 |
self.faces = load_obj(mesh_file)[1]
|
261 |
|
|
|
128 |
|
129 |
|
130 |
class Tracker(object):
|
131 |
+
def __init__(self, config, flame_module,
|
132 |
device='cuda:0',
|
133 |
):
|
134 |
self.config = config
|
135 |
self.flame = flame_module
|
136 |
+
|
137 |
+
self.diff_renderer = NVDRenderer(self.config.size,
|
138 |
+
obj_filename=mesh_file,
|
139 |
+
no_sh=self.no_sh,
|
140 |
+
white_bg= True,
|
141 |
+
).to(self.device)
|
142 |
|
143 |
self.config = config
|
144 |
self.device = device
|
|
|
258 |
self.opt_post = torch.compile(self.opt_post)
|
259 |
self.actual_smooth = torch.compile(self.actual_smooth)
|
260 |
|
|
|
261 |
self.renderer = self.diff_renderer # already global
|
262 |
+
|
263 |
|
264 |
self.faces = load_obj(mesh_file)[1]
|
265 |
|