public class ImageToNDArrayConfig extends Object
Images to NDArrays.
The following can be configured:
NDArrayType (data type) of the output arrayImageNormalization - support scaling ([0,1] range),
subtracting mean (out = (in-mean)), standardization (out = (in-mean)/stdev), inception ([-1, 1] range) and
VGG mean subtraction (fixed out = in - meanRgb, where meanRgb is hardcoded to [123.68, 116.779, 103.939].
Default: simple scale normalization ([0, 1] range).
Note: If image normalization in null, or ImageNormalization.type == Type.NONE, no normalization is applied.
ImageToNDArrayStep,
and only when List<Image> is passed in instead of Image. This setting determines what the output
should be. NONE: Error for List<Image> input (only single Images are allowed). BATCH: a single output
NDArray is returned, with the images batched along dimension 0. LIST_OUT: A List<NDArray> is returned
instead of a single NDArray - one entry for each entry in the input List<Image>. FIRST:
the first bounding box only is returned as as single NDArray - the remainder are discarded/ignored.
| Modifier and Type | Class and Description |
|---|---|
static class |
ImageToNDArrayConfig.ListHandling
See
ImageToNDArrayConfig - listHandling field |
| Constructor and Description |
|---|
ImageToNDArrayConfig(Integer height,
Integer width,
NDArrayType dataType,
boolean includeMinibatchDim,
AspectRatioHandling aspectRatioHandling,
NDFormat format,
NDChannelLayout channelLayout,
ImageNormalization normalization,
ImageToNDArrayConfig.ListHandling listHandling) |
public ImageToNDArrayConfig(Integer height, Integer width, NDArrayType dataType, boolean includeMinibatchDim, AspectRatioHandling aspectRatioHandling, NDFormat format, NDChannelLayout channelLayout, ImageNormalization normalization, ImageToNDArrayConfig.ListHandling listHandling)
Copyright © 2022. All rights reserved.