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)

Improving the handwritten digit recognition application

Let's see how our CNN architecture will look when written in Java. We'll also run the Java application and test the improved model from the graphical user interface. We'll draw some digits and ask models for predictions, and maybe simulate a case when a convolution will outperform the simple neural network model.

Before checking out the code, let's first look at the CNN architecture that we saw in the previous section from a different point of view:

So, we have this table here, and in the extreme left, there are the layers. Then we have these two columns, which are the activation's. So the activations are just the input, hidden layers, or convolution layers, and one activation shows the shape of the matrix dimensions, while the other shows the complete size, which is just a multiplication of the...