File size: 2,077 Bytes
87998df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
license: mit
library_name: coreml
pipeline_tag: image-segmentation
base_model: joelseytre/toonout
tags:
  - coreml
  - background-removal
  - image-segmentation
  - anime
  - birefnet
  - toonout
---

# ToonOut Core ML

Core ML conversions of [ToonOut](https://huggingface.co/joelseytre/toonout) — BiRefNet fine-tuned for background removal of anime characters — for on-device use on iOS 17 and later.

These are unofficial conversions. All credit for the model goes to the original authors (see Credits).

## Variants

| Folder | Weights | Size | IoU vs. PyTorch |
| --- | --- | --- | --- |
| `int8/` | 8-bit linear symmetric, per-channel (recommended) | about 237 MB | 0.9916 |
| `fp16/` | 16-bit float | about 469 MB | 0.9989 |
| `pal4/` | 4-bit k-means palettized | about 120 MB | 0.8813 |

IoU was measured on a Mac against the original PyTorch model with four test images. `pal4` is the smallest but shows blocky noise in the mask.

## Files

Each variant folder contains:

- `ToonOut.mlpackage/` — the Core ML model package
- `manifest.json` — every file in the package with its relative path, size in bytes and SHA-256
- `README.md`, `LICENSE`

Download the files listed in `manifest.json` and check each SHA-256 before use.

## Input and output

- Input: `image`, Float32 `(1, 3, 1024, 1024)`, RGB in 0...1 normalized with ImageNet mean and std
- Output: `mask_logits`, Float32 `(1, 1, 1024, 1024)`, foreground mask logits (apply sigmoid)

## Source versions

- ToonOut weights: `joelseytre/toonout` @ `cbf720eca394edcde66b861a8a8c20fbabe9c748`
- BiRefNet architecture: `ZhengPeng7/BiRefNet` @ `e2bf8e4460fc8fa32bba5ea4d94b3233d367b0e4`

## Credits

- ToonOut: Matteo Muratori, Joël Seytre (Kartoon AI). Paper: *ToonOut: Fine-tuned Background Removal for Anime Characters* (arXiv:2509.06839). MIT License.
- Training data: [ToonOut Dataset](https://huggingface.co/datasets/joelseytre/toonout), CC-BY 4.0.
- BiRefNet: Peng Zheng et al. ([ZhengPeng7/BiRefNet](https://github.com/ZhengPeng7/BiRefNet)). MIT License.

## License

MIT. See [LICENSE](LICENSE).