def get_measures(self, val_min, val_max, steps):
    ' Outputs the average mean and median error as well as the pck score. '
    thresholds = np.linspace(val_min, val_max, steps)
    thresholds = np.array(thresholds)
    norm_factor = np.trapz(np.ones_like(thresholds), thresholds)
    epe_mean_all = list()
    epe_median_all = list()
    auc_all = list()
    pck_curve_all = list()
    for part_id in range(self.num_kp):
        (mean, median) = self._get_epe(part_id)
        if (mean is None):
            continue
        epe_mean_all.append(mean)
        epe_median_all.append(median)
        pck_curve = list()
        for t in thresholds:
            pck = self._get_pck(part_id, t)
            pck_curve.append(pck)
        pck_curve = np.array(pck_curve)
        pck_curve_all.append(pck_curve)
        auc = np.trapz(pck_curve, thresholds)
        auc /= norm_factor
        auc_all.append(auc)
    epe_mean_all = np.mean(np.array(epe_mean_all))
    epe_median_all = np.mean(np.array(epe_median_all))
    auc_all = np.mean(np.array(auc_all))
    pck_curve_all = np.mean(np.array(pck_curve_all), 0)
    return (epe_mean_all, epe_median_all, auc_all, pck_curve_all, thresholds)
Outputs the average mean and median error as well as the pck score.
def get_measures(self, val_min, val_max, steps):
    '  '
    thresholds = np.linspace(val_min, val_max, steps)
    thresholds = np.array(thresholds)
    norm_factor = np.trapz(np.ones_like(thresholds), thresholds)
    epe_mean_all = list()
    epe_median_all = list()
    auc_all = list()
    pck_curve_all = list()
    for part_id in range(self.num_kp):
        (mean, median) = self._get_epe(part_id)
        if (mean is None):
            continue
        epe_mean_all.append(mean)
        epe_median_all.append(median)
        pck_curve = list()
        for t in thresholds:
            pck = self._get_pck(part_id, t)
            pck_curve.append(pck)
        pck_curve = np.array(pck_curve)
        pck_curve_all.append(pck_curve)
        auc = np.trapz(pck_curve, thresholds)
        auc /= norm_factor
        auc_all.append(auc)
    epe_mean_all = np.mean(np.array(epe_mean_all))
    epe_median_all = np.mean(np.array(epe_median_all))
    auc_all = np.mean(np.array(auc_all))
    pck_curve_all = np.mean(np.array(pck_curve_all), 0)
    return (epe_mean_all, epe_median_all, auc_all, pck_curve_all, thresholds)