In the Metal Camera Tutorial series we have created a simple app that renders camera frames on screen in real time. However, this app uses Metal framework, which is not available in iOS Simulator. Basically, your app won’t even build if you select simulator as a build device, which is a shame in case you want to add unit tests for example, being able to run them without actual device connected to your machine.
So one Saturday I got particularly bored and thought I should configure my Jupyter Notebook a bit.
In the second part of the Metal Camera Tutorial series we managed to convert frame data to a Metal texture. Now we are going to render it on screen with the help of a very simple Metal shader.
If anyone is wondering why would you need to use AWS for machine learning after reading this post, here’s a real example. I’ve tried training the same model with the same data on CPU of my MacBook Pro (2.5 GHz Intel Core i7) and GPU of a AWS instance (g2.2xlarge).
Although protocols are not by any means a new thing, Swift specifically encourages the developers to use it over inheritance. Not that Objective-C didn’t make use of protocols, but due to the dynamic nature of Objective-C Runtime one would be tempted to put chunks of common declarations in a superclass instead.