Upload 2 files
Browse files- README.md +41 -0
- model_fp16.onnx +3 -0
README.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
library_name: onnx
|
| 4 |
+
pipeline_tag: image-segmentation
|
| 5 |
+
tags:
|
| 6 |
+
- background-removal
|
| 7 |
+
- onnx
|
| 8 |
+
- onnxruntime-web
|
| 9 |
+
- dichotomous-image-segmentation
|
| 10 |
---
|
| 11 |
+
|
| 12 |
+
# ISNet general-use (fp16 ONNX) for in-browser background removal
|
| 13 |
+
|
| 14 |
+
A half-precision (fp16) copy of the **ISNet general-use** model, used by techyCoderWorld's Image
|
| 15 |
+
Studio to remove image backgrounds entirely in the visitor's browser with ONNX Runtime Web
|
| 16 |
+
(WebGPU or WebAssembly). Images never leave the device.
|
| 17 |
+
|
| 18 |
+
## Source and licence
|
| 19 |
+
|
| 20 |
+
- Model: **ISNet** from *Highly Accurate Dichotomous Image Segmentation* (DIS), Xuebin Qin,
|
| 21 |
+
Hang Dai, Xiaobin Hu, Deng-Ping Fan, Ling Shao, Luc Van Gool (ECCV 2022).
|
| 22 |
+
Code and weights: https://github.com/xuebinqin/DIS, released under the **Apache License 2.0**.
|
| 23 |
+
- ONNX export used as the starting point: `isnet-general-use.onnx` distributed by the rembg
|
| 24 |
+
project (https://github.com/danielgatis/rembg), SHA-256 `60920e99c45464f2ba57bee2ad08c919a52bbf852739e96947fbb4358c0d964a`.
|
| 25 |
+
|
| 26 |
+
## Changes made
|
| 27 |
+
|
| 28 |
+
- Weights and internal computation converted from float32 to float16 with
|
| 29 |
+
`onnxconverter-common` 1.14.0 (`keep_io_types=True`), so inputs and outputs stay float32.
|
| 30 |
+
- No retraining or other changes. Output matches the float32 model to within fp16 precision.
|
| 31 |
+
|
| 32 |
+
## File
|
| 33 |
+
|
| 34 |
+
| File | SHA-256 | Size |
|
| 35 |
+
|---|---|---|
|
| 36 |
+
| `model_fp16.onnx` | `d27e782d3bec1c787c5b6c612a1aae8526373a721540d4046939e8a75d2db949` | 90662600 bytes |
|
| 37 |
+
|
| 38 |
+
## Input and output
|
| 39 |
+
|
| 40 |
+
- Input `input_image`: float32 `[1, 3, 1024, 1024]`, RGB, each pixel divided by the image's
|
| 41 |
+
maximum value, then minus 0.5.
|
| 42 |
+
- Output: float32 `[1, 1, 1024, 1024]`; min-max normalise to get the foreground mask (0..1).
|
| 43 |
+
|
| 44 |
+
Licensed under the Apache License, Version 2.0: https://www.apache.org/licenses/LICENSE-2.0
|
model_fp16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d27e782d3bec1c787c5b6c612a1aae8526373a721540d4046939e8a75d2db949
|
| 3 |
+
size 90662600
|