def evaluate_endtoend_identification(training = False, num_folds = 10, fcn_filters = 128, augm = False, augm_type=AugmentationType.RND):
    model_name = generate_model_name(representation_type=RepresentationType.EE, fcn_filters = fcn_filters, augm = augm, augm_type = augm_type)
    
    if training  == True:
        df_idnet = pd.read_csv("input_csv_gait/idnet_raw.csv", header = None)  
        if augm == True:       
            df_idnet = get_augmented_dataset(df_idnet, augm_type)      
        df_idnet = normalize_rows( df_idnet, st.NormalizationType.ZSCORE)
        train_model(df_idnet, model_name, fcn_filters = fcn_filters, representation_learning=True)
    
    
    df1 = pd.read_csv("input_csv_gait/zju_session1_frames_raw.csv", header = None)
    df2 = pd.read_csv("input_csv_gait/zju_session2_frames_raw.csv", header = None)
    
    df1 = normalize_rows( df1, st.NormalizationType.ZSCORE)
    df2 = normalize_rows( df2, st.NormalizationType.ZSCORE)

    features1 = get_model_output_features( df1, model_name)
    features2 = get_model_output_features( df2, model_name)

    print("\nSession 1")
    evaluate_identification_CV(features1, num_folds = num_folds)
    print("\nSession 2")
    evaluate_identification_CV(features2, num_folds = num_folds)
     print("\nCross-Session")
예제 #2
0
def evaluate_endtoend_identification(training=False,
                                     augm=False,
                                     augm_type=AugmentationType.RND):
    if augm == True:
        if augm_type == AugmentationType.RND:
            model_name = "gait_fcn_rnd.h5"
        else:
            model_name = "gait_fcn_cshift.h5"
    else:
        model_name = "gait_fcn.h5"

    if training == True:
        df_idnet = pd.read_csv("input_csv/idnet.csv", header=None)
        if augm == True:
            df_idnet = get_augmented_dataset(df_idnet, augm_type)
        df_idnet = normalize_rows(df_idnet, st.NormalizationType.ZSCORE)
        train_model(df_idnet, model_name)

    df1 = pd.read_csv("input_csv/zju_session1_frames_raw.csv", header=None)
    df2 = pd.read_csv("input_csv/zju_session2_frames_raw.csv", header=None)

    df1 = normalize_rows(df1, st.NormalizationType.ZSCORE)
    df2 = normalize_rows(df2, st.NormalizationType.ZSCORE)

    features1 = get_model_output_features(df1, model_name)
    features2 = get_model_output_features(df2, model_name)

    evaluate_identification_CV(features1, num_folds=10)
    evaluate_identification_CV(features2, num_folds=10)
    evaluate_identification_Train_Test(features1, features2)
예제 #3
0
def evaluate_raw_identification():
    df1 = pd.read_csv("input_csv/zju_session1_frames_raw.csv", header=None)
    df2 = pd.read_csv("input_csv/zju_session2_frames_raw.csv", header=None)

    df1 = normalize_rows(df1, st.NormalizationType.ZSCORE)
    df2 = normalize_rows(df2, st.NormalizationType.ZSCORE)

    evaluate_identification_CV(df1, num_folds=10)
    evaluate_identification_CV(df2, num_folds=10)
    evaluate_identification_Train_Test(df1, df2)
def evaluate_raw_identification(num_folds = 10):
    df1 = pd.read_csv("input_csv_gait/zju_session1_frames_raw.csv", header = None)
    df2 = pd.read_csv("input_csv_gait/zju_session2_frames_raw.csv", header = None)
    
    df1 = normalize_rows( df1, st.NormalizationType.ZSCORE)
    df2 = normalize_rows( df2, st.NormalizationType.ZSCORE)

    print("\nSession 1")
    evaluate_identification_CV(df1, num_folds = num_folds)
    print("\nSession 2")
    evaluate_identification_CV(df2, num_folds = num_folds)
    print("\nCross-Session")
    evaluate_identification_Train_Test(df1, df2)