def get_sampled_precision_recall(self, precision, recall):
        """Given an array of precision, recall values, sample evenly along the recall range, and interpolate the precision
        based on AP from section 6 from https://research.mapillary.com/img/publications/MonoDIS.pdf

        Parameters
        ----------
        precision: np.ndarray
            Numpy array of precision curves at different recalls, of shape
            [num_classes, num_difficulties, num_overlap_thresholds, self.sample_points]

        recall: np.ndarray
            Numpy array of recall values corresponding to each precision, of shape
            [num_classes, num_difficulties, num_overlap_thresholds, self.sample_points]

        Returns
            sampled_precision: list of np.ndarrays, of shape (num_classes, num_difficulties, num_overlap_thresholds)
                The maximum precision values corresponding to the sampled recall.
            sampled_recall: list
                Recall values evenly spaced along the recall range.
        """
        # recall_range = self.recall_range
        recall_range = (0.0, 1.0)
        precisions = []
        # Don't count recall at 0
        recall_spacing = [1. / (self.sample_points - 1) * i for i in range(1, self.sample_points)]
        recall_spacing = list(filter(lambda recall: recall_range[0] <= recall <= recall_range[1], recall_spacing))
        for r in recall_spacing:
            precisions_above_recall = (recall >= r) * precision
            precisions.append(precisions_above_recall.max(axis=3))

        return precisions, recall_spacing
Given an array of precision, recall values, sample evenly along the recall range, and interpolate the precision
        based on AP from section 6 from https://research.mapillary.com/img/publications/MonoDIS.pdf

        Parameters
        ----------
        precision: np.ndarray
            Numpy array of precision curves at different recalls, of shape
            [num_classes, num_difficulties, num_overlap_thresholds, self.sample_points]

        recall: np.ndarray
            Numpy array of recall values corresponding to each precision, of shape
            [num_classes, num_difficulties, num_overlap_thresholds, self.sample_points]

        Returns
            sampled_precision: list of np.ndarrays, of shape (num_classes, num_difficulties, num_overlap_thresholds)
                The maximum precision values corresponding to the sampled recall.
            sampled_recall: list
                Recall values evenly spaced along the recall range.
        
tridet/evaluators/kitti_3d_evaluator.py