Do CoreML do normalisation?

When I train my model I train my Keras model on values 0.0-1.0 as floats, but anything except kCVPixelFormatType_OneComponent8 in CVPixelBufferCreate will create an error!


So my question is, should I start training my model with 0-255 as the input format instead even though I know I will get worse result? Or will CoreML convert unsigned chars to normalised floats behind my back?

Replies

You need to tell Core ML how to scale the image's pixels down to the 0 - 1 range. Please read this blog post:


machinethink dot net /blog/help-core-ml-gives-wrong-output/


(I would have pasted a URL but then the comment goes into moderation for several days.)