當前位置: 首頁>>代碼示例>>Python>>正文


Python Classifier.dynamicClassify方法代碼示例

本文整理匯總了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)
開發者ID:NikoXM,項目名稱:KinectGaitRecognition,代碼行數:22,代碼來源:dynamicWindow.py

示例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)
開發者ID:NikoXM,項目名稱:KinectGaitRecognition,代碼行數:70,代碼來源:recognitionWindow.py


注:本文中的Classifier.Classifier.dynamicClassify方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。