def test_runner(model, test_set, test_iter, type_): matlab_path_editor(type_) cmd = os.environ['CAFFE_DIR'] + os.environ['CAFFE_BIN'] + ' test --model=' + os.environ['CONFIG_DIR'] + '/test_' + test_set + '.prototxt' \ ' --weights=' + model + ' --gpu=' + '0' + ' --iterations=' + '1308' #+ str(test_iter) #1os.environ['DEV_ID'] print('Running ' + cmd) subprocess.call(cmd, shell=True)
def grid_search(LOAD_MAT_FILE=1, train2=0): # the features folder save the features computed via the model trained with the train set # the features2 folder save the features computed via the model trained with the trainval set if train2==1: FEATURE_NAME='features2' #features, features2 TEST_SET = 'test' else: FEATURE_NAME='features' #features, features2 TEST_SET = 'val' IMG_DIR, CRF_BIN, FEATURE_DIR, SAVE_DIR = grid_setting(FEATURE_NAME, TEST_SET, LOAD_MAT_FILE) grid_runner(IMG_DIR, CRF_BIN, FEATURE_DIR, SAVE_DIR) os.environ['POSTPROCESS'] = str(1) matlab_path_editor(type_) matlab_runner() matlab_result_runner()
def crf_runner(LOAD_MAT_FILE=1, train2=0): # the features folder save the features computed via the model trained with the train set # the features2 folder save the features computed via the model trained with the trainval set if train2 == 1: FEATURE_NAME = 'features2' #features, features2 TEST_SET = 'test' type_ = 2 else: FEATURE_NAME = 'features' #features, features2 TEST_SET = 'val' type_ = 1 SAVE_DIR, cmd = dense_setting(FEATURE_NAME, TEST_SET) dense_runner(LOAD_MAT_FILE, FEATURE_NAME, TEST_SET, SAVE_DIR, cmd) os.environ['POSTPROCESS'] = str(1) matlab_path_editor(type_) matlab_runner() matlab_result_runner()
def crf_runner(LOAD_MAT_FILE=1, train2=0): # the features folder save the features computed via the model trained with the train set # the features2 folder save the features computed via the model trained with the trainval set if train2==1: FEATURE_NAME='features2' #features, features2 TEST_SET = 'test' type_ = 2 else: FEATURE_NAME='features' #features, features2 TEST_SET = 'val' type_ = 1 SAVE_DIR, cmd = dense_setting(FEATURE_NAME, TEST_SET) dense_runner(LOAD_MAT_FILE, FEATURE_NAME, TEST_SET, SAVE_DIR,cmd) os.environ['POSTPROCESS'] = str(1) matlab_path_editor(type_) matlab_runner() matlab_result_runner()
def test_runner(model, test_set, test_iter, type_): matlab_path_editor(type_) cmd = os.environ['CAFFE_DIR'] + os.environ['CAFFE_BIN'] + ' test --model=' + os.environ['CONFIG_DIR'] + '/test_' + test_set + '.prototxt' \ ' --weights=' + model + ' --gpu=' + os.environ['DEV_ID'] + ' --iterations=' + str(test_iter) print 'Running ' + cmd subprocess.call(cmd, shell=True)