[PYTHON] Super (concise) summary of image classification by ArcFace

Introduction

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.

Super summary

--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

Super (concise) summary of image classification by ArcFace
Judge Yosakoi Naruko by image classification of Tensorflow.
[PyTorch] Image classification of CIFAR-10
A beginner's summary of Python machine learning is super concise.
Summary of basic implementation by PyTorch
Summary of restrictions by file system
Summary of library hosting pages by language
Summary of SQLAlchemy connection method by DB
Analysis of X-ray microtomography image by Python
[Image classification] Facial expression analysis of dogs
"Trash classification by image!" App creation diary day6 ~ Correction of directory structure ~
Classification of guitar images by machine learning Part 1
Extract dominant color of image by k-means clustering
[mypy] Summary of options not enabled by `--strict`
Classification of guitar images by machine learning Part 2
Image of closure
[Language processing 100 knocks 2020] Summary of answer examples by Python
Image processing by matrix Basics & Table of Contents-Reinventor of Python image processing-
Summary of Python articles by pharmaceutical company researcher Yukiya
Separation summary of development environment by chroot of various Linux