def modelTest(select_date, test_set_type, gpu_id, test_batch_num = -1): #init class test = face_verification_test.ModelTest(select_date, test_set_type, gpu_id, test_batch_num) current_date = test.current_date select = select_best_result.ModelSelect(current_date, test_set_type) for root_path, folder_path, filename_path in os.walk(ConfigPath.model_root_path): for elem in folder_path: model_path = '{}/{}'.format(root_path, elem) test.runTest(model_path) #after finished all model test then select model select.findBestModel()
def modelTestSingle(select_date, test_set_type, gpu_id, folder_path, test_batch_num=-1): test = face_verification_test.ModelTest(select_date, test_set_type, gpu_id, test_batch_num) current_date = test.current_date select = select_best_result.ModelSelect(current_date, test_set_type) model_path = '{}/FakeFaceMtcnn/{}'.format(ConfigPath.model_root_path, folder_path) test.runTest(model_path) select.findBestModel()
def selectThreshold(test_set_type, threshold): current_date = time.strftime('%Y-%m-%d', time.localtime()) select = select_best_result.ModelSelect(current_date, test_set_type) select.selectVerificationModel(threshold)
def modelTestSelect(test_set_type, model_num): current_date = time.strftime('%Y-%m-%d', time.localtime()) select = select_best_result.ModelSelect(current_date, test_set_type) select.findBestModel(model_num)
def selectThresholdDate(select_date, test_set_type, threshold): select = select_best_result.ModelSelect(select_date, test_set_type) select.selectVerificationModel(threshold)