Commit 537743f7 authored by Gabriel Kirsten's avatar Gabriel Kirsten
Browse files

No more thread to the classifier
parent 48a9859e
......@@ -20,7 +20,6 @@
Author: Alessandro dos Santos Ferreira ( santosferreira.alessandro@gmail.com )
"""
import argparse
import thread
import interface
......@@ -44,7 +43,7 @@ if __name__ == "__main__":
tk = interface.TkInterface("Pynovisao")
# Bind all Pynovisao actions to menu
act = Act(tk, thread, get_args())
act = Act(tk, get_args())
tk.add_menu("File")
tk.add_command("Open a image", act.open_image, 'O')
......
......@@ -34,7 +34,7 @@ from util.x11_colors import X11Colors
class Act(object):
"""Store all actions of Pynovisao."""
def __init__(self, tk, thread, args):
def __init__(self, tk, args):
"""Constructor.
Parameters
......@@ -65,8 +65,6 @@ class Act(object):
self._init_dataset(args["dataset"])
self._init_classes(args["classes"], args["colors"])
self.thread = thread
self._dataset_generator = True
self._ground_truth = False
......@@ -620,7 +618,7 @@ class Act(object):
self.tk.append_log("Training classifier...")
self.thread.start_new_thread(self.classifier.train, (self.dataset, "training"))
self.classifier.train(self.dataset, "training")
self.tk.append_log("DONE (%0.3f seconds)", (TimeUtils.get_time() - start_time))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment