K-means clustering using sklearn and Python

Articles

Did you know that 60% of newly-launched products may not perform well because they fail to represent or actually offer something, their customers really want?

This is the era of personalization. Using personalization you can efficiently attract new customers and retain existing customers. These days, a one-size-fits-all approach generally doesn’t work.

Personalization starts with customer segmentation, which is the practice of grouping customers based on features like age, gender, interests, and spending habits. We do this so we can customize our marketing approaches for each customer group.

Continue reading K-means clustering using sklearn and Python

Image Effects for Android using OpenCV: Cartoon Effect

Articles

OpenCV is a powerful tool for doing intensive operations in real-time, even for resource-limited mobile devices. Throughout a couple of tutorials, we’re going to create an Android app that applies various effects to images.

In part 1 of the series, we discussed horizontal and vertical image stitching:

This tutorial will explore creating a cartoon image effect by reducing the number of colors representing the image using lookup tables (LUTs). The sections covered in this tutorial are as follows:

Continue reading Image Effects for Android using OpenCV: Cartoon Effect

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