pyanomaly/datatools/evaluate/eval_function.py
def compute(self, result_file_dict):
        """Compute the metrics.
        Load the results stored in the file, compute the results and return the optimal result.
        Args:
            result_file_dict: The dictionary to store the results' files
            For example:
            {'train':{'description1':sigma0_result_file, 'description2':sigma1_result_file, .....}, 
            'val':{'description1':sigma0_result_file, 'description2':sigma1_result_file}
            }
        """
        for part in self.parts:
            #=====================Need to change, temporal=========================
            if part == 'train':
                continue      # because the train not have the label
            #=======================================================================
            gt = self.gt_dict[part]
            result_file = result_file_dict[part]
            # import ipdb; ipdb.set_trace()
            for key, item in result_file.items():
                self._result_name = item
                # score_records, num_videos = self.load_results(result_file)
                score_records, num_videos = self.load_results(item)
                logger.info(f'Compute Metric of {item}')
                assert num_videos == len(gt), f'the number of saved videos does not match the ground truth, {num_videos} != {len(gt)}'
                temp_result = self.eval_method(score_records, gt, str(key))
                if temp_result > self.optimal_resulst:
                    self.optimal_resulst = temp_result
        
        return self.optimal_resulst
Compute the metrics.
        Load the results stored in the file, compute the results and return the optimal result.
        Args:
            result_file_dict: The dictionary to store the results' files
            For example:
            {'train':{'description1':sigma0_result_file, 'description2':sigma1_result_file, .....}, 
            'val':{'description1':sigma0_result_file, 'description2':sigma1_result_file}
            }
        
Compute the metrics.
Load the results stored in the file, compute the results and return the optimal result.
Compute the metrics . Load the results stored in the file compute the results and return the optimal result .
def compute(self, result_file_dict):
        for part in self.parts:
            if part == 'train':
                continue      
            gt = self.gt_dict[part]
            result_file = result_file_dict[part]
            for key, item in result_file.items():
                self._result_name = item
                score_records, num_videos = self.load_results(item)
                logger.info(f'Compute Metric of {item}')
                assert num_videos == len(gt), f'the number of saved videos does not match the ground truth, {num_videos} != {len(gt)}'
                temp_result = self.eval_method(score_records, gt, str(key))
                if temp_result > self.optimal_resulst:
                    self.optimal_resulst = temp_result
        return self.optimal_resulst
def compute ( self , result_file_dict ) : for part in self . parts : if part == 'train' : continue gt = self . gt_dict [ part ] result_file = result_file_dict [ part ] for key , item in result_file . items ( ) : self . _result_name = item score_records , num_videos = self . load_results ( item ) logger . info ( f'Compute Metric of {item}' ) assert num_videos == len ( gt ) , f'the number of saved videos does not match the ground truth, {num_videos} != {len(gt)}' temp_result = self . eval_method ( score_records , gt , str ( key ) ) if temp_result > self . optimal_resulst : self . optimal_resulst = temp_result return self . optimal_resulst
Compute the metrics.
Compute the metrics .
"""Compute the metrics.
        Load the results stored in the file, compute the results and return the optimal result.
        Args:
            result_file_dict: The dictionary to store the results' files
            For example:
            {'train':{'description1':sigma0_result_file, 'description2':sigma1_result_file, .....}, 
            'val':{'description1':sigma0_result_file, 'description2':sigma1_result_file}
            }
        """ #=====================Need to change, temporal=========================
 # because the train not have the label
 #=======================================================================
 # import ipdb; ipdb.set_trace()
 # score_records, num_videos = self.load_results(result_file)

self
result_file_dict