MCPcopy
hub / github.com/shunsukesaito/PIFu / eval

Method eval

apps/eval.py:90–105  ·  view source on GitHub ↗

Evaluate a data point :param data: a dict containing at least ['name'], ['image'], ['calib'], ['b_min'] and ['b_max'] tensors. :return:

(self, data, use_octree=False)

Source from the content-addressed store, hash-verified

88 }
89
90 def eval(self, data, use_octree=False):
91 '''
92 Evaluate a data point
93 :param data: a dict containing at least ['name'], ['image'], ['calib'], ['b_min'] and ['b_max'] tensors.
94 :return:
95 '''
96 opt = self.opt
97 with torch.no_grad():
98 self.netG.eval()
99 if self.netC:
100 self.netC.eval()
101 save_path = '%s/%s/result_%s.obj' % (opt.results_path, opt.name, data['name'])
102 if self.netC:
103 gen_mesh_color(opt, self.netG, self.netC, self.cuda, data, save_path, use_octree=use_octree)
104 else:
105 gen_mesh(opt, self.netG, self.cuda, data, save_path, use_octree=use_octree)
106
107
108if __name__ == '__main__':

Callers 4

eval.pyFile · 0.80
set_trainFunction · 0.80
set_evalFunction · 0.80
set_evalFunction · 0.80

Calls 2

gen_mesh_colorFunction · 0.50
gen_meshFunction · 0.50

Tested by

no test coverage detected