otaha178 / Emotion-recognition

Real time emotion recognition
MIT License
1.04k stars 361 forks source link

Why should it be treated as follows function? #24

Open luckhhn opened 4 years ago

luckhhn commented 4 years ago

def preprocess_input(x, v2=True):

scale the raw pixel intensities to the range [0, 1]

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

Thank you very much for your work, Looking forward to your reply

luckhhn commented 4 years ago

What is the purpose of the above processing?