imageNetPreprocessing
fun imageNetPreprocessing(ctx: ExecutionContext): Transform<PlatformBitmapImage, Tensor<FP16, Float>>(source)
Creates a standard ImageNet preprocessing pipeline.
This pipeline:
Resizes to 256x256
Center crops to 224x224
Converts to tensor
Rescales to 0, 1
Normalizes with ImageNet statistics
Return
A transform that preprocesses images for ImageNet-trained models
Parameters
ctx
The execution context