This series of articles I’ll be writing over the coming weeks will focus on using JavaScript and the deep learning framework TensorFlow.js. Though I’ll try to make these articles as easy as possible, I’m making the following assumptions about you, the reader.
Blog
Implementing Conway’s Game of Life in Lens Studio
ArticlesAs an undergraduate I took a course on emergent phenomena — collective behaviors that arise from individual action. One of the most elegant examples we studied was Conway’s Game of Life. Devised by British mathematician John Conway, the Game of Life is played on an infinite 2-dimensional grid where each cell can occupy one of two states: dead (0) or alive (1). The world is initialized in a random state and three simple rules govern how each grid cell evolves [1]:
Continue reading Implementing Conway’s Game of Life in Lens Studio
Serving TensorFlow Models
ArticlesOnce you’ve trained a TensorFlow model and it’s ready to be deployed, you’d probably like to move it to a production environment. Luckily, TensorFlow provides a way to do this with minimal effort. In this article, we’ll use a pre-trained model, save it, and serve it using TensorFlow Serving. Let’s get moving!
TensorFlow Serving is a system built with the sole purpose of bringing machine learning models to production. TensorFlow’s ModelServer provides support for RESTful APIs. However, we’ll need to install it before we can use it. First, let’s add it as a package source.
Snapchat Lens Creator Spotlight: JP Pirie
ArticlesUntil recently, I’d never really explored Snap’s impressive catalogue of Lenses. It’s truly an endless-seeming scroll of incredible, otherworldly, and hilarious face warpers, background replacers, and ground shifters, to name just a few.
You can discover some of the best, brightest, and most prolific Lens Creators highlighted on Lens Studio’s Official Creator page.
Receiving Conversation Text Messages for an Android Chat Application
ArticlesIn a previous tutorial, we were able to fetch and display chat conversations between verified users. We implemented this feature by querying the messages table from the MySQL database and returning the unique usernames that sent or received at least one message from the user that logged into the Android app. The conversations were listed in a ListView.
This tutorial continues the development of our Android chat application. Here, we’ll allow the receiving of text messages within conversations.
We’ll do this by binding an OnItemClickListener to each of the items in the ListView. When the user clicks a specific conversation, the messages sent or received within this conversation will be fetched and displayed.
Continue reading “Receiving Conversation Text Messages for an Android Chat Application”
Set up (almost free) cloud GPU ML model training on Google Colab
ArticlesNo fancy GPU processor? No time to leave your machine crunching for endless hours on a single machine learning task? Problems installing the endless dependencies your model requires? No problem.
Google Colab Notebooks are Jupyter Notebooks that run in the browser, using $10/month cloud GPU infrastructure from Google. This article will show you why and how to use them, implementing a style transfer example.
Continue reading Set up (almost free) cloud GPU ML model training on Google Colab
Positive and Unlabelled Learning: Recovering Labels for Data Using Machine Learning
ArticlesIt’s often the case that companies want to implement machine learning for a given task—let’s say, to perform classification on data—but are cursed with the problem of having insufficient or unreliable labels for that data.
In these cases, companies could opt to hand label their data, but hand labelling can be a demanding task that could also lead to human bias or significant errors. What if it’s the case that you have labelled data for your positive class, but you have unreliable labels for your negative class? How do you get around this problem?
Continue reading Positive and Unlabelled Learning: Recovering Labels for Data Using Machine Learning
Packaging and Shipping Python Apps for the Desktop
ArticlesIf you’ve been following my blogs lately, you might have noticed that I’ve been writing a lot on edge machine learning, for both mobile and desktop.
While building models and writing code that runs inference on them is one thing, it’s equally important to also package your solution in a way that lets your end-users actually use them.
Continue reading Packaging and Shipping Python Apps for the Desktop
Real-Time Human Pose Estimation with TensorFlow.js
ArticlesPoseNet is a deep learning TensorFlow model that allows you to estimate and track human poses (known as “pose estimation”) by detecting body parts such as elbows, hips, wrists, knees, and ankles.
It uses the joints of these body parts to determine body postures. Nowadays, many industries use this kind of technology in order to improve work efficiency, and in technologies such as augmented reality experiences, animation & gaming, and robotics. The evolution of human-like robots, virtual gaming experiences, motion tracking, and body movement interpretations can be done with the use of these types of high-end PoseNet deep learning models.
Continue reading Real-Time Human Pose Estimation with TensorFlow.js
Multi-team object detection for football games on Raspberry Pi 3
ArticlesComputer vision is a branch of deep learning that focuses on the utilization of deep neural networks to model problems from images. In this article, we’ll be looking at how we can apply computer vision as a tool for football analytics.
Football is a sport that involves 2 teams; with each team having 11 players and a goalkeeper. Here are some analytics that could be explored from football games using AI.
Continue reading Multi-team object detection for football games on Raspberry Pi 3