Book Image

Hands-On Java Deep Learning for Computer Vision

By : Klevis Ramo
Book Image

Hands-On Java Deep Learning for Computer Vision

By: Klevis Ramo

Overview of this book

Although machine learning is an exciting world to explore, you may feel confused by all of its theoretical aspects. As a Java developer, you will be used to telling the computer exactly what to do, instead of being shown how data is generated; this causes many developers to struggle to adapt to machine learning. The goal of this book is to walk you through the process of efficiently training machine learning and deep learning models for Computer Vision using the most up-to-date techniques. The book is designed to familiarize you with neural networks, enabling you to train them efficiently, customize existing state-of-the-art architectures, build real-world Java applications, and get great results in a short space of time. You will build real-world Computer Vision applications, ranging from a simple Java handwritten digit recognition model to real-time Java autonomous car driving systems and face recognition models. By the end of this book, you will have mastered the best practices and modern techniques needed to build advanced Computer Vision Java applications and achieve production-grade accuracy.
Table of Contents (8 chapters)

Convolution on RGB images

Let's see how convolution is done with color images, and how we can obtain multi-dimensional output matrices.

As we saw previously, a color image is represented as a three-dimensional matrix of numbers:

The third dimension is usually called all the channels. In this case, we have three channels: red, green, and blue. Considering how the convolution was done with the grayscale images, just convolving a two-dimensional matrix with one filter, one reasonable thing to do here—since we have three of the two-dimensional matrices—is to convolve with three filters:

Each of these filters will be convolved with one of the channels.

So far, we've seen 3 x 3 filters, but actually, the two dimensions can vary from x to ε.

This kind of operation will now produce three outputs:

Let's look in a bit more detail at what's happened...