Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to train a CoreML model on device as the app runs?

Is it possible to ship an iOS app with a CoreML model and then have the app continue improving (training) the model on device based on user behaviour for example? So, then the model would keep growing and improving right on the device with no need of a server support...

like image 777
zumzum Avatar asked Apr 27 '18 20:04

zumzum


2 Answers

It's now possible with Core ML 3. https://developer.apple.com/videos/play/wwdc2019/704/ Skip to 9:00 to see it in action. If you just want the code, skip to 13:50.

like image 100
Adam Avatar answered Nov 01 '22 02:11

Adam


The answer is YES.

Since CoreML 3 is greatly optimised – the answer is YES, you can train a CoreML model on device when your app is running.

However, using CoreML 2 it's not possible to train a model on device, because running CoreML 2 app, considerably much power is required to train a model in comparison with CoreML 3. That's why desktop and cloud computers with power GPUs are used for creating a pre-trained models. In CoreML 2 your MLmodel must be pre-configured and you have to include all pre-processing techniques like Edge Detection or Frame Differencing at that stage.

like image 43
Andy Jazz Avatar answered Nov 01 '22 02:11

Andy Jazz