MCPcopy Create free account
hub / github.com/baegwangbin/surface_normal_uncertainty / compute_normal_errors

Function compute_normal_errors

utils/utils.py:63–74  ·  view source on GitHub ↗
(total_normal_errors)

Source from the content-addressed store, hash-verified

61
62# compute normal errors
63def compute_normal_errors(total_normal_errors):
64 metrics = {
65 'mean': np.average(total_normal_errors),
66 'median': np.median(total_normal_errors),
67 'rmse': np.sqrt(np.sum(total_normal_errors * total_normal_errors) / total_normal_errors.shape),
68 'a1': 100.0 * (np.sum(total_normal_errors < 5) / total_normal_errors.shape[0]),
69 'a2': 100.0 * (np.sum(total_normal_errors < 7.5) / total_normal_errors.shape[0]),
70 'a3': 100.0 * (np.sum(total_normal_errors < 11.25) / total_normal_errors.shape[0]),
71 'a4': 100.0 * (np.sum(total_normal_errors < 22.5) / total_normal_errors.shape[0]),
72 'a5': 100.0 * (np.sum(total_normal_errors < 30) / total_normal_errors.shape[0])
73 }
74 return metrics
75
76
77# log normal errors

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected