fixed bug
This commit is contained in:
parent
5f42ed7d6f
commit
9a08c137d1
@ -0,0 +1,6 @@
|
|||||||
|
<OpenViBE-SettingsOverride>
|
||||||
|
<SettingValue>-9.854506e-03 4.490459e-02 -2.235728e-02 3.564301e-02 -7.770992e-03 6.771856e-02 -1.015223e-02 1.494322e-03 6.786301e-02 1.430098e-01 5.039326e-02 -4.353548e-01 -5.419809e-01 2.169224e-01 3.499630e-01 -3.175689e-03 1.135831e-01 -2.099687e-01 2.703752e-01 -1.665248e-01 2.137575e-01 1.187045e-01 -1.959052e-01 -5.080815e-02 1.121617e-02 -2.612318e-01 -7.263354e-01 6.296948e-01 -3.519859e-01 -4.575292e-02 5.313071e-01 -2.527051e-02 </SettingValue>
|
||||||
|
<SettingValue>2</SettingValue>
|
||||||
|
<SettingValue>16</SettingValue>
|
||||||
|
<SettingValue></SettingValue>
|
||||||
|
</OpenViBE-SettingsOverride>
|
@ -42,7 +42,7 @@ class Modell(Thread):
|
|||||||
process = Popen(['bash', self.PATH_OV, '--play', path, '--no-gui'],
|
process = Popen(['bash', self.PATH_OV, '--play', path, '--no-gui'],
|
||||||
stdout=PIPE,
|
stdout=PIPE,
|
||||||
universal_newlines=True)
|
universal_newlines=True)
|
||||||
self.openVibeAktiv = True
|
self.openVibeAktiv = True
|
||||||
while True:
|
while True:
|
||||||
output = process.stdout.readline()
|
output = process.stdout.readline()
|
||||||
print(output.strip())
|
print(output.strip())
|
||||||
@ -62,6 +62,7 @@ class Modell(Thread):
|
|||||||
process.terminate()
|
process.terminate()
|
||||||
self.controller.stop()
|
self.controller.stop()
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
self.controller.stop()
|
self.controller.stop()
|
||||||
#self.killProzess()
|
#self.killProzess()
|
||||||
@ -72,6 +73,7 @@ class Modell(Thread):
|
|||||||
self.infoText = self.infoText + 'start training XDawn -- '
|
self.infoText = self.infoText + 'start training XDawn -- '
|
||||||
self.controller.setInfos(self.infoText)
|
self.controller.setInfos(self.infoText)
|
||||||
path = self.PATH_FILES + 'p300-visual-2-train-xDAWN.xml'
|
path = self.PATH_FILES + 'p300-visual-2-train-xDAWN.xml'
|
||||||
|
#path = 'Projekte/test.xml'
|
||||||
process = Popen(['bash', self.PATH_OV, '--play', path, '--no-gui'],
|
process = Popen(['bash', self.PATH_OV, '--play', path, '--no-gui'],
|
||||||
stdout=PIPE,
|
stdout=PIPE,
|
||||||
universal_newlines=True)
|
universal_newlines=True)
|
||||||
@ -110,24 +112,31 @@ class Modell(Thread):
|
|||||||
process = Popen(['bash', self.PATH_OV, '--play', path, '--no-gui'],
|
process = Popen(['bash', self.PATH_OV, '--play', path, '--no-gui'],
|
||||||
stdout=PIPE,
|
stdout=PIPE,
|
||||||
universal_newlines=True)
|
universal_newlines=True)
|
||||||
self.openVibeAktiv = True
|
self.openVibeAktiv = True
|
||||||
|
counter = 0
|
||||||
while True:
|
while True:
|
||||||
output = process.stdout.readline()
|
output = process.stdout.readline()
|
||||||
print(output.strip())
|
print(output.strip())
|
||||||
x = output.find("schlagwort?")
|
x = output.find("aka Classifier trainer")
|
||||||
|
accuracy = output.find("Training set accuracy is")
|
||||||
y = output.find("Error")
|
y = output.find("Error")
|
||||||
if(x != -1):
|
if(x != -1):
|
||||||
print("Training finished")
|
counter = counter +1
|
||||||
self.infoText = self.infoText + 'finished Training\n'
|
#counter = 18
|
||||||
self.controller.setInfos(self.infoText)
|
if(counter >= 17):
|
||||||
process.terminate()
|
print("Training finished")
|
||||||
break
|
self.infoText = self.infoText + 'finished Training\n'
|
||||||
|
self.controller.setInfos(self.infoText)
|
||||||
|
process.terminate()
|
||||||
|
break
|
||||||
elif(y != -1 ):
|
elif(y != -1 ):
|
||||||
print("Error occured")
|
print("Error occured")
|
||||||
self.controller.changeScreen("StartPage")
|
self.controller.changeScreen("StartPage")
|
||||||
self.controller.setInfos(self.infoText + "Fehler beim Classifier Training aufgetaucht\n")
|
self.controller.setInfos(self.infoText + "Fehler beim Classifier Training aufgetaucht\n")
|
||||||
process.terminate()
|
process.terminate()
|
||||||
break
|
break
|
||||||
|
elif(accuracy != -1):
|
||||||
|
print("ACCURACY" + output)
|
||||||
|
|
||||||
self.controller.changeScreen("StartPage")
|
self.controller.changeScreen("StartPage")
|
||||||
self.controller.stop()
|
self.controller.stop()
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user