Optional options: SessionOptionsgeneric model output processing
Most models output a single tensor with shape [1, 1, height, width] This method extracts the data from the tensor and returns it as a Float32Array
Model outputs
[Mask array]
Generic mask array to mask canvas processing
Most models just normalize, resize and return the result as a mask canvas.
Model output mask array
Original image dimensions for resizing
HTMLCanvasElement
Static clearStatic clearStatic get
ISNet General Use model session for high-quality background removal.
ISNet (Interactive Segmentation Network) provides superior quality background removal with better edge detection and detail preservation. Uses larger input resolution (1024x1024) for higher quality results.
Example