Skip to content

Latest commit

 

History

History
64 lines (49 loc) · 2.58 KB

README.md

File metadata and controls

64 lines (49 loc) · 2.58 KB

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.