modnet-onnx
Mirror of the fp16 ONNX export of MODNet (photographic portrait matting) for the Ipsilon apps (ID2Spec and Template Studio descendants). Runs natively on ONNX Runtime (Android); never in a web layer.
Provenance
- Upstream: https://huggingface.co/Xenova/modnet (commit
fa2fa546052fba4c08921230a26cc69a333fca12), fileonnx/model_fp16.onnx, copied unchanged. Original model: https://github.com/ZHKKKe/MODNet (Apache-2.0). - Licence: Apache-2.0 (upstream card
license: apache-2.0). model_fp16.onnx: 12984781 bytes, SHA-25625f165da9bfd30830a575f1f0490f1acd995975cb349bc02f3d79332e1fe5cf6, opset 11.preprocessor_config.json: copied from upstream (reference only; the app does its own pre-processing: RGB,(x - 127.5) / 127.5, size snapped to a multiple of 32 around 512).
Graph I/O (read with onnx python, graph.input / graph.output)
- Inputs:
inputFLOAT ['batch_size', 3, 'height', 'width'] - Outputs:
outputFLOAT ['batch_size', 1, 'height', 'width']
Note: graph input and output are FLOAT (fp32) tensors; only the weights are fp16 (internal casts), so Java code creates ordinary float32 tensors. Output is the alpha matte, values in [0, 1].
On-device check
The ORT CPU provider must run this graph on a device; if it does not, an fp32 variant (onnx/model.onnx, 25.9 MB upstream) will be added to this repo. Status: not yet verified on a device (no device available at creation time).
Model tree for ipsilondev/modnet-onnx
Base model
Xenova/modnet