Emotion Classification: iOS App with CoreML model trained by CreateML

Yeskendir Salgara
Kerege
Published in
5 min readSep 7, 2023

--

In this article, I will demonstrate how to use CreateML, CoreML, and SwiftUI to train models and develop an iOS app with ease.

If you aren’t familiar with CreateML, it’s a great chance to look at some cool features I’ll show in this guide.

Let’s start

Dataset from Kaggle

In order to train the emotion classifier model we need to find the dataset. I’ve found a dataset in Kaggle with around 3000 pictures of faces that show one of 7 different emotions: angry, disgusted, fearful, happy, neutral, sad, and surprised. I’m not sure of the quality of the data, but let’s assume that it’s enough for our experiment and proceed with that.

Dataset from Kaggle

Just click on the ‘Download’ button and after downloading the archive we can see two folders: ‘test’ and ‘train’. This is divided data that the CoreML model will…

--

--