CN109241995A - A kind of image-recognizing method based on modified ArcFace loss function - Google Patents
A kind of image-recognizing method based on modified ArcFace loss function Download PDFInfo
- Publication number
- CN109241995A CN109241995A CN201810866142.4A CN201810866142A CN109241995A CN 109241995 A CN109241995 A CN 109241995A CN 201810866142 A CN201810866142 A CN 201810866142A CN 109241995 A CN109241995 A CN 109241995A
- Authority
- CN
- China
- Prior art keywords
- image
- loss function
- image recognition
- modified
- indicate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2413—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Abstract
The invention discloses a kind of image-recognizing methods based on modified ArcFace loss function, the feature of image is extracted using the image recognition network based on deep learning, the feature of extraction is used to describe the main information of image, the image recognition network based on deep learning is trained using modified ArcFace loss function, modified ArcFace loss function maximizes classification boundaries by not only reducing inter- object distance but also increasing between class distance in angular region, to improve the accuracy of image recognition model identification.The present invention is used for area of pattern recognition.
Description
Technical field
The invention belongs to the deep learning fields that deep neural network extracts characteristics of image, are related to neural network, mode
Technologies more particularly to a kind of image-recognizing methods based on modified ArcFace loss function such as identification.
Background technique
With the arriving of big data era and greatly improving for computing capability, image recognition technology is just managed towards high-level semantics
Solution direction is developed, and the image recognition technology based on deep learning has become the research hotspot of current artificial intelligence field.
Image recognition technology is that image is handled automatically, analyzed and understood by computer, to identify various differences
The target of mode and the technology of object.Image recognition technology has a wide range of applications, for example, can pass through plant in agricultural
Growing way, the color of leaf and flower judged, watered, applied fertilizer to plant, desinsection;In the industry, image can be passed through
It identifies and control is carried out to the product in entire workshop;In medicine, the strong of analysis patient can be carried out by the shape of cell, bone
Health situation;In space flight, space research can be carried out according to the Real-time Feedback of satellite photo;In daily life, image recognition
Technology is also very universal, such as Car license recognition, fingerprint recognition;However, there is also some difficulties for image recognition technology, due to viewpoint
Variation, the increase image recognition such as background is complicated, shadow change, blocks, deforming difficulty, cause in the image based on deep learning
Identify image classification inaccuracy problem in network training process, to solve this problem, ArcFace loss function is suggested, but
ArcFace only maximizes classification boundaries from reducing inter- object distance.
The key to solve the above problems is exactly to design a modified ArcFace loss function, based on deep learning
In image recognition network training process, inter- object distance was not only reduced but also had increased between class distance to maximize classification boundaries, to improve
The accuracy of image recognition model identification.
Summary of the invention
It is a kind of based on modified ArcFace loss function the present invention overcomes proposing in place of the deficiencies in the prior art
Image-recognizing method, it is intended that carry out image recognition model training using modified ArcFace loss function, improve in reality scene
The accuracy of image recognition.
The present invention is to adopt the following technical scheme that up to foregoing invention purpose
A kind of image-recognizing method based on modified ArcFace loss function, step include:
Step (1): prepare image recognition training dataset, test data set;
Step (2): image recognition network structure of the building based on convolutional neural networks, it is described based on convolutional neural networks
Image recognition network includes convolutional layer, pond layer, full articulamentum, modified ArcFace loss function layer, wherein two convolution
Layer constitutes an image recognition minor structure with a pond layer, and image recognition network is by N number of concatenated minor structure, two full connections
Layer F1、F2, a modified ArcFace loss function layer composition;
Step (3): image recognition training dataset is input to the image based on convolutional neural networks of step (2) building
Identify training in network, the loss function in training process uses modified ArcFace loss function, by constantly to network
Carry out loop iteration training reduce loss function constantly, until complete setting the number of iterations Q, and by image recognition model into
Row saves;
Further, the modified ArcFace loss function calculation formula are as follows:
Wherein, n indicates that the training sample sum of iteration input every time in training process, L indicate that the loss of n sample is average
Value, yiIndicate the image category label of i-th of sample,Indicate full articulamentum F2Weight matrix yiColumn and full articulamentum
F1Output angle, θjIndicate full articulamentum F2Weight matrix jth column and full articulamentum F1Output angle, s indicate
Adaptive cosine coefficient (desirable s=64), C indicate the classification number of total training sample, λ indicate adaptive weighting coefficient (desirable λ=
0.5), m indicates decision edge, is obtained by network training;
Step (4): image recognition test data set is subjected to image spy using image recognition model obtained in step (3)
Sign is extracted, and calculates the cosine similarity P between every two image feature vector, setting image similarity threshold value is T, if similar
It spends P and is greater than threshold value T, then judge that two images are same class images, otherwise judge that two images are not same class images, obtain figure
As the test result of identification model.
Compared with prior art, the beneficial effects of the present invention are embodied in:
The present invention takes a kind of modified ArcFace loss function that is based on to carry out image recognition, using based on deep learning
Image recognition network the feature of image is extracted, the feature of extraction is used to describe the main information of image, using changing
The image recognition network based on deep learning is trained into type ArcFace loss function, ArcFace loss function only exists
Angular region maximizes classification boundaries by reducing inter- object distance, and different classes of image can not be made to divide as far as possible,
And modified ArcFace loss function maximizes classification by both reducing inter- object distance increase between class distance in angular region
Boundary can not only make same category of image more compact, also different classes of image can be made to divide as far as possible, to mention
The accuracy of hi-vision identification model identification, the present invention are suitable for image recognition, can overcome using ArcFace loss function pair
Inaccurate problem is identified based on the image recognition model that convolutional neural networks are trained, and improves the accurate of image recognition
Property.
Detailed description of the invention
Fig. 1 is a kind of image recognition convolutional neural networks structural schematic diagram based on modified ArcFace loss function.
Specific embodiment
The present invention will be further explained below with reference to the attached drawings.
In the present embodiment, as shown in Figure 1, a kind of image-recognizing method based on modified ArcFace loss function includes
Following steps:
Step (1): prepare image recognition training dataset, test data set;
Step (2): image recognition network structure of the building based on convolutional neural networks, it is described based on convolutional neural networks
Image recognition network includes convolutional layer, pond layer, full articulamentum, modified ArcFace loss function layer, wherein two convolution
Layer constitutes an image recognition minor structure with a pond layer, and image recognition network is connected entirely by 32 concatenated minor structures, two
Meet a layer F1、F2, a modified ArcFace loss function layer composition;
Step (3): image recognition training dataset is input to the image based on convolutional neural networks of step (2) building
Identify training in network, the loss function in training process uses modified ArcFace loss function, by constantly to network
Carrying out loop iteration training reduces loss function constantly, the number of iterations 100 until completing setting, and 000, and by image recognition
Model is saved;
Further, modified ArcFace loss function calculation formula are as follows:
Wherein, n indicates that the training sample sum of iteration input every time in training process, L indicate that the loss of n sample is average
Value, yiIndicate the image category label of i-th of sample,Indicate full articulamentum F2Weight matrix yiColumn and full articulamentum
F1Output angle, θjIndicate full articulamentum F2Weight matrix jth column and full articulamentum F1Output angle, s indicate
Adaptive cosine coefficient (desirable s=64), C indicate the classification number of total training sample, λ indicate adaptive weighting coefficient (desirable λ=
0.5), m indicates decision edge, is obtained by network training;
In the training process, adaptive cosine coefficient s=64, adaptive weighting coefficient lambda=0.5 are set;
Step (4): image recognition test data set is subjected to image spy using image recognition model obtained in step (3)
Sign is extracted, and calculates the cosine similarity P between every two image feature vector, setting image similarity threshold value is T, if similar
It spends P and is greater than threshold value T, T=0.8 is set, then judges that two images are same class images, otherwise judges that two images are not same class
Image obtains the test result of image recognition model.
Claims (2)
1. a kind of image-recognizing method based on modified ArcFace loss function, it is characterised in that include the following steps:
Step (1): prepare image recognition training dataset, test data set;
Step (2): image recognition network structure of the building based on convolutional neural networks, the image based on convolutional neural networks
Identify that network includes convolutional layer, pond layer, full articulamentum, modified ArcFace loss function layer, wherein two convolutional layers and
One pond layer constitutes an image recognition minor structure, and image recognition network is by N number of concatenated minor structure, two full articulamentums
F1、F2, a modified ArcFace loss function layer composition;
Step (3): image recognition training dataset is input to the image recognition based on convolutional neural networks of step (2) building
It is trained in network, the loss function in training process uses modified ArcFace loss function, by constantly carrying out to network
Loop iteration training reduces loss function constantly, until completing the number of iterations Q of setting, and image recognition model is protected
It deposits;
Step (4): image recognition test data set is subjected to characteristics of image using image recognition model obtained in step (3) and is mentioned
It takes, calculates the cosine similarity P between every two image feature vector, setting image similarity threshold value is T, if similarity P
Greater than threshold value T, then judge that two images are same class images, otherwise judges that two images are not same class images, obtain image
The test result of identification model.
2. a kind of image-recognizing method based on modified ArcFace loss function as described in claim 1, feature exist
In modified ArcFace loss function calculation formula in the step (3) are as follows:
Wherein, n indicates that the training sample sum of iteration input every time in training process, L indicate the loss average value of n sample, yi
Indicate the image category label of i-th of sample,Indicate full articulamentum F2Weight matrix yiColumn and full articulamentum F1It is defeated
Angle out, θjIndicate full articulamentum F2Weight matrix jth column and full articulamentum F1Output angle, s indicates adaptive
Cosine coefficient (desirable s=64), C indicate that the classification number of total training sample, λ indicate adaptive weighting coefficient (desirable λ=0.5), m
It indicates decision edge, is obtained by network training.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810866142.4A CN109241995B (en) | 2018-08-01 | 2018-08-01 | Image identification method based on improved ArcFace loss function |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810866142.4A CN109241995B (en) | 2018-08-01 | 2018-08-01 | Image identification method based on improved ArcFace loss function |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109241995A true CN109241995A (en) | 2019-01-18 |
CN109241995B CN109241995B (en) | 2021-05-14 |
Family
ID=65072644
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810866142.4A Active CN109241995B (en) | 2018-08-01 | 2018-08-01 | Image identification method based on improved ArcFace loss function |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109241995B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110659573A (en) * | 2019-08-22 | 2020-01-07 | 北京捷通华声科技股份有限公司 | Face recognition method and device, electronic equipment and storage medium |
CN110880018A (en) * | 2019-10-29 | 2020-03-13 | 北京邮电大学 | Convolutional neural network target classification method based on novel loss function |
CN111639558A (en) * | 2020-05-15 | 2020-09-08 | 圣点世纪科技股份有限公司 | Finger vein identity verification method based on ArcFace Loss and improved residual error network |
CN112200159A (en) * | 2020-12-01 | 2021-01-08 | 四川圣点世纪科技有限公司 | Non-contact palm vein identification method based on improved residual error network |
CN112766399A (en) * | 2021-01-28 | 2021-05-07 | 电子科技大学 | Self-adaptive neural network training method for image recognition |
CN113255694A (en) * | 2021-05-21 | 2021-08-13 | 北京百度网讯科技有限公司 | Training image feature extraction model and method and device for extracting image features |
CN113378833A (en) * | 2021-06-25 | 2021-09-10 | 北京百度网讯科技有限公司 | Image recognition model training method, image recognition device and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100082639A1 (en) * | 2008-09-30 | 2010-04-01 | Microsoft Corporation | Processing maximum likelihood for listwise rankings |
CN107145852A (en) * | 2017-04-28 | 2017-09-08 | 深圳市唯特视科技有限公司 | A kind of character recognition method based on homologous cosine losses function |
-
2018
- 2018-08-01 CN CN201810866142.4A patent/CN109241995B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100082639A1 (en) * | 2008-09-30 | 2010-04-01 | Microsoft Corporation | Processing maximum likelihood for listwise rankings |
CN107145852A (en) * | 2017-04-28 | 2017-09-08 | 深圳市唯特视科技有限公司 | A kind of character recognition method based on homologous cosine losses function |
Non-Patent Citations (2)
Title |
---|
JIANKANG DENG等: "《ArcFace:Additive Angular Margin Loss for Deep Face Recognition》", 《ARXIV》 * |
LEI LI等: "《TypicFace:Dynamic Margin Cosine Loss for Deep Face Recognition》", 《PRICAI2018》 * |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110659573A (en) * | 2019-08-22 | 2020-01-07 | 北京捷通华声科技股份有限公司 | Face recognition method and device, electronic equipment and storage medium |
CN110659573B (en) * | 2019-08-22 | 2021-03-09 | 北京捷通华声科技股份有限公司 | Face recognition method and device, electronic equipment and storage medium |
CN110880018A (en) * | 2019-10-29 | 2020-03-13 | 北京邮电大学 | Convolutional neural network target classification method based on novel loss function |
CN110880018B (en) * | 2019-10-29 | 2023-03-14 | 北京邮电大学 | Convolutional neural network target classification method |
CN111639558A (en) * | 2020-05-15 | 2020-09-08 | 圣点世纪科技股份有限公司 | Finger vein identity verification method based on ArcFace Loss and improved residual error network |
CN111639558B (en) * | 2020-05-15 | 2023-06-20 | 圣点世纪科技股份有限公司 | Finger vein authentication method based on ArcFace Loss and improved residual error network |
CN112200159A (en) * | 2020-12-01 | 2021-01-08 | 四川圣点世纪科技有限公司 | Non-contact palm vein identification method based on improved residual error network |
CN112766399A (en) * | 2021-01-28 | 2021-05-07 | 电子科技大学 | Self-adaptive neural network training method for image recognition |
CN113255694A (en) * | 2021-05-21 | 2021-08-13 | 北京百度网讯科技有限公司 | Training image feature extraction model and method and device for extracting image features |
CN113378833A (en) * | 2021-06-25 | 2021-09-10 | 北京百度网讯科技有限公司 | Image recognition model training method, image recognition device and electronic equipment |
CN113378833B (en) * | 2021-06-25 | 2023-09-01 | 北京百度网讯科技有限公司 | Image recognition model training method, image recognition device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN109241995B (en) | 2021-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109241995A (en) | A kind of image-recognizing method based on modified ArcFace loss function | |
CN110363122B (en) | Cross-domain target detection method based on multi-layer feature alignment | |
Sun et al. | Research on the hand gesture recognition based on deep learning | |
Zhu et al. | High performance vegetable classification from images based on alexnet deep learning model | |
Zhou et al. | BOMSC-Net: Boundary optimization and multi-scale context awareness based building extraction from high-resolution remote sensing imagery | |
CN105069434B (en) | A kind of human action Activity recognition method in video | |
Li et al. | Pedestrian detection based on deep learning model | |
Pan et al. | Intelligent diagnosis of northern corn leaf blight with deep learning model | |
Wang et al. | SSRNet: In-field counting wheat ears using multi-stage convolutional neural network | |
CN108230330B (en) | Method for quickly segmenting highway pavement and positioning camera | |
CN105975932A (en) | Gait recognition and classification method based on time sequence shapelet | |
CN109034213B (en) | Hyperspectral image classification method and system based on correlation entropy principle | |
Xiao et al. | Enhancing multiscale representations with transformer for remote sensing image semantic segmentation | |
CN108960342A (en) | Based on the image similarity calculation method for improving SoftMax loss function | |
CN105631477A (en) | Traffic sign recognition method based on extreme learning machine and self-adaptive lifting | |
CN104966052A (en) | Attributive characteristic representation-based group behavior identification method | |
CN110072183A (en) | Passive type location fingerprint base construction method based on intelligent perception | |
CN104732247B (en) | A kind of human face characteristic positioning method | |
CN104268553A (en) | SAR image target recognition method based on kernel fuzzy Foley-Sammon transformation | |
CN111695460A (en) | Pedestrian re-identification method based on local graph convolution network | |
Yue et al. | Deep learning for hyperspectral data classification through exponential momentum deep convolution neural networks | |
Wang et al. | Weakly supervised object detection based on active learning | |
Ma et al. | Infrared target tracking based on proximal robust principal component analysis method | |
Zhu et al. | Real-time traffic sign detection based on YOLOv2 | |
Zuo et al. | An attention-based lightweight residual network for plant disease recognition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |