The ONLINE dataset contains 40 trials for each subject. In this example, for each subject, 20 trials are for training whereas the other trials are for testing. """ import sys sys.path.append('../process_facial_expression') import face_tool if __name__ == '__main__': root_path = '../../dataset/ONLINE/' for subject_id in range(1, 10): subject_path = root_path + str(subject_id) + '/' face_model = face_tool.Face_model() #use 20 trial as train set for train_trial_id in range(1, 21): #load train data path = subject_path + 'trial_' + str(train_trial_id) + '/' face_model.add_one_trial_data(path) face_model.train() #calculate accuracy acc_valence, acc_arousal = 0, 0 #other 20 for testing for test_trial_id in range(21, 41):
def __init__(self, preprocessed): self.preprocessed = preprocessed self.face_model = face_tool.Face_model() self.EEG_model = EEG_tool.EEG_model() self.train_trial_paths = []