We are going through the code details of building a Java face recognition application, and by the end of this section, we shall be able to create a live demo version of the recognition application.
Let's begin with exploring the code by creating a basic network:
Training the model for face recognition is time consuming and hard. To take care of this, we shall be using transfer recognition and to obtain pre-trained weights. The time model we choose is based on the inception network GoogLeNet, and this will be used to obtain the encodings or the activations of the last layer. Post this, instead of calculating the distance between them directly, we shall normalize the encodings using the L2-norm and only after this, we shall use the distance between the images.
Notice that we are not using the squared distance but rather just...