"Image" (Net Decoder)
NetDecoder["Image"]
represents a decoder that converts a rank-3 array of pixel values to a 2D image.
NetDecoder[{"Image","param"val,…}]
represents a decoder with specific parameters for post-processing.
Details
- NetDecoder[…][input] applies the decoder to an input to produce an output.
- NetDecoder[…][{input1,input2,…}] applies the decoder to a list of inputs to produce a list of outputs.
- The input to the decoder input is a rank-3 array of numeric values that lie between 0 and 1.
- A decoder can be attached to an output port of a net by specifying "port"->NetDecoder[…] when constructing the net.
- The following parameters are supported:
-
ColorSpace "RGB" color space to use for encoding "DataTransposed" False whether width is the first dimension Interleaving False whether channels are interleaved "MeanImage" None mean image to subtract "VarianceImage" None variance image to normalize by - The parameter "ColorSpace" can take the same values as the ColorSpace option.
- With "DataTransposed"False, the input of the decoder is a rank-3 array of dimensions {c,height,width} when InterleavingFalse and {height,width,c} when InterleavingTrue, where c is the number of color channels.
- With "DataTransposed"True, the input of the decoder is a rank-3 array of dimensions {c,width,height} when InterleavingFalse and {width,height,c} when InterleavingTrue.
- The following settings can be used for "MeanImage" and "VarianceImage":
-
None do not subtract anything m value to subtract from each channel of each pixel {m1,m2,…} values to be subtracted from different channels Image3D[…] overall image to subtract - Pixels are normalized to lie between 0 and 1 before doing subtraction.
- NetDecoder[…][data,prop] can be used to calculate a specific property for the input data.
- When an "Image" decoder is attached to a net, net[data,prop] or net[data,"oport"->prop] can be used to calculate a specific property of the decoded output.
- The "Image" decoder only supports the bypass property. Setting prop to None bypasses decoding and returns the input to the decoder.