In this article, I will briefly summarize the outline of image classification using ArcFace. The theoretical background and code will be shown on the reference site as appropriate, so please check it.
--A learning method called distance learning is often used to classify images. --Distance learning is learning so that the same class is grouped together and different classes are placed apart from each other for the data embedded in the space. --In a simple classifier, the model needs to be retrained when a new class is added, but in distance learning, the existing model can be used as it is. --The new class is (ideally) located far from the existing class, so the new class gathers in a unique place among the new classes. --The basic idea is to plot unknown data against spatially collected data and return the nearest class as a predicted value (described later). --ArcFace is one of the SOTA distance learning algorithms. --In order to separate the points in space, the distance from the origin of each point should be increased or the angle should be increased. --Arc Face is an angle-focused approach. --As a feature, the distance between points is the same as the distance between hyperplanes, so it seems easy to interpret geometrically. --Others include traditional center loss, contrastive loss, triplet loss, and recently introduced SphereFace and CosFace. --For more information: Modern deep metric learning method: SphereFace, CosFace, ArcFace -Thorough explanation of deep metric learning using angles -AdaCos practice by Pytorch- --ArcFace works by adding it as a layer later in the classifier --For more information: [Keras] I tried to classify PET bottles using MobileNetV2 + ArcFace! -Implementation of ArcFace by Keras (github) --Predict uses a learning model with ArcFace removed --For more information: [Keras] I tried to classify PET bottles using MobileNetV2 + ArcFace! --Output is one vector (one-dimensional array) for each data --Calculate the distance between the output vector of the test data and the output vector of the train data (calculated in advance), and use the label of the train data with the closest distance as the predict result.
Recommended Posts