|
|
@@ -42,7 +42,7 @@ class Modell(Thread): |
|
|
|
process = Popen(['bash', self.PATH_OV, '--play', path, '--no-gui'], |
|
|
|
stdout=PIPE, |
|
|
|
universal_newlines=True) |
|
|
|
self.openVibeAktiv = True |
|
|
|
self.openVibeAktiv = True |
|
|
|
while True: |
|
|
|
output = process.stdout.readline() |
|
|
|
print(output.strip()) |
|
|
@@ -62,6 +62,7 @@ class Modell(Thread): |
|
|
|
process.terminate() |
|
|
|
self.controller.stop() |
|
|
|
break |
|
|
|
|
|
|
|
|
|
|
|
self.controller.stop() |
|
|
|
#self.killProzess() |
|
|
@@ -72,6 +73,7 @@ class Modell(Thread): |
|
|
|
self.infoText = self.infoText + 'start training XDawn -- ' |
|
|
|
self.controller.setInfos(self.infoText) |
|
|
|
path = self.PATH_FILES + 'p300-visual-2-train-xDAWN.xml' |
|
|
|
#path = 'Projekte/test.xml' |
|
|
|
process = Popen(['bash', self.PATH_OV, '--play', path, '--no-gui'], |
|
|
|
stdout=PIPE, |
|
|
|
universal_newlines=True) |
|
|
@@ -110,24 +112,31 @@ class Modell(Thread): |
|
|
|
process = Popen(['bash', self.PATH_OV, '--play', path, '--no-gui'], |
|
|
|
stdout=PIPE, |
|
|
|
universal_newlines=True) |
|
|
|
self.openVibeAktiv = True |
|
|
|
self.openVibeAktiv = True |
|
|
|
counter = 0 |
|
|
|
while True: |
|
|
|
output = process.stdout.readline() |
|
|
|
print(output.strip()) |
|
|
|
x = output.find("schlagwort?") |
|
|
|
x = output.find("aka Classifier trainer") |
|
|
|
accuracy = output.find("Training set accuracy is") |
|
|
|
y = output.find("Error") |
|
|
|
if(x != -1): |
|
|
|
print("Training finished") |
|
|
|
self.infoText = self.infoText + 'finished Training\n' |
|
|
|
self.controller.setInfos(self.infoText) |
|
|
|
process.terminate() |
|
|
|
break |
|
|
|
counter = counter +1 |
|
|
|
#counter = 18 |
|
|
|
if(counter >= 17): |
|
|
|
print("Training finished") |
|
|
|
self.infoText = self.infoText + 'finished Training\n' |
|
|
|
self.controller.setInfos(self.infoText) |
|
|
|
process.terminate() |
|
|
|
break |
|
|
|
elif(y != -1 ): |
|
|
|
print("Error occured") |
|
|
|
self.controller.changeScreen("StartPage") |
|
|
|
self.controller.setInfos(self.infoText + "Fehler beim Classifier Training aufgetaucht\n") |
|
|
|
process.terminate() |
|
|
|
break |
|
|
|
elif(accuracy != -1): |
|
|
|
print("ACCURACY" + output) |
|
|
|
|
|
|
|
self.controller.changeScreen("StartPage") |
|
|
|
self.controller.stop() |