Skip to content

A unified CoreML model conversion tools specific for YOLO models

Notifications You must be signed in to change notification settings

hwdavr/YOLO-CoreML-Converter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOLO-CoreML-Converter

license

Introduction

A conversion tool to convert Weights file, TensorFlow and PyTorch model to CoreML model via coremltools. Inspired by MPieter.

Weights files

weight_file_converter: A converter to convert Weights file to CoreML model.

  • Support both YOLOv3, Tiny YOLOv3, YOLOv4 and Tiny YOLOv4 models
  • Support to export Keras h5 format model

Other models

unified_converter: A converter to convert TensorFlow and PyTorch model to CoreML model by using coremltools unified Conversion API.


Pretrained Models

Weights file Models

Keras H5 models

https://github.com/david8862/keras-YOLOv3-model-set

Quick Start

Weights files

Download the pretrained model and run below command.

python weight_file_converter.py yolov4.cfg yolov4.weights model_data/yolov4.mlmodel --keras_output_path model_data/yolov4.h5

To also export the intermediate Keras model use the argument --keras_output_path.

Other models

python unified_converter.py yolov4-tiny-416 fine_tuned.mlmldel -t

For YOLO tiny model, please specify -t option.

Tested with

- Python 3.x.x
- Keras 2.2.4
- tensorflow 2.3.0
- coremltools 5.0

Verify Converted Models

To verify the converted YOLO model, please use my YOLO CoreML project to verify.

About

A unified CoreML model conversion tools specific for YOLO models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%