radames commited on
Commit
9ed0107
1 Parent(s): eda0416

Update PIFu/apps/eval_spaces.py

Browse files
Files changed (1) hide show
  1. PIFu/apps/eval_spaces.py +10 -1
PIFu/apps/eval_spaces.py CHANGED
@@ -22,6 +22,8 @@ import glob
22
  import tqdm
23
 
24
  import trimesh
 
 
25
  # get options
26
  opt = BaseOptions().parse()
27
 
@@ -118,8 +120,15 @@ if __name__ == '__main__':
118
  print("test_mask: ", test_mask_path)
119
 
120
  try:
 
 
121
  data = evaluator.load_image(test_image_path, test_mask_path)
122
  evaluator.eval(data, True)
 
 
 
 
 
123
  mesh = trimesh.load(f'{results_path}/{name}/result_{test_img_name}.obj')
124
  mesh.apply_transform([[1, 0, 0, 0],
125
  [0, 1, 0, 0],
@@ -127,4 +136,4 @@ if __name__ == '__main__':
127
  [0, 0, 0, 1]])
128
  mesh.export(file_obj=f'{results_path}/{name}/result_{test_img_name}.glb')
129
  except Exception as e:
130
- print("error:", e.args)
 
22
  import tqdm
23
 
24
  import trimesh
25
+ from datetime import datetime
26
+
27
  # get options
28
  opt = BaseOptions().parse()
29
 
 
120
  print("test_mask: ", test_mask_path)
121
 
122
  try:
123
+ time = datetime.now()
124
+ print("evaluating" , time)
125
  data = evaluator.load_image(test_image_path, test_mask_path)
126
  evaluator.eval(data, True)
127
+ print("done evaluating" , datetime.now() - time)
128
+ except Exception as e:
129
+ print("error:", e.args)
130
+
131
+ try:
132
  mesh = trimesh.load(f'{results_path}/{name}/result_{test_img_name}.obj')
133
  mesh.apply_transform([[1, 0, 0, 0],
134
  [0, 1, 0, 0],
 
136
  [0, 0, 0, 1]])
137
  mesh.export(file_obj=f'{results_path}/{name}/result_{test_img_name}.glb')
138
  except Exception as e:
139
+ print("error generating MESH", e)