MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / print_eval_result

Method print_eval_result

datasets/humandata.py:1179–1236  ·  view source on GitHub ↗
(self, eval_result)

Source from the content-addressed store, hash-verified

1177 return eval_result
1178
1179 def print_eval_result(self, eval_result):
1180 print(f'======{cfg.testset}======')
1181 print('PA MPVPE (All): %.2f mm' % np.mean(eval_result['pa_mpvpe_all']))
1182 print('PA MPVPE (L-Hands): %.2f mm' %
1183 np.mean(eval_result['pa_mpvpe_l_hand']))
1184 print('PA MPVPE (R-Hands): %.2f mm' %
1185 np.mean(eval_result['pa_mpvpe_r_hand']))
1186 print('PA MPVPE (Hands): %.2f mm' %
1187 np.mean(eval_result['pa_mpvpe_hand']))
1188 print('PA MPVPE (Face): %.2f mm' %
1189 np.mean(eval_result['pa_mpvpe_face']))
1190 print()
1191
1192 print('MPVPE (All): %.2f mm' % np.mean(eval_result['mpvpe_all']))
1193 print('MPVPE (L-Hands): %.2f mm' %
1194 np.mean(eval_result['mpvpe_l_hand']))
1195 print('MPVPE (R-Hands): %.2f mm' %
1196 np.mean(eval_result['mpvpe_r_hand']))
1197 print('MPVPE (Hands): %.2f mm' % np.mean(eval_result['mpvpe_hand']))
1198 print('MPVPE (Face): %.2f mm' % np.mean(eval_result['mpvpe_face']))
1199 print()
1200
1201 print('PA MPJPE (Body): %.2f mm' %
1202 np.mean(eval_result['pa_mpjpe_body']))
1203 print('PA MPJPE (L-Hands): %.2f mm' %
1204 np.mean(eval_result['pa_mpjpe_l_hand']))
1205 print('PA MPJPE (R-Hands): %.2f mm' %
1206 np.mean(eval_result['pa_mpjpe_r_hand']))
1207 print('PA MPJPE (Hands): %.2f mm' %
1208 np.mean(eval_result['pa_mpjpe_hand']))
1209
1210 f = open(os.path.join(cfg.result_dir, 'result.txt'), 'w')
1211 f.write(f'{cfg.testset} dataset \n')
1212 f.write('PA MPVPE (All): %.2f mm\n' %
1213 np.mean(eval_result['pa_mpvpe_all']))
1214 f.write('PA MPVPE (L-Hands): %.2f mm' %
1215 np.mean(eval_result['pa_mpvpe_l_hand']))
1216 f.write('PA MPVPE (R-Hands): %.2f mm' %
1217 np.mean(eval_result['pa_mpvpe_r_hand']))
1218 f.write('PA MPVPE (Hands): %.2f mm\n' %
1219 np.mean(eval_result['pa_mpvpe_hand']))
1220 f.write('PA MPVPE (Face): %.2f mm\n' %
1221 np.mean(eval_result['pa_mpvpe_face']))
1222 f.write('MPVPE (All): %.2f mm\n' % np.mean(eval_result['mpvpe_all']))
1223 f.write('MPVPE (L-Hands): %.2f mm' %
1224 np.mean(eval_result['mpvpe_l_hand']))
1225 f.write('MPVPE (R-Hands): %.2f mm' %
1226 np.mean(eval_result['mpvpe_r_hand']))
1227 f.write('MPVPE (Hands): %.2f mm' % np.mean(eval_result['mpvpe_hand']))
1228 f.write('MPVPE (Face): %.2f mm\n' % np.mean(eval_result['mpvpe_face']))
1229 f.write('PA MPJPE (Body): %.2f mm\n' %
1230 np.mean(eval_result['pa_mpjpe_body']))
1231 f.write('PA MPJPE (L-Hands): %.2f mm' %
1232 np.mean(eval_result['pa_mpjpe_l_hand']))
1233 f.write('PA MPJPE (R-Hands): %.2f mm' %
1234 np.mean(eval_result['pa_mpjpe_r_hand']))
1235 f.write('PA MPJPE (Hands): %.2f mm\n' %
1236 np.mean(eval_result['pa_mpjpe_hand']))

Callers

nothing calls this directly

Calls 2

writeMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected