Skip to content

This repo provides scripts for converting tensorflow and pytorch models to coreml for variety of tasks. Converted models like efficientDet, mobilenetV3, efficientNet in coreml format is also provided

gouthamvgk/coreml_conversion_hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CoreML Conversion Hub

This repository contains the code for converting various deep learning models from Tensorflow and Pytorch to CoreML format. Converting models in standard frameworks like Tensorflow and Pytorch isn't always a straightforward process as the conversion libraries are still evolving and may have to change the code for different kinds of model types. In addition to the converted CoreML models, this repo also contains the code for converting them so that users can use them for converting some other models of similar types. Use the IOS app AiBench to benchmark all these provided models on real devices.

Requirements

  • tensorflow == 2.2.0
  • coremltools == 3.4
  • onnx_coreml == 1.3
  • onnx == 1.7.0
  • torch == 1.5.1

Conversion code

All the conversion codes are present under either Tensorflow or Pytorch directory with names mentioned in the below table. Run them to download the models in the original framework format from the source and convert them. Go through the code comments for understanding various model surgery performed for creating the model in correct format.

CoreML Library

Classification models like mobilenet, efficientnet, resnet, inception are provided

Classification

Model Name Download Link
Mobilenet V1 mobilenetV1.mlmodel
Mobilenet V2 mobilenetV2.mlmodel
Resnet V2 resnetV2.mlmodel
Inception V3 inceptionV3.mlmodel

EfficientNet-Lite

Model Name Download Link
Eff-Lite-b0 efflite_b0.mlmodel
Eff-Lite-b1 efflite_b1.mlmodel
Eff-Lite-b2 efflite_b2.mlmodel
Eff-Lite-b3 efflite_b3.mlmodel
Eff-Lite-b4 efflite_b4.mlmodel

EfficientNet-Edge-TPU

Model Name Download Link
Eff-Edge-Small eff_edgetpu_small.mlmodel
Eff-Edge-Medium eff_edgetpu_medium.mlmodel
Eff-Edge-Large eff_edgetpu_large.mlmodel

MobileNet V3

Model Name Download Link
Mbnet-V3-Small mobilenetV3_small.mlmodel
Mbnet-V3-Large mobilenetV3_large.mlmodel
Mbnet-V3-Small-Minimal mobilenetV3_small_min.mlmodel
Mbnet-V3-Large-Minimal mobilenetV3_large_min.mlmodel

Detection

Mobilenet based SSD networks and EfficientDet models are provided.

Model Name Download Link
SSD-MbNet-V2 MobileNetV2_SSDLite.mlmodel
SSD-MbNet-V3-Small ssd_mobilenet_v3_small.mlmodel
SSD-MbNet-V3-Large ssd_mobilenet_v3_large.mlmodel

EfficienetDet

Model Name Download Link
EfficientDet-D0 efficientdet_0.mlmodel
EfficientDet-D1 efficientdet_1.mlmodel
EfficientDet-D2 efficientdet_2.mlmodel
EfficientDet-D3 efficientdet_3.mlmodel

Face Analysis

Model Name Download Link
Blazeface-Mediapipe blazeface_pipeline.mlmodel
FaceMesh-Mediapipe facemesh.mlmodel

Credits

About

This repo provides scripts for converting tensorflow and pytorch models to coreml for variety of tasks. Converted models like efficientDet, mobilenetV3, efficientNet in coreml format is also provided

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages