Articles Fritz has written:

Image Classification Made Easy in the Browser with TensorFlow.js

Articles

Nowadays, building a machine learning app isn’t considered nearly as difficult as it used to be. We have numerous cloud providers offering services that enable us to use their ML service to train and deploy models to a variety of environments and devices.

In this tutorial, we’re going to use TensorFlow.js to classify an apple as rotten or fresh using a fruit image dataset from Kaggle. We’re going to train our model using Microsoft Custom Vision from the Azure software family. Lastly, we’ll implement a simple Node.js application in order to handle the classification task directly on the browser.

Continue reading Image Classification Made Easy in the Browser with TensorFlow.js

Training a Core ML Model with Turi Create to Classify Dog Breeds

Articles

You may recall that Apple acquired the machine learning and artificial intelligence startup Turi a few years ago for upwards of $200M; it offers powerful tools to create advanced machine learning models in a short amount of time.

In this tutorial, you’ll be learning to install Turi Create on your Mac, create a Python script, and use that script to train a Core ML model that you can drag directly into your Xcode projects and quickly implement in your apps.

Continue reading Training a Core ML Model with Turi Create to Classify Dog Breeds

Train and Ship a Core ML Object Detection Model for iOS in 4 Hours — Without a Line of Code

Articles

My initial interest in mobile machine learning came from a somewhat strange place. In short, a friend of mine approached me with an idea for an application that would apply a NSFW filter to online videos. This led to a two-week deep dive into the tools to make this happen:

The framework to be used to train the model (TensorFlow, Keras, Turi Create, etc.) The platform to launch this framework for training purposes (Google Colab, FloydHub, Conda, etc.) The programs to be used to markup photos (RectLabel, LabelImg) Python scripts to be used to convert these annotations in the format required by the framework

In the end, I collected a dataset of 100 photos which I found on the Internet (don’t ask), and I succeeded in training my first object detection model ready for mobile.

Continue reading “Train and Ship a Core ML Object Detection Model for iOS in 4 Hours — Without a Line of Code”

The Right Loss Function [PyTorch]

Articles

Loss functions are among the most important parts of neural network design. A loss function helps us interact with a model, tell it what we want — this is why we classify them as “objective functions”. Let us look at the precise definition of a loss function.

In deep learning, an objective function is one whose output has to be minimized. Thus, the optimization algorithm needs to find a minima from the objective function. This is usually done by a backpropagation algorithm that calculates the gradients and then passes them over to the optimization algorithm. The optimization algorithm then changes the neural network parameters and weights so as to arrive at a lower objective function output.

Continue reading The Right Loss Function [PyTorch]

The 3 Deep Learning Frameworks For End-to-End Speech Recognition That Power Your Devices

Articles

Speech recognition is invading our lives. It’s built into our phones (Siri), our game consoles (Kinect), our smartwatches (Apple Watch), and even our homes (Amazon Echo). But speech recognition has been around for decades, so why is it just now hitting the mainstream?

The reason is that deep learning finally made speech recognition accurate enough to be useful outside of carefully-controlled environments. In this blog post, we’ll learn how to perform speech recognition with 3 different implementations of popular deep learning frameworks.

Continue reading The 3 Deep Learning Frameworks For End-to-End Speech Recognition That Power Your Devices

Running Artificial Neural Networks in Android using OpenCV

Articles

This tutorial is a step-by-step guide for building an artificial neural network (ANN) using OpenCV for Android devices. An ANN for creating a 2-input XOR gate is built and trained on a desktop computer and then saved for later use in an Android app.

The IDE used in this tutorial for building the desktop app is NetBeans and the OS is Windows. This tutorial discusses the steps for using OpenCV in NetBeans.

Continue reading Running Artificial Neural Networks in Android using OpenCV

SharedPreferences in Android

Articles

Android provides many ways of storing an application’s data. One of these ways is called SharedPreferences. SharedPreferences allow you to save and retrieve data in the form of a key-value pair. It’s beneficial to use SharedPreferences APIs only when you have a relatively small collection of key-values that you’d like to save. Each SharedPreferences file is managed by the framework and can be private or shared.

Continue reading SharedPreferences in Android