Dive into Deep Learning with Scala
Slides from my talk at Scala Days Europe 2018 "Dive into Deep Learning with Scala".
Update: The recording is now available.
Slides from my talk at Scala Days Europe 2018 "Dive into Deep Learning with Scala".
Update: The recording is now available.
In this post, we're going to create an off the shelve object detector using OpenCV and TensorFlow for Scala. The detector will be able to detect common objects like people in still images and videos. It will also be able to run on a live video stream captured from your webcam.
In the previous post we talked about image recognition (or image classification). Image recognition is about recognizing what the content of an image is. In object detection, we want to predict where one or multiple objects are located in an image. Usually when we say object detection we mean recognition and localization together. I.e. we want a neural net to tell us that the image contains a beagle, and to also tell us the location of the beagle within the image.
In most cases, a neural network is trained to predict the coordinates of the rectangle surrounding an object, called bounding box, and to classify the object within that bounding box. The classification part is almost always done using a convolutional …
more ...In the first part of this series, we saw a high-level overview of deep learning, and why Scala is a good fit for building neural networks. We also discussed what a deep learning library should provide, and we looked at a few existing libraries. Now it's time to build the canonical "Hello, World!" example for deep learning: Classifying handwritten digits.
Building a neural network usually consists of the following steps:
In our case, the task is already set: We want to recognize handwritten digits. The second step, data preparation, usually takes most of the effort, but we don't have to worry about it here because it has …
more ...Deep learning is a subset of machine learning, which has seen a tremendous growth in popularity recently. One of the reasons for that growth is that deep learning has brought huge advances to fields such as computer vision, speech recognition or machine translation. Those are fields that are mostly dealing with unstructured data that have traditionally been difficult for computers. Another reason for the success of deep learning, compared to traditional machine learning approaches, is its ability to automatically learn features from raw data, such as images, reducing the need for expensive manual feature engineering and making it applicable to a broader range of domains.
Deep learning is actually just a newer term for modern artificial neural networks. It's called "Deep", because these networks tend to be stacked in a sequence of several successive layers of computation. In a nutshell, common types of deep neural networks can learn to approximate very complex functions by being trained on (usually a lot of) known examples. After being trained, a deep learning model can be applied to previously unseen data and, with high probability, make correct predictions about that data.
Neural networks are not a new idea, they have been around for …
more ...