Instructions to use marimona/ToonOut-CoreML with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- BiRefNet
How to use marimona/ToonOut-CoreML with BiRefNet:
# Option 1: use with transformers from transformers import AutoModelForImageSegmentation birefnet = AutoModelForImageSegmentation.from_pretrained("marimona/ToonOut-CoreML", trust_remote_code=True)# Option 2: use with BiRefNet # Install from https://github.com/ZhengPeng7/BiRefNet from models.birefnet import BiRefNet model = BiRefNet.from_pretrained("marimona/ToonOut-CoreML") - Notebooks
- Google Colab
- Kaggle
Add ToonOut Core ML int8, fp16 and pal4
Browse files- LICENSE +39 -0
- README.md +59 -0
- fp16/LICENSE +39 -0
- fp16/README.md +8 -0
- fp16/ToonOut.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
- fp16/ToonOut.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
- fp16/ToonOut.mlpackage/Manifest.json +18 -0
- fp16/manifest.json +24 -0
- int8/LICENSE +39 -0
- int8/README.md +8 -0
- int8/ToonOut.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
- int8/ToonOut.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
- int8/ToonOut.mlpackage/Manifest.json +18 -0
- int8/manifest.json +24 -0
- pal4/LICENSE +39 -0
- pal4/README.md +8 -0
- pal4/ToonOut.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
- pal4/ToonOut.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
- pal4/ToonOut.mlpackage/Manifest.json +18 -0
- pal4/manifest.json +24 -0
LICENSE
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2024 ZhengPeng (original BiRefNet)
|
| 4 |
+
Copyright (c) 2025 Matteo Muratori, Joël Seytre (ToonOut modifications)
|
| 5 |
+
|
| 6 |
+
This repository contains Core ML conversions of the ToonOut weights.
|
| 7 |
+
|
| 8 |
+
1. ToonOut weights
|
| 9 |
+
Model: joelseytre/toonout (https://huggingface.co/joelseytre/toonout)
|
| 10 |
+
Code: https://github.com/MatteoKartoon/BiRefNet
|
| 11 |
+
Paper: ToonOut: Fine-tuned Background Removal for Anime Characters (arXiv:2509.06839)
|
| 12 |
+
Authors: Matteo Muratori, Joël Seytre (Kartoon AI)
|
| 13 |
+
License: MIT License
|
| 14 |
+
|
| 15 |
+
Training dataset attribution:
|
| 16 |
+
ToonOut Dataset (https://huggingface.co/datasets/joelseytre/toonout), licensed under CC-BY 4.0.
|
| 17 |
+
|
| 18 |
+
2. BiRefNet architecture
|
| 19 |
+
Model/Code: ZhengPeng7/BiRefNet (https://github.com/ZhengPeng7/BiRefNet)
|
| 20 |
+
Authors: Peng Zheng et al.
|
| 21 |
+
License: MIT License
|
| 22 |
+
|
| 23 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 24 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 25 |
+
in the Software without restriction, including without limitation the rights
|
| 26 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 27 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 28 |
+
furnished to do so, subject to the following conditions:
|
| 29 |
+
|
| 30 |
+
The above copyright notice and this permission notice shall be included in all
|
| 31 |
+
copies or substantial portions of the Software.
|
| 32 |
+
|
| 33 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 34 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 35 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 36 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 37 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 38 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 39 |
+
SOFTWARE.
|
README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: coreml
|
| 4 |
+
pipeline_tag: image-segmentation
|
| 5 |
+
base_model: joelseytre/toonout
|
| 6 |
+
tags:
|
| 7 |
+
- coreml
|
| 8 |
+
- background-removal
|
| 9 |
+
- image-segmentation
|
| 10 |
+
- anime
|
| 11 |
+
- birefnet
|
| 12 |
+
- toonout
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# ToonOut Core ML
|
| 16 |
+
|
| 17 |
+
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.
|
| 18 |
+
|
| 19 |
+
These are unofficial conversions. All credit for the model goes to the original authors (see Credits).
|
| 20 |
+
|
| 21 |
+
## Variants
|
| 22 |
+
|
| 23 |
+
| Folder | Weights | Size | IoU vs. PyTorch |
|
| 24 |
+
| --- | --- | --- | --- |
|
| 25 |
+
| `int8/` | 8-bit linear symmetric, per-channel (recommended) | about 237 MB | 0.9916 |
|
| 26 |
+
| `fp16/` | 16-bit float | about 469 MB | 0.9989 |
|
| 27 |
+
| `pal4/` | 4-bit k-means palettized | about 120 MB | 0.8813 |
|
| 28 |
+
|
| 29 |
+
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.
|
| 30 |
+
|
| 31 |
+
## Files
|
| 32 |
+
|
| 33 |
+
Each variant folder contains:
|
| 34 |
+
|
| 35 |
+
- `ToonOut.mlpackage/` — the Core ML model package
|
| 36 |
+
- `manifest.json` — every file in the package with its relative path, size in bytes and SHA-256
|
| 37 |
+
- `README.md`, `LICENSE`
|
| 38 |
+
|
| 39 |
+
Download the files listed in `manifest.json` and check each SHA-256 before use.
|
| 40 |
+
|
| 41 |
+
## Input and output
|
| 42 |
+
|
| 43 |
+
- Input: `image`, Float32 `(1, 3, 1024, 1024)`, RGB in 0...1 normalized with ImageNet mean and std
|
| 44 |
+
- Output: `mask_logits`, Float32 `(1, 1, 1024, 1024)`, foreground mask logits (apply sigmoid)
|
| 45 |
+
|
| 46 |
+
## Source versions
|
| 47 |
+
|
| 48 |
+
- ToonOut weights: `joelseytre/toonout` @ `cbf720eca394edcde66b861a8a8c20fbabe9c748`
|
| 49 |
+
- BiRefNet architecture: `ZhengPeng7/BiRefNet` @ `e2bf8e4460fc8fa32bba5ea4d94b3233d367b0e4`
|
| 50 |
+
|
| 51 |
+
## Credits
|
| 52 |
+
|
| 53 |
+
- ToonOut: Matteo Muratori, Joël Seytre (Kartoon AI). Paper: *ToonOut: Fine-tuned Background Removal for Anime Characters* (arXiv:2509.06839). MIT License.
|
| 54 |
+
- Training data: [ToonOut Dataset](https://huggingface.co/datasets/joelseytre/toonout), CC-BY 4.0.
|
| 55 |
+
- BiRefNet: Peng Zheng et al. ([ZhengPeng7/BiRefNet](https://github.com/ZhengPeng7/BiRefNet)). MIT License.
|
| 56 |
+
|
| 57 |
+
## License
|
| 58 |
+
|
| 59 |
+
MIT. See [LICENSE](LICENSE).
|
fp16/LICENSE
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2024 ZhengPeng (original BiRefNet)
|
| 4 |
+
Copyright (c) 2025 Matteo Muratori, Joël Seytre (ToonOut modifications)
|
| 5 |
+
|
| 6 |
+
This repository contains Core ML conversions of the ToonOut weights.
|
| 7 |
+
|
| 8 |
+
1. ToonOut weights
|
| 9 |
+
Model: joelseytre/toonout (https://huggingface.co/joelseytre/toonout)
|
| 10 |
+
Code: https://github.com/MatteoKartoon/BiRefNet
|
| 11 |
+
Paper: ToonOut: Fine-tuned Background Removal for Anime Characters (arXiv:2509.06839)
|
| 12 |
+
Authors: Matteo Muratori, Joël Seytre (Kartoon AI)
|
| 13 |
+
License: MIT License
|
| 14 |
+
|
| 15 |
+
Training dataset attribution:
|
| 16 |
+
ToonOut Dataset (https://huggingface.co/datasets/joelseytre/toonout), licensed under CC-BY 4.0.
|
| 17 |
+
|
| 18 |
+
2. BiRefNet architecture
|
| 19 |
+
Model/Code: ZhengPeng7/BiRefNet (https://github.com/ZhengPeng7/BiRefNet)
|
| 20 |
+
Authors: Peng Zheng et al.
|
| 21 |
+
License: MIT License
|
| 22 |
+
|
| 23 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 24 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 25 |
+
in the Software without restriction, including without limitation the rights
|
| 26 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 27 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 28 |
+
furnished to do so, subject to the following conditions:
|
| 29 |
+
|
| 30 |
+
The above copyright notice and this permission notice shall be included in all
|
| 31 |
+
copies or substantial portions of the Software.
|
| 32 |
+
|
| 33 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 34 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 35 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 36 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 37 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 38 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 39 |
+
SOFTWARE.
|
fp16/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ToonOut Core ML (fp16)
|
| 2 |
+
|
| 3 |
+
- Upstream model: `joelseytre/toonout` @ `cbf720eca394edcde66b861a8a8c20fbabe9c748` (MIT)
|
| 4 |
+
- Architecture: `ZhengPeng7/BiRefNet` @ `e2bf8e4460fc8fa32bba5ea4d94b3233d367b0e4` (MIT)
|
| 5 |
+
- Variant: `fp16` (Float16 compute / Float32 I/O)
|
| 6 |
+
- Input: `image` Float32 `(1, 3, 1024, 1024)` (RGB 0..1 normalized with ImageNet mean/std)
|
| 7 |
+
- Output: `mask_logits` Float32 `(1, 1, 1024, 1024)` (foreground mask logits; apply sigmoid)
|
| 8 |
+
- Deployment target: iOS 17+
|
fp16/ToonOut.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d51d7b7f2bd170eb8b38129b1cfe8decf16e67c803a1fddf4ffad7f736d7bedf
|
| 3 |
+
size 3234337
|
fp16/ToonOut.mlpackage/Data/com.apple.CoreML/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a5f102104d4a3eca2da7c890ff68f1e25ad13ef7b4099c7c95b10a8a30ca9467
|
| 3 |
+
size 465999840
|
fp16/ToonOut.mlpackage/Manifest.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fileFormatVersion": "1.0.0",
|
| 3 |
+
"itemInfoEntries": {
|
| 4 |
+
"9423145B-08C3-41D1-9F90-1A0B9B38278C": {
|
| 5 |
+
"author": "com.apple.CoreML",
|
| 6 |
+
"description": "CoreML Model Specification",
|
| 7 |
+
"name": "model.mlmodel",
|
| 8 |
+
"path": "com.apple.CoreML/model.mlmodel"
|
| 9 |
+
},
|
| 10 |
+
"D5F1E94B-9CF8-4583-BC9E-E1AB179FA755": {
|
| 11 |
+
"author": "com.apple.CoreML",
|
| 12 |
+
"description": "CoreML Model Weights",
|
| 13 |
+
"name": "weights",
|
| 14 |
+
"path": "com.apple.CoreML/weights"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"rootModelIdentifier": "9423145B-08C3-41D1-9F90-1A0B9B38278C"
|
| 18 |
+
}
|
fp16/manifest.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"format": "toonout-coreml-distribution-v1",
|
| 3 |
+
"bundleVersion": "1.0.0-cbf720ec",
|
| 4 |
+
"variant": "fp16",
|
| 5 |
+
"inputSize": 1024,
|
| 6 |
+
"approximateBytes": 469234794,
|
| 7 |
+
"files": [
|
| 8 |
+
{
|
| 9 |
+
"path": "ToonOut.mlpackage/Data/com.apple.CoreML/model.mlmodel",
|
| 10 |
+
"bytes": 3234337,
|
| 11 |
+
"sha256": "d51d7b7f2bd170eb8b38129b1cfe8decf16e67c803a1fddf4ffad7f736d7bedf"
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"path": "ToonOut.mlpackage/Data/com.apple.CoreML/weights/weight.bin",
|
| 15 |
+
"bytes": 465999840,
|
| 16 |
+
"sha256": "a5f102104d4a3eca2da7c890ff68f1e25ad13ef7b4099c7c95b10a8a30ca9467"
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"path": "ToonOut.mlpackage/Manifest.json",
|
| 20 |
+
"bytes": 617,
|
| 21 |
+
"sha256": "9beb4a84efc63803c513e9cbda3a0eb9892b897838573de8939aacec097c8ec8"
|
| 22 |
+
}
|
| 23 |
+
]
|
| 24 |
+
}
|
int8/LICENSE
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2024 ZhengPeng (original BiRefNet)
|
| 4 |
+
Copyright (c) 2025 Matteo Muratori, Joël Seytre (ToonOut modifications)
|
| 5 |
+
|
| 6 |
+
This repository contains Core ML conversions of the ToonOut weights.
|
| 7 |
+
|
| 8 |
+
1. ToonOut weights
|
| 9 |
+
Model: joelseytre/toonout (https://huggingface.co/joelseytre/toonout)
|
| 10 |
+
Code: https://github.com/MatteoKartoon/BiRefNet
|
| 11 |
+
Paper: ToonOut: Fine-tuned Background Removal for Anime Characters (arXiv:2509.06839)
|
| 12 |
+
Authors: Matteo Muratori, Joël Seytre (Kartoon AI)
|
| 13 |
+
License: MIT License
|
| 14 |
+
|
| 15 |
+
Training dataset attribution:
|
| 16 |
+
ToonOut Dataset (https://huggingface.co/datasets/joelseytre/toonout), licensed under CC-BY 4.0.
|
| 17 |
+
|
| 18 |
+
2. BiRefNet architecture
|
| 19 |
+
Model/Code: ZhengPeng7/BiRefNet (https://github.com/ZhengPeng7/BiRefNet)
|
| 20 |
+
Authors: Peng Zheng et al.
|
| 21 |
+
License: MIT License
|
| 22 |
+
|
| 23 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 24 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 25 |
+
in the Software without restriction, including without limitation the rights
|
| 26 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 27 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 28 |
+
furnished to do so, subject to the following conditions:
|
| 29 |
+
|
| 30 |
+
The above copyright notice and this permission notice shall be included in all
|
| 31 |
+
copies or substantial portions of the Software.
|
| 32 |
+
|
| 33 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 34 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 35 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 36 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 37 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 38 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 39 |
+
SOFTWARE.
|
int8/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ToonOut Core ML (int8)
|
| 2 |
+
|
| 3 |
+
- Upstream model: `joelseytre/toonout` @ `cbf720eca394edcde66b861a8a8c20fbabe9c748` (MIT)
|
| 4 |
+
- Architecture: `ZhengPeng7/BiRefNet` @ `e2bf8e4460fc8fa32bba5ea4d94b3233d367b0e4` (MIT)
|
| 5 |
+
- Variant: `int8` (8-bit linear symmetric per-channel weights)
|
| 6 |
+
- Input: `image` Float32 `(1, 3, 1024, 1024)` (RGB 0..1 normalized with ImageNet mean/std)
|
| 7 |
+
- Output: `mask_logits` Float32 `(1, 1, 1024, 1024)` (foreground mask logits; apply sigmoid)
|
| 8 |
+
- Deployment target: iOS 17+
|
int8/ToonOut.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:42d38f0fcbe364b97baec191fae481462776c17be08b60232718dc80617830d9
|
| 3 |
+
size 3337268
|
int8/ToonOut.mlpackage/Data/com.apple.CoreML/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:13d87da9cd57949f438208e985a3319096526c821ee3ec205987708fecacc511
|
| 3 |
+
size 234083936
|
int8/ToonOut.mlpackage/Manifest.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fileFormatVersion": "1.0.0",
|
| 3 |
+
"itemInfoEntries": {
|
| 4 |
+
"9CB9E809-C3CD-4EA2-9F7F-C963381E3403": {
|
| 5 |
+
"author": "com.apple.CoreML",
|
| 6 |
+
"description": "CoreML Model Specification",
|
| 7 |
+
"name": "model.mlmodel",
|
| 8 |
+
"path": "com.apple.CoreML/model.mlmodel"
|
| 9 |
+
},
|
| 10 |
+
"B7BFFCF0-6919-4231-9503-3012EF73C271": {
|
| 11 |
+
"author": "com.apple.CoreML",
|
| 12 |
+
"description": "CoreML Model Weights",
|
| 13 |
+
"name": "weights",
|
| 14 |
+
"path": "com.apple.CoreML/weights"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"rootModelIdentifier": "9CB9E809-C3CD-4EA2-9F7F-C963381E3403"
|
| 18 |
+
}
|
int8/manifest.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"format": "toonout-coreml-distribution-v1",
|
| 3 |
+
"bundleVersion": "1.0.0-cbf720ec",
|
| 4 |
+
"variant": "int8",
|
| 5 |
+
"inputSize": 1024,
|
| 6 |
+
"approximateBytes": 237421821,
|
| 7 |
+
"files": [
|
| 8 |
+
{
|
| 9 |
+
"path": "ToonOut.mlpackage/Data/com.apple.CoreML/model.mlmodel",
|
| 10 |
+
"bytes": 3337268,
|
| 11 |
+
"sha256": "42d38f0fcbe364b97baec191fae481462776c17be08b60232718dc80617830d9"
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"path": "ToonOut.mlpackage/Data/com.apple.CoreML/weights/weight.bin",
|
| 15 |
+
"bytes": 234083936,
|
| 16 |
+
"sha256": "13d87da9cd57949f438208e985a3319096526c821ee3ec205987708fecacc511"
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"path": "ToonOut.mlpackage/Manifest.json",
|
| 20 |
+
"bytes": 617,
|
| 21 |
+
"sha256": "5440d4ead4db1b715a3a019e6cb98d8efb294ccb258dc8bfec043bddec8151c5"
|
| 22 |
+
}
|
| 23 |
+
]
|
| 24 |
+
}
|
pal4/LICENSE
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2024 ZhengPeng (original BiRefNet)
|
| 4 |
+
Copyright (c) 2025 Matteo Muratori, Joël Seytre (ToonOut modifications)
|
| 5 |
+
|
| 6 |
+
This repository contains Core ML conversions of the ToonOut weights.
|
| 7 |
+
|
| 8 |
+
1. ToonOut weights
|
| 9 |
+
Model: joelseytre/toonout (https://huggingface.co/joelseytre/toonout)
|
| 10 |
+
Code: https://github.com/MatteoKartoon/BiRefNet
|
| 11 |
+
Paper: ToonOut: Fine-tuned Background Removal for Anime Characters (arXiv:2509.06839)
|
| 12 |
+
Authors: Matteo Muratori, Joël Seytre (Kartoon AI)
|
| 13 |
+
License: MIT License
|
| 14 |
+
|
| 15 |
+
Training dataset attribution:
|
| 16 |
+
ToonOut Dataset (https://huggingface.co/datasets/joelseytre/toonout), licensed under CC-BY 4.0.
|
| 17 |
+
|
| 18 |
+
2. BiRefNet architecture
|
| 19 |
+
Model/Code: ZhengPeng7/BiRefNet (https://github.com/ZhengPeng7/BiRefNet)
|
| 20 |
+
Authors: Peng Zheng et al.
|
| 21 |
+
License: MIT License
|
| 22 |
+
|
| 23 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 24 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 25 |
+
in the Software without restriction, including without limitation the rights
|
| 26 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 27 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 28 |
+
furnished to do so, subject to the following conditions:
|
| 29 |
+
|
| 30 |
+
The above copyright notice and this permission notice shall be included in all
|
| 31 |
+
copies or substantial portions of the Software.
|
| 32 |
+
|
| 33 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 34 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 35 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 36 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 37 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 38 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 39 |
+
SOFTWARE.
|
pal4/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ToonOut Core ML (pal4)
|
| 2 |
+
|
| 3 |
+
- Upstream model: `joelseytre/toonout` @ `cbf720eca394edcde66b861a8a8c20fbabe9c748` (MIT)
|
| 4 |
+
- Architecture: `ZhengPeng7/BiRefNet` @ `e2bf8e4460fc8fa32bba5ea4d94b3233d367b0e4` (MIT)
|
| 5 |
+
- Variant: `pal4` (4-bit k-means palettized weights)
|
| 6 |
+
- Input: `image` Float32 `(1, 3, 1024, 1024)` (RGB 0..1 normalized with ImageNet mean/std)
|
| 7 |
+
- Output: `mask_logits` Float32 `(1, 1, 1024, 1024)` (foreground mask logits; apply sigmoid)
|
| 8 |
+
- Deployment target: iOS 17+
|
pal4/ToonOut.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d178e1aae4334578be9ea62c91ec1d416476a5551f49bd0cab50892bf3c22f9c
|
| 3 |
+
size 3304044
|
pal4/ToonOut.mlpackage/Data/com.apple.CoreML/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe514ff01d855bb0f25352c517ff9a301ef97a13d040959c3a330ae53d897f24
|
| 3 |
+
size 116825952
|
pal4/ToonOut.mlpackage/Manifest.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fileFormatVersion": "1.0.0",
|
| 3 |
+
"itemInfoEntries": {
|
| 4 |
+
"31EAF47C-57DA-4E45-978C-FB4B3FA1BF0D": {
|
| 5 |
+
"author": "com.apple.CoreML",
|
| 6 |
+
"description": "CoreML Model Specification",
|
| 7 |
+
"name": "model.mlmodel",
|
| 8 |
+
"path": "com.apple.CoreML/model.mlmodel"
|
| 9 |
+
},
|
| 10 |
+
"517500FB-0E89-442F-B04D-470F1BD8ABD9": {
|
| 11 |
+
"author": "com.apple.CoreML",
|
| 12 |
+
"description": "CoreML Model Weights",
|
| 13 |
+
"name": "weights",
|
| 14 |
+
"path": "com.apple.CoreML/weights"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"rootModelIdentifier": "31EAF47C-57DA-4E45-978C-FB4B3FA1BF0D"
|
| 18 |
+
}
|
pal4/manifest.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"format": "toonout-coreml-distribution-v1",
|
| 3 |
+
"bundleVersion": "1.0.0-cbf720ec",
|
| 4 |
+
"variant": "pal4",
|
| 5 |
+
"inputSize": 1024,
|
| 6 |
+
"approximateBytes": 120130613,
|
| 7 |
+
"files": [
|
| 8 |
+
{
|
| 9 |
+
"path": "ToonOut.mlpackage/Data/com.apple.CoreML/model.mlmodel",
|
| 10 |
+
"bytes": 3304044,
|
| 11 |
+
"sha256": "d178e1aae4334578be9ea62c91ec1d416476a5551f49bd0cab50892bf3c22f9c"
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"path": "ToonOut.mlpackage/Data/com.apple.CoreML/weights/weight.bin",
|
| 15 |
+
"bytes": 116825952,
|
| 16 |
+
"sha256": "fe514ff01d855bb0f25352c517ff9a301ef97a13d040959c3a330ae53d897f24"
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"path": "ToonOut.mlpackage/Manifest.json",
|
| 20 |
+
"bytes": 617,
|
| 21 |
+
"sha256": "6300a072f71978c385c6f26658da028cb0e721d7e2843702927d991ce64cae4d"
|
| 22 |
+
}
|
| 23 |
+
]
|
| 24 |
+
}
|