def confirmPush(self):
     limbList = []
     for p in self.selection:
         if self.selection[p] == 1:
             limbList.append(p)
     self.pbar.setValue(0)
     homedir = os.getcwd()
     filt = Filter(homedir)
     filt.dataProcess()
     self.pbar.setValue(25)
     select = RandomSelector(homedir)
     select.dataProcess()
     self.pbar.setValue(50)
     st = StaticAnalyzer(homedir,limbList)
     st.dataProcess()
     self.pbar.setValue(75)
     c = Classifier(homedir)
     count,rate,total,result = c.staticClassify()
     self.pbar.setValue(100)
     reply = QtGui.QMessageBox.question(self, 'Static Analysis Result',"Total number is %d"%(total)+"\nCorrect number is %d"%(count)+"\nCorrect rate is %f"%(100*rate)+"%", QtGui.QMessageBox.Yes)
Exemple #2
0
import sys

limbDescriptors  = ['neck','rshoulder','lshoulder','rarm','larm','rfarm','lfarm',
					'rhand','lhand','uspine','lspine','rhip','lhip','rthigh','lthigh',
					'rcalf','lcalf','rfoot','lfoot','height']

if __name__ == "__main__":
	homedir = sys.path[0]
	import platform
	p = platform.platform().split('-')[0]
	if p == "Windows":
		seperator = "\\"
	elif p == "Darwin":
		seperator = "/"
	i = homedir.rfind(seperator)
	homedir = homedir[0:i]

	print homedir

	filt = Filter(homedir)
	filt.dataProcess()
	select = RandomSelector(homedir)
	select.dataProcess()

	lists = ['srkrar','srklal']
	dy = DynamicAnalyzer(homedir,lists)
	dy.dataProcess()
	st = StaticAnalyzer(homedir,limbDescriptors)
	st.dataProcess()
	c = Classifier(homedir)
	c.dataProcess()