コード例 #1
0
ファイル: tester.py プロジェクト: 573671712/DeepLab-Context
def tester(type_=1):
    set_, caffe_, features = test_variables(type_)  
    print 'Testing' + str(type_) + ' net ' + os.environ['EXP'] + '/' + os.environ['NET_ID'] 
    for test_set in set_:
        test_iter = test_txt_maker(test_set)
        model = test_prototext(type_, caffe_, features, test_set)
        test_runner(model, test_set, test_iter,type_)
    matlab_result_runner()
コード例 #2
0
def tester(type_=1):
    set_, caffe_, features = test_variables(type_)
    print 'Testing' + str(
        type_) + ' net ' + os.environ['EXP'] + '/' + os.environ['NET_ID']
    for test_set in set_:
        test_iter = test_txt_maker(test_set)
        model = test_prototext(type_, caffe_, features, test_set)
        test_runner(model, test_set, test_iter, type_)
    matlab_result_runner()
コード例 #3
0
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()
コード例 #4
0
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()
コード例 #5
0
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()
コード例 #6
0
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()