def m_ndp_post(self, p_novel: np.ndarray, gt_novel: np.ndarray) -> Dict: """ m_ndp_post function. Args: p_novel: detection predictions for N videos (Dimension: N X 1) gt_novel: ground truth detections for N videos (Dimension: N X 1) Returns: Dictionary containing detection performance post novelty. """ return M_ndp(p_novel, gt_novel, mode="post_novelty")
def m_ndp(self, p_novel: np.ndarray, gt_novel: np.ndarray) -> Dict: """ m_ndp function. Args: p_novel: detection predictions for N videos (Dimension: N X 1) gt_novel: ground truth detections for N videos (Dimension: N X 1) Returns: Dictionary containing novelty detection performance over the test. """ return M_ndp(p_novel, gt_novel, mode="full_test")
def m_ndp_post(self, p_novel: np.ndarray, gt_novel: np.ndarray) -> Dict: """ m_ndp_post function. See :func:`~sail-on-client.evaluate.transcription.DocumentTranscriptionMetrics.m_ndp` with post_novelty. This computes from the first GT novel sample. Args: p_novel: detection predictions (Dimension: [img X novel]) gt_novel: ground truth detections (Dimension: [img X detection]) Returns: Dictionary containing detection performance post novelty. """ return M_ndp(p_novel, gt_novel, mode="post_novelty")
def m_ndp_post(self, p_novel: np.ndarray, gt_novel: np.ndarray) -> Dict: """ Novelty Detection Performance Post Red Light. m_ndp_post function. See :func:`~sail-on-client.evaluation.ImageClassificationMetrics.m_ndp` with post_novelty. This computes from the first GT novel sample Args: p_novel: detection predictions (Dimension: [img X novel]) gt_novel: ground truth detections (Dimension: [img X detection]) Returns: Dictionary containing detection performance post novelty. """ return M_ndp(p_novel, gt_novel, mode="post_novelty")
def m_ndp(self, p_novel: np.ndarray, gt_novel: np.ndarray) -> Dict: """ m_ndp function. Novelty detection performance. The method computes per-sample novelty detection performance over the entire test. Args: p_novel: detection predictions (Dimension: [img X novel]) gt_novel: ground truth detections (Dimension: [img X detection]) Returns: Dictionary containing novelty detection performance over the test. """ return M_ndp(p_novel, gt_novel)
def m_ndp_pre(self, p_novel: np.ndarray, gt_novel: np.ndarray) -> Dict: """ Novelty Detection Performance Pre Red Light. m_ndp_pre function. See :func:`~sail-on-client.evaluation.ImageClassificationMetrics.m_ndp` with post_novelty. This computes to the first GT novel sample. It really isn't useful and is just added for completion. Should always be 0 since no possible TP. Args: p_novel: detection predictions (Dimension: [img X novel]) gt_novel: ground truth detections (Dimension: [img X detection]) Returns: Dictionary containing detection performance pre novelty. """ return M_ndp(p_novel, gt_novel, mode="pre_novelty")
def m_ndp(self, p_novel: np.ndarray, gt_novel: np.ndarray, mode: str = "full_test") -> Dict: """ Novelty Detection Performance: Program Metric. Novelty detection performance. The method computes per-sample novelty detection performance. Args: p_novel: detection predictions (Dimension: [img X novel]) Nx1 vector with each element corresponding to probability of it being novel gt_novel: ground truth detections (Dimension: [img X detection]) Nx1 vector with each element 0 (not novel) or 1 (novel) mode: the mode to compute the test. if 'full_test' computes on all test samples, if 'post_novelty' computes from first GT novel sample. If 'pre_novelty', only calculate before first novel sample. Returns: Dictionary containing novelty detection performance over the test. """ return M_ndp(p_novel, gt_novel, mode="full_test")