本文整理匯總了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])