IBM Developer Day | Bengaluru | March 14th Register now
Get the code
By David Okun, Sanjeev Ghimire, Anton McConville | Published June 2, 2018
Artificial IntelligenceMobile DevelopmentSwiftCloudOfflineGaming
Whether you are identifying pieces of art in a museum or creating a game, there are many use cases for computer vision on a mobile device. With Core ML, detecting objects has never been faster, and with Watson Visual Recognition and Watson Studio, creating a model couldn’t be easier. This code pattern shows you how to create your own iOS game to challenge players to find a variety of predetermined objects as fast as they can.
In this code pattern, you will create an iOS timed game that has users find items based on a list of objects. The list of objects is customizable and uses Watson Visual Recognition to train a Core ML model. The Core ML model is deployed to the iOS device when the user initializes the app. The beauty of Core ML is that the recognition is done on the device rather than over an HTTP call, meaning it’s that much faster. The code pattern also uses Kitura to power a leaderboard, Cloudant to persist user records and best times, and push notifications to let a user know when they have been removed from the top of the leaderboard.
The application has been published to the App Store under the name “WatsonML,” and we’d like for you to try it out. It comes with a built-in model for identifying six objects: shirts, jeans, apples, plants, notebooks, and a plush bee. Also included are instructions on how to modify the application to fit your own needs. Feel free to fork the code and modify it to create your own conference swap game, scavenger hunt, guided tour, or team building or training event.
When you have completed this code pattern, you should understand how to:
Back to top