def processFolder(datasetPath): stats = Stats(datasetPath) props = SaliencyProps() sal = sal_instance(SaliencyMethods.REGION_CONTRAST,props); for category in getDirectories(datasetPath): stats.addCategories(category) categoryPath = os.path.join(datasetPath,category) for image in getDirectories(categoryPath): stats.update(category,image,compareWithGroundtruth(sal,categoryPath,image)); stats.writeCategoryResult(category) stats.writeOverallResults()
def processFolder(datasetPath): stats = Stats(datasetPath) props = SaliencyProps() sal = sal_instance(SaliencyMethods.REGION_CONTRAST, props) for category in getDirectories(datasetPath): stats.addCategories(category) categoryPath = os.path.join(datasetPath, category) for image in getDirectories(categoryPath): stats.update(category, image, compareWithGroundtruth(sal, categoryPath, image)) stats.writeCategoryResult(category) stats.writeOverallResults()
def processFolder(datasetPath,sal,bg,smoothner,num_prev_frames,num_blocks): stats = Stats(datasetPath) for category in getDirectories(datasetPath): stats.addCategories(category) categoryPath = os.path.join(datasetPath, category) for video in getDirectories(categoryPath): videoPath = os.path.join(categoryPath, video) confusionMatrix = compareWithGroundtruth(videoPath,sal,bg,smoothner, num_prev_frames,num_blocks) stats.update(category, video, confusionMatrix) stats.writeCategoryResult(category) stats.writeOverallResults()