File size: 378 Bytes
3b6d764
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import numpy as np

emotion_list = ["0", "1", "2", "3", "4", "5", "6"]


def load_data(psd_file_pth):
    np_data = np.load(psd_file_pth, allow_pickle=True).item()["psd"]
    return np_data


def process_data(np_data):
    #Swap axes
    swapped_data = np.swapaxes(np_data, 0, 1)
    ## reshape data
    reshape_data = swapped_data.reshape(630, 320)
    return reshape_data