コード例 #1
0
ファイル: searchengine.py プロジェクト: xiaojiew1/KDGAN
 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)
コード例 #2
0
ファイル: searchengine.py プロジェクト: Peratham/jingwei
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)
コード例 #3
0
ファイル: searchengine.py プロジェクト: xiaojiew1/KDGAN
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)
コード例 #4
0
ファイル: searchengine.py プロジェクト: Peratham/jingwei
 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)