def _do_matlab_eval(self, output_dir = 'output'): pass def evaluate_detections(self, all_boxes, output_dir): self._write_voc_results_file(all_boxes) self._do_python_eval(output_dir) if self.config['matlab_eval']: self._do_matlab_eval(output_dir) # if self.config['cleanup']: # for cls in self._classes: # if cls == '__background__': # continue # filename = self._get_voc_results_file_template().format(cls) # os.remove(filename) # def competition_mode(self, on): # if on: # self.config['use_salt'] = False # self.config['cleanup'] = False # else: # self.config['use_salt'] = True # self.config['cleanup'] = True if __name__ == '__main__': from datasets.caltech_ped import caltech_ped d = caltech_ped('train04', '2009') res = d.roidb from IPython import embed; embed()
__sets[name] = (lambda split=split, year=year: coco(split, year)) # Set up coco_2015_<split> for year in ['2015']: for split in ['test', 'test-dev']: name = 'coco_{}_{}'.format(year, split) __sets[name] = (lambda split=split, year=year: coco(split, year)) # Set up kaist_ped_2015_<split> for year in ['2015']: for split in ['train20', 'train02', 'test20', 'test01']: # test01: to generate result videos name = 'kaist_ped_{}_{}'.format(year, split) __sets[name] = (lambda split=split, year=year: kaist_ped(split, year)) # Set up caltech_ped_2009_<split> for year in ['2009']: for split in ['train30', 'train04', 'test30', 'test01']: # test01: to generate result videos name = 'caltech_ped_{}_{}'.format(year, split) __sets[name] = (lambda split=split, year=year: caltech_ped(split, year)) def get_imdb(name): """Get an imdb (image database) by name.""" if not __sets.has_key(name): raise KeyError('Unknown dataset: {}'.format(name)) return __sets[name]() def list_imdbs(): """List all registered imdbs.""" return __sets.keys()