Hierarchy

  • TensorFactory

Methods

Methods

  • create a tensor from image object - HTMLImageElement, ImageData, ImageBitmap, URL

    Returns

    A promise that resolves to a tensor object

    Parameters

    • imageData: ImageData

      {ImageData} - composed of: Uint8ClampedArray, width. height - uses known pixel format RGBA

    • Optional options: TensorFromImageOptions

      Optional - Interface describing input image & output tensor - Input Defaults: RGBA, 3 channels, 0-255, NHWC - Output Defaults: same as input parameters

    Returns Promise<Tensor>

  • create a tensor from image object - HTMLImageElement, ImageData, ImageBitmap, URL

    Returns

    A promise that resolves to a tensor object

    Parameters

    • imageElement: HTMLImageElement

      {HTMLImageElement} - since the data is stored as ImageData no need for format parameter

    • Optional options: TensorFromImageOptions

      Optional - Interface describing input image & output tensor - Input Defaults: RGBA, 3 channels, 0-255, NHWC - Output Defaults: same as input parameters

    Returns Promise<Tensor>

  • create a tensor from image object - HTMLImageElement, ImageData, ImageBitmap, URL

    Returns

    A promise that resolves to a tensor object

    Parameters

    • url: string

      {string} - Assuming the string is a URL to an image

    • Optional options: TensorFromImageOptions

      Optional - Interface describing input image & output tensor - Input Defaults: RGBA, 3 channels, 0-255, NHWC - Output Defaults: same as input parameters

    Returns Promise<Tensor>

  • create a tensor from image object - HTMLImageElement, ImageData, ImageBitmap, URL

    Returns

    A promise that resolves to a tensor object

    Parameters

    • bitmap: ImageBitmap
    • options: TensorFromImageOptions

      NOT Optional - Interface describing input image & output tensor - Output Defaults: same as input parameters

    Returns Promise<Tensor>

Generated using TypeDoc