本文整理汇总了Python中Classifier.Classifier.dynamicClassify方法的典型用法代码示例。如果您正苦于以下问题:Python Classifier.dynamicClassify方法的具体用法?Python Classifier.dynamicClassify怎么用?Python Classifier.dynamicClassify使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Classifier.Classifier
的用法示例。
在下文中一共展示了Classifier.dynamicClassify方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: confirmPush
# 需要导入模块: from Classifier import Classifier [as 别名]
# 或者: from Classifier.Classifier import dynamicClassify [as 别名]
def confirmPush(self):
angle_list = []
for p in self.selection:
if self.selection[p] == 1:
angle_list.append(p)
homedir = os.getcwd()
# filt = af.Filter(homedir)
# filt.data_process()
self.pbar.setValue(25)
select = RandomSelector(homedir)
select.dataProcess()
self.pbar.setValue(50)
dt = DynamicAnalyzer(homedir,angle_list)
dt.dataProcess()
self.pbar.setValue(75)
c = Classifier(homedir)
count,rate,total,result = c.dynamicClassify()
self.pbar.setValue(100)
reply = QtGui.QMessageBox.question(self, 'Dynamic Analysis Result',"Total number is %d"%(total)+"\nCorrect number is %d"%(count)+"\nCorrect rate is %f"%(100*rate)+"%", QtGui.QMessageBox.Yes)
self.pbar.setValue(0)
示例2: confirmPush
# 需要导入模块: from Classifier import Classifier [as 别名]
# 或者: from Classifier.Classifier import dynamicClassify [as 别名]
def confirmPush(self):
checked = self.staticRecognition.isChecked() or self.dynamicRecognition.isChecked() or self.fusionRecognition.isChecked()
if not checked:
reply = QtGui.QMessageBox.question(self, 'Analysis Result',"Select One", QtGui.QMessageBox.Yes)
return
homdir = os.getcwd()
trainGaitPath = homdir+"\\Dataset\\TrainDataset\\TrainGaitDataset"
if (os.path.exists(trainGaitPath)):
shutil.rmtree(trainGaitPath)
os.mkdir(trainGaitPath)
else:
os.mkdir(trainGaitPath)
filterFilePath = homdir+"\\Dataset\\FilteredGaitDataset"
files = os.listdir(filterFilePath)
for f in files:
fpath = filterFilePath + "\\"+f
dstGaitPath = trainGaitPath+"\\"+f
shutil.copytree(fpath,dstGaitPath)
testGaitPath = homdir+"\\Dataset\\TestDataset\\TestGaitDataset"
if (os.path.exists(testGaitPath)):
shutil.rmtree(testGaitPath)
os.mkdir(testGaitPath)
else:
os.mkdir(testGaitPath)
exePath = "C:\Users\Niko\Documents\BodyBasics-D2D\Debug\BodyBasics-D2D "
homdir = os.getcwd()
outputFilePath = homdir+"\\test.txt"
# outputFile = open(outputFilePath,'w')
# outputFile.close()
# os.system(exePath+outputFilePath)
dstOutputPersonPath = homdir+"\\Dataset\\TestDataset\\TestGaitDataset\\Person001"
os.mkdir(dstOutputPersonPath)
dstOutputPath = dstOutputPersonPath+"\\1.txt"
shutil.copy(outputFilePath,dstOutputPath)
self.pbar.setValue(50)
if self.staticRecognition.isChecked():
self.pbar.setValue(75)
st = StaticAnalyzer(homdir,limbDescriptors)
st.dataProcess()
c = Classifier(homdir)
count,rate,total,result = c.staticClassify()
self.pbar.setValue(100)
name = self.findName(result[0])
reply = QtGui.QMessageBox.question(self, 'Static Analysis Result',"This is "+name, QtGui.QMessageBox.Yes)
elif self.dynamicRecognition.isChecked():
self.pbar.setValue(75)
dy = DynamicAnalyzer(homdir,angleDescriptors)
dy.dataProcess()
c = Classifier(homdir)
count,rate,total = c.dynamicClassify()
self.pbar.setValue(100)
reply = QtGui.QMessageBox.question(self, 'Dynamic Analysis Result',"Total number is %d"%(total)+"\nCorrect number is %d"%(count)+"\nCorrect rate is %f"%(100*rate)+"%", QtGui.QMessageBox.Yes)
else:
self.pbar.setValue(75)
dy = DynamicAnalyzer(homdir,angleDescriptors)
dy.dataProcess()
st = StaticAnalyzer(homdir,limbDescriptors)
st.dataProcess()
c = Classifier(homdir)
count,rate,total = c.fusionClassify()
self.pbar.setValue(100)
reply = QtGui.QMessageBox.question(self, 'Fusion Analysis Result',"Total number is %d"%(total)+"\nCorrect number is %d"%(count)+"\nCorrect rate is %f"%(100*rate)+"%", QtGui.QMessageBox.Yes)