(metric, img, ref)
| 155 | raise ValueError(f"Unknown metric: {metric}.") |
| 156 | |
| 157 | def compute_error(metric, img, ref): |
| 158 | metric_map = compute_error_img(metric, img, ref) |
| 159 | metric_map[np.logical_not(np.isfinite(metric_map))] = 0 |
| 160 | if len(metric_map.shape) == 3: |
| 161 | metric_map = np.mean(metric_map, axis=2) |
| 162 | mean = np.mean(metric_map) |
| 163 | return mean |
nothing calls this directly
no test coverage detected