execute
Processes a given image through a specified neural network.
Alias for upscale
.
Example
[object Object]
Defined in upscaler.ts:117Parameters
- image:
Input
- The image to upscale. - options: - A set of upscaling arguments.
- signal?:
AbortSignal
- Provides a mechanism to abort the warmup process. For more, see the guides on cancelling requests. - awaitNextFrame?:
boolean
- If provided, upscaler will awaittf.nextFrame()
on each cycle. This can be helpful if you need to release for the UI thread or wish to be more responsive to abort signals. - output?:
base64 | tensor
- Denotes the kind of response UpscalerJS returns - a base64 string representation of the image, or the tensor. In the browser, this defaults to"base64"
and in Node.js, to"tensor"
. - patchSize?:
number
- Optionally specify an image patch size to operate on. For more, see the guide on patch sizes. - padding?:
number
- Optionally specify a patch size padding. For more, see the guide on patch sizes. - progress?:
Progress
- An optional progress callback ifupscale
is called with apatchSize
argument. For more, see the guide on progress callbacks. - progressOutput?:
base64 | tensor
- Denotes the kind of response UpscalerJS returns within aprogress
callback.
- signal?:
Returns
Promise<Tensor3D | string>
- an upscaled image.