Home

Awesome

CoreML-Models

Converted Core ML Model Zoo.

<img width="1280" src="https://user-images.githubusercontent.com/23278992/147420041-fdeb1fbb-7e93-41c6-84d6-80d7c1c45200.jpeg">

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.

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

<img width="400" alt="スクリーンショット 2021-12-27 6 34 43" src="https://user-images.githubusercontent.com/23278992/147420587-108b87f8-7996-4288-905a-ad53f9142221.png">
Google Drive LinkSizeDatasetOriginal ProjectLicense
Efficientnetb022.7 MBImageNetTensorFlowHubApache2.0

Efficientnetv2

<img width="400" alt="スクリーンショット 2021-12-31 4 30 22" src="https://user-images.githubusercontent.com/23278992/147782567-bbf26186-8c84-4073-8df4-b08e06d4e791.png">
Google Drive LinkSizeDatasetOriginal ProjectLicenseYear
Efficientnetv285.8 MBImageNetGoogle/autoMLApache2.02021

VisionTransformer

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

<img width="400" alt="スクリーンショット 2022-01-07 10 37 05" src="https://user-images.githubusercontent.com/23278992/148482246-64269fb4-fda4-4bd5-b219-5bf860fd77e7.png">
Google Drive LinkSizeDatasetOriginal ProjectLicenseYear
VisionTransformer-B16347.5 MBImageNetgoogle-research/vision_transformerApache2.02021

Conformer

Local Features Coupling Global Representations for Visual Recognition.

<img width="400" alt="スクリーンショット 2022-01-07 11 34 33" src="https://user-images.githubusercontent.com/23278992/148482144-2d5bb7e8-ed67-4146-9f9d-c95fe94735d3.png">
Google Drive LinkSizeDatasetOriginal ProjectLicenseYear
Conformer-tiny-p1694.1 MBImageNetpengzhiliang/ConformerApache2.02021

DeiT

Data-efficient Image Transformers

<img width="400" alt="スクリーンショット 2022-01-07 11 50 25" src="https://user-images.githubusercontent.com/23278992/148484220-38494287-49b4-4992-9ceb-9dc7b75a250e.png">
Google Drive LinkSizeDatasetOriginal ProjectLicenseYear
DeiT-base384350.5 MBImageNetfacebookresearch/deitApache2.02021

RepVGG

Making VGG-style ConvNets Great Again

<img width="400" alt="スクリーンショット 2022-01-08 5 00 53" src="https://user-images.githubusercontent.com/23278992/148600326-69dd9666-2709-4318-914b-30db8c294fd3.png">
Google Drive LinkSizeDatasetOriginal ProjectLicenseYear
RepVGG-A033.3 MBImageNetDingXiaoH/RepVGGMIT2021

RegNet

Designing Network Design Spaces

<img width="400" alt="スクリーンショット 2022-02-23 7 38 23" src="https://user-images.githubusercontent.com/23278992/155233183-edf61ebe-922c-4b63-8a5e-7ef6c9f7eaa8.png">
Google Drive LinkSizeDatasetOriginal ProjectLicenseYear
regnet_y_400mf16.5 MBImageNetTORCHVISION.MODELSMIT2020

MobileViTv2

CVNets: A library for training computer vision networks

<img width="400" alt="スクリーンショット 2022-02-23 7 38 23" src="https://user-images.githubusercontent.com/23278992/225600794-a0a4dc00-cc67-4614-82ed-3ed8633cf03e.png">
Google Drive LinkSizeDatasetOriginal ProjectLicenseYearConversion Script
MobileViTv218.8 MBImageNetapple/ml-cvnetsapple2022Open In Colab

Object Detection

YOLOv5s

<img width="400" alt="スクリーンショット 2021-12-29 6 17 08" src="https://user-images.githubusercontent.com/23278992/147608051-be2ff345-22e8-4f82-83ed-7cc41ce4084d.png">
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

<img width="400" alt="スクリーンショット 2021-12-29 6 17 08" src="https://user-images.githubusercontent.com/23278992/178128011-e0056777-0c2a-495b-b132-7741cc693077.png">
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

<img width="400" alt="スクリーンショット 2021-12-29 6 17 08" src="https://user-images.githubusercontent.com/23278992/211807010-d48854b3-beb0-46a8-bd99-cbb9351529b0.png">
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

Segmentation

U2Net

<img width="400" src="https://camo.qiitausercontent.com/a8e89c72c0950db66d63415b9010d203aae22617/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e61702d6e6f727468656173742d312e616d617a6f6e6177732e636f6d2f302f3233353235392f36303037393162322d633534332d613537652d303639622d3863663130373932643662392e6a706567"> <img width="400" src="https://camo.qiitausercontent.com/4f502487cd9e9e02d150ad63b33683a1446e7516/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e61702d6e6f727468656173742d312e616d617a6f6e6177732e636f6d2f302f3233353235392f39636532633237612d643134322d663136352d343365662d6532373966646337386333382e706e67">

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

<img width="400" src="https://user-images.githubusercontent.com/23278992/179818731-b919c8a2-f5c9-4a80-8666-e3034d1e86f0.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/179818740-38336aec-c9c5-4471-b529-ae45286062b5.JPG"> <img width="400" src="https://user-images.githubusercontent.com/23278992/186722092-3b8ed1a1-4a03-4357-9bfd-9ec213e7d87d.jpeg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/186791654-42b4ba54-f06f-43d3-805b-5bb89e5df272.JPG">

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.

<img src="https://github.com/john-rocky/PersonSegmentationSampler/assets/23278992/2a91ec10-fe94-43be-aedc-283e71fa9a1e" width=400> <img src="https://github.com/john-rocky/PersonSegmentationSampler/assets/23278992/04af501d-996d-48f4-b008-f0076dcbc117" width=400>

Google Drive LinkSizeOutputOriginal ProjectLicenseyearConversion Script
RMBG.mlpackage/RMBG.mlmodel176 MBImage(GrayScale 1024x1024)briaai/RMBG-1.4Creative Commons2024Open In Colab

face-Parsing

<img src="https://user-images.githubusercontent.com/23278992/147860040-14a7e022-5490-4e51-98cd-cd421066dd8c.png" width=400> <img src="https://user-images.githubusercontent.com/23278992/147860042-d27f37b0-227b-45ab-8d76-f6c6f2f5b3a4.png" width=400>

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

<img src="https://user-images.githubusercontent.com/23278992/148621010-5ecf6b90-c501-4cf8-91e1-446850030265.png" width=400> <img src="https://user-images.githubusercontent.com/23278992/148621013-44d9cd29-ef3c-4250-bbd9-4e4093385a54.JPG" width=400>

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

<img src="https://user-images.githubusercontent.com/23278992/148663182-c1f3b9dd-8db4-49be-bf92-97a898a8b477.jpg" width=400> <img src="https://user-images.githubusercontent.com/23278992/148663183-327dc684-342d-43f1-a8d8-ebf817c91bdd.JPG" width=400>

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

DNL

Disentangled Non-Local Neural Networks

<img src="https://user-images.githubusercontent.com/23278992/150061280-23a1de7c-2e12-41d2-9056-7c4b375193a6.jpg" width=400> <img src="https://user-images.githubusercontent.com/23278992/150061290-eed50b79-f5c0-4fa4-b5bf-728b9029f34c.png" width=400>

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

<img src="https://user-images.githubusercontent.com/23278992/150234575-7dcb8521-4ebd-46aa-bd19-4c1036b514dc.jpg" width=400> <img src="https://user-images.githubusercontent.com/23278992/150234561-41478d2a-b411-48df-9980-8553c381e530.png" width=400>

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

<img src="https://user-images.githubusercontent.com/23278992/150237380-3b8522e6-e310-436e-b5c3-60b7ff8cb606.jpg" width=400> <img src="https://user-images.githubusercontent.com/23278992/150237372-1d17f4e2-cf1b-49f0-82b8-d9e6644ff465.png" width=400>

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

<img src="https://user-images.githubusercontent.com/23278992/150239404-9d6438ec-cee5-44b9-9179-436ac5ceaab2.jpg" width=400> <img src="https://user-images.githubusercontent.com/23278992/150239421-cceaae77-eb6b-468d-a069-72750fc6b0f4.png" width=400>

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)

<img src="https://user-images.githubusercontent.com/23278992/150419837-980a0e0f-6333-4853-b638-6e6854e093e3.jpg" width=400> <img src="https://user-images.githubusercontent.com/23278992/150419740-052fca9b-0519-440c-bffd-5abc7a5ac240.png" width=400>

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

Semantic-FPN

Panoptic Feature Pyramid Networks

<img src="https://user-images.githubusercontent.com/23278992/150614015-6b712113-6b8f-484e-88dc-124b76229153.jpg" width=400> <img src="https://user-images.githubusercontent.com/23278992/150614022-590eb6fa-075f-4ff7-8ad5-b9d502b8763b.png" width=400>

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.

<img src="https://user-images.githubusercontent.com/23278992/154873792-54c12be0-d446-4789-bf00-bb89cab5a566.jpg" width=400> <img src="https://user-images.githubusercontent.com/23278992/154873786-2b90e0d9-dd86-4397-8977-ea1464ca2f75.JPG" width=400>

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

easyportrait

EasyPortrait - Face Parsing and Portrait Segmentation Dataset.

<img src="https://github.com/john-rocky/CoreML-Models/assets/23278992/6ab8ed6a-2de7-43fd-bb84-2fb77286bd6c" width=400> <img src="https://github.com/john-rocky/CoreML-Models/assets/23278992/a0b8e435-d04e-4a88-940b-bd5fb45cbc15" width=400>

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

Super Resolution

Real ESRGAN

<img width="400" src="https://user-images.githubusercontent.com/23278992/147418147-47f2089f-80ea-4688-ac06-7d9c4b46a08e.png"> <img width="400" src="https://user-images.githubusercontent.com/23278992/147418143-b8f89073-afa1-4c5c-95e9-2ee8a00a94b9.JPG">

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

<img width="400" src="https://user-images.githubusercontent.com/23278992/186315786-56634605-e357-4e9e-a0d9-51bb526bf69f.png"> <img width="400" src="https://user-images.githubusercontent.com/23278992/186316328-1fc64a6f-a443-4df2-bb86-0af343cd8a64.png">

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

BSRGAN

<img width="400" src="https://user-images.githubusercontent.com/23278992/148810656-4c5faa33-1be9-45f6-b31a-defd931cb1f8.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/148811822-56844bc7-b197-44d5-8454-757890c890b5.jpg">

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

A-ESRGAN

<img width="400" src="https://user-images.githubusercontent.com/23278992/151077592-a993a19c-8a05-471a-8924-c7302f7af84b.png"> <img width="400" src="https://user-images.githubusercontent.com/23278992/151077667-62bdbe2b-8e00-4816-945a-14890ccf1bcd.png">

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

<img width="400" src="https://user-images.githubusercontent.com/23278992/151282027-14a5d386-60a8-4152-bff1-a0416db81d7a.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/151282014-1177b73d-a2b3-40eb-9a87-9cbe8ace504b.jpg">

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.

<img width="400" src="https://user-images.githubusercontent.com/23278992/152622988-795c1279-43f7-4d8a-a2ea-a786bcd6a34b.png"> <img width="400" src="https://user-images.githubusercontent.com/23278992/152622984-fbc911c5-901c-4ce3-93b6-753f35dea531.png">

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

Fast-SRGAN

Fast-SRGAN.

<img width="400" src="https://user-images.githubusercontent.com/23278992/156285673-a6239cec-41ec-46d8-a2fa-d0ad21498f1d.png"> <img width="400" src="https://user-images.githubusercontent.com/23278992/156285686-8d0333a2-b07f-4aa2-8a44-fe959758289f.png">

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

ESRGAN

Enhanced-SRGAN.

<img width="400" src="https://user-images.githubusercontent.com/23278992/156899173-bdc1ceed-c3f6-4abd-b217-18667fc88cf6.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/156899267-65343f4e-a963-4680-83ba-7ecd7e6680a5.jpg">

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

UltraSharp

Pretrained: 4xESRGAN

<img width="400" src="https://github.com/john-rocky/PersonSegmentationSampler/assets/23278992/b98ab056-23b0-486e-a52c-a88e857c1048"> <img width="400" src="https://github.com/john-rocky/PersonSegmentationSampler/assets/23278992/d4214ded-c9d2-4f18-8de3-222f912862b0">

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.

<img width="400" src="https://user-images.githubusercontent.com/23278992/156899475-172b7ac5-a6ca-4b0b-a6d8-f0d0ddea986e.png"> <img width="400" src="https://user-images.githubusercontent.com/23278992/156899476-641af271-9b2e-4122-a048-099700d8335a.png">

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

SRResNet

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

<img width="400" src="https://user-images.githubusercontent.com/23278992/156899905-40746d09-4580-4e30-b0b4-b146fd1975c2.png"> <img width="400" src="https://user-images.githubusercontent.com/23278992/156899906-ab5c8c4e-54af-4d55-874b-5d1e0aac961f.JPG">

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

LESRCNN

Lightweight Image Super-Resolution with Enhanced CNN.

<img width="400" src="https://user-images.githubusercontent.com/23278992/180625941-3a6b44a6-35e1-4ff9-a85b-c5efc81fc101.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/180625939-308f7176-488a-40a1-ab6e-428dc01bbf67.jpg">

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

<img width="400" src="https://user-images.githubusercontent.com/23278992/186336018-9c5d5700-28a7-438e-bc07-5ca2a8e843cd.png"> <img width="400" src="https://user-images.githubusercontent.com/23278992/186336038-5e877d1a-33b1-4f54-9e4d-192f9bb765fe.png">

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

<img width="400" src="https://github.com/john-rocky/PersonSegmentationSampler/assets/23278992/7e806f4d-0323-431a-89e8-816163e5c3f5"> <img width="400" src="https://github.com/john-rocky/PersonSegmentationSampler/assets/23278992/8589f89b-367d-4777-8ebd-6e78253c4b33">

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

Low Light Enhancement

StableLLVE

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

<img width="400" src="https://user-images.githubusercontent.com/23278992/148664179-4d0cd417-d8f9-4d0e-bc05-cff3a4a30b5a.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/148664220-c756198f-e8c5-4ea8-8737-59c004d2f08c.jpg">

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

Zero-DCE

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

<img width="400" src="https://user-images.githubusercontent.com/23278992/151897265-7c3c0295-69c3-4c90-9dcc-d04bbcfd41a3.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/151897430-f16d84f0-170c-4e54-a08d-ad4d5b6ca47a.jpg">

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

<img width="256" src="https://github.com/john-rocky/PersonSegmentationSampler/assets/23278992/296650ba-e2a9-49ba-b2d6-be02e8b56f09"> <img width="256" src="https://github.com/john-rocky/PersonSegmentationSampler/assets/23278992/eac9f78a-2b00-442a-b73f-01760268184e">

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

<img width="400" src="https://user-images.githubusercontent.com/23278992/149243725-79c68d8e-db6c-4114-ac64-738cd6b5c37c.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/149243509-7eff6ae8-65c2-45ba-bfa2-d730657ab2bd.png">

Denoising

<img width="400" src="https://user-images.githubusercontent.com/23278992/149241165-534c54db-7e98-4356-8613-44acb93d4c6a.png"> <img width="400" src="https://user-images.githubusercontent.com/23278992/149242199-7cc3e456-7c8d-441c-b0aa-f1b6ca19a5c9.png">

Deraining

<img width="400" src="https://user-images.githubusercontent.com/23278992/149241095-91791593-416e-41b0-8a95-71819cb7fb06.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/149241720-afe94607-e9c2-45bb-988d-3c322d7dde1a.jpg">

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

<img width="400" src="https://user-images.githubusercontent.com/23278992/176293658-6715e545-fe9b-4b21-b374-1394740efdde.png"> <img width="400" src="https://user-images.githubusercontent.com/23278992/176293741-dc77831a-86d0-4bdc-a667-96d318d064c4.png">

Super Resolution

<img width="400" src="https://user-images.githubusercontent.com/23278992/176276244-93535414-bc0e-423d-9c0a-18ba432391a4.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/176276266-75228905-2266-4c2c-b42a-026803a0da3b.jpg">

Contrast Enhancement

<img width="400" src="https://user-images.githubusercontent.com/23278992/176286891-563c92cd-1817-406a-babb-7dd9b0cccc01.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/176296935-bce82abf-6420-43ae-924e-5b98ee956431.jpg">

Low Light Enhancement

<img width="400" src="https://user-images.githubusercontent.com/23278992/176283269-145a5ce4-709a-4eea-91a7-b924b598a03d.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/176283354-c45a6247-b1c2-43f8-8b43-8fcf0ddac64f.jpg">

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

<img width="400" src="https://user-images.githubusercontent.com/23278992/147397892-773c55ca-55fc-422b-a95b-a729eda04077.JPG"> <img width="400" src="https://user-images.githubusercontent.com/23278992/147397894-e2d3a1ef-7afa-410a-9580-f09ef7157c50.JPG">

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

DCGAN

<img width="400" src="https://user-images.githubusercontent.com/23278992/144690829-3a4cebcf-ee73-4df0-b8db-1dfc2e616798.png">
Google Drive LinkSizeOutputOriginal Project
DCGAN 9.2MBMultiArrayTensorFlowCore

Image2Image

Anime2Sketch

<img width="400" src="https://user-images.githubusercontent.com/23278992/147990751-9ac35e43-b9a6-4db2-af5c-37978322240d.jpeg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/147990892-d676142c-62c4-433d-9835-337b1293bfc4.jpeg">

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

AnimeGAN2Face_Paint_512_v2

<img width="400" src="https://camo.qiitausercontent.com/74a02b6e0b80e52c2ae3af798c93eea9aa3e394d/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e61702d6e6f727468656173742d312e616d617a6f6e6177732e636f6d2f302f3233353235392f30313764616563342d333933312d643664662d303339322d6162313039303237313963642e706e67"> <img width="400" src="https://camo.qiitausercontent.com/311349da47136ff9ce61701d09ce59dc663c95bf/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e61702d6e6f727468656173742d312e616d617a6f6e6177732e636f6d2f302f3233353235392f66633337653936332d383533302d333731312d643163662d3335366266646666316665322e706e67">

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

Photo2Cartoon

<img width="400" src="https://user-images.githubusercontent.com/23278992/147394190-01a2c6be-5056-4f83-b4af-3f494dad47f4.png"> <img width="400" src="https://user-images.githubusercontent.com/23278992/147394192-46de7634-c3ce-481f-afa5-8a7ab4603f2e.png">

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

<img width="400" src="https://user-images.githubusercontent.com/23278992/147421574-8f38367c-d5c5-442d-9742-7b2bb24d43e4.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/147421569-df8e2e59-fef8-4db4-9cb2-65ee960ef705.png">

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

AnimeGANv2_Paprika

<img width="400" src="https://user-images.githubusercontent.com/23278992/144670978-1447ce28-db49-4cf9-b484-3142ef703ade.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/144671455-f7258cc9-1a3e-49df-8bbb-03285c619b17.png">

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

WarpGAN Caricature

<img width="400" src="https://user-images.githubusercontent.com/23278992/147397894-e2d3a1ef-7afa-410a-9580-f09ef7157c50.JPG"> <img width="400" src="https://user-images.githubusercontent.com/23278992/147421276-574edb28-f909-4830-afd0-5cb41328bdba.JPG">

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

UGATIT_selfie2anime

<img width="400" alt="スクリーンショット 2021-12-27 8 18 33" src="https://user-images.githubusercontent.com/23278992/147422391-847b3c75-3e6e-419e-9a53-f6138b9ac813.png"> <img width="400" alt="スクリーンショット 2021-12-27 8 28 11" src="https://user-images.githubusercontent.com/23278992/147422387-2b71a135-cd9c-4f02-8223-65bf365cda4e.png">

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

<img width="400" src="https://user-images.githubusercontent.com/23278992/155708074-ab651a7c-b882-40f1-9ce5-a94e80bac62d.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/155708089-ee888836-3f18-41a1-97fd-72e17e604c9a.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/155707184-403ad161-6354-4ce4-87d4-284e323b1261.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/155708401-f76481ad-1de7-4262-acc2-9dcb61c89784.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/155707199-b77b2583-c355-4406-bc9a-3248492df2c7.jpg"> <img width="400" src="https://user-images.githubusercontent.com/23278992/155706861-97e629a0-4322-4924-94ed-cb10c966bfb8.jpg">

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

<img width="400" img src="https://user-images.githubusercontent.com/23278992/189335273-d05f9cdb-1375-4553-8146-2f598676a95b.jpg"> <img width="400" img src="https://user-images.githubusercontent.com/23278992/189335456-5184b222-9b55-429e-850a-adf4879a47fc.jpg">

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

FacialCartoonization

White-box facial image cartoonizaiton

<img width="400" img src="https://user-images.githubusercontent.com/23278992/189454922-1a95ca25-4031-47a7-8914-9fb8e5c7ff58.png"> <img width="400" img src="https://user-images.githubusercontent.com/23278992/189454801-19d6ef20-7361-41a5-b85b-5dbd7cf05adb.png">

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

Inpainting

AOT-GAN-for-Inpainting

<img width="400" src="https://user-images.githubusercontent.com/23278992/220097750-0cd3f94e-1c60-4e03-b9dc-e1ea14f3e57c.gif">
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

<img width="400" src="https://github.com/john-rocky/PersonSegmentationSampler/assets/23278992/847f874b-7174-4317-8313-f82685bdd20c">
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

MiDaS

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

<img width="400" img src="https://user-images.githubusercontent.com/23278992/224542700-701472b7-fa8c-4824-a966-f9490f7c780f.jpg"> <img width="400" img src="https://user-images.githubusercontent.com/23278992/224542703-11ed535f-40c6-4a45-8e3f-d42ce2b9c6f9.jpeg">

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

Stable Diffusion

stable-diffusion-v1-5

<img width="400" alt="スクリーンショット 2023-03-21 18 52 18" src="https://user-images.githubusercontent.com/23278992/226571395-0815ebdb-39e1-4763-bb16-25c33c5ae9bb.png">
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.

<img width="400" alt="スクリーンショット 2023-03-21 19 54 13" src="https://user-images.githubusercontent.com/23278992/226585761-3eaba244-7fea-4529-af36-0962fe624936.png">
Google Drive LinkOriginal ModelLicenseRun on macConversion ScriptYear
pastelMixStylizedAnime_pastelMixPrunedFP16andite/pastel-mixFantasy.aigodly-devotion/MochiDiffusiongodly-devotion/MochiDiffusion2023

Orange Mix

<img width="800" alt="スクリーンショット 2023-03-21 23 34 13" src="https://user-images.githubusercontent.com/23278992/226656177-8260d83c-6e93-4d9b-8fbd-154a0028f88d.png">
Google Drive LinkOriginal ModelLicenseRun on macConversion ScriptYear
AOM3_orangemixsWarriorMama777/OrangeMixsCreativeML OpenRAIL-Mgodly-devotion/MochiDiffusiongodly-devotion/MochiDiffusion2023

Counterfeit

<img width="800" alt="スクリーンショット 2023-03-22 0 47 53" src="https://user-images.githubusercontent.com/23278992/226731352-c6ad077d-6f91-4a03-a6e5-dd01ce398d9c.png">
Google Drive LinkOriginal ModelLicenseRun on macConversion ScriptYear
Counterfeit-V2.5gsdf/Counterfeit-V2.5-godly-devotion/MochiDiffusiongodly-devotion/MochiDiffusion2023

anything-v4

<img width="800" alt="スクリーンショット 2023-03-22 0 47 53" src="https://user-images.githubusercontent.com/23278992/226734890-8b48320f-5b4c-4f6c-bd56-07954f573582.png">
Google Drive LinkOriginal ModelLicenseRun on macConversion ScriptYear
anything-v4.5andite/anything-v4.0Fantasy.aigodly-devotion/MochiDiffusiongodly-devotion/MochiDiffusion2023

Openjourney

<img width="800" alt="スクリーンショット 2023-03-22 7 49 39" src="https://user-images.githubusercontent.com/23278992/226909583-42efdb55-e2f0-4331-be0d-7f4bcd2c8b2c.png">
Google Drive LinkOriginal ModelLicenseRun on macConversion ScriptYear
Openjourneyprompthero/openjourney-godly-devotion/MochiDiffusiongodly-devotion/MochiDiffusion2023

dreamlike-photoreal-2

<img width="800" alt="dreamlike" src="https://user-images.githubusercontent.com/23278992/226922948-1af2334b-0798-4aef-bfb4-464438dde1b9.png">
Google Drive LinkOriginal ModelLicenseRun on macConversion ScriptYear
dreamlike-photoreal-2.0dreamlike-art/dreamlike-photoreal-2.0CreativeML OpenRAIL-Mgodly-devotion/MochiDiffusiongodly-devotion/MochiDiffusion2023

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

<img src="https://user-images.githubusercontent.com/23278992/147712147-0959c0b9-9d4b-4049-9dd9-7a9d1ffa0eed.JPEG" width=200> <img src="https://user-images.githubusercontent.com/23278992/147712215-dd0c8788-75ad-4676-804a-fdd47233daa6.JPG" width=200> <img src="https://user-images.githubusercontent.com/23278992/147712220-d02ab436-9716-4cdc-91d3-8b6f3aa01fac.JPG" width=200> <img src="https://user-images.githubusercontent.com/23278992/147712259-aabf5ecf-db59-476d-8f36-e6027dfb91e2.JPG" width=200> <img src="https://user-images.githubusercontent.com/23278992/147712328-a44f538c-aa3e-431d-98ec-626239262e01.JPG" width=200>

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