def run(self): while not self.kill_received: # get a task try: job = self.work_queue.get_nowait() except Queue.Empty: break start_time = time.time(); dbrec3d_batch.set_stdout('logs/log_' + str(os.getpid())+ ".txt"); dbrec3d_batch.init_process("bofKMeansTrainProcess"); dbrec3d_batch.set_input_string(0, job.bof_path); dbrec3d_batch.set_input_string(1, job.starting_means_path); dbrec3d_batch.set_input_int(2, job.scene_id); dbrec3d_batch.set_input_int(3, job.block_i); dbrec3d_batch.set_input_int(4, job.block_j); dbrec3d_batch.set_input_int(5, job.block_k); dbrec3d_batch.set_input_unsigned(6, job.max_it); dbrec3d_batch.set_input_string(7, job.file_out); dbrec3d_batch.run_process(); dbrec3d_batch.clear(); dbrec3d_batch.reset_stdout(); print ("Runing time for worker:", self.name) print(time.time() - start_time);
def run(self): while not self.kill_received: # get a task try: job = self.work_queue.get_nowait() except Queue.Empty: break start_time = time.time(); dbrec3d_batch.set_stdout('logs/log_' + str(os.getpid())+ ".txt"); dbrec3d_batch.init_process("bof_learn_category_codebook_salient_process"); dbrec3d_batch.set_input_from_db(0,job.categories); dbrec3d_batch.set_input_unsigned(1, job.class_id); dbrec3d_batch.set_input_unsigned(2, job.num_means); dbrec3d_batch.set_input_double(3, job.fraction); dbrec3d_batch.set_input_unsigned(4, job.J); dbrec3d_batch.set_input_unsigned(5, job.max_it); dbrec3d_batch.set_input_float(6, job.top_p); dbrec3d_batch.set_input_string(7, job.class_mean_dir); dbrec3d_batch.run_process(); dbrec3d_batch.clear(); dbrec3d_batch.reset_stdout();
def run(self): while not self.kill_received: # get a task try: job = self.work_queue.get_nowait() except Queue.Empty: break dbrec3d_batch.register_processes(); dbrec3d_batch.register_datatypes(); start_time = time.time(); dbrec3d_batch.set_stdout('logs/log_' + str(os.getpid())+ ".txt"); dbrec3d_batch.init_process("bofKMeansSubsampleProcess"); dbrec3d_batch.set_input_string(0, job.bof_path); dbrec3d_batch.set_input_string(1, job.starting_means_path); dbrec3d_batch.set_input_double(2, job.fraction); dbrec3d_batch.set_input_unsigned(3, job.max_it); dbrec3d_batch.set_input_string(4, job.file_out); dbrec3d_batch.run_process(); dbrec3d_batch.clear(); dbrec3d_batch.reset_stdout(); print ("Runing time for worker:", self.name) print(time.time() - start_time);
def run(self): while not self.kill_received: # get a task try: job = self.work_queue.get_nowait() except Queue.Empty: break start_time = time.time(); dbrec3d_batch.set_stdout('logs/log_' + str(os.getpid())+ ".txt"); dbrec3d_batch.init_process("bof_sample_statistics_process"); dbrec3d_batch.set_input_from_db(0,job.categories); dbrec3d_batch.set_input_from_db(1,job.global_pca); dbrec3d_batch.set_input_unsigned(2, job.scene_id); dbrec3d_batch.set_input_string(3, job.file_out); dbrec3d_batch.run_process(); dbrec3d_batch.clear(); dbrec3d_batch.reset_stdout(); print ("Runing time for worker:", self.name) print(time.time() - start_time);
def run(self): while not self.kill_received: # get a task try: job = self.work_queue.get_nowait() except Queue.Empty: break start_time = time.time(); dbrec3d_batch.set_stdout('logs/log_' + str(os.getpid())+ ".txt"); dbrec3d_batch.init_process("bofKMeansOnVectorProcess"); dbrec3d_batch.set_input_string(0, job.cm_i_file); dbrec3d_batch.set_input_from_db(1, job.CM_set); dbrec3d_batch.set_input_unsigned(2, job.max_it); dbrec3d_batch.set_input_string(3, job.fm_i_file); dbrec3d_batch.run_process(); dbrec3d_batch.clear(); dbrec3d_batch.reset_stdout(); print ("Runing time for worker:", self.name) print(time.time() - start_time);
def run(self): while not self.kill_received: # get a task try: job = self.work_queue.get_nowait() except Queue.Empty: break start_time = time.time(); dbrec3d_batch.set_stdout('logs/log_' + str(os.getpid())+ ".txt"); dbrec3d_batch.init_process("bofLearnCategoriesProcess"); dbrec3d_batch.set_input_from_db(0, job.codebook); dbrec3d_batch.set_input_int(1, job.scene_id); dbrec3d_batch.set_input_string(2, job.bof_dir); dbrec3d_batch.set_input_string(3, job.path_out); dbrec3d_batch.run_process(); dbrec3d_batch.clear(); dbrec3d_batch.reset_stdout();
def run(self): while not self.kill_received: # get a task try: job = self.work_queue.get_nowait() except Queue.Empty: break start_time = time.time() dbrec3d_batch.set_stdout("logs/log_" + str(os.getpid()) + ".txt") dbrec3d_batch.init_process("bof_learn_categories_salient_process") dbrec3d_batch.set_input_from_db(0, job.codebook) dbrec3d_batch.set_input_int(1, job.scene_id) dbrec3d_batch.set_input_float(2, job.top_p) dbrec3d_batch.set_input_from_db(3, job.categories) dbrec3d_batch.set_input_string(4, job.path_out) dbrec3d_batch.run_process() dbrec3d_batch.clear() dbrec3d_batch.reset_stdout()
def run(self): while not self.kill_received: # get a task try: job = self.work_queue.get_nowait() except Queue.Empty: break start_time = time.time(); dbrec3d_batch.set_stdout('logs/log_' + str(os.getpid())+ ".txt"); dbrec3d_batch.init_process("bofClassifyProcess"); dbrec3d_batch.set_input_from_db(0, job.codebook); dbrec3d_batch.set_input_from_db(1, job.p_xc); dbrec3d_batch.set_input_int(2, job.scene_id); dbrec3d_batch.set_input_string(3, job.bof_dir); dbrec3d_batch.set_input_string(4, job.path_out); dbrec3d_batch.run_process(); dbrec3d_batch.clear(); dbrec3d_batch.reset_stdout(); print ("Runing time for worker:", self.name) print(time.time() - start_time);