iOS Golf Ball Detector in 1 hr.


That is correct. Using the right tools, I went from 0 to 1 on an embedded ML iPhone application within the span of 1 hour. How did I do it?


I love golf AND I didn’t have my contacts on when I played last week 😣. It was incredibly difficult to find the ball, so I thought: OK, MVP for golf ball object detector on iPhone.


The Data

I hopped on Roboflow, which is my dataset annotation platform of choice, grabbed a small, public golf ball dataset.

Export to CreateML format to train locally on Macbook with M1 Pro.


Train in CreateML

Test in CreateML

Spin-up iPhone project in Xcode.

Using this project as a starting point, all I did was change the object detector model to the new one we used.

One line change…

BOOM. Working in the Field.


Proof-of-concept in 1 hour. From here, it’s just adding numbers and variety to the dataset (couple hundred). I’m always telling people that the end-to-end “synthesis” of a product is most important; Once you have that, then you can go make each piece as good as it needs to be.

Leading a project without first having something end-to-end is leading the project to nowhere. Start with fast spin-up, get feedback, iterate, improve quality, … → go to market.

By: Dillon Peterson