def _createEvaluator(self, annoPath): if self.config['use_salt']: self._salt = str(uuid.uuid4()) else: self._salt = None cachedir = self._cachedir if not osp.isdir(cachedir): os.makedirs(cachedir) return bboxEvaluator(self._datasetName, self.classes, self._compID, "_" + self._salt, cachedir, self._imageSetPath, self._image_index, annoPath, self.load_annotation)
def _createEvaluator(self,compID): if self.config['use_salt']: self._salt = str(uuid.uuid4()) else: self._salt = None cachedir = os.path.join(self._path_root,\ 'annotations_cache',\ self._image_set) if not osp.isdir(cachedir): os.makedirs(cachedir) return bboxEvaluator(self._datasetName,self.classes, compID, "_" + self._salt, cachedir, self._imageSetPath)
def _createEvaluator(self, annoPath): if self.config['use_salt']: self._salt = str(uuid.uuid4()) else: self._salt = None cachedir = self._cachedir if not osp.isdir(cachedir): os.makedirs(cachedir) if cfg.TASK == 'object_detection': return bboxEvaluator(self._datasetName, self.classes, self._compID, self._salt, cachedir, self._imageSetPath, self._image_index, annoPath, self.load_annotation) elif cfg.TASK == 'classification': return classificationEvaluator(self._datasetName, self.classes, self._compID, self._salt, cachedir, self._imageSetPath, self._image_index, annoPath, self.load_annotation) else: print("\n\n\nNo Evaluator Included\n\n\n") return None
path = osp.join(prefix_path, "widths.dat") np.savetxt(path, widths, fmt='%.18e', delimiter=' ') path = osp.join(prefix_path, "heights.dat") np.savetxt(path, heights, fmt='%.18e', delimiter=' ') _compID, _salt, _imageSet, cls = getResultsFileFormatFromFilename( txtFilename) print(_compID, _salt, _imageSet, cls) print(imdb._image_index[:10]) print(imdb.name) print(imdb._cachedir) bbEval = bboxEvaluator(imdb.name, imdb.classes, _compID, _salt, imdb._cachedir, imdb._imageSetPath, imdb._image_index, cfgData['PATH_TO_ANNOTATIONS'], imdb.load_annotation, onlyCls=cls) bbEval._pathResults = '/'.join(txtFilename.split("/")[:-1]) + "/" bbEval._imageSet = _imageSet bbEval._do_python_eval("./output/txtEval/") ''' argparse.ArgumentParser Input: (description='Generate an Imdb Report'), Output: parser get_repo_imdb input: (imdb_name), output: imdb get_training_roidb