本文整理汇总了Python中Detector.Detector.activeLearningTest方法的典型用法代码示例。如果您正苦于以下问题:Python Detector.activeLearningTest方法的具体用法?Python Detector.activeLearningTest怎么用?Python Detector.activeLearningTest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Detector.Detector
的用法示例。
在下文中一共展示了Detector.activeLearningTest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Smit
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import activeLearningTest [as 别名]
from Detector import Detector
__author__ = 'Rik Smit ([email protected])'
projectDirectory = '/home/rik-target/owncloud-rixmit/Studie/Droneproject/dataset/cows/'
datasetIds = [
'DJI_0005_cut_233-244',
'DJI_0007_cut_22-65',
'DJI_0081'
]
detector = Detector(projectDirectory, datasetIds)
detector.featureType = 'HSV-HIST'
detector.classifierType = 'SVM-RBF'
runs = 20
for active in [True, False]:
print("Testing (active=%s)" % active)
results = None
for run in range(runs):
result = detector.activeLearningTest(active, datasetIdx=1) # use dataset DJI_0007_cut_22-65 as it is big enough
if not results:
results = result
else:
results = [x + y for x, y in zip(results, result)]
pprint([x / runs for x in results])