Esempio n. 1
0
 def __init__(self, name, mode, metrics_args):
     self.name = name
     self.mode = mode
     self.topk = metrics_args['MODEL']['topk']
     self.calculator = kinetics_metrics.MetricsCalculator(name, mode.lower())
     if self.mode == 'infer':
         self.infer_results = []
Esempio n. 2
0
 def __init__(self, name, mode, metrics_args):
     self.name = name
     self.mode = mode
     self.topk = metrics_args['MODEL']['topk']
     self.calculator = kinetics_metrics.MetricsCalculator(name, mode.lower())
     if self.mode == 'infer':
         self.infer_results = []
         self.kinetics_labels = metrics_args['INFER']['kinetics_labels']
         self.labels_list = json.load(open(self.kinetics_labels))
Esempio n. 3
0
 def __init__(self, name, phase, **metrics_args):
     self.name = name
     self.phase = phase
     self.metrics_args = metrics_args
     if phase == 'test':
         self.calculator = nonlocal_test_metrics.MetricsCalculator(
             name, phase.lower(), **metrics_args)
     else:
         self.calculator = kinetics_metrics.MetricsCalculator(
             name, phase.lower())
Esempio n. 4
0
 def __init__(self, name, mode, metrics_args):
     self.name = name
     self.mode = mode
     if mode == 'test':
         args = {}
         args['num_test_clips'] = metrics_args.TEST.num_test_clips
         args['dataset_size'] = metrics_args.TEST.dataset_size
         args['filename_gt'] = metrics_args.TEST.filename_gt
         args['checkpoint_dir'] = metrics_args.TEST.checkpoint_dir
         args['num_classes'] = metrics_args.MODEL.num_classes
         self.calculator = multicrop_test_metrics.MetricsCalculator(
             name, mode.lower(), **args)
     else:
         self.calculator = kinetics_metrics.MetricsCalculator(
             name, mode.lower())
 def __init__(self, name, mode, metrics_args):
     self.name = name
     self.mode = mode
     if (mode == 'test') or (mode == 'infer'):
         args = {}
         args['num_test_clips'] = metrics_args[
             mode.upper()]['num_test_clips']
         args['dataset_size'] = metrics_args.TEST.dataset_size
         args['filename_gt'] = metrics_args.TEST.filename_gt
         args['checkpoint_dir'] = metrics_args[
             mode.upper()]['checkpoint_dir']
         args['num_classes'] = metrics_args.MODEL.num_classes
         args['labels_list'] = metrics_args.INFER.kinetics_labels
         self.calculator = multicrop_test_metrics.MetricsCalculator(
             name, mode.lower(), **args)
     else:
         self.calculator = kinetics_metrics.MetricsCalculator(
             name, mode.lower())
Esempio n. 6
0
 def __init__(self, name, mode, metrics_args):
     self.name = name
     self.mode = mode
     self.calculator = kinetics_metrics.MetricsCalculator(
         name, mode.lower())
Esempio n. 7
0
 def __init__(self, name, phase, **metrics_args):
     self.name = name
     self.phase = phase
     self.metrics_args = metrics_args
     self.calculator = kinetics_metrics.MetricsCalculator(
         name, phase.lower())