def __init__(self, collection, dataset, detectorMethod, rootpath=ROOT_PATH): SearchEngine.__init__(self, collection, dataset, rootpath) self.reader = AutotagReader(collection, dataset, detectorMethod, rootpath=rootpath) self.name = "%s(%s)" % (self.__class__.__name__, self.reader.name) self.outputdir = os.path.join(self.outputdir, detectorMethod)
class DetectorSearchEngine (SearchEngine): def __init__(self, collection, dataset, detectorMethod, rootpath=ROOT_PATH): SearchEngine.__init__(self, collection, dataset, rootpath) self.reader = AutotagReader(collection, dataset, detectorMethod, rootpath=rootpath) self.name = "%s(%s)" % (self.__class__.__name__, self.reader.name) self.outputdir = os.path.join(self.outputdir, detectorMethod) def computeScore(self, concept, photoid): return self.reader.get(photoid, concept)
class DetectorSearchEngine(SearchEngine): def __init__(self, collection, dataset, detectorMethod, rootpath=ROOT_PATH): SearchEngine.__init__(self, collection, dataset, rootpath) self.reader = AutotagReader(collection, dataset, detectorMethod, rootpath=rootpath) self.name = "%s(%s)" % (self.__class__.__name__, self.reader.name) self.outputdir = os.path.join(self.outputdir, detectorMethod) def computeScore(self, concept, photoid): return self.reader.get(photoid, concept)