module

MJ::Onnx

Thin wrapper over the ONNX Runtime shim for matting models (IS-Net / U2Net family).

Class methods

matte(model_path : String, input : Slice(Float32), h : Int32, w : Int32) : Tuple(Slice(Float32), Int32, Int32)

Run a matting model. input is an NCHW float tensor [1,3,h,w] (channels R,G,B). Returns the single-channel mask as a float Slice plus its dims. Raises with the ORT error message on failure.

Source