Skip to main content

Posts

Showing posts from 2018

SWIFT PLAYGROUND / QR Code Generator

This is a quick test to make QR Code Generator that will run on Swift Playground app on iPad. I sourced some of the code online from few forums. The resulting QR Image on "Playground Preview" is stretched, however it seems to still work when I am using iPhone camera to scan it. Ideally the Playground Preview should not be stretched like this and keeping the QR image square. Saving the QR Code itself is another mystery. The whole code is actually very simple, taking advantage of Core Image CIFilter "CIQRCodeGenerator" as below: import Foundation import UIKit import PlaygroundSupport let data = "https://youtube.com/c/jimmygunawan".data(using: .utf8) let filter = CIFilter(name: "CIQRCodeGenerator", withInputParameters: ["inputMessage" : data, "inputCorrectionLevel":"L"]) let ciimage = filter!.outputImage! let transform = CGAffineTransform(scaleX: 20.0, y: 20.0) let image = ciimage.transformed(by: tran

ML / Using Turi Create for Machine Learning Style Transfer

A few days ago, I found out about "Turi Create" , basically a Python module, a tool from Apple that allows non-Apple computer user to generate MLM aka Machine Learning Model that can be integrated inside iOS app on iPhone and iPad. The cool thing about Turi Create is that you can also use it for your own purpose in processing data using Machine Learning. https://developer.apple.com/videos/play/wwdc2018/712/ As an additional note, at WWDC 2018, Apple also presented XCode Playground tool for MacOS that allows user to easily generate this MLM model for all kind of purposes. The process is as simple as drag and drop for Image Classifier. It is quite fascinating and worth watching the video. STYLE TRANSFER From what I gather after a short research, there are a few applications of Machine Learning that we can use in application such as for Image Classification, Graphing, etc but one that interest me in particular is STYLE TRANSFER using Turi Create: https://apple.gith