def acc_threshold(depth_pred, depth_gt, mask, threshold):
    """
    computes the percentage of pixels whose depth error is less than @threshold
    """
    errors = abs_error(depth_pred, depth_gt, mask)
    acc_mask = errors < threshold
    return acc_mask.astype('float') if type(depth_pred) is np.ndarray else acc_mask.float()

    computes the percentage of pixels whose depth error is less than @threshold
    
mv-diffusion/One-2-3-45/reconstruction/utils/misc_utils.py