예제 #1
0
def get_discrete4D_data(gesture_list, preprocess, augment):

    if (preprocess == True):
        gesture_list = dataPreprocessor.input_data_cleanup(gesture_list)
        gesture_list = dataPreprocessor.repair_gesture_data(gesture_list)

    if (augment == True):
        gesture_list = dataCreatorRaw.get_augmented_input_data3D(gesture_list)
        print("augumented input data " + repr(len(gesture_list)))

    gesture_list = create4DTestdata.create_slowed_gestures(gesture_list)
    print("slowed down gestures... its " + repr(len(gesture_list)) + " now")

    discrete_gestures = dataDiscretizer.discretize_4D(gesture_list)

    if (augment == True):
        discrete_gestures = dataCreatorDiscrete.transpose(discrete_gestures)
        discrete_gestures = dataCreatorDiscrete.flip(discrete_gestures, 0)
        discrete_gestures = dataCreatorDiscrete.flip(discrete_gestures, 1)
        discrete_gestures = dataCreatorDiscrete.flip(discrete_gestures, 2)
        discrete_gestures = dataCreatorDiscrete.shift_discrete_gesture(
            discrete_gestures)
        discrete_gestures = dataCreatorDiscrete.shift_discrete_gesture_down(
            discrete_gestures)
        discrete_gestures = dataCreatorDiscrete.shift_discrete_gesture_back(
            discrete_gestures)

    print(" ")
    return compress_3D(discrete_gestures)
예제 #2
0
def get_max_jittered_data(gesture_list):

    gesture_list = dataPreprocessor.input_data_cleanup(gesture_list)
    gesture_list = dataPreprocessor.repair_gesture_data(gesture_list)
    gesture_list = dataCreatorRaw.get_max_jittered_data2D(gesture_list)

    discrete_gestures = dataDiscretizer.discretize_2D(gesture_list)
    print(" ")
    return discrete_gestures
예제 #3
0
def get_discrete2D_data(gesture_list, preprocess, augment):
    
    if(preprocess == True):
        gesture_list = dataPreprocessor.input_data_cleanup(gesture_list) 
        gesture_list = dataPreprocessor.repair_gesture_data(gesture_list)
    
    if(augment == True):
        gesture_list = dataCreatorRaw.get_augmented_input_data2D(gesture_list)
        print("augumented input data "  + repr(len(gesture_list)))
    

    discrete_gestures = dataDiscretizer.discretize_2D(gesture_list)
            
    if(augment == True):
        discrete_gestures = dataCreatorDiscrete.transpose(discrete_gestures)
        discrete_gestures = dataCreatorDiscrete.flip(discrete_gestures,0)
        discrete_gestures = dataCreatorDiscrete.flip(discrete_gestures,1)
        discrete_gestures = dataCreatorDiscrete.shift_discrete_gesture(discrete_gestures)
        discrete_gestures = dataCreatorDiscrete.shift_discrete_gesture_down(discrete_gestures)
    
    print(" ")
    return discrete_gestures