File size: 1,575 Bytes
2e2e471 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ---
license: apache-2.0
base_model: Xenova/modnet
tags:
- onnx
- image-segmentation
- portrait-matting
---
# 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`), file `onnx/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-256 `25f165da9bfd30830a575f1f0490f1acd995975cb349bc02f3d79332e1fe5cf6`, 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: `input` FLOAT ['batch_size', 3, 'height', 'width']
- Outputs: `output` FLOAT ['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).
|