INNER CODE UNIT · Python

faces

otaha178/Emotion-recognition · load_and_process.py:20

        faces = np.expand_dims(faces, -1)
        emotions = pd.get_dummies(data['emotion']).as_matrix()
        return faces, emotions

def preprocess_input(x, v2=True):
    x = x.astype('float32')
    x = x / 255.0
    if v2:
        x = x - 0.5
        x = x * 2.0
    return x

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…