The input image to construct the tensor from. The
supported image types are all 4-channel. You can also pass in an image
object with following attributes:
{data: Uint8Array; width: number; height: number}
Optional
numChannels: numberThe number of channels of the output tensor. A numChannels value less than 4 allows you to ignore channels. Defaults to 3 (ignores alpha channel of input image).
Creates a
tf.Tensor
from an image in async way.This API is the async version of fromPixels. The API will first check |WRAP_TO_IMAGEBITMAP| flag, and try to wrap the input to imageBitmap if the flag is set to true.