CoreML-Models

April 24, 2026 · View on GitHub

Converted Core ML Model Zoo.

Core ML is a machine learning framework by Apple. If you are iOS developer, you can easly use machine learning models in your Xcode project.

Try the iOS sample-app collection (sample_apps/CoreMLModelsApp) on the App Store:

Download on the App Store

How to use

Take a look this model zoo, and if you found the CoreML model you want, download the model from google drive link and bundle it in your project. Or if the model have sample project link, try it and see how to use the model in the project. You are free to do or not.

If you like this repository, please give me a star so I can do my best.

Section Link

How to get the model

You can get the model converted to CoreML format from the link of Google drive. See the section below for how to use it in Xcode. The license for each model conforms to the license for the original project.

Image Classifier

Efficientnet

スクリーンショット 2021-12-27 6 34 43
Google Drive LinkSizeDatasetOriginal ProjectLicense
Efficientnetb022.7 MBImageNetTensorFlowHubApache2.0

Efficientnetv2

スクリーンショット 2021-12-31 4 30 22
Google Drive LinkSizeDatasetOriginal ProjectLicenseYear
Efficientnetv285.8 MBImageNetGoogle/autoMLApache2.02021

VisionTransformer

An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale.

スクリーンショット 2022-01-07 10 37 05
Google Drive LinkSizeDatasetOriginal ProjectLicenseYear
VisionTransformer-B16347.5 MBImageNetgoogle-research/vision_transformerApache2.02021

Conformer

Local Features Coupling Global Representations for Visual Recognition.

スクリーンショット 2022-01-07 11 34 33
Google Drive LinkSizeDatasetOriginal ProjectLicenseYear
Conformer-tiny-p1694.1 MBImageNetpengzhiliang/ConformerApache2.02021

DeiT

Data-efficient Image Transformers

スクリーンショット 2022-01-07 11 50 25
Google Drive LinkSizeDatasetOriginal ProjectLicenseYear
DeiT-base384350.5 MBImageNetfacebookresearch/deitApache2.02021

RepVGG

Making VGG-style ConvNets Great Again

スクリーンショット 2022-01-08 5 00 53
Google Drive LinkSizeDatasetOriginal ProjectLicenseYear
RepVGG-A033.3 MBImageNetDingXiaoH/RepVGGMIT2021

RegNet

Designing Network Design Spaces

スクリーンショット 2022-02-23 7 38 23
Google Drive LinkSizeDatasetOriginal ProjectLicenseYear
regnet_y_400mf16.5 MBImageNetTORCHVISION.MODELSMIT2020

MobileViTv2

CVNets: A library for training computer vision networks

スクリーンショット 2022-02-23 7 38 23
Google Drive LinkSizeDatasetOriginal ProjectLicenseYearConversion Script
MobileViTv218.8 MBImageNetapple/ml-cvnetsapple2022Open In Colab

Object Detection

D-FINE

D-FINE iOS Demo
Download LinkSizeOutputOriginal ProjectLicenseNoteSample Project
dfine-n-coco13MBConfidence(MultiArray (Float32 300 × 80)), Coordinates (MultiArray (Float32 300 × 4))Peterande/D-FINEApache 2.0Input 640×640. Coordinates are normalized cxcywh. No NMS — filter by confidence threshold.peaceofcake DFINEDemo

RF-DETR

RF-DETR iOS Demo
Download LinkSizeOutputOriginal ProjectLicenseNoteSample Project
rfdetr-n-coco95MBConfidence(MultiArray (Float32 300 × 91)), Coordinates (MultiArray (Float32 300 × 4))roboflow/rf-detrApache 2.0Input 384×384. 91 classes (index 0 = background, 1-90 = COCO category IDs). Coordinates are normalized cxcywh. No NMS.peaceofcake DFINEDemo

YOLOv5s

スクリーンショット 2021-12-29 6 17 08
Google Drive LinkSizeOutputOriginal ProjectLicenseNoteSample Project
YOLOv5s29.3MBConfidence(MultiArray (Double 0 × 80)), Coordinates (MultiArray (Double 0 × 4))ultralytics/yolov5GNUNon Maximum Suppression has been added.CoreML-YOLOv5

YOLOv7

スクリーンショット 2021-12-29 6 17 08
Google Drive LinkSizeOutputOriginal ProjectLicenseNoteSample ProjectConversion Script
YOLOv7147.9MBConfidence(MultiArray (Double 0 × 80)), Coordinates (MultiArray (Double 0 × 4))WongKinYiu/yolov7GNUNon Maximum Suppression has been added.CoreML-YOLOv5Open In Colab

YOLOv8

スクリーンショット 2021-12-29 6 17 08
Google Drive LinkSizeOutputOriginal ProjectLicenseNoteSample Project
YOLOv8s45.1MBConfidence(MultiArray (Double 0 × 80)), Coordinates (MultiArray (Double 0 × 4))ultralytics/ultralyticsGNUNon Maximum Suppression has been added.CoreML-YOLOv5

YOLOv9

YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information. Uses PGI and GELAN architecture for efficient object detection.

Download LinkSizeOutputOriginal ProjectLicenseYearNoteSample Project
yolov9s.mlpackage.zip14 MBConfidence (MultiArray (Double 0 × 80)), Coordinates (MultiArray (Double 0 × 4))WongKinYiu/yolov9GPL-3.02024Non Maximum Suppression has been added.YOLOv9Demo

YOLOv10

YOLOv10: Real-Time End-to-End Object Detection. NMS-free architecture using consistent dual assignments — no post-processing needed.

Download LinkSizeOutputOriginal ProjectLicenseYearNoteSample Project
yolov10s.mlpackage.zip14 MBMultiArray (1 × 300 × 6)THU-MIG/yolov10AGPL-3.02024NMS-free end-to-end detection.YOLO26Demo

YOLO11

YOLO11: Ultralytics latest YOLO with improved backbone and neck architecture. 22% fewer parameters than YOLOv8 with higher mAP.

Download LinkSizeOutputOriginal ProjectLicenseYearNoteSample Project
yolo11s.mlpackage.zip18 MBConfidence (MultiArray (Double 0 × 80)), Coordinates (MultiArray (Double 0 × 4))ultralytics/ultralyticsAGPL-3.02024Non Maximum Suppression has been added.YOLOv9Demo

YOLO26

YOLO26: Edge-first vision AI with NMS-free end-to-end detection. Up to 43% faster CPU inference vs YOLO11 with DFL removal and ProgLoss.

Download LinkSizeOutputOriginal ProjectLicenseYearNoteSample Project
yolo26s.mlpackage.zip18 MBMultiArray (1 × 300 × 6)ultralytics/ultralyticsAGPL-3.02026NMS-free end-to-end detection.YOLO26Demo

YOLO-World

YOLO-World: Real-Time Open-Vocabulary Object Detection. Type any text query and detect it — no fixed class list. Uses CLIP text encoder for open-vocabulary matching.

Download LinkSizeDescriptionOriginal ProjectLicenseYearSample Project
yoloworld_detector.mlpackage.zip25 MBYOLO-World V2-S visual detectorAILab-CVC/YOLO-WorldGPL-3.02024YOLOWorldDemo
clip_text_encoder.mlpackage.zip121 MBCLIP ViT-B/32 text encoderopenai/CLIPMIT2021
clip_vocab.json.zip1.6 MBBPE vocabulary for tokenizer

Multi-Object Tracking

ByteTrack

ByteTrack: Multi-Object Tracking by Associating Every Detection Box. Pure-Swift on-device tracker that adds persistent IDs to any of the object detectors above. Pairs a per-track 8D constant-velocity Kalman filter with a two-stage IoU association — high-confidence detections are matched first, then low-confidence detections are used to rescue tracks about to be lost through motion blur and brief occlusions. No appearance / ReID network, so it runs for free on top of an existing detector.

ImplementationSourcePaperLicenseYearNoteSample Project
Pure Swift (no download)Tracker.swiftByteTrack (arXiv 2110.06864)MIT (this port) / Original20228D Kalman + two-stage IoU association, class-aware, greedy matching, lost-track buffer of 30 frames. Drop-in on top of any [Detection] stream.YOLO26Demo

Segmentation

U2Net

Google Drive LinkSizeOutputOriginal ProjectLicense
U2Net175.9 MBImage(GRAYSCALE 320 × 320)xuebinqin/U-2-NetApache
U2Netp4.6 MBImage(GRAYSCALE 320 × 320)xuebinqin/U-2-NetApache

IS-Net

Google Drive LinkSizeOutputOriginal ProjectLicenseYearConversion Script
IS-Net176.1 MBImage(GRAYSCALE 1024 × 1024)xuebinqin/DISApache2022Open In Colab
IS-Net-General-Use176.1 MBImage(GRAYSCALE 1024 × 1024)xuebinqin/DISApache2022Open In Colab

RMBG1.4

RMBG1.4 - The IS-Net enhanced with our unique training scheme and proprietary dataset.

Download LinkSizeOutputOriginal ProjectLicenseyearSample ProjectConversion Script
RMBG_1_4.mlpackage.zip42 MB (INT8)Alpha mask 1024x1024briaai/RMBG-1.4Creative Commons2024RMBGDemoconvert_rmbg.py

face-Parsing

Google Drive LinkSizeOutputOriginal ProjectLicenseSample Project
face-Parsing53.2 MBMultiArray(1 x 512 × 512)zllrunning/face-parsing.PyTorchMITCoreML-face-parsing

Segformer

Simple and Efficient Design for Semantic Segmentation with Transformers

Google Drive LinkSizeOutputOriginal ProjectLicenseyear
SegFormer_mit-b0_1024x1024_cityscapes14.9 MBMultiArray(512 × 1024)NVlabs/SegFormerNVIDIA2021

BiSeNetV2

Bilateral Network with Guided Aggregation for Real-time Semantic Segmentation

Google Drive LinkSizeOutputOriginal ProjectLicenseyear
BiSeNetV2_1024x1024_cityscapes12.8 MBMultiArrayycszen/BiSeNetApache2.02021

DNL

Disentangled Non-Local Neural Networks

Google Drive LinkSizeOutputDatasetOriginal ProjectLicenseyear
dnl_r50-d8_512x512_80k_ade20k190.8 MBMultiArray[512x512]ADE20Kyinmh17/DNL-Semantic-SegmentationApache2.02020

ISANet

Interlaced Sparse Self-Attention for Semantic Segmentation

Google Drive LinkSizeOutputDatasetOriginal ProjectLicenseyear
isanet_r50-d8_512x512_80k_ade20k141.5 MBMultiArray[512x512]ADE20Kopenseg-group/openseg.pytorchMITArXiv'2019/IJCV'2021

FastFCN

Rethinking Dilated Convolution in the Backbone for Semantic Segmentation

Google Drive LinkSizeOutputDatasetOriginal ProjectLicenseyear
fastfcn_r50-d32_jpu_aspp_512x512_80k_ade20k326.2 MBMultiArray[512x512]ADE20Kwuhuikai/FastFCNMITArXiv'2019

GCNet

Non-local Networks Meet Squeeze-Excitation Networks and Beyond

Google Drive LinkSizeOutputDatasetOriginal ProjectLicenseyear
gcnet_r50-d8_512x512_20k_voc12aug189 MBMultiArray[512x512]PascalVOCxvjiarui/GCNetApache License 2.0ICCVW'2019/TPAMI'2020

DANet

Dual Attention Network for Scene Segmentation(CVPR2019)

Google Drive LinkSizeOutputDatasetOriginal ProjectLicenseyear
danet_r50-d8_512x1024_40k_cityscapes189.7 MBMultiArray[512x1024]CityScapesjunfu1115/DANetMITCVPR2019

Semantic-FPN

Panoptic Feature Pyramid Networks

Google Drive LinkSizeOutputDatasetOriginal ProjectLicenseyear
fpn_r50_512x1024_80k_cityscapes108.6 MBMultiArray[512x1024]CityScapesfacebookresearch/detectron2Apache License 2.02019

cloths_segmentation

Code for binary segmentation of various cloths.

Google Drive LinkSizeOutputDatasetOriginal ProjectLicenseyear
clothSegmentation50.1 MBImage(GrayScale 640x960)fashion-2019-FGVC6facebookresearch/detectron2MIT2020

easyportrait

EasyPortrait - Face Parsing and Portrait Segmentation Dataset.

Google Drive LinkSizeOutputOriginal ProjectLicenseyearSwift sampleConversion Script
easyportrait-segformer512-fp7.6 MBImage(GrayScale 512x512) * 9hukenovs/easyportraitCreative Commons2023easyportrait-coremlOpen In Colab

MobileSAM

Faster Segment Anything: Towards Lightweight SAM for Mobile Applications. MobileSAM replaces the heavy ViT-H image encoder with a lightweight ViT-Tiny encoder via decoupled knowledge distillation, making it ~60x smaller and ~40x faster than the original SAM.

Download LinkSizeOutputOriginal ProjectLicenseYearSample Project
MobileSAM.zip23 MB (Encoder 13 MB + Decoder 9.8 MB)Segmentation MaskChaoningZhang/MobileSAMApache 2.02023SamKit

SAM2-Tiny

SAM 2: Segment Anything in Images and Videos. SAM 2 extends promptable segmentation from images to videos using a streaming architecture with memory. The Tiny variant uses a Hiera-T backbone for efficient on-device inference.

Download LinkSizeOutputOriginal ProjectLicenseYearSample Project
SAM2Tiny.zip76 MB (ImageEncoder 64 MB + PromptEncoder 2 MB + MaskDecoder 9.8 MB)Segmentation Maskfacebookresearch/sam2Apache 2.02024SamKit

Video Matting

MatAnyone

pq-yang/MatAnyone (CVPR 2025) — temporally consistent video matting with object-level memory propagation. Given a first-frame mask the network tracks and refines an alpha matte across the whole clip, holding sharp edges (hair, semitransparent regions) much better than per-frame matting baselines. Built on the Cutie video object segmentation backbone with a dedicated mask decoder for matting.

The CoreML port splits the network into 5 stateless modules so the per-frame memory state machine can live in Swift while CoreML handles the heavy compute. End-to-end alpha matte parity vs the official PyTorch reference: MAE < 2e-4, correlation 0.9999+ across 18 frames including 3 memory cycles.

The sample app uses Vision's VNGeneratePersonSegmentationRequest to bootstrap the first-frame mask automatically — pick a video, tap "Remove BG", and it composites the foreground over the chosen background colour.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
MatAnyone (5 mlpackages, ~111 MB FP16 total)111 MBimage [1,3,432,768] (per-frame state in Swift)alpha matte [1,1,432,768]pq-yang/MatAnyoneNTU S-Lab 1.02025MatAnyoneDemoconvert_matanyone.py

See sample_apps/MatAnyoneDemo/README.md for the per-frame state machine, the 5-module split, and conversion details.

Super Resolution

Real ESRGAN

Google Drive LinkSizeOutputOriginal ProjectLicenseyear
Real ESRGAN4x66.9 MBImage(RGB 2048x2048)xinntao/Real-ESRGANBSD 3-Clause License2021
Real ESRGAN Anime4x66.9 MBImage(RGB 2048x2048)xinntao/Real-ESRGANBSD 3-Clause License2021

GFPGAN

Towards Real-World Blind Face Restoration with Generative Facial Prior

Google Drive LinkSizeOutputOriginal ProjectLicenseyear
GFPGAN337.4 MBImage(RGB 512x512)TencentARC/GFPGANApache2.02021

BSRGAN

Google Drive LinkSizeOutputOriginal ProjectLicenseyear
BSRGAN66.9 MBImage(RGB 2048x2048)cszn/BSRGAN2021

A-ESRGAN

Google Drive LinkSizeOutputOriginal ProjectLicenseyearConversion Script
A-ESRGAN63.8 MBImage(RGB 1024x1024)aesrgan/A-ESRGANNBSD 3-Clause License2021Open In Colab

Beby-GAN

Best-Buddy GANs for Highly Detailed Image Super-Resolution

Google Drive LinkSizeOutputOriginal ProjectLicenseyear
Beby-GAN66.9 MBImage(RGB 2048x2048)dvlab-research/Simple-SRMIT2021

RRDN

The Residual in Residual Dense Network for image super-scaling.

Google Drive LinkSizeOutputOriginal ProjectLicenseyear
RRDN16.8 MBImage(RGB 2048x2048)idealo/image-super-resolutionApache2.02018

Fast-SRGAN

Fast-SRGAN.

Google Drive LinkSizeOutputOriginal ProjectLicenseyear
Fast-SRGAN628 KBImage(RGB 1024x1024)HasnainRaz/Fast-SRGANMIT2019

ESRGAN

Enhanced-SRGAN.

Google Drive LinkSizeOutputOriginal ProjectLicenseyear
ESRGAN66.9 MBImage(RGB 2048x2048)xinntao/ESRGANApache 2.02018

UltraSharp

Pretrained: 4xESRGAN

Google Drive LinkSizeOutputOriginal ProjectLicenseyear
UltraSharp34 MBImage(RGB 1024x1024)Kim2019/CC-BY-NC-SA-4.02021

SRGAN

Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network.

Google Drive LinkSizeOutputOriginal ProjectLicenseyear
SRGAN6.1 MBImage(RGB 2048x2048)dongheehand/SRGAN-PyTorch2017

SRResNet

Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network.

Google Drive LinkSizeOutputOriginal ProjectLicenseyear
SRResNet6.1 MBImage(RGB 2048x2048)dongheehand/SRGAN-PyTorch2017

LESRCNN

Lightweight Image Super-Resolution with Enhanced CNN.

Google Drive LinkSizeOutputOriginal ProjectLicenseyearConversion Script
LESRCNN4.3 MBImage(RGB 512x512)hellloxiaotian/LESRCNN2020Open In Colab

MMRealSR

Metric Learning based Interactive Modulation for Real-World Super-Resolution

Google Drive LinkSizeOutputOriginal ProjectLicenseyearConversion Script
MMRealSRGAN104.6 MBImage(RGB 1024x1024)TencentARC/MM-RealSRBSD 3-Clause2022Open In Colab
MMRealSRNet104.6 MBImage(RGB 1024x1024)TencentARC/MM-RealSRBSD 3-Clause2022Open In Colab

DASR

Pytorch implementation of "Unsupervised Degradation Representation Learning for Blind Super-Resolution", CVPR 2021

Google Drive LinkSizeOutputOriginal ProjectLicenseyear
DASR12.1 MBImage(RGB 1024x1024)The-Learning-And-Vision-Atelier-LAVA/DASRMIT2022

SinSR

wyf0912/SinSR — single-step diffusion-based super-resolution (CVPR 2024, ~113M params). Distilled from ResShift for one-step 4x upscaling. Uses a Swin Transformer UNet with VQ-VAE latent space.

Left: bicubic 4x upscale, Right: SinSR single-step diffusion SR (128x128 → 512x512)

3 CoreML models: VQ-VAE encoder, Swin-UNet denoiser (single step), and VQ-VAE decoder with vector quantization.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
SinSR_Encoder.mlpackage.zip39 MBimage [1,3,1024,1024]latent [1,3,256,256]wyf0912/SinSRS-Lab2024SinSRDemoconvert_sinsr.py
SinSR_Denoiser.mlpackage.zip420 MBinput [1,6,256,256]predicted_latent [1,3,256,256]
SinSR_Decoder.mlpackage.zip58 MBlatent [1,3,256,256]image [1,3,1024,1024]

See sample_apps/SinSRDemo/README.md for the inference pipeline and conversion details.

Low Light Enhancement

StableLLVE

Learning Temporal Consistency for Low Light Video Enhancement from Single Images.

Google Drive LinkSizeOutputOriginal ProjectLicenseYear
StableLLVE17.3 MBImage(RGB 512x512)zkawfanx/StableLLVEMIT2021

Zero-DCE

Zero-Reference Deep Curve Estimation for Low-Light Image Enhancement

Google Drive LinkSizeOutputOriginal ProjectLicenseYearConversion Script
Zero-DCE320KBImage(RGB 512x512)Li-Chongyi/Zero-DCESee Repo2021Open In Colab

Retinexformer

Retinexformer: One-stage Retinex-based Transformer for Low-light Image Enhancement

Google Drive LinkSizeOutputOriginal ProjectLicenseYearConversion Script
ZRetinexformer FiveK3.4MBImage(RGB 512x512)caiyuanhao1998/RetinexformerMIT2023Open In Colab
ZRetinexformer NTIRE3.4MBImage(RGB 512x512)caiyuanhao1998/RetinexformerMIT2023Open In Colab

Image Restoration

MPRNet

Multi-Stage Progressive Image Restoration.

Debluring

Denoising

Deraining

Google Drive LinkSizeOutputOriginal ProjectLicenseYear
MPRNetDebluring137.1 MBImage(RGB 512x512)swz30/MPRNetMIT2021
MPRNetDeNoising108 MBImage(RGB 512x512)swz30/MPRNetMIT2021
MPRNetDeraining24.5 MBImage(RGB 512x512)swz30/MPRNetMIT2021

MIRNetv2

Learning Enriched Features for Fast Image Restoration and Enhancement.

Denoising

Super Resolution

Contrast Enhancement

Low Light Enhancement

Google Drive LinkSizeOutputOriginal ProjectLicenseYearConversion Script
MIRNetv2Denoising42.5 MBImage(RGB 512x512)swz30/MIRNetv2ACADEMIC PUBLIC LICENSE2022Open In Colab
MIRNetv2SuperResolution42.5 MBImage(RGB 512x512)swz30/MIRNetv2ACADEMIC PUBLIC LICENSE2022Open In Colab
MIRNetv2ContrastEnhancement42.5 MBImage(RGB 512x512)swz30/MIRNetv2ACADEMIC PUBLIC LICENSE2022Open In Colab
MIRNetv2LowLightEnhancement42.5 MBImage(RGB 512x512)swz30/MIRNetv2ACADEMIC PUBLIC LICENSE2022Open In Colab

Image Generation

MobileStyleGAN

Google Drive LinkSizeOutputOriginal ProjectLicenseSample Project
MobileStyleGAN38.6MBImage(Color 1024 × 1024)bes-dev/MobileStyleGAN.pytorchNvidia Source Code License-NCCoreML-StyleGAN

DCGAN

Google Drive LinkSizeOutputOriginal Project
DCGAN 9.2MBMultiArrayTensorFlowCore

Image2Image

Anime2Sketch

Google Drive LinkSizeOutputOriginal ProjectLicenseUsage
Anime2Sketch217.7MBImage(Color 512 × 512)Mukosame/Anime2SketchMITDrop an image to preview

AnimeGAN2Face_Paint_512_v2

Google Drive LinkSizeOutputOriginal ProjectConversion Script
AnimeGAN2Face_Paint_512_v28.6MBImage(Color 512 × 512)bryandlee/animegan2-pytorchOpen In Colab

Photo2Cartoon

Google Drive LinkSizeOutputOriginal ProjectLicenseNote
Photo2Cartoon15.2 MBImage(Color 256 × 256)minivision-ai/photo2cartoonMITThe output is little bit different from the original model. It cause some operations were converted replaced manually.

AnimeGANv2_Hayao

Google Drive LinkSizeOutputOriginal ProjectSample
AnimeGANv2_Hayao 8.7MBImage(256 x 256)TachibanaYoshino/AnimeGANv2AnimeGANv2-iOS

AnimeGANv2_Paprika

Google Drive LinkSizeOutputOriginal Project
AnimeGANv2_Paprika 8.7MBImage(256 x 256)TachibanaYoshino/AnimeGANv2

WarpGAN Caricature

Google Drive LinkSizeOutputOriginal Project
WarpGAN Caricature 35.5MBImage(256 x 256)seasonSH/WarpGAN

UGATIT_selfie2anime

スクリーンショット 2021-12-27 8 18 33 スクリーンショット 2021-12-27 8 28 11

Google Drive LinkSizeOutputOriginal Project
UGATIT_selfie2anime266.2MB(quantized)Image(256x256)taki0112/UGATIT

CartoonGAN

Google Drive LinkSizeOutputOriginal Project
CartoonGAN_Shinkai 44.6MBMultiArraymnicnc404/CartoonGan-tensorflow
CartoonGAN_Hayao 44.6MBMultiArraymnicnc404/CartoonGan-tensorflow
CartoonGAN_Hosoda 44.6MBMultiArraymnicnc404/CartoonGan-tensorflow
CartoonGAN_Paprika 44.6MBMultiArraymnicnc404/CartoonGan-tensorflow

Fast-Neural-Style-Transfer

Google Drive LinkSizeOutputOriginal ProjectLicenseYear
fast-neural-style-transfer-cuphead6.4MBImage(RGB 960x640)eriklindernoren/Fast-Neural-Style-TransferMIT2019
fast-neural-style-transfer-starry-night6.4MBImage(RGB 960x640)eriklindernoren/Fast-Neural-Style-TransferMIT2019
fast-neural-style-transfer-mosaic6.4MBImage(RGB 960x640)eriklindernoren/Fast-Neural-Style-TransferMIT2019

White_box_Cartoonization

Learning to Cartoonize Using White-box Cartoon Representations

Google Drive LinkSizeOutputOriginal ProjectLicenseYear
White_box_Cartoonization5.9MBImage(1536x1536)SystemErrorWang/White-box-CartoonizationcreativecommonsCVPR2020

FacialCartoonization

White-box facial image cartoonizaiton

Google Drive LinkSizeOutputOriginal ProjectLicenseYear
FacialCartoonization8.4MBImage(256x256)SystemErrorWang/FacialCartoonizationcreativecommons2020

Inpainting

AOT-GAN-for-Inpainting

Google Drive LinkSizeOutputOriginal ProjectLicenseNoteSample Project
AOT-GAN-for-Inpainting60.8MBMLMultiArray(3,512,512)researchmm/AOT-GAN-for-InpaintingApache2.0To use see sample.john-rocky/Inpainting-CoreML

Lama

Google Drive LinkSizeInputOutputOriginal ProjectLicenseNoteSample ProjectConversion Script
Lama216.6MBImage (Color 800 × 800), Image (GrayScale 800 × 800)Image (Color 800 × 800)advimman/lamaApache2.0To use see sample.john-rocky/lama-cleaner-iOSmallman/CoreMLaMa

Monocular Depth Estimation

Depth Anything 3

ByteDance-Seed/Depth-Anything-3 (ICLR 2026 Oral) — relative monocular depth from a single image. DA3 Main Series uses a plain DINOv2 ViT backbone plus a DualDPT head with a unified depth-ray representation; this Core ML port exposes only the monocular depth + confidence subgraph (camera / multi-view / sky / 3DGS branches are stripped). First public Core ML conversion of DA3.

ModuleSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
DA3 Small 504×504~44 MB FP16Image (RGB 504 × 504)depth + confidenceByteDance-Seed/Depth-Anything-3Apache 2.02025Hub Appconvert_depth_anything_v3.py
DA3 Base 504×504~173 MB FP16Image (RGB 504 × 504)depth + confidenceByteDance-Seed/Depth-Anything-3Apache 2.02025Hub Appconvert_depth_anything_v3.py

MoGe-2

microsoft/MoGe (CVPR 2025 Oral) — open-domain monocular 3D geometry from a single image. Predicts a metric depth map, surface normals, and a confidence mask in one forward pass on a DINOv2 ViT-B backbone with three task heads. The successor to MiDaS-style relative depth: depth comes out in real meters.

Left: original photo, center: metric depth (turbo colormap), right: surface normals.

ModuleSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
MoGe-2 ViT-B + normal~200 MB FP16Image (RGB 504 × 504)depth + normal + mask + metric_scalemicrosoft/MoGeMIT2025MoGe2Democonvert_moge2.py

MiDaS

Towards Robust Monocular Depth Estimation: Mixing Datasets for Zero-shot Cross-dataset Transfer

Google Drive LinkSizeOutputOriginal ProjectLicenseYearConversion Script
MiDaS_Small66.3MBMultiArray(1x256x256)isl-org/MiDaSMIT2022Open In Colab

Stable Diffusion

Nitro-E

amd/Nitro-E — AMD's 304M-parameter E-MMDiT text-to-image model released October 2025. 4-step distilled variant generates 512×512 images from a prompt in ~2–3 seconds on iPhone 15+. Uses Llama 3.2 1B as the text encoder, a DC-AE f32c32 VAE decoder, and an ASA-based (Alternating Subregion Attention) diffusion transformer. Full pipeline fits in ~1.04 GB after INT4 / INT8 palettization (TextEncoder 590 MB + E-MMDiT 295 MB + VAE 159 MB).

4-step generation on iPhone, 512×512. Prompt: "a hot air balloon in the shape of a heart, grand canyon".

3 CoreML models total:

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
NitroE_TextEncoder.mlpackage590 MB (INT4) / 2.3 GB (FP16)input_ids [1,128], attention_mask [1,128]last_hidden_state [1,128,2048]meta-llama/Llama-3.2-1BLlama 3.2 (gated)2024NitroEDemoconvert_nitro_e_text_encoder.py
NitroE_EMMDiT.mlpackage295 MB (INT8) / 578 MB (FP16)latent [1,32,16,16], encoder_hs [1,128,2048], timestep [1]noise_pred [1,32,16,16]amd/Nitro-EMIT2025convert_nitro_e_emmdit.py
NitroE_VAEDecoder.mlpackage159 MB (INT8) / 608 MB (FP32)latent [1,32,16,16]image [1,3,512,512]mit-han-lab/dc-ae-f32c32-sana-1.0-diffusersMIT2024convert_nitro_e_vae_decoder.py

See sample_apps/NitroEDemo/README.md for the Swift FlowMatchEulerScheduler port, tokenizer details, and iOS 18 palettization notes.

Hyper-SD

ByteDance/Hyper-SD — single-step text-to-image distilled from SD1.5 via Trajectory Segmented Consistency Distillation. ByteDance reports user preference 2x over SD-Turbo at 1 step. Combined with Apple's ml-stable-diffusion (Split-Einsum attention, chunked UNet, 6-bit palettization), runs at acceptable speed and quality on iPhone 15+.

1-step generations on iPhone, 512×512. Prompts: cat with sunglasses, cyberpunk city, japanese garden, astronaut on horse.

4 CoreML models (~947 MB total): CLIP text encoder + Swin-style chunked UNet (6-bit palettized) + VAE decoder. Uses TCD scheduler for single-step inference.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
HyperSDTextEncoder.mlpackage.zip235 MBinput_ids [1,77]encoder_hidden_states [1,77,768]ByteDance/Hyper-SDOpenRAIL++2024HyperSDDemoconvert_hypersd.py
HyperSDUnetChunk1.mlpackage.zip318 MBlatent + encoder_hs + timestepfirst half intermediates
HyperSDUnetChunk2.mlpackage.zip299 MBfirst half outputs + skip connectionsnoise_pred [2,4,64,64]
HyperSDVAEDecoder.mlpackage.zip95 MBlatent [1,4,64,64]image [1,3,512,512]

See sample_apps/HyperSDDemo/README.md for the LoRA fusion, chunked-UNet palettization, and TCD scheduler details.

stable-diffusion-v1-5

スクリーンショット 2023-03-21 18 52 18
Google Drive LinkOriginal ModelOriginal ProjectLicenseRun on macConversion ScriptYear
stable-diffusion-v1-5runwayml/stable-diffusion-v1-5runwayml/stable-diffusionOpen RAIL M licensegodly-devotion/MochiDiffusiongodly-devotion/MochiDiffusion2022

pastel-mix

Pastel Mix - a stylized latent diffusion model.This model is intended to produce high-quality, highly detailed anime style with just a few prompts.

スクリーンショット 2023-03-21 19 54 13
Google Drive LinkOriginal ModelLicenseRun on macConversion ScriptYear
pastelMixStylizedAnime_pastelMixPrunedFP16andite/pastel-mixFantasy.aigodly-devotion/MochiDiffusiongodly-devotion/MochiDiffusion2023

Orange Mix

スクリーンショット 2023-03-21 23 34 13
Google Drive LinkOriginal ModelLicenseRun on macConversion ScriptYear
AOM3_orangemixsWarriorMama777/OrangeMixsCreativeML OpenRAIL-Mgodly-devotion/MochiDiffusiongodly-devotion/MochiDiffusion2023

Counterfeit

スクリーンショット 2023-03-22 0 47 53
Google Drive LinkOriginal ModelLicenseRun on macConversion ScriptYear
Counterfeit-V2.5gsdf/Counterfeit-V2.5-godly-devotion/MochiDiffusiongodly-devotion/MochiDiffusion2023

anything-v4

スクリーンショット 2023-03-22 0 47 53
Google Drive LinkOriginal ModelLicenseRun on macConversion ScriptYear
anything-v4.5andite/anything-v4.0Fantasy.aigodly-devotion/MochiDiffusiongodly-devotion/MochiDiffusion2023

Openjourney

スクリーンショット 2023-03-22 7 49 39
Google Drive LinkOriginal ModelLicenseRun on macConversion ScriptYear
Openjourneyprompthero/openjourney-godly-devotion/MochiDiffusiongodly-devotion/MochiDiffusion2023

dreamlike-photoreal-2

dreamlike
Google Drive LinkOriginal ModelLicenseRun on macConversion ScriptYear
dreamlike-photoreal-2.0dreamlike-art/dreamlike-photoreal-2.0CreativeML OpenRAIL-Mgodly-devotion/MochiDiffusiongodly-devotion/MochiDiffusion2023

Image Colorization

DDColor Tiny

DDColor — AI image colorization for grayscale/B&W photos using dual decoders (ICCV 2023).

InputOutput
Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
DDColor_Tiny.mlpackage.zip242 MB512×512 RGBAB channels (LAB)piddnad/DDColorApache-2.02023DDColorDemoconvert_ddcolor.py

Face Recognition

AdaFace IR-18

AdaFace — Quality-adaptive face recognition. Outputs 512-dim embedding for face verification and identification.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
AdaFace_IR18.mlpackage.zip48 MBImage (112×112 face)512-dim L2-normalized embeddingmk-minchul/AdaFaceMIT2022AdaFaceDemoconvert_adaface.py

3D Face Pose Estimation

3DDFA_V2

3DDFA_V2 — 3D face reconstruction and head pose estimation (yaw, pitch, roll) from a single face image.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample Project
3DDFA_V2.mlpackage.zip6.3 MBImage (120×120 RGB)62 params (12 pose + 40 shape + 10 expression)cleardusk/3DDFA_V2MIT2020Face3DDemo

Speaker Diarization

pyannote segmentation-3.0

pyannote segmentation — Speaker diarization with up to 3 simultaneous speakers. Identifies who speaks when, with overlap detection and per-speaker transcription.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
SpeakerSegmentation.mlpackage.zip5.8 MB10s mono 16kHz [1,1,160000][1, 589, 7] speaker logitspyannote/segmentation-3.0MIT2023DiarizationDemoconvert_diarization.py

Voice Conversion

OpenVoice V2

OpenVoice — Zero-shot voice conversion. Record source and target voice, convert on-device.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
OpenVoice_SpeakerEncoder.mlpackage.zip1.7 MBSpectrogram [1, T, 513]256-dim speaker embeddingmyshell-ai/OpenVoiceMIT2024OpenVoiceDemoconvert_openvoice.py
OpenVoice_VoiceConverter.mlpackage.zip64 MBSpectrogram + speaker embeddingsWaveform audio (22050 Hz)

Audio Source Separation

HTDemucs

Hybrid Transformer Demucs — separates music into 4 stems: drums, bass, vocals, and other instruments.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
HTDemucs_SourceSeparation_F32.mlpackage.zip80 MBAudio Waveform [1, 2, 343980] at 44.1kHz4 stems (drums, bass, other, vocals) stereofacebookresearch/demucsMIT2022DemucsDemoconvert_htdemucs.py

Vision-Language

Florence-2-base

Microsoft Florence-2 — a unified vision-language model supporting image captioning, OCR, and object detection from a single model. Converted as 3 CoreML models (INT8): Vision Encoder (DaViT), Text Encoder (BART), and Decoder with autoregressive generation.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
Florence2VisionEncoder / TextEncoder / Decoder260 MB (INT8, 3 models total)768x768 RGB image + task promptGenerated text (caption, OCR, etc.)microsoft/Florence-2-baseMIT2024Florence2Democonvert_florence2.py

Language Model

john-rocky/CoreML-LLM — Companion repository for running LLMs on the Apple Neural Engine. Unlike MLX Swift (GPU-only), CoreML-LLM targets ANE for ~10x lower power draw, making always-on on-device LLMs practical on iPhone. Current release v1.4.0 — Gemma 4 E2B 3-chunk decode (31.6 → 34.2 tok/s, +8.2%), chunk pipelining default ON, still-image vision encoder on ANE. All models below load via the same CoreMLLLM.load(...) Swift API and are available in-app through the Models Zoo hub.

ModelSizeModalitiesiPhone 17 Pro decodeHuggingFace
Gemma 4 E2B3.1 GBText + image + audio + video31–34 tok/smlboydaisuke/gemma-4-E2B-coreml
Gemma 4 E4B5.5 GBText~14 tok/smlboydaisuke/gemma-4-E4B-coreml
Qwen3.5 2B2.4 GBText~17 tok/s (~200 MB RSS)mlboydaisuke/qwen3.5-2B-CoreML
Qwen3.5 0.8B754 MBText~20 tok/smlboydaisuke/qwen3.5-0.8B-CoreML
Qwen3-VL 2B4.7 GBText + image~7.5 tok/smlboydaisuke/qwen3-vl-2b-coreml

Gemma 4 E2B (CoreML-LLM)

Google Gemma 4 E2B (2.3B effective parameters with Per-Layer Embeddings) running fully on ANE. Multimodal: text, image (native 384x384 encoder, 196 tokens/image), audio (12-layer Conformer encoder), and video (64 tokens/frame). 2048 context length, Sliding Window Attention (28/35 layers are O(W)), PLE computed inside the graph. The default 4-chunk decode ships at 31.6 tok/s on iPhone 17 Pro; LLM_3CHUNK=1 bumps it to 34.2 tok/s by collapsing chunk 2+3.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectSwift Package
mlboydaisuke/gemma-4-E2B-coreml3.1 GB (INT4, 4 chunks + vision + audio + video encoders)Text + image + audio + video (≤2048 tokens)Generated text (streaming)google/gemma-3n-E2B-itGemma ToU2025CoreMLLLMChatCoreML-LLM

Gemma 4 E4B

Larger text-only Gemma 4 variant — 42-layer decoder, ~4B effective parameters, 100% ANE-resident. Use when you want maximum text quality and have the storage budget. No vision / audio / video encoders.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectSwift Package
mlboydaisuke/gemma-4-E4B-coreml5.5 GB (INT4, 4 chunks)Text prompt (≤2048 tokens)Generated text (streaming)google/gemma-3n-E4B-itGemma ToU2025CoreMLLLMChatCoreML-LLM

Qwen3.5 2B

Alibaba Qwen3.5 2B — hybrid Gated-DeltaNet SSM + attention. Shipped as 4 INT8 body chunks (6 layers each) + tail + mmap fp16 embed sidecar so a 2B-param model fits in ~200 MB phys_footprint. The 4-chunk split is required to stay ANE-resident — a 2-chunk variant at 2 GB fp16/chunk exceeds the single-mlprogram budget and falls to GPU.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectSwift Package
mlboydaisuke/qwen3.5-2B-CoreML2.4 GB (INT8, 4 chunks + embed)Text promptGenerated text (streaming)Qwen/Qwen3.5-2BApache-2.02025CoreMLLLMChatCoreML-LLM

Qwen3.5 0.8B

Compact hybrid SSM+attention model, INT8 palettized — same semantic precision as fp16 (top-3 = 100% parity vs fp32 oracle), half the bundle size. Smallest and fastest option in the lineup at 754 MB / ~20 tok/s decode.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectSwift Package
mlboydaisuke/qwen3.5-0.8B-CoreML754 MB (INT8 palettized)Text promptGenerated text (streaming)Qwen/Qwen3.5-0.8BApache-2.02025CoreMLLLMChatCoreML-LLM

Qwen3-VL 2B

Qwen3-VL multimodal — text + image input with DeepStack injection at L0/1/2 and interleaved mRoPE for the 196 image tokens. 28-layer GQA text backbone shipped as 6 INT8 body chunks + chunk_head + raw fp16 embed sidecar that Swift mmaps. Vision tower re-uses Qwen3-VL's native ViT.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectSwift Package
mlboydaisuke/qwen3-vl-2b-coreml4.7 GB (INT8, 6 body chunks + head + embed)Text + imageGenerated text (streaming)Qwen/Qwen3-VL-2B-InstructApache-2.02025CoreMLLLMChatCoreML-LLM

See CoreML-LLM for the full conversion pipeline, ANE optimization techniques (cat-trick RMSNorm, Conv2d Linear, pre-computed RoPE, stateless KV with explicit I/O), and the Swift sample app.

Zero-Shot Image Classification

SigLIP ViT-B/16

Google SigLIP — sigmoid-based contrastive image-text model for zero-shot classification. Type any labels (e.g. "cat, dog, car") and get per-label probabilities. Converted as 2 CoreML models (INT8): Image Encoder and Text Encoder.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
SigLIP_ImageEncoder / TextEncoder386 MB (FP16, 2 models total)224x224 RGB image + text labelsPer-label similarity scores (softmax)google/siglip-base-patch16-224Apache-2.02024SigLIPDemoconvert_siglip.py

Text-to-Speech

Kokoro-82M

hexgrad/Kokoro-82M — open-weight 82M-parameter TTS by hexgrad. Style-conditioned StyleTTS2 architecture (BERT + duration predictor + iSTFTNet vocoder) producing 24kHz speech in 9 languages from per-voice style embeddings. The first CoreML port with on-device bilingual (English + Japanese) free-text input — no MLX, no MeCab, no IPADic, no Python G2P at runtime.

2 CoreML models: a flexible-length Predictor (BERT + LSTM duration head + text encoder) and 3 fixed-shape Decoder buckets (128 / 256 / 512 frames). The Swift pipeline picks the smallest bucket that fits the predicted total duration, pads input features with zeros, and trims the output audio.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
Kokoro_Predictor.mlpackage.zip75 MBinput_ids [1, T≤256] (int32) + ref_s_style [1, 128]duration [1, T] + d_for_align [1, 640, T] + t_en [1, 512, T]hexgrad/Kokoro-82MApache-2.02025KokoroDemoconvert_kokoro.py
Kokoro_Decoder_128.mlpackage.zip238 MBen_aligned [1, 640, 128] + asr_aligned [1, 512, 128] + ref_s [1, 256]audio [1, 76800] @ 24kHz
Kokoro_Decoder_256.mlpackage.zip241 MBen_aligned [1, 640, 256] + asr_aligned [1, 512, 256] + ref_s [1, 256]audio [1, 153600] @ 24kHz
Kokoro_Decoder_512.mlpackage.zip246 MBen_aligned [1, 640, 512] + asr_aligned [1, 512, 512] + ref_s [1, 256]audio [1, 307200] @ 24kHz

See sample_apps/KokoroDemo/README.md for the on-device G2P (English + Japanese), bucketed decoder strategy, and conversion details.

Anomaly Detection

EfficientAD

EfficientAD (PDN-Small) — lightweight unsupervised anomaly detection for industrial inspection. Wraps teacher, student, and autoencoder networks into a single model that outputs a per-pixel anomaly heatmap and image-level anomaly score. Pretrained on MVTec AD bottle category.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
EfficientAD_Bottle.mlpackage.zip15 MB (FP16)256x256 RGB imageanomaly_map [1,1,256,256] + anomaly_score [0-1]nelson1425/EfficientADMIT2023EfficientADDemoconvert_efficientad.py

Music Transcription

Basic Pitch

spotify/basic-pitch — polyphonic Automatic Music Transcription. Converts any audio (any instrument, any voice) into MIDI notes with pitch bend detection. Just 17K parameters / 272 KB — runs in real time on iPhone with full ANE acceleration.

The first open-source iOS implementation. Loads any audio file, runs the CoreML model in 2-second sliding windows, then runs the full Python note_creation.py pipeline natively in Swift (onset inference, greedy backwards-in-time tracking, melodia trick, pitch bend extraction). Detected notes are visualized as a piano roll, exported as a Standard MIDI File, and played back through a built-in additive sine synth so you can A/B compare with the original audio.

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample Project
BasicPitch_nmp.mlpackage.zip272 KBaudio waveform [1, 43844, 1] @ 22050 Hz mononote [1,172,88] + onset [1,172,88] + contour [1,172,264]spotify/basic-pitchApache-2.02022BasicPitchDemo

See sample_apps/BasicPitchDemo/README.md for the sliding-window inference, post-processing port, and iOS-specific gotchas.

Text-to-Music Generation

Stable Audio Open Small

stabilityai/stable-audio-open-small — text-to-music generation (497M params). Generates up to 11.9 seconds of stereo 44.1kHz audio from text prompts using rectified flow diffusion.

4 CoreML models: T5 text encoder, NumberEmbedder (seconds conditioning), DiT (diffusion transformer), and VAE decoder (Oobleck).

Download LinkSizeInputOutputOriginal ProjectLicenseYearSample ProjectConversion Script
StableAudioT5Encoder.mlpackage.zip105 MBinput_ids [1, 64]text_embeddings [1, 64, 768]stabilityai/stable-audio-open-smallStability AI Community2024StableAudioDemoconvert_stable_audio.py
StableAudioNumberEmbedder.mlpackage.zip396 KBnormalized_seconds [1]seconds_embedding [1, 768]
StableAudioDiT.mlpackage.zip326 MBlatent [1,64,256] + timestep + conditioningvelocity [1,64,256]
StableAudioDiT_FP32.mlpackage.zip1.3 GBlatent [1,64,256] + timestep + conditioningvelocity [1,64,256]
StableAudioVAEDecoder.mlpackage.zip149 MBlatent [1, 64, 256]stereo audio [1, 2, 524288] at 44.1kHz

See sample_apps/StableAudioDemo/README.md for INT8 vs FP32 DiT selection and conversion details.

Models converted by someone other than me.

Stable Diffusion

apple/ml-stable-diffusion

How to use in a xcode project.

Option 1,implement Vision request.


import Vision
lazy var coreMLRequest:VNCoreMLRequest = {
   let model = try! VNCoreMLModel(for: modelname().model)
   let request = VNCoreMLRequest(model: model, completionHandler: self.coreMLCompletionHandler)
   return request
   }()

let handler = VNImageRequestHandler(ciImage: ciimage,options: [:])
   DispatchQueue.global(qos: .userInitiated).async {
   try? handler.perform([coreMLRequest])
}

If the model has Image type output:

let result = request?.results?.first as! VNPixelBufferObservation
let uiimage = UIImage(ciImage: CIImage(cvPixelBuffer: result.pixelBuffer))

Else the model has Multiarray type output:

For visualizing multiArray as image, Mr. Hollance’s “CoreML Helpers” are very convenient. CoreML Helpers

Converting from MultiArray to Image with CoreML Helpers.

func coreMLCompletionHandler(request:VNRequest?、error:Error?){
   let = coreMLRequest.results?.first as!VNCoreMLFeatureValueObservation
   let multiArray = result.featureValue.multiArrayValue
   let cgimage = multiArray?.cgImage(min:-1、max:1、channel:nil)

Option 2,Use CoreGANContainer. You can use models with dragging&dropping into the container project.

Make the model lighter

You can make the model size lighter with Quantization if you want. https://coremltools.readme.io/docs/quantization

The lower the number of bits, more the chances of degrading the model accuracy. The loss in accuracy varies with the model.

import coremltools as ct
from coremltools.models.neural_network import quantization_utils

# load full precision model
model_fp32 = ct.models.MLModel('model.mlmodel')

model_fp16 = quantization_utils.quantize_weights(model_fp32, nbits=16)
# nbits can be 16(half size model), 8(1/4), 4(1/8), 2, 1
quantized sample (U2Net)
InputImage / nbits=32(original) / nbits=16 / nbits=8 / nbits=4

Thanks

Cover image was taken from Ghibli free images.

On YOLOv5 convertion, dbsystel/yolov5-coreml-tools give me the super inteligent convert script.

And all of original projects

Auther

Daisuke Majima Freelance engineer. iOS/MachineLearning/AR I can work on mobile ML projects and AR project. Feel free to contact: rockyshikoku@gmail.com

GitHub Twitter Medium