Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
5092a01
1
Parent(s):
1317804
add
Browse files
app.py
CHANGED
@@ -201,10 +201,8 @@ class BaseTrainer(object):
|
|
201 |
if self.use_trans:
|
202 |
self.trans_mean = np.load(args.mean_trans_path)
|
203 |
self.trans_std = np.load(args.std_trans_path)
|
204 |
-
self.trans_mean = torch.from_numpy(self.trans_mean).cuda()
|
205 |
-
self.trans_std = torch.from_numpy(self.trans_std).cuda()
|
206 |
-
|
207 |
|
|
|
208 |
joints = [3,6,9,12,13,14,15,16,17,18,19,20,21]
|
209 |
upper_body_mask = []
|
210 |
for i in joints:
|
@@ -227,12 +225,6 @@ class BaseTrainer(object):
|
|
227 |
self.std_hands = self.std[hands_body_mask]
|
228 |
self.std_lower = self.std[lower_body_mask]
|
229 |
|
230 |
-
self.mean_upper = torch.from_numpy(self.mean_upper).cuda()
|
231 |
-
self.mean_hands = torch.from_numpy(self.mean_hands).cuda()
|
232 |
-
self.mean_lower = torch.from_numpy(self.mean_lower).cuda()
|
233 |
-
self.std_upper = torch.from_numpy(self.std_upper).cuda()
|
234 |
-
self.std_hands = torch.from_numpy(self.std_hands).cuda()
|
235 |
-
self.std_lower = torch.from_numpy(self.std_lower).cuda()
|
236 |
|
237 |
|
238 |
def inverse_selection(self, filtered_t, selection_array, n):
|
@@ -609,6 +601,15 @@ class BaseTrainer(object):
|
|
609 |
self.model = self.model.cuda()
|
610 |
self.model.eval()
|
611 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
612 |
@spaces.GPU(duration=149)
|
613 |
def _warp(self, batch_data):
|
614 |
self._create_cuda_model()
|
|
|
201 |
if self.use_trans:
|
202 |
self.trans_mean = np.load(args.mean_trans_path)
|
203 |
self.trans_std = np.load(args.std_trans_path)
|
|
|
|
|
|
|
204 |
|
205 |
+
|
206 |
joints = [3,6,9,12,13,14,15,16,17,18,19,20,21]
|
207 |
upper_body_mask = []
|
208 |
for i in joints:
|
|
|
225 |
self.std_hands = self.std[hands_body_mask]
|
226 |
self.std_lower = self.std[lower_body_mask]
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
|
229 |
|
230 |
def inverse_selection(self, filtered_t, selection_array, n):
|
|
|
601 |
self.model = self.model.cuda()
|
602 |
self.model.eval()
|
603 |
|
604 |
+
self.mean_upper = torch.from_numpy(self.mean_upper).cuda()
|
605 |
+
self.mean_hands = torch.from_numpy(self.mean_hands).cuda()
|
606 |
+
self.mean_lower = torch.from_numpy(self.mean_lower).cuda()
|
607 |
+
self.std_upper = torch.from_numpy(self.std_upper).cuda()
|
608 |
+
self.std_hands = torch.from_numpy(self.std_hands).cuda()
|
609 |
+
self.std_lower = torch.from_numpy(self.std_lower).cuda()
|
610 |
+
self.trans_mean = torch.from_numpy(self.trans_mean).cuda()
|
611 |
+
self.trans_std = torch.from_numpy(self.trans_std).cuda()
|
612 |
+
|
613 |
@spaces.GPU(duration=149)
|
614 |
def _warp(self, batch_data):
|
615 |
self._create_cuda_model()
|