r4ghu / iOS-CoreML-Yolo

Almost Real-time Object Detection using Apple's CoreML and YOLO v1 -
https://goo.gl/8eVso5
163 stars 25 forks source link
coreml ios object-detection object-detection-pipelines yolov1

iOS-CoreML-Yolo

This is the implementation of Object Detection using Tiny YOLO v1 model on Apple's CoreML Framework.

The app fetches image from your camera and perform object detection @ (average) 17.8 FPS.

Requirements

Usage

To use this app, open iOS-CoreML-MNIST.xcodeproj in Xcode 9 and run it on a device with iOS 11. (You can also use simulator)

Model conversion

In this project, I am not training YOLO from scratch but converting the already existing model to CoreML model. If you want to create model on your own.

I also included a jupyter notebook for better understanding the above code. You need to use it with root permissions for mainly converting the keras model to CoreML model. Initialise the jupyter notebook instance with the following command:

(coreml) $ jupyter notebook --allow-root

CoreML Model Download [New]

The converted CoreML model can be downloaded here:

Tutorial

If you are interested in creating the Tiny YOLO v1 model on your own, a step-by-step tutorial is available at - Link

Results

These are the results of the app when tested on iPhone 7.

Result 1 Result 1 Result 1 Result 1 Result 1 Result 1

Author

Sri Raghu Malireddi / @r4ghu