@@ -325,16 +325,31 @@ def main(gt_path, pred_path, output_dir, pred_file_name=None, set_name=None):
325
325
fo .write ('%s\n ' % t )
326
326
print ('Scores written to: %s' % score_path )
327
327
328
+ # scale to cm
329
+ thresh_xyz *= 100.0
330
+ thresh_xyz_al *= 100.0
331
+ thresh_mesh *= 100.0
332
+ thresh_mesh_al *= 100.0
333
+
328
334
createHTML (
329
335
output_dir ,
330
336
[
331
- curve (thresh_xyz * 100 , pck_xyz , 'Distance in cm' , 'Percentage of correct keypoints' , 'PCK curve for aligned keypoint error' ),
332
- curve (thresh_xyz_al * 100 , pck_xyz_al , 'Distance in cm' , 'Percentage of correct keypoints' , 'PCK curve for aligned keypoint error' ),
333
- curve (thresh_mesh * 100 , pck_mesh , 'Distance in cm' , 'Percentage of correct vertices' , 'PCV curve for mesh error' ),
334
- curve (thresh_mesh_al * 100 , pck_mesh_al , 'Distance in cm' , 'Percentage of correct vertices' , 'PCV curve for aligned mesh error' )
337
+ curve (thresh_xyz , pck_xyz , 'Distance in cm' , 'Percentage of correct keypoints' , 'PCK curve for keypoint error' ),
338
+ curve (thresh_xyz_al , pck_xyz_al , 'Distance in cm' , 'Percentage of correct keypoints' , 'PCK curve for aligned keypoint error' ),
339
+ curve (thresh_mesh , pck_mesh , 'Distance in cm' , 'Percentage of correct vertices' , 'PCV curve for mesh error' ),
340
+ curve (thresh_mesh_al , pck_mesh_al , 'Distance in cm' , 'Percentage of correct vertices' , 'PCV curve for aligned mesh error' )
335
341
]
336
342
)
337
343
344
+ pck_curve_data = {
345
+ 'xyz' : [thresh_xyz .tolist (), pck_xyz .tolist ()],
346
+ 'xyz_al' : [thresh_xyz_al .tolist (), pck_xyz_al .tolist ()],
347
+ 'mesh' : [thresh_mesh .tolist (), pck_mesh .tolist ()],
348
+ 'mesh_al' : [thresh_mesh_al .tolist (), pck_mesh_al .tolist ()],
349
+ }
350
+ with open ('pck_data.json' , 'w' ) as fo :
351
+ json .dump (pck_curve_data , fo )
352
+
338
353
print ('Evaluation complete.' )
339
354
340
355
0 commit comments