ONNX Runtime JavaScript API
    Preparing search index...

    Interface TensorFromTextureOptions<T>

    interface TensorFromTextureOptions<T extends TextureDataTypes> {
        format?: ImageFormat;
        height: number;
        width: number;
        dispose?(): void;
        download?(): Promise<DataTypeMap[T]>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    format?: ImageFormat

    Describes the image format represented in RGBA color space.

    height: number

    Describes the image height in pixel

    width: number

    Describes the image width in pixel

    Methods

    • an optional callback function that will be called when the tensor is disposed.

      If not provided, the tensor treat the GPU data as external resource.

      Returns void

    • an optional callback function to download data from GPU to CPU.

      If not provided, the tensor treat the GPU data as external resource.

      Returns Promise<DataTypeMap[T]>