File size: 1,597 Bytes
9d6739f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
license: mit
library_name: onnx
pipeline_tag: image-to-image
tags:
- migan
- inpainting
- object-removal
- onnx
- webgpu
---

# MI-GAN (ONNX) — object-removal inpainting

`migan_pipeline_v2.onnx` — an ONNX export of **MI-GAN** for image inpainting
(erasing a masked object and filling the hole). This "pipeline" variant takes a
full-size image + mask and returns the composited result, so it runs client-side
with onnxruntime-web on the WASM or WebGPU execution providers with no pre/post
resize step.

A verbatim mirror of
[`andraniksargsyan/migan`](https://huggingface.co/andraniksargsyan/migan)'s
`migan_pipeline_v2.onnx`, hosted so a single, immutable, CORS-enabled copy backs
the Edge Tools "Remove Object" tool.

## Inputs / outputs

- **Inputs:** `image` uint8 `[1, 3, H, W]`, `mask` uint8 `[1, 1, H, W]`
- **Output:** `result` uint8 `[1, 3, H, W]` — the inpainted image, already
  composited at the input resolution
- RGB, channels-first (CHW). `H` and `W` are dynamic (the graph resizes
  internally). **Mask polarity: `0` = erase (the hole), `255` = keep.**

## Provenance & license

- **Algorithm / weights:** **MI-GAN** — *MI-GAN: A Simple Baseline for Image
  Inpainting on Mobile Devices* (Sargsyan et al., ICCV 2023),
  [Picsart-AI-Research/MI-GAN](https://github.com/Picsart-AI-Research/MI-GAN).
  Code and weights are released under the **MIT license**.
- **ONNX export:**
  [andraniksargsyan/migan](https://huggingface.co/andraniksargsyan/migan)
  (`migan_pipeline_v2.onnx`).
- The upstream **MIT `LICENSE`** (© 2024 Picsart AI Research) is included in this
  repo.