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)

Binary classification

In this section, we will begin by looking at the formal definition of the triplet loss function and how to choose the triplets.

We'll continue to use CMS networks, which will help us gain the encoded values for the last fully connected layers.

In the following two diagrams, notice that the comparison made here is the triplet loss. Labelled data is made up of two images instead of three:

In this case, instead of using the similarity function, we shall use binary classification. When it comes to binary classification, we use the logistic regression unit:

So we will feed each of these units, multiply them by the weights, sum up these values, and give to the sigmoid function that will give us an output of one for a positive value and zero for a negative image. Here, we shall use it in a similar manner, where zero would indicate that the images are different...