WO2024078299A1 - 发明名称:特征提取模型处理及特征提取方法、装置和计算机设备 - Google Patents
发明名称:特征提取模型处理及特征提取方法、装置和计算机设备 Download PDFInfo
- Publication number
- WO2024078299A1 WO2024078299A1 PCT/CN2023/120674 CN2023120674W WO2024078299A1 WO 2024078299 A1 WO2024078299 A1 WO 2024078299A1 CN 2023120674 W CN2023120674 W CN 2023120674W WO 2024078299 A1 WO2024078299 A1 WO 2024078299A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- classification
- image
- model
- feature
- loss
- Prior art date
Links
- 238000000605 extraction Methods 0.000 title claims abstract description 427
- 238000003672 processing method Methods 0.000 title claims abstract description 26
- 238000013145 classification model Methods 0.000 claims abstract description 194
- 238000012549 training Methods 0.000 claims abstract description 168
- 238000000034 method Methods 0.000 claims description 58
- 238000012545 processing Methods 0.000 claims description 56
- 238000013507 mapping Methods 0.000 claims description 45
- 238000004590 computer program Methods 0.000 claims description 8
- 230000002596 correlated effect Effects 0.000 claims description 8
- 238000010606 normalization Methods 0.000 claims description 7
- 230000000875 corresponding effect Effects 0.000 description 19
- 230000006870 function Effects 0.000 description 18
- 230000008569 process Effects 0.000 description 17
- 239000000284 extract Substances 0.000 description 15
- 238000010586 diagram Methods 0.000 description 13
- 230000000694 effects Effects 0.000 description 10
- 230000009286 beneficial effect Effects 0.000 description 7
- 238000005259 measurement Methods 0.000 description 7
- 230000008859 change Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 238000010801 machine learning Methods 0.000 description 5
- 230000002829 reductive effect Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 239000000654 additive Substances 0.000 description 1
- 230000000996 additive effect Effects 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000033228 biological regulation Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- PCHJSUWPFVWCPO-UHFFFAOYSA-N gold Chemical compound [Au] PCHJSUWPFVWCPO-UHFFFAOYSA-N 0.000 description 1
- 239000010931 gold Substances 0.000 description 1
- 229910052737 gold Inorganic materials 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 230000001939 inductive effect Effects 0.000 description 1
- 230000000670 limiting effect Effects 0.000 description 1
- 238000000691 measurement method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000036961 partial effect Effects 0.000 description 1
- 230000002787 reinforcement Effects 0.000 description 1
- 238000013526 transfer learning Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/774—Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/776—Validation; Performance evaluation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Definitions
- the present application relates to the field of computer technology, and in particular to a feature extraction model processing method, apparatus, computer equipment, storage medium and computer program product, as well as a feature extraction method, apparatus, computer equipment, storage medium and computer program product.
- the search technology for retrieving specified resources from the Internet is no longer limited to text search, but also supports image search by users. For example, users can enter a query image for search, and then search for images similar to the query image entered by the user from the database.
- image retrieval technology image features are often extracted from images, such as by using an image feature extraction model to extract image features, and similarity comparison is performed through the extracted image features to achieve retrieval processing for images.
- the new model will sacrifice part of its own feature extraction capabilities in order to achieve compatibility with the old model, which may easily lead to the new model being unable to extract effective image features.
- a feature extraction model processing method, apparatus, computer device, computer-readable storage medium and computer program product as well as a feature extraction method, apparatus, computer device, storage medium and computer program product are provided.
- the present application provides a feature extraction model processing method.
- the method is executed by a computer device, comprising:
- a historical image classification model obtained by joint training with a historical feature extraction model performs a first classification based on the second image feature to obtain a classification result of the first classification, determines a classification loss of the first classification according to the classification result of the first classification, and adjusts the classification loss of the first classification through inheritance parameters to obtain a model compatible loss;
- the model parameters of the feature extraction model to be trained and the image classification model to be trained are updated and then the joint training is continued to obtain the trained feature extraction model.
- the present application also provides a feature extraction model processing device.
- the device comprises:
- a sample image acquisition module used to acquire a sample image and an inheritance parameter of the sample image, wherein the inheritance parameter is determined based on a feature discrimination reflected by a first image feature of the sample image, wherein the first image feature is extracted from the sample image by a trained historical feature extraction model;
- a second image feature extraction module used for extracting second image features from the sample image through a feature extraction model to be trained
- a model compatible loss obtaining module is used to perform a first classification based on the second image feature using the historical image classification model obtained by joint training with the historical feature extraction model to obtain a classification result of the first classification, determine the classification loss of the first classification according to the classification result of the first classification, and adjust the classification loss of the first classification through inheritance parameters to obtain a model compatible loss;
- the second classification loss obtaining module is used to perform a second classification based on the second image feature through the image classification model to be trained. class, obtain the classification result of the second category, and obtain the classification loss of the second category according to the classification result of the second category;
- the model updating module is used to update the model parameters of the feature extraction model to be trained and the image classification model to be trained based on the model compatibility loss and the classification loss of the second classification, and then continue the joint training to obtain the trained feature extraction model.
- the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of each method embodiment of the present application are implemented.
- the present application further provides a computer-readable storage medium having computer-readable instructions stored thereon, and when the computer-readable instructions are executed by a processor, the steps of each method embodiment of the present application are implemented.
- the present application further provides a computer program product, which includes computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of each method embodiment of the present application are implemented.
- the present application provides a feature extraction method.
- the method is executed by a computer device, comprising:
- feature extraction is performed on the image to be processed to obtain the image features to be processed of the image to be processed;
- the feature extraction model is obtained by continuing the joint training after updating the model parameters of the feature extraction model to be trained and the image classification model to be trained based on the model compatibility loss and the classification loss of the second classification.
- the model compatibility loss is obtained by jointly training the historical image classification model with the trained historical feature extraction model, performing the first classification based on the second image feature, and adjusting the classification loss of the first classification through the inheritance parameter.
- the second image feature is extracted from the sample image by the feature extraction model to be trained.
- the inheritance parameter is determined based on the feature discrimination reflected by the first image feature of the sample image.
- the first image feature is extracted from the sample image by the historical feature extraction model.
- the classification loss of the second classification is obtained by performing the second classification based on the second image feature by the image classification model to be trained.
- the present application also provides a feature extraction device.
- the device comprises:
- An image acquisition module used to acquire an image to be processed
- a feature extraction processing module is used to extract features of the image to be processed through a feature extraction model to obtain the image features to be processed of the image to be processed;
- the feature extraction model is obtained by continuing the joint training after updating the model parameters of the feature extraction model to be trained and the image classification model to be trained based on the model compatibility loss and the classification loss of the second classification.
- the model compatibility loss is obtained by jointly training the historical image classification model with the trained historical feature extraction model, performing the first classification based on the second image feature, and adjusting the classification loss of the first classification through the inheritance parameter.
- the second image feature is extracted from the sample image by the feature extraction model to be trained.
- the inheritance parameter is determined based on the feature discrimination reflected by the first image feature of the sample image.
- the first image feature is extracted from the sample image by the historical feature extraction model.
- the classification loss of the second classification is obtained by performing the second classification based on the second image feature by the image classification model to be trained.
- the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of each method embodiment of the present application are implemented.
- the present application further provides a computer-readable storage medium having computer-readable instructions stored thereon, and when the computer-readable instructions are executed by a processor, the steps of each method embodiment of the present application are implemented.
- the present application further provides a computer program product, which includes computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of each method embodiment of the present application are implemented.
- FIG. 1 is a diagram showing an application environment of a feature extraction model processing method in one embodiment.
- FIG. 2 is a flow chart of a feature extraction model processing method in one embodiment.
- FIG. 3 is a schematic diagram of a process of determining inheritance parameters in one embodiment.
- FIG. 4 is a schematic flow chart of a feature extraction method in one embodiment.
- FIG. 5 is a schematic diagram showing a comparison of class center changes in different model upgrade paradigms in one embodiment.
- FIG. 6 is a schematic diagram showing a comparison of effects of different model upgrade paradigms in one embodiment.
- FIG. 7 is a schematic diagram of the structure of a feature extraction model in one embodiment.
- FIG. 8 is a schematic diagram of a flow chart of a strength measurement method according to an embodiment of the present invention.
- FIG. 9 is a schematic diagram of feature changes in a backward-compatible serialization model upgrade in one embodiment.
- FIG. 10 is a schematic diagram of feature changes in feature extraction model processing in one embodiment.
- FIG. 11 is a structural block diagram of a feature extraction model processing device in one embodiment.
- FIG. 12 is a structural block diagram of a feature extraction device in one embodiment.
- FIG. 13 is a diagram showing the internal structure of a computer device in one embodiment.
- the feature extraction model processing method provided in the embodiment of the present application can be applied in the application environment shown in FIG. 1.
- the terminal 102 communicates with the server 104 through the network.
- the data storage system can store the data that the server 104 needs to process.
- the data storage system can be integrated on the server 104, or it can be placed on the cloud or other servers.
- the terminal 102 can send the sample image to the server 104, and the server 104 performs a first classification based on the second image feature extracted from the received sample image by the feature extraction model to be trained through the historical image classification model obtained by joint training with the historical feature extraction model, and adjusts the classification loss of the first classification through the inheritance parameter to obtain the model compatibility loss, the inheritance parameter is obtained based on the feature discrimination reflected by the first image feature extracted from the sample image by the historical feature extraction model, and the second classification is performed based on the second image feature through the image classification model to be trained.
- the model is updated and trained based on the model compatibility loss and the classification loss of the second classification, and the trained feature extraction model is obtained when the training is completed.
- the trained feature extraction model can perform feature extraction on the input image and output the image features of the input image.
- the server 104 can transplant the trained feature extraction model to the terminal 102, so that the terminal 102 can extract features from the input image through the trained feature extraction model.
- the server 104 can also receive images sent by the terminal 102 and extract features from the images sent by the terminal 102 through the trained feature extraction model.
- the feature extraction method provided in the embodiment of the present application can also be applied to the application environment shown in Figure 1.
- a pre-trained feature extraction model can be stored in the terminal 102 or the server 104.
- the terminal 102 or the server 104 can obtain an image and input the obtained image into the feature extraction model, and the feature extraction model performs image extraction and outputs the image features of the extracted image.
- the pre-trained feature extraction model can be trained by the feature extraction model processing method provided in the embodiment of the present application.
- the terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices.
- the IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc.
- the portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc.
- the server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
- a feature extraction model processing method is provided.
- the method is executed by a computer device, and specifically can be executed by a computer device such as a terminal or a server alone, or can be executed by a terminal and a server together.
- the method is applied to the server in FIG. 1 as an example for description, and includes the following steps:
- Step 202 obtaining a sample image and an inheritance parameter of the sample image, wherein the inheritance parameter is determined based on the feature discrimination reflected by the first image feature of the sample image, and the first image feature is extracted from the sample image by a trained historical feature extraction model.
- the feature extraction model may include an artificial neural network model built based on machine learning, which can extract features from the input image and output the extracted image features.
- the extracted image features can be used for various processing such as image matching, image classification, and image optimization.
- Machine Learning ML is a multi-disciplinary cross-disciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance.
- Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all fields of artificial intelligence.
- Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.
- the sample image is a sample for training the feature extraction model.
- the historical feature extraction model is a trained model. In the model update and upgrade process, the historical feature extraction model belongs to the model that needs to be upgraded and updated, that is, the historical feature extraction model belongs to the old model, and the retrained feature extraction model belongs to the new model.
- the historical feature extraction model may be a feature extraction model of a historical version
- the retrained feature extraction model may be a feature extraction model of the latest version.
- the first image feature of the sample image can be extracted.
- various image processing such as image classification and image matching can be performed.
- the feature discrimination power represents the discrimination ability for different images when performing various image processing such as image classification and image matching based on the first image feature. The higher the quantitative value of the feature discrimination power of the image, the more obvious the feature used to identify the image. For example, when performing image classification based on the first image feature, the feature discrimination power can be the discrimination ability for different image categories.
- the accuracy of image classification through the first image feature is positively correlated with the feature discrimination power reflected by the first image feature, that is, the stronger the feature discrimination power, the more obvious the classification feature reflected by the first image feature, and the more conducive to classification, that is, the more accurate image classification processing can be performed using the first image feature.
- the feature discrimination power can be the discrimination ability for different images, that is, the stronger the feature discrimination power, the more accurate the image can be matched with other images, thereby identifying similar or different pictures. That is, the stronger the feature discrimination reflected by the image feature, the more accurately the image feature can express the characteristics of the image, and the more accurate the processing result can be obtained by processing based on the image feature.
- different feature extraction models are used to extract features, and different image features extracted have different feature discriminations.
- the classification results may be different. The more accurate the classification results are, the stronger the feature discrimination of the extracted image features is.
- the feature discrimination can be obtained by analyzing the feature discrimination of the extracted image features.
- the extracted image features can be used for classification processing, and the feature discrimination of each image feature is determined based on the classification results.
- the extracted image features can be used for matching processing, and the feature discrimination of each image feature is determined based on the matching results.
- the feature discrimination can be quantified, such as the feature discrimination parameters can be quantified, which can be a quantized value in the range of 0-100, or a quantized value in the range of 0-1 after normalization, so that the feature discrimination of the image features of each image can be quantitatively compared using the feature discrimination parameters.
- the feature discrimination parameters can be quantified, which can be a quantized value in the range of 0-100, or a quantized value in the range of 0-1 after normalization, so that the feature discrimination of the image features of each image can be quantitatively compared using the feature discrimination parameters.
- the inheritance parameter is determined based on the feature discrimination reflected by the image feature, and each sample image may have a corresponding inheritance parameter.
- the stronger the feature discrimination reflected by the image feature the more accurate the result can be obtained by image processing using the image feature, the more accurately the image feature can express the corresponding image, and the more worthy the new model is to inherit and learn the image feature.
- the inheritance parameter can be used to characterize the degree of inheritance of the image feature, and specifically can represent the contribution value of the image feature extracted by the old model to the image feature extracted by the new model. The higher the contribution value represented by the inheritance parameter, the greater the influence of the image feature extracted by the old model on the feature extraction result of the new model.
- the inheritance parameter may include an inheritance weight.
- a higher inheritance weight may be provided; and for image features with weak feature discrimination, a lower inheritance weight may be provided, so that the new model selectively inherits and learns the feature discrimination reflected by the image feature, so that the new model can learn effective image feature knowledge.
- image feature A, image feature B, and image feature C if image feature A>image feature C>image feature A>image feature B>image feature C>image feature C>image feature A>image feature C>image feature A>image feature C>image feature A>image feature B>image feature C>image feature A ...
- the inheritance parameter can also include the number of inheritances. For image features with strong feature discrimination, the number of inheritances of the image feature can be increased, that is, the importance of compatible training for the image feature can be increased; and for image features with weak feature discrimination, the number of inheritances of the image feature can be reduced, that is, the importance of compatible training for the image feature can be reduced.
- the server can obtain a sample image and inheritance parameters of the sample image.
- the inheritance parameters of the sample image can be determined by the server in advance by extracting a first image feature from the sample image through a trained historical feature extraction model, and based on the feature discrimination reflected by the first image feature.
- the server can establish a mapping relationship between the inheritance parameters and the sample image, and by querying the mapping relationship, the inheritance parameters of the sample image can be obtained. For example, after determining the inheritance parameters of the sample image, the server can write the inheritance parameters into the image attribute information of the sample image. After training a new model to obtain the sample image, the server can extract the inheritance parameters from the image attribute information of the sample image.
- Step 204 extracting a second image feature from the sample image using the feature extraction model to be trained.
- the feature extraction model to be trained is a feature extraction model that needs to be retrained and is a new model.
- the feature extraction model to be trained needs to perform compatibility processing on the features extracted by the old model, so that the trained new model can be effectively compatible with the old model.
- the second image feature is extracted from the sample image through the new model that needs to be trained, that is, through the feature extraction model to be trained.
- the server determines the feature extraction model to be trained, and extracts features from the sample image through the feature extraction model to be trained. For example, the sample image can be input into the feature extraction model to be trained to obtain the second image feature of the sample image.
- Step 206 the historical image classification model obtained by joint training with the historical feature extraction model performs a first classification based on the second image feature to obtain a classification result of the first classification, determines the classification loss of the first classification according to the classification result of the first classification, and adjusts the classification loss of the first classification through inheritance parameters to obtain a model compatible loss.
- the historical image classification model is a trained model for image classification.
- the historical image classification model is obtained by joint training with the historical feature extraction model, that is, the historical image classification model is obtained by synchronous training with the historical feature extraction model.
- the historical feature extraction model can be used to extract image features from the trained sample images, and the historical image classification model can perform image classification processing on the extracted image features.
- the historical image classification model and the historical feature extraction model are updated based on the image classification results, such as updating the model parameters of the historical image classification model and the historical feature extraction model, and then continuing the training until the training is completed, so as to obtain the trained historical feature extraction model and the historical image classification model.
- the trained historical feature extraction model can extract features from the input image, and the extracted image features can be used to process the image, such as image classification, image matching, etc.; the trained historical image classification model can classify the input image features to determine the category to which the image belongs.
- the first classification refers to the image classification processing of the second image features extracted by the feature extraction model to be trained through the historical image classification model.
- the classification loss of the first classification can be obtained. Specifically, after the classification result of the first classification is obtained, the classification loss of the first classification is further determined based on the classification result of the first classification.
- the classification loss of the first classification can be determined based on the difference between the classification result of the first classification and the real category label of the sample image.
- the specific form of the classification loss of the first classification can be set according to actual needs, such as including but not limited to various loss functions including log-likelihood loss, hinge loss, cross entropy loss, Softmax loss, ArcFace (Additive Angular Margin) loss, etc.
- the model compatible loss is the loss obtained by adjusting the classification loss of the first classification through the inheritance parameter.
- the feature discrimination reflected by the inheritance parameter can be used to selectively inherit and learn the first image features carried in the historical feature extraction model, specifically, the weight of the poor sample can be reduced and the weight of the good sample can be increased, thereby effectively inheriting and learning the knowledge included in the old model.
- the model compatibility loss reflects the loss when the new model is compatible with the old model, that is, the loss when the feature extraction model to be trained is compatible with the historical feature extraction model.
- the server may obtain a trained historical image classification model, and the historical image classification model may be a classifier model obtained by jointly training with a historical feature extraction model, and is used to perform image classification processing on the extracted image features.
- the server performs a first classification based on the second image feature through the historical image classification model to obtain a classification result of the first classification, and determines the classification loss of the first classification based on the classification result of the first classification.
- the server can obtain the classification loss of the first classification based on the difference between the classification combination of the first classification and the real category label of the sample image.
- the server adjusts the classification loss of the first classification through the inheritance parameter. For example, when the inheritance parameter includes the inheritance weight, the classification loss of the first classification can be weighted according to the inheritance weight to obtain the model compatible loss.
- Step 208 Perform a second classification based on the second image feature by using the image classification model to be trained to obtain a classification result of the second classification, and obtain a classification loss of the second classification according to the classification result of the second classification.
- the image classification model to be trained is a retrained image classification model, which is used to perform image classification processing on the image features extracted by the feature extraction model to be trained, that is, the image classification model to be trained and the feature extraction model to be trained are also jointly trained to simultaneously train the image classification model and the feature extraction model.
- the second classification is performed based on the second image features by the image classification model to be trained, that is, the features extracted by the new feature extraction model are classified by the new image classification model, and the classification loss of the second classification can be obtained. Specifically, after the classification result of the second classification is obtained, the classification loss of the second classification is further determined based on the classification result of the second classification. The classification loss of the second classification can be determined based on the difference between the classification result of the second classification and the true category label of the sample image.
- the server can perform a second classification based on the second image features extracted by the feature extraction model to be trained through an image classification model jointly trained with the feature extraction model to be trained, obtain a classification result of the second classification, and determine the classification loss of the second classification based on the classification result of the second classification.
- the server can determine the classification loss of the second classification based on the difference between the classification result of the second classification and the true category label of the sample image.
- the specific form of the classification loss of the second classification can be set according to actual needs, such as including but not limited to various forms of losses including log-likelihood loss, hinge loss, cross entropy loss, Softmax loss, ArcFace loss, etc.
- Step 210 based on the model compatibility loss and the classification loss of the second classification, the model parameters of the feature extraction model to be trained and the image classification model to be trained are updated and then the joint training is continued to obtain a trained feature extraction model.
- the feature extraction model to be trained and the image classification model to be trained are jointly trained, that is, according to the loss in training, the model parameters of the feature extraction model to be trained and the image classification model to be trained are updated respectively and then continue to be trained.
- Model parameters may include parameters of various layer structures in the model, such as weight parameters, hyperparameters, etc.
- the loss in training includes model compatibility loss and classification loss of the second classification. Specifically, the loss in training can be obtained according to the sum of the model compatibility loss and the classification loss of the second classification, and based on the loss in training, the feature extraction model to be trained and the image classification model to be trained are updated and then continue to be jointly trained, so as to obtain a trained feature extraction model.
- the server can update the new models to be trained, including the feature extraction model to be trained and the image classification model to be trained, respectively, according to the model compatibility loss and the classification loss of the second classification.
- the model parameters of the feature extraction model to be trained and the image classification model to be trained can be updated respectively.
- joint training is continued, that is, joint training is performed using the next sample image until the training is completed, such as the training meets the convergence condition, the model accuracy meets the preset accuracy condition, the number of training samples meets the quantity condition, etc., to obtain the trained feature extraction model and image classification model.
- the trained feature extraction model can extract features from the input image to extract the image features of the input image; and the trained image classification model can classify the input image features, specifically the image features extracted by the trained feature extraction model, to determine the image category to which the image features of the source image belong.
- the image classification model is used to assist the training of the feature extraction model, and finally the trained feature extraction model can be obtained to perform feature extraction processing on the image through the trained feature extraction model.
- the historical image classification model obtained by joint training with the historical feature extraction model performs a first classification based on the second image feature extracted from the sample image by the feature extraction model to be trained, and the classification loss of the first classification is adjusted by the inheritance parameter to obtain the model compatibility loss, the inheritance parameter is obtained based on the feature discrimination reflected by the first image feature extracted from the sample image by the historical feature extraction model, the second classification is performed based on the second image feature by the image classification model to be trained, and the model update training is performed based on the model compatibility loss and the classification loss of the second classification, the features extracted by the historical feature extraction model can be selectively inherited by the inheritance parameters determined by the features extracted by the historical feature extraction model, the knowledge of the historical feature extraction model can be effectively learned, and the feature extraction obtained by the training can be improved.
- the model can improve the effectiveness of image feature extraction while ensuring model compatibility with historical feature extraction models.
- the feature extraction model processing method further includes a process of determining inheritance parameters, specifically including:
- Step 302 extracting a first image feature from a sample image using a historical feature extraction model.
- the historical feature extraction model is an old feature extraction model that has been trained, and the newly trained feature extraction model needs to be compatible with the historical feature extraction model, that is, compatible with the feature extraction results of the historical feature extraction model.
- the first image feature is an image feature obtained by extracting features from the sample image using the old feature extraction model, that is, the historical feature extraction model.
- the server can obtain a historical feature extraction model that has been trained.
- the historical feature extraction model can be a new feature extraction model, that is, it can be an old feature extraction model that the feature extraction model to be trained needs to be compatible with.
- the server extracts features from the sample image through the historical feature extraction model.
- the sample image can be input into the historical feature extraction model, and the historical feature extraction model outputs the first image feature extracted.
- the first image feature can reflect the feature extraction performance of the historical feature extraction model for the sample image. The more accurate and effective the first image feature is in expressing the sample image, the higher the accuracy of the image feature extraction of the historical feature extraction model.
- Step 304 classify the first image feature using a historical image classification model to obtain an image category classification result.
- the historical image classification model is an old image classification model that has been trained, and the newly trained feature extraction model needs to be compatible with the historical image classification model, that is, compatible with the image classification results of the historical image classification model.
- the historical image classification model and the historical feature extraction model are jointly trained, that is, there is a corresponding relationship between the historical image classification model and the historical feature extraction model.
- the image category classification result is the image classification result obtained by the historical image classification model performing image classification on the first image feature extracted by the historical feature extraction model.
- the image category classification result may include the probability distribution of the sample image corresponding to each image category.
- the server can obtain a historical image classification model that has been trained. There is a corresponding relationship between the historical image classification model and the historical feature extraction model, and the historical image classification model and the historical feature extraction model are obtained through joint training. After determining the historical feature extraction model, the server can determine the historical image classification model based on the corresponding relationship of the joint training.
- the server performs image classification on the first image feature through the historical image classification model. Specifically, the first image feature can be input into the historical image classification model, and the historical image classification model outputs the image category classification result. Based on the image category classification result, the image classification result of the sample image based on the first image feature by the historical image classification model can be determined, that is, the classification category of the sample image can be determined.
- Step 306 Determine the inheritance parameters of the sample image according to the image category classification result.
- the inheritance parameter is determined based on the feature discrimination reflected by the image feature.
- the inheritance parameter can be used to characterize the degree of inheritance of the image feature.
- the inheritance parameter can include an inheritance weight. For image features that are worthy of inheritance and learning by the new model, that is, for image features with strong feature discrimination, a higher inheritance weight can be given.
- the server determines the inheritance parameters of the sample image based on the image category classification result.
- the inheritance parameters of the sample image can be determined according to the discrete degree of the corresponding probability distribution of each image category in the image category classification result. The stronger the discreteness of the corresponding probability distribution of each image category, the more obvious the probability distribution of each category is when the image is classified for the first image feature, and the feature discrimination of the first image feature is limited.
- the image category classification results for different sample images are (1, 0, 0, 0), (0.8, 0, 0.2, 0), (0.5, 0.3, 0.1, 0.1) and (0.2, 0.2, 0.2, 0.4).
- the corresponding probabilities of each category are the most concentrated.
- the feature classification discrimination of the image feature corresponding to the image category classification result is the strongest.
- the image can be accurately classified based on the image feature, and the sample image can be determined to be a high-quality sample.
- the inheritance weight of the sample can be increased, thereby obtaining the inheritance parameters of the sample image.
- the server extracts the first image feature of the sample image through the historical feature extraction model, and classifies the first image feature through the historical image classification model.
- the server determines the inheritance parameter of the sample image according to the image category classification result obtained.
- the inheritance parameter of the sample image can be determined based on the classification performance of the sample image through the old model.
- the inheritance parameter can reflect the feature discrimination of the image feature extracted from the sample image by the old model, so that the trained
- the feature extraction model can selectively inherit the features extracted by the historical feature extraction model, and can effectively learn the knowledge of the historical feature extraction model, thereby improving the effectiveness of image feature extraction while ensuring the model compatibility of the trained feature extraction model with the historical feature extraction model.
- the inheritance parameters of the sample image are determined according to the image category classification result, including: determining the category cross entropy parameter based on the image category classification result; normalizing the category cross entropy parameter to obtain a discrimination parameter, the discrimination parameter is used to measure the feature discrimination of the first image feature; and determining the inheritance parameters of the sample image according to the discrimination parameter.
- the image category classification result may include the probability distribution of the sample image corresponding to each image category, and the category cross entropy parameter is the cross entropy determined based on the image category classification result.
- the cross entropy between the image category classification results can be used to measure the feature discrimination of the first image feature.
- the category cross entropy parameter is negatively correlated with the feature discrimination of the first image feature, that is, the stronger the feature discrimination of the first image feature, the more obvious the feature of the first image feature, and the smaller the value of its category cross entropy parameter, that is, the more concentrated the categories are; and the weaker the feature discrimination of the first image feature, the less obvious the feature of the first image feature, and the larger the value of its category cross entropy parameter, that is, the more dispersed the category distribution is.
- Normalization is a dimensionless processing method that converts the absolute value of the physical system value into a relative value relationship. Specifically, the category cross entropy parameter can be mapped to the range of 0 to 1 through normalization.
- the discrimination parameter is the processing result after the category cross entropy parameter is normalized.
- the discrimination parameter can be used to measure the feature discrimination of the first image feature, and the inheritance parameter of the sample image can be determined based on the discrimination parameter. For example, when the inheritance parameter includes the inheritance weight, the discrimination parameter may be converted into a weight ranging from 0 to 1, thereby obtaining the inheritance weight of the sample image.
- the server can determine the category cross entropy parameter based on the image category classification result, such as by calculating the cross entropy of the corresponding probability distribution of each image category in the image category classification result to obtain the category cross entropy parameter.
- the server normalizes the category cross entropy parameter to obtain the discrimination parameter.
- the discrimination parameter can be used to measure the feature discrimination of the first image feature. For example, when the discrimination parameter is a numerical parameter, the numerical value of the discrimination parameter can be negatively correlated with the feature discrimination of the first image feature, that is, the stronger the feature discrimination of the first image feature, the smaller the numerical value of the discrimination parameter.
- the server determines the inheritance parameter of the sample image based on the discrimination parameter. Specifically, the server can set the inheritance weight of the sample image based on the discrimination parameter, and use the inheritance weight as the inheritance parameter of the sample image.
- a discriminability parameter for measuring the feature discriminability of the first image feature is determined by the cross entropy of the image category classification result, and an inheritance parameter of the sample image is determined based on the discriminability parameter, so that the inheritance parameter can effectively reflect the feature discriminability of the image feature extracted from the sample image by the old model.
- the trained feature extraction model can selectively inherit the features extracted by the historical feature extraction model, thereby improving the effectiveness of image feature extraction while ensuring the model compatibility of the trained feature extraction model with the historical feature extraction model.
- the inheritance parameters include inheritance weights
- the numerical value of the inheritance weights is positively correlated with the metric value of feature discrimination
- the classification loss of the first category is adjusted by the inheritance parameters to obtain the model compatibility loss, including: weighting the classification loss of the first category according to the inheritance weights to obtain the model compatibility loss.
- the value of the inheritance weight is positively correlated with the measurement value of the feature discrimination.
- the measurement value of the feature discrimination is a quantitative parameter used to measure the strength of the feature discrimination. The stronger the feature discrimination of the image feature, the larger the measurement value of the feature discrimination, and the larger the corresponding value of the inheritance weight, so as to highlight the inheritance and learning of image features with strong feature discrimination.
- the classification loss of the first category reflects the classification performance of the second image feature through the historical image classification model, which can be determined by the designed classification loss function.
- the model compatibility loss is the loss obtained by adjusting the classification loss of the first category through the inheritance parameter.
- the model compatibility loss reflects the loss when the new model is compatible with the old model, that is, the loss when the feature extraction model to be trained is model compatible with the historical feature extraction model.
- the inheritance parameters include inheritance weights.
- the value of the inheritance weight is positively correlated with the measurement value of the feature discrimination.
- the server can obtain the classification loss of the first category. Specifically, the classification loss of the first category can be determined based on the classification result of the first category, or based on the second image features and the model parameters of the historical image classification model. The classification loss of the first category can be determined based on the actual loss function involved.
- the server performs weighted processing on the classification loss of the first category according to the inheritance weights in the inheritance parameters. Specifically, the classification loss of the same training batch can be determined.
- the classification loss of each sample image in is weightedly summed to obtain the model compatible loss of the training batch.
- Different sample images can correspond to different inheritance weights.
- the classification loss of different sample images is adjusted by inheritance weights, thereby adjusting the training of the feature extraction model, so that the feature extraction model can focus on inheriting the features of good samples during the training process, and realize selective inheritance of features.
- the server can weight the classification loss of the first category through the inheritance weight included in the inheritance parameters to obtain the model compatibility loss, and use the model compatibility loss to adjust the training of the feature extraction model so that the feature extraction model can focus on inheriting the features of good samples during the training process and realize selective inheritance of features. This can ensure the model compatibility of the trained feature extraction model with the historical feature extraction model while improving the effectiveness of image feature extraction.
- a historical image classification model obtained by joint training with a historical feature extraction model performs a first classification based on a second image feature to obtain a classification result of the first classification, including: determining the historical image classification model obtained by joint training with the historical feature extraction model and the category label of the sample image; based on the category label, determining the historical classification model parameters of the historical image classification model for the category to which the sample image belongs; and obtaining the classification result of the first classification based on the second image feature and the historical classification model parameters.
- the category label refers to the category to which the sample image actually belongs.
- the historical classification model parameters may include weight parameters for classifying images belonging to the category label in the historical image classification model, that is, images belonging to the same category label may correspond to the same historical classification model parameters.
- the historical classification model parameters may specifically include the weight values of the image categories indicated by the category labels in the historical image classification model.
- the probability value that the sample image belongs to the image category indicated by the category label may be calculated using the historical classification model parameters and the second image feature, thereby implementing the first classification processing of the sample image by the historical image classification model and obtaining the classification result of the first classification of the sample image by the historical image classification model.
- the server may determine a historical image classification model obtained by joint training with a historical feature extraction model, and the historical image classification model is obtained by synchronous training with the historical feature extraction model.
- the historical feature extraction model may be used to extract image features from the trained sample image, and the historical image classification model may perform image classification processing on the extracted image features, and the historical image classification model and the historical feature extraction model may be updated respectively based on the image classification results, such as updating the model parameters of the historical image classification model and the historical feature extraction model respectively, and continuing the training until the training is completed, thereby obtaining the trained historical feature extraction model and the historical image classification model.
- the server determines the category label of the sample image, and the category label is used to indicate the image category to which the sample image actually belongs.
- the server determines the historical classification model parameters of the historical image classification model for the category to which the sample image belongs, and specifically may determine the historical classification model parameters for the category to which the sample image belongs based on the classification results of the historical image classification model for images of various categories, and specifically may include the weight value of the image category indicated by the category label in the historical image classification model.
- the server can obtain the classification result of the first classification based on the second image feature and the historical classification model parameters, such as obtaining the classification result of the first classification based on the product of the second image feature and the historical classification model parameters, thereby realizing the first classification processing of the historical image classification model for the sample image.
- the server obtains the classification result of the first classification based on the second image features and the historical classification model parameters in the historical image classification model, and thus performs classification processing on the sample image through the historical image classification model.
- the classification loss of the first classification can be determined based on the classification result of the first classification.
- the classification performance of the first classification can be accurately expressed through the classification loss of the first classification, which is conducive to ensuring the training effect of the feature extraction model, and can not only improve the performance of the feature extraction model, but also improve the training efficiency.
- determining the classification loss of the first classification according to the classification result of the first classification includes: obtaining the classification loss of the first classification based on the angular interval between the second image feature and the historical classification model parameter in the classification result of the first classification.
- the historical classification model parameters include weight parameters for classifying images belonging to a category label in the historical image classification model, that is, images belonging to the same category label can correspond to the same historical classification model parameters.
- the classification loss of the first classification can be determined based on the angular interval between the second image feature and the historical classification model parameters.
- the server constructs the classification loss of the first classification in the form of ArcFace loss function.
- the server can determine the historical classification model parameters from the classification result of the first classification, and The historical classification model parameters in determine the classification loss of the first classification.
- the server can determine the angular interval between the second image feature and the historical classification model parameters.
- the server can normalize the second image feature and the historical classification model parameters respectively, determine the angle between the normalized second image feature and the historical classification model parameters, add the angular interval, and construct the Softmax function based on the added angular interval to obtain the loss function in the form of ArcFace as the classification loss of the first classification.
- the classification loss of the first classification is constructed by the angular interval between the second image feature and the historical classification model parameters in the classification result of the first classification, so that the classification performance of the first classification can be accurately expressed through the classification loss, which is beneficial to ensure the training effect of the feature extraction model, and can not only improve the performance of the feature extraction model, but also improve the training efficiency.
- determining the classification loss of the first classification according to the classification result of the first classification includes: determining the classification loss of the first classification based on a difference between the classification result of the first classification and a category label of the sample image.
- the server can determine the difference between the classification result of the first classification and the category label of the sample image.
- the difference can characterize the accuracy of the classification result of the first classification.
- the server can determine the classification loss of the first classification in the form of various loss functions such as log-likelihood loss, hinge loss, cross entropy loss, and Softmax loss.
- the server can directly use the difference between the classification result of the first classification and the category label of the sample image to determine the classification loss, so that the classification performance of the first classification can be accurately expressed through various forms of classification losses, which is conducive to ensuring the training effect of the feature extraction model and improving the performance of the feature extraction model.
- a second classification is performed based on the second image feature through the image classification model to be trained to obtain a classification result of the second classification
- a classification loss of the second classification is obtained according to the classification result of the second classification, including: performing a second classification based on the second image feature through the image classification model to be trained to obtain a classification result of the second classification; and determining the classification loss of the second classification based on the difference between the classification result of the second classification and the category label carried by the sample image.
- the classification loss of the second classification is used to represent the classification effect of the second classification.
- the classification effect of the second classification can be quantitatively analyzed through the difference between the category labels carried by the sample images of the classification results of the second classification, and the classification loss of the second classification can be obtained.
- the server can perform the second classification based on the second image features through the image classification model to be trained.
- the second image features can be input into the image classification model to be trained, so that the classification results of the second classification are output by the image classification model to be trained.
- the server obtains the category label carried by the sample image, and determines the classification difference between the category label and the classification result of the second classification, and calculates the classification loss of the second classification based on the classification difference.
- the classification loss of the second classification can be calculated by different calculation methods.
- the classification loss of the second classification can also be constructed in the form of ArcFace loss function, thereby obtaining a loss function in the form of ArcFace as the classification loss of the second classification.
- a second classification is performed on the second image features through the image classification model to be trained, and the classification loss of the second classification is determined based on the difference between the classification result of the second classification and the category label carried by the sample image.
- the classification performance of the second classification can be accurately expressed through the classification loss, which is beneficial to ensure the training effect of the feature extraction model, and can not only improve the performance of the feature extraction model, but also improve the training efficiency.
- the model parameters of the feature extraction model to be trained and the image classification model to be trained are updated and then joint training is continued to obtain a trained feature extraction model, including: obtaining the loss in training according to the sum of the model compatibility loss and the classification loss of the second category; and based on the loss in training, the model parameters of the feature extraction model to be trained and the image classification model to be trained are updated and then joint training is continued until the training end condition is met to obtain a trained feature extraction model.
- the training end condition is used to determine whether to end the joint training, and may include but is not limited to at least one of the following conditions: the training meets the convergence condition, the model accuracy meets the preset accuracy condition, and the number of training samples reaches the quantity condition.
- the server can obtain the loss in training based on the sum of the model compatibility loss and the classification loss of the second category, that is, the sum of the model compatibility loss and the classification loss of the second category can be used as the loss in training.
- the server can also perform a weighted summation of the model compatibility loss and the classification loss of the second category, that is, according to the weighted summation of the model compatibility loss and the classification loss of the second category,
- the weights of the class losses are weighted and summed to obtain the loss in training.
- the weights of the model compatibility loss and the classification loss of the second classification can be set according to actual needs, for example, they can be set according to empirical values, and the empirical values can be obtained after multiple experiments.
- the server uses the loss in training to update the model parameters of the feature extraction model to be trained and the image classification model to be trained, and continues to perform joint training after the update until the training end conditions are met, such as when the training meets the convergence conditions, the model accuracy meets the preset accuracy conditions, or the number of training samples reaches the quantity conditions, the training is terminated to obtain the trained feature extraction model.
- the server uses the sum of the model compatibility loss and the classification loss of the second category to update the model and then continue training.
- the model parameters can be accurately adjusted by comprehensively considering the model compatibility loss and the classification loss of the second category, which is beneficial to ensure the training effect of the feature extraction model, thereby improving the performance of the feature extraction model.
- the feature extraction model processing method also includes: performing feature mapping on the first image feature through the feature evolution model to be trained to obtain the mapping feature of the first image feature; and performing a third classification based on the mapping feature through the image classification model to be trained to obtain the classification result of the third classification, and obtaining the classification loss of the third classification according to the classification result of the third classification; based on the model compatibility loss and the classification loss of the second classification, the model parameters of the feature extraction model to be trained and the image classification model to be trained are updated, and then the joint training is continued to obtain the trained feature extraction model, including: based on the model compatibility loss, the classification loss of the second classification and the classification loss of the third classification, the model parameters of the feature extraction model to be trained, the image classification model to be trained and the feature evolution model to be trained are updated respectively, and then the joint training is continued to obtain the trained feature extraction model.
- the feature evolution model is used to perform feature mapping processing on the input image features (extracted by the old model), so as to achieve the evolution of the input image features to optimize the input image features.
- the feature evolution model to be trained can be jointly trained with the feature extraction model to be trained and the image classification model to be trained, that is, the feature extraction model, the image classification model and the feature evolution model can be trained at the same time, and when the training is completed, the trained feature extraction model, the image classification model and the feature evolution model can be obtained.
- the trained feature extraction model can extract features from the input image and output image features; the trained image classification model can classify the input image features and output image classification categories; the feature evolution model can perform feature mapping on the input image features and output the mapped image features, and the mapped image features can be used for image processing, such as image classification, image matching, etc.
- the mapping feature of the first image feature is the image feature obtained after feature mapping of the first image feature by the feature evolution model.
- the first image feature extracted from the sample image by the historical feature extraction model can be feature optimized so that the first image feature evolves toward a better feature latent space, which is beneficial to optimize the features of each image in the image library.
- the third classification refers to the image classification processing based on the mapping feature by the image classification model to be trained.
- the feature extraction model, the image classification model and the feature evolution model are jointly trained in combination with the classification loss of the third classification to obtain a trained feature extraction model.
- the server can determine the feature evolution model to be trained, and the feature evolution model training is used to optimize the features extracted by the historical feature extraction model, realize feature backfilling in a lightweight and efficient manner, and further improve the gain brought by the retrieval system model upgrade.
- the server can perform feature mapping on the first image feature through the feature evolution model, and specifically can input the first image feature into the feature evolution model to be trained, so that the feature evolution model to be trained outputs the mapping feature of the first image feature.
- the server performs a third classification based on the mapping feature through the image classification model to be trained, and specifically can input the mapping feature into the image classification model to be trained, and the image classification model to be trained performs image classification to obtain the classification result of the third classification.
- the server can obtain the classification loss of the third classification based on the classification result of the third classification, and specifically can determine the classification loss of the third classification according to the difference between the classification result of the third classification and the real category label of the sample image.
- the specific form of the loss function of the classification loss of the third classification can be flexibly set according to actual needs, such as including but not limited to various loss functions such as log-likelihood loss, hinge loss, cross entropy loss, Softmax loss, ArcFace loss, etc.
- the server updates the model parameters of the feature extraction model to be trained, the image classification model to be trained, and the feature evolution model to be trained, and then continues the joint training until the training is completed, and obtains the trained feature extraction model.
- the server can obtain the target loss of the joint training based on the model compatibility loss, the classification loss of the second category, and the classification loss of the third category, and based on the target loss, the feature extraction model to be trained, the image classification model to be trained, and the feature evolution model to be trained are updated.
- the model and the feature evolution model to be trained are updated respectively. Specifically, the model parameters of each model to be trained can be updated, and the training is continued after the update until the training is completed to obtain a trained feature extraction model.
- feature mapping is performed on the image features extracted by the historical feature extraction model through the feature evolution model, and the obtained mapping features are subjected to a third classification through the image classification model to be trained. Based on the classification loss of the third classification, the feature extraction model to be trained, the image classification model to be trained, and the feature evolution model to be trained are respectively updated and then continue to be jointly trained.
- the first image feature extracted from the sample image by the historical feature extraction model can be feature optimized so that the first image feature evolves towards a better feature latent space, which is beneficial to optimizing the features of each image in the image library.
- the model parameters of the feature extraction model to be trained, the image classification model to be trained and the feature evolution model to be trained are respectively updated and then the joint training is continued, including: according to the model compatibility loss, the classification loss of the second category and the classification loss of the third category, the target loss of the joint training is obtained; and based on the target loss, the model parameters of the feature extraction model to be trained, the image classification model to be trained and the feature evolution model to be trained are respectively updated and then the joint training is continued.
- the target loss refers to the overall loss of jointly training the feature extraction model to be trained, the image classification model to be trained, and the feature evolution model to be trained. It can be constructed according to the model compatibility loss, the classification loss of the second category, and the classification loss of the third category. For example, the sum of the model compatibility loss, the classification loss of the second category, and the classification loss of the third category can be used as the target loss for joint training.
- the server constructs the target loss for joint training based on the model compatibility loss, the classification loss of the second category, and the classification loss of the third category.
- the server can directly use the sum of the model compatibility loss, the classification loss of the second category, and the classification loss of the third category as the target loss for joint training, that is, as the overall training target for joint training.
- the server performs joint training based on the target loss, that is, based on the target loss, the feature extraction model to be trained, the image classification model to be trained, and the feature evolution model to be trained are respectively updated. For example, after the model parameters of each model to be trained are updated respectively, the joint training continues until the training is completed, and a trained feature extraction model is obtained.
- an overall target loss is constructed based on the model compatibility loss, the classification loss of the second category, and the classification loss of the third category.
- the feature extraction model to be trained, the image classification model to be trained, and the feature evolution model to be trained are jointly trained through the target loss.
- the feature extraction model can be trained from multiple dimensions, so that the trained feature extraction model can improve the effectiveness of image feature extraction while ensuring model compatibility with the historical feature extraction model.
- the target loss of joint training is obtained according to the model compatibility loss, the classification loss of the second category, and the classification loss of the third category, including: obtaining the target loss of joint training according to the sum of the model compatibility loss, the classification loss of the second category, and the classification loss of the third category.
- the server can obtain the target loss of joint training according to the sum of the model compatibility loss, the classification loss of the second category, and the classification loss of the third category.
- the server can also perform weighted summation of the model compatibility loss, the classification loss of the second category, and the classification loss of the third category, that is, perform weighted summation according to the weights of the model compatibility loss, the classification loss of the second category, and the classification loss of the third category to obtain the target loss of joint training.
- the weights of the model compatibility loss, the classification loss of the second category, and the classification loss of the third category can be set according to actual needs, for example, they can be set according to empirical values, and the empirical values can be obtained through multiple experiments.
- the server determines the target loss by using the sum of the model compatibility loss, the classification loss of the second category, and the classification loss of the third category.
- the server can accurately adjust the model parameters by comprehensively considering the model compatibility loss, the classification loss of the second category, and the classification loss of the third category, which is beneficial to ensuring the training effect of the feature extraction model, thereby improving the performance of the feature extraction model.
- the feature extraction model processing method further includes: determining a to-be-queried image feature library associated with the historical feature extraction model, the to-be-queried image feature library including respective to-be-queried image features of each to-be-queried image, the to-be-queried image features being extracted by the historical feature extraction model for each to-be-queried image; performing feature mapping on the features of each to-be-queried image respectively through the trained feature evolution model to obtain respective to-be-queried image mapping features of each to-be-queried image; And based on the mapping features of each image to be queried, a feature library of the image to be queried is updated to obtain a feature library of the image to be queried associated with the trained feature extraction model.
- the image features to be queried included in the image feature library to be queried are obtained by extracting each image to be queried by the historical feature extraction model.
- the image features to be queried of each image to be queried are extracted by the historical feature extraction model, and the image feature library to be queried associated with the historical feature extraction model is constructed.
- the server can extract features of the query image through the historical feature extraction model, and match the extracted image features with each image feature to be queried in the image feature library to be queried, so as to obtain an image matching the query image according to the matching result, such as obtaining an image similar to the query image, thereby realizing the retrieval processing of the query image.
- the mapping features of the image to be queried are obtained by feature mapping the features of the image to be queried through the trained feature evolution model.
- the trained feature evolution model is used to perform feature mapping on each image feature to be queried in the image feature library to be queried, thereby realizing the optimization and update of the image feature library to be queried, and obtaining the image feature library to be queried associated with the trained feature extraction model.
- the optimized and updated image feature library to be queried supports the trained feature extraction model to perform accurate image query processing.
- the server can query the image feature library to be queried associated with the historical feature extraction model, and the image feature library to be queried includes the image features to be queried of each image to be queried, and the image features to be queried are extracted by the historical feature extraction model for each image to be queried. That is, the image features to be queried in the image feature library to be queried are used as the image base library features when the historical feature extraction model is used for image matching.
- the server obtains the trained feature evolution model, and performs feature mapping on each image feature to be queried respectively through the trained feature evolution model to obtain the image mapping features to be queried of each image to be queried.
- the server updates the image feature library to be queried based on the mapping features of each image to be queried, and obtains the image feature library to be queried associated with the trained feature extraction model.
- the trained feature evolution model is used to perform feature mapping on each image feature to be queried, so as to update the image feature library to be queried, and the image mapping features to be queried in the updated image feature library to be queried are suitable as the image base library features when the trained feature extraction model is used for image matching.
- the server can perform feature extraction on the query image through the trained feature extraction model, and perform feature matching on the extracted image features in the feature library of images to be queried that is associated with the trained feature extraction model, that is, perform feature matching on the extracted image features with the mapping features of each image to be queried, and based on the feature matching results, images that match the query image can be determined, such as images that are the same or similar to the query image.
- the feature library of the image to be queried associated with the historical feature extraction model is updated through the trained feature evolution model to obtain the feature library of the image to be queried associated with the trained feature extraction model, so that the base library features can be updated directly based on the feature evolution model, and feature backfilling can be achieved in a lightweight and efficient manner, which is beneficial to improving the quality of the base library features and improving the update processing efficiency of the image feature library to be queried.
- a feature extraction method is provided.
- the method is executed by a computer device, and specifically can be executed by a computer device such as a terminal or a server alone, or can be executed by a terminal and a server together.
- the method is applied to the server in FIG1 as an example for description, and includes the following steps:
- Step 402 Obtain an image to be processed.
- the image to be processed is a target image that needs to be processed for feature extraction, and specifically can be an image sent by a user to a server via a terminal.
- the server can obtain the image to be processed that needs to be processed for feature extraction.
- Step 404 extracting features from the image to be processed by the feature extraction model to obtain the image features to be processed of the image to be processed; wherein the feature extraction model is obtained by continuing to perform joint training after updating the model parameters of the feature extraction model to be trained and the image classification model to be trained based on the model compatibility loss and the classification loss of the second classification, the model compatibility loss is obtained by jointly training the historical image classification model obtained by jointly training with the trained historical feature extraction model, performing a first classification based on the second image feature, and adjusting the classification loss of the first classification by inheriting the parameters, the second image feature is extracted from the sample image by the feature extraction model to be trained, the inheritance parameter is determined based on the feature discrimination reflected by the first image feature of the sample image, the first image feature is extracted from the sample image by the historical feature extraction model, and the classification loss of the second classification is obtained by performing a second classification based on the second image feature by the image classification model to be trained.
- the feature extraction model is a pre-trained model used to extract features from input images.
- the feature extraction is performed on the input image to be processed, and the image features to be processed of the image to be processed are output.
- the image features to be processed are used to characterize the image characteristics of the image to be processed, and various subsequent processing such as image matching and image classification can be performed on the image to be processed based on the image features to be processed.
- the training process of the feature extraction model can be implemented based on the feature extraction model processing method involved above.
- the server may obtain a pre-trained feature extraction model, and perform feature extraction on the image to be processed through the feature extraction model, such as inputting the image to be processed into the feature extraction model to obtain the image features to be processed of the image to be processed. Further, when pre-training the feature extraction model, the server may obtain a sample image and inheritance parameters of the sample image, and the inheritance parameters of the sample image are extracted by the server in advance from the sample image through a trained historical feature extraction model to obtain a first image feature, and are determined based on the feature discrimination reflected by the first image feature. The server performs feature extraction on the sample image through the feature extraction model to be trained to obtain a second image feature of the sample image.
- the server performs a first classification based on the second image feature through the trained historical image classification model to obtain the classification loss of the first classification, and adjusts the classification loss of the first classification through the inheritance parameters to obtain the model compatibility loss.
- the server performs a second classification based on the second image feature extracted by the feature extraction model to be trained through an image classification model jointly trained with the feature extraction model to be trained, and obtains the classification loss of the second classification.
- the server updates the new trained models, including the feature extraction model to be trained and the image classification model to be trained, respectively, based on the model compatibility loss and the classification loss of the second classification, and continues to perform joint training after the model is updated, that is, using the next sample image for joint training until the training is completed, and a trained feature extraction model is obtained.
- the trained feature extraction model can extract features from the input image and output image features used to characterize the input image.
- feature extraction is performed on the image to be processed by a pre-trained feature extraction model, and in the training process of the feature extraction model, a historical image classification model obtained by joint training with a historical feature extraction model performs a first classification based on the second image feature extracted from the sample image by the feature extraction model to be trained, and the classification loss of the first classification is adjusted by inheritance parameters to obtain a model compatibility loss, the inheritance parameters are obtained based on the feature discrimination reflected by the first image feature extracted from the sample image by the historical feature extraction model, a second classification is performed based on the second image feature by the image classification model to be trained, and model update training is performed based on the model compatibility loss and the classification loss of the second classification, and the features extracted by the historical feature extraction model can be selectively inherited by the inheritance parameters determined by the features extracted by the historical feature extraction model, so that the knowledge of the historical feature extraction model can be effectively learned, so that the trained feature extraction model can improve the effectiveness of image feature extraction while ensuring model compatibility with the historical feature extraction model
- the feature extraction method also includes: determining a feature library of the image to be queried; performing feature matching on the features of the image to be processed in the feature library of the image to be queried to obtain features of the image to be queried that match the features of the image to be processed; and determining an image query result for the image to be processed based on an image associated with the features of the image to be queried.
- the image feature library includes the image features of each image to be queried, and the image features to be queried are obtained by extracting features from each image to be queried by the feature extraction model.
- the server can extract features from each image to be queried by using the feature extraction model, and aggregate the extracted image features to be queried to construct the image feature library to be queried. By performing feature matching on the image features to be queried, image query processing can be realized.
- the server determines a feature library of an image to be queried, and the feature library of an image to be queried is associated with a feature extraction model, and is suitable for image query processing using image features extracted by the feature extraction model.
- the server performs feature matching on the image features to be processed in the feature library of an image to be queried, and specifically, the image features to be processed can be matched with each image feature to be queried in the feature library of an image to be queried, such as determining the feature similarity between the image features to be processed and the image features to be queried.
- the server can determine the image features to be queried that match the image features to be processed based on the feature matching result, such as determining the image features to be queried that have a similarity greater than a similarity threshold as the image features to be queried that match the image features to be processed.
- the server determines the image associated with the image features to be queried, and determines the image query result for the image to be processed based on the image associated with the image features to be queried. For example, the server can return the image associated with the image features to be queried that match the image features to be processed as an image matching the image to be processed, thereby obtaining the image query result for the image to be processed.
- the features of the image to be processed are extracted by a pre-trained feature extraction model.
- the features of the image to be processed are matched in the feature library of the image to be queried, and the image query result for the image to be processed is determined based on the image associated with the matched features of the image to be queried, so as to improve the accuracy of the image query.
- the present application also provides an application scenario, which applies the above-mentioned feature extraction model processing method and feature extraction method.
- the application of the feature extraction model processing method and feature extraction method in the application scenario is as follows:
- the server can construct sample images, and each sample image can be divided into different categories.
- the server uses the historical image classification model obtained by joint training with the historical feature extraction model to perform the first classification based on the second image feature extracted from the sample image by the feature extraction model to be trained, and adjusts the classification loss of the first classification by inheritance parameters to obtain the model compatibility loss, the inheritance parameter is obtained based on the feature discrimination reflected by the first image feature extracted from the sample image by the historical feature extraction model, and performs the second classification based on the second image feature by the image classification model to be trained, and performs model update training based on the model compatibility loss and the classification loss of the second classification until the training is completed to obtain the trained feature extraction model.
- the server can receive the image to be classified sent by the terminal, and the server can extract features of the image to be classified through the trained feature extraction model, and classify the image features of the image to be classified through the classifier to determine the image category to which the image to be classified belongs, such as landscape image, character image, etc.
- the present application also provides an application scenario, which applies the above-mentioned feature extraction model processing method and feature extraction method.
- the application of the feature extraction model processing method and feature extraction method in the application scenario is as follows:
- an image retrieval system there is generally a feature extractor or model and a database that stores a large number of base image features.
- the image retrieval system will use the feature extractor to extract the features of the query image, and perform a similarity comparison in the existing database, and then return to the user the same or similar images as the query image to realize the query processing of the input image.
- the traditional model upgrade paradigm requires that all base features be updated again using the new model before deploying the new model, which is called feature backfilling. Considering the hundreds of millions of images in the industry, the feature backfilling process is extremely time-consuming and costly. Furthermore, feature backfilling can be avoided based on the backward compatible model upgrade paradigm.
- DMU Darwinian Model Upgrades
- backward-compatible representation learning an influence loss function is introduced when training a new model to guide the new features to get close to the class center of the old features, where the parameters of the old classifier serve as a reference for the old class center.
- Backward-compatible training can meet the initial compatibility performance requirements, but the new model needs to sacrifice its own discriminability to ensure compatibility with the old model.
- this embodiment proposes a new Darwin model upgrade paradigm, which decouples the inheritance and evolution stages in the model upgrade process, realizes the inheritance of old features through selective backward-compatible training, and realizes the evolution of old features through a lightweight forward evolution branch.
- the figure (a) on the left shows that the model upgrade paradigm based on backward compatibility inherits the old features indiscriminately, facing the dilemma that the new model identification ability and the new-old compatibility cannot be achieved at the same time, that is, in order to effectively be compatible with the old model, the new class center formed after adding the new features has a low correlation with the new features, which affects the new model identification ability and cannot extract effective image features.
- the figure (b) on the right shows the Darwinian model upgrade in this embodiment. This paradigm can effectively avoid the previous dilemma by inheriting good old features through selective backward compatibility and updating poor old features through forward evolution branches.
- the new class center formed after adding the new features has a high correlation with the new features.
- the distance between the new features and the new class center is close, which can effectively alleviate the loss of the new model's own identification ability and improve the compatibility of the new-old model.
- the experimental results on the landmark retrieval dataset Google Landmark show that this embodiment has higher gain than the traditional upgrade paradigm 1 (BCT (CVPR'20)) and the traditional upgrade paradigm 2 (UniBCT (IJCAI'22)), and It has lower loss, which can effectively alleviate the problem of loss of discriminability of the new model, while further improving the compatibility between the new and old models.
- the feature extraction model processing method and feature extraction method provided in this embodiment raise new issues of general backward compatible representation learning, and propose a unified backward compatible training paradigm, and achieve optimal performance in various real compatible training scenarios.
- the new Darwin model upgrade paradigm provided in this embodiment can effectively alleviate the problem of the decline in the discriminative power of the new model itself caused by backward compatibility, and at the same time further improve the compatibility between the new and old models, making the upgrade of the retrieval model more efficient and reducing the upgrade cost of the industry.
- image retrieval refers to the ability to correctly retrieve images with the same content or object from a large-scale candidate image gallery (Gallery, denoted as G).
- G a large-scale candidate image gallery
- D the training dataset
- Representation model Any image x ⁇ D in the new training data set is extracted by the new model, that is, the features extracted by the newly trained feature extraction model can be expressed as
- the classification task in the form of ArcFace loss function is selected as the pre-task. If the label corresponding to the image x is y, the loss function can be expressed as shown in the following formula (1):
- ⁇ is the feature extracted by the model
- ⁇ (y) is the weight value in the classifier corresponding to the category
- the result of multiplication with ⁇ (y) represents the probability value of x belonging to the category y, that is, the classification result
- m is a hyperparameter, which represents the spacing between angles
- s is a scaling factor
- ⁇ represents the classifier.
- the kernel function is defined as ⁇ , ⁇ > represents the vector inner product.
- the performance of the retrieval system is denoted as M( ⁇ , ⁇ )
- the new and old image feature extractors and the old image feature extractors are denoted as
- the backward-compatible model upgrade improves the retrieval performance by improving the features of the query image.
- the specific goal is as shown in the following formula (2):
- the performance gain ⁇ ⁇ is defined as shown in the following formula (3):
- the Darwinian model upgrade paradigm proposed in this embodiment includes a backward compatible new model And a lightweight forward evolution branch ( ⁇ ), as shown in Figure 7.
- ⁇ a lightweight forward evolution branch
- feature extraction is performed by the new and old feature extraction models respectively.
- feature mapping is performed through the forward evolution branch to evolve the old features, and then the classification is performed by the new classifier to obtain the forward evolution loss;
- the inheritance weight of each sample image is determined by the discriminant strength measurement of the old features, and the new features extracted by the new feature extraction model are classified by the old classifier based on the inheritance weight to obtain the selective backward compatibility loss.
- the features extracted by the old feature extraction model are classified by the old classifier to obtain the probability distribution corresponding to each category, and the cross entropy is calculated based on the probability distribution, and normalized to construct the inheritance weight corresponding to the sample image, which can be 0.3.
- the new features extracted by the new feature extraction model they are classified by the new split period to obtain the classification loss.
- the sum of the forward evolution loss, the selective backward compatibility loss and the classification loss is taken as the overall training goal.
- Lnew represents the selective backward compatibility loss
- LSBC represents the forward evolution loss
- LFA represents the classification loss function
- the discriminative power of the feature is measured by entropy, which is defined as shown in the following formula (7):
- ⁇ (x) is the inherited weight of the sample image.
- ⁇ For the forward evolution loss, a lightweight forward evolution branch ( ⁇ ) is designed to make the old features evolve towards a better feature latent space, which is defined as shown in the following formula (9):
- the features extracted from the query image can be compatible with the base database features of the previous version. That is, the Darwin model upgrade paradigm provided in this embodiment can improve the quality of query features by selectively backward compatible training of the new model, while improving the quality of base database features through the forward upgrade branch.
- the Darwin model upgrade paradigm proposed in this embodiment can effectively alleviate the loss of new model discrimination caused by compatible training, while further improving the compatibility of new and old models, thereby pushing it to a wider range of application fields.
- the Darwin model upgrade paradigm provided in this embodiment is verified on multiple large-scale image retrieval datasets Google Landmark, Revisited Oxford, Revisited Paris, MS1Mv3, and IJB-C.
- mAP mean average precision
- face recognition tasks including face recognition datasets MS1Mv3 and IJB-C
- TAR true acceptance rate
- FAR false acceptance rates
- the performance of the Darwin model upgrade paradigm (DMU) proposed in this embodiment is compared with the benchmark model (BCT) in different compatible scenarios.
- the oracle is a pure model without compatibility constraints, and the test set is a landmark retrieval dataset (Google Landmark, ROxford, RParis).
- Table 1 simulates four different compatible scenarios: (1) 30% data->100% data means that the old model is trained with 30% data, and the new model is trained with 100% data for compatibility with the old model; (2) 30% data->70% data means that the new model is trained with 70% data (which does not overlap with the old training dataset, but shares categories) for compatibility with the old model; (3) 30% class->100% class means that the old model is trained with 30% categories, and the new model is trained with all categories for compatibility with the old model; (4) resnet50->resnet101 means that the old model uses ResNet50 as the backbone network and 30% data for training, while the new model uses ResNet101 as the backbone network and 100% data for compatibility with the old model.
- the Darwin model upgrade paradigm proposed in this embodiment can alleviate the degree of loss of the new model's discriminability, while improving the compatibility performance between the new and old model retrievals.
- steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
- the embodiment of the present application also provides a feature extraction model processing device for implementing the feature extraction model processing method involved above.
- the implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more feature extraction model processing device embodiments provided below can refer to the limitations on the feature extraction model processing method above, and will not be repeated here.
- a feature extraction model processing device 1100 comprising: a sample image acquisition module 1102, a second image feature extraction module 1104, a model compatibility loss acquisition module 1106, a second classification loss acquisition module 1108, and a model updating module 1110, wherein:
- the sample image acquisition module 1102 is used to acquire the sample image and the inheritance parameter of the sample image, where the inheritance parameter is determined based on the feature discrimination reflected by the first image feature of the sample image, where the first image feature is extracted from the sample image by the trained historical feature extraction model;
- a second image feature extraction module 1104 configured to extract a second image feature from the sample image by using a feature extraction model to be trained;
- a model compatible loss obtaining module 1106 is used to perform a first classification based on the second image feature using the historical image classification model obtained by joint training with the historical feature extraction model to obtain a classification result of the first classification, determine the classification loss of the first classification according to the classification result of the first classification, and adjust the classification loss of the first classification through an inheritance parameter to obtain a model compatible loss;
- a second classification loss obtaining module 1108 is used to perform a second classification based on the second image feature by using the image classification model to be trained, obtain a classification result of the second classification, and obtain a classification loss of the second classification according to the classification result of the second classification;
- the model updating module 1110 is used to update the model parameters of the feature extraction model to be trained and the image classification model to be trained based on the model compatibility loss and the classification loss of the second classification, and then continue the joint training to obtain the trained feature extraction model.
- it also includes a first image feature extraction module, a category distribution acquisition module and an inheritance parameter determination module; wherein: the first image feature extraction module is used to extract the first image feature from the sample image through a historical feature extraction model; the category distribution acquisition module is used to classify the first image feature through a historical image classification model to obtain an image category classification result; and the inheritance parameter determination module is used to determine the inheritance parameter of the sample image according to the image category classification result.
- the inheritance parameter determination module includes a cross entropy determination module, a normalization processing module and a discriminability parameter processing module; wherein: the cross entropy determination module is used to determine the category cross entropy parameter based on the image category classification result; the normalization processing module is used to perform normalization processing on the category cross entropy parameter to obtain the discriminability parameter, and the discriminability parameter is used to measure the feature discriminability of the first image feature; and the discriminability parameter processing module is used to determine the inheritance parameter of the sample image according to the discriminability parameter.
- the inheritance parameters include inheritance weights, and the value of the inheritance weights is positively correlated with the metric value of feature discrimination.
- the model compatibility loss acquisition module 1106 is also used to weight the classification loss of the first classification according to the inheritance weights to obtain the model compatibility loss.
- the model compatibility loss obtaining module 1106 is also used to determine the joint training with the historical feature extraction model.
- the historical image classification model and the category label of the sample image obtained by training; based on the category label, determining the historical classification model parameters of the historical image classification model for the category to which the sample image belongs; and obtaining the classification result of the first category according to the second image feature and the historical classification model parameters.
- the model compatibility loss obtaining module 1106 is further used to obtain the classification loss of the first classification based on the angular interval between the second image feature and the historical classification model parameter in the classification result of the first classification.
- the model compatibility loss obtaining module 1106 is further used to determine the classification loss of the first classification based on the difference between the classification result of the first classification and the category label of the sample image.
- the second classification loss acquisition module 1108 is also used to perform a second classification based on the second image features through the image classification model to be trained to obtain a classification result of the second classification; and determine the classification loss of the second classification based on the difference between the classification result of the second classification and the category label carried by the sample image.
- the model updating module 1110 is also used to obtain the loss in training based on the sum of the model compatibility loss and the classification loss of the second classification; and based on the loss in training, update the model parameters of the feature extraction model to be trained and the image classification model to be trained respectively, and then continue the joint training until the training end condition is met to obtain a trained feature extraction model.
- it also includes a feature mapping module and a third classification module; wherein: the feature mapping module is used to perform feature mapping on the first image feature through the feature evolution model to be trained to obtain the mapping feature of the first image feature; and the third classification module is used to perform a third classification based on the mapping feature through the image classification model to be trained to obtain the classification result of the third classification, and obtain the classification loss of the third classification according to the classification result of the third classification; the model updating module 1110 is also used to update the model parameters of the feature extraction model to be trained, the image classification model to be trained and the feature evolution model to be trained respectively based on the model compatibility loss, the classification loss of the second classification and the classification loss of the third classification, and then continue to perform joint training to obtain a trained feature extraction model.
- the feature mapping module is used to perform feature mapping on the first image feature through the feature evolution model to be trained to obtain the mapping feature of the first image feature
- the third classification module is used to perform a third classification based on the mapping feature through the image classification model to be trained to obtain the
- the model update module 1110 is also used to obtain the target loss for joint training based on the model compatibility loss, the classification loss of the second category, and the classification loss of the third category; based on the target loss, the model parameters of the feature extraction model to be trained, the image classification model to be trained, and the feature evolution model to be trained are updated respectively, and then the joint training continues.
- the model updating module 1110 is further used to obtain the target loss of joint training according to the sum of the model compatibility loss, the classification loss of the second category, and the classification loss of the third category.
- it also includes a feature library determination module, a feature library feature mapping module and a feature library update module; wherein: the feature library determination module is used to determine the feature library of the image to be queried associated with the historical feature extraction model, the feature library of the image to be queried includes the image features of each image to be queried, and the image features to be queried are extracted by the historical feature extraction model for each image to be queried; the feature library feature mapping module is used to perform feature mapping on the features of each image to be queried respectively through the trained feature evolution model to obtain the image mapping features of each image to be queried; and the feature library update module is used to update the image feature library to be queried based on the mapping features of each image to be queried, to obtain the image feature library to be queried associated with the trained feature extraction model.
- the embodiment of the present application also provides a feature extraction device for implementing the feature extraction method involved above.
- the implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more feature extraction device embodiments provided below can refer to the limitations on the feature extraction method above, and will not be repeated here.
- a feature extraction device 1200 comprising: an image acquisition module 1202 and a feature extraction processing module 1204, wherein:
- An image acquisition module 1202 is used to acquire an image to be processed
- the feature extraction processing module 1204 is used to extract features of the image to be processed by using a feature extraction model to obtain the image features to be processed of the image to be processed;
- the feature extraction model is obtained by continuing the joint training after updating the model parameters of the feature extraction model to be trained and the image classification model to be trained based on the model compatibility loss and the classification loss of the second classification.
- the model compatibility loss is the historical image classification model obtained by joint training with the trained historical feature extraction model.
- the second image feature is used for the first classification, and the classification loss of the first classification is adjusted by the inheritance parameter.
- the second image feature is extracted from the sample image by the feature extraction model to be trained.
- the inheritance parameter is determined based on the feature discrimination reflected by the first image feature of the sample image.
- the first image feature is extracted from the sample image by the historical feature extraction model.
- the classification loss of the second classification is obtained by performing the second classification based on the second image feature by the image classification model to be trained.
- it also includes a feature library determination module, a feature matching module and a query result determination module; wherein: the feature library determination module is used to determine the feature library of the image to be queried; the feature matching module is used to perform feature matching on the features of the image to be processed in the feature library of the image to be queried to obtain features of the image to be queried that match the features of the image to be processed; and the query result determination module is used to determine the image query result for the image to be processed based on the image associated with the features of the image to be queried.
- Each module in the feature extraction model processing device and the feature extraction device can be implemented in whole or in part by software, hardware, or a combination thereof.
- Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
- a computer device which may be a server or a terminal, and its internal structure diagram may be shown in FIG13.
- the computer device includes a processor, a memory, an input/output interface (I/O for short) and a communication interface.
- the processor, the memory and the input/output interface are connected via a system bus, and the communication interface is connected to the system bus via the input/output interface.
- the processor of the computer device is used to provide computing and control capabilities.
- the memory of the computer device includes a non-volatile storage medium and an internal memory.
- the non-volatile storage medium stores an operating system, a computer-readable instruction and a database.
- the internal memory provides an environment for the operation of the operating system and the computer-readable instructions in the non-volatile storage medium.
- the database of the computer device is used to store various model data.
- the input/output interface of the computer device is used to exchange information between the processor and an external device.
- the communication interface of the computer device is used to communicate with an external terminal via a network connection.
- FIG. 13 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied.
- the specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
- a computer device including a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps in the above-mentioned method embodiments when executing the computer-readable instructions.
- a computer-readable storage medium which stores computer-readable instructions.
- the steps in the above-mentioned method embodiments are implemented.
- a computer program product comprising computer-readable instructions, which implement the steps in the above method embodiments when executed by a processor.
- user information including but not limited to user device information, user personal information, etc.
- data including but not limited to data used for analysis, stored data, displayed data, etc.
- any reference to memory, database or other media used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory.
- Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc.
- Volatile memory can include random access memory (RAM) or external cache memory, etc.
- RAM can be in various forms, such as static random access memory, Static Random Access Memory (SRAM) or dynamic random access memory (DRAM), etc.
- the database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database.
- Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto.
- the processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but are not limited thereto.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Multimedia (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Medical Informatics (AREA)
- General Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Biology (AREA)
- General Engineering & Computer Science (AREA)
- Image Analysis (AREA)
Abstract
一种特征提取模型处理方法,包括:获取基于样本图像的第一图像特征所反映的特征鉴别力确定的继承参数,第一图像特征是由历史特征提取模型从样本图像中提取得到的(202);通过待训练的特征提取模型从样本图像中提取第二图像特征(204);通过与历史特征提取模型联合训练得到的历史图像分类模型,基于第二图像特征进行第一分类,并通过继承参数对第一分类的分类损失进行调整,得到模型兼容损失(206);通过待训练的图像分类模型基于第二图像特征进行第二分类,获得第二分类的分类损失(208);及基于模型兼容损失和第二分类的分类损失,对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后获得训练完成的特征提取模型(210)。
Description
相关申请
本申请要求2022年10月11日申请的,申请号为2022112420304,名称为“特征提取模型处理及特征提取方法、装置和计算机设备”的中国专利申请的优先权,在此将其全文引入作为参考。
本申请涉及计算机技术领域,特别是涉及一种特征提取模型处理方法、装置、计算机设备、存储介质和计算机程序产品,以及一种特征提取方法、装置、计算机设备、存储介质和计算机程序产品。
随着计算机技术的发展,从互联网中检索出指定资源的检索技术已经不局限于文字检索,还支持用户进行图片检索。例如,用户可以输入查询图片进行检索,从而从数据库中查询到与用户输入的查询图片相似的图片。在图片检索技术中,往往是针对图片提取图像特征,如通过图像特征提取模型提取图像特征,通过提取的图像特征进行相似度比较,以实现针对图片的检索处理。
然而,在图像特征提取模型升级、更新时,新模型为了实现与旧模型之间的兼容性,会牺牲一部分自身的特征提取能力,故容易导致新模型无法提取到有效的图像特征。
发明内容
根据本申请提供的各种实施例,提供一种特征提取模型处理方法、装置、计算机设备、计算机可读存储介质和计算机程序产品,以及一种特征提取方法、装置、计算机设备、存储介质和计算机程序产品。
第一方面,本申请提供了一种特征提取模型处理方法。所述方法由计算机设备执行,包括:
获取样本图像和样本图像的继承参数,继承参数,是基于样本图像的第一图像特征所反映的特征鉴别力确定的,第一图像特征,是由已训练完成的历史特征提取模型从样本图像中提取得到的;
通过待训练的特征提取模型从样本图像中提取得到第二图像特征;
通过与历史特征提取模型联合训练得到的历史图像分类模型,基于第二图像特征进行第一分类,得到第一分类的分类结果,根据第一分类的分类结果确定第一分类的分类损失,并通过继承参数对第一分类的分类损失进行调整,得到模型兼容损失;
通过待训练的图像分类模型基于第二图像特征进行第二分类,得到所述第二分类的分类结果,并根据所述第二分类的分类结果获得第二分类的分类损失;及
基于模型兼容损失和第二分类的分类损失,对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练,获得训练完成的特征提取模型。
第二方面,本申请还提供了一种特征提取模型处理装置。所述装置包括:
样本图像获取模块,用于获取样本图像和样本图像的继承参数,继承参数,是基于样本图像的第一图像特征所反映的特征鉴别力确定的,第一图像特征,是由已训练完成的历史特征提取模型从样本图像中提取得到的;
第二图像特征提取模块,用于通过待训练的特征提取模型从样本图像中提取得到第二图像特征;
模型兼容损失获得模块,用于通过与历史特征提取模型联合训练得到的历史图像分类模型,基于第二图像特征进行第一分类,得到第一分类的分类结果,根据第一分类的分类结果确定第一分类的分类损失,并通过继承参数对第一分类的分类损失进行调整,得到模型兼容损失;
第二分类损失获得模块,用于通过待训练的图像分类模型基于第二图像特征进行第二分
类,得到第二分类的分类结果,并根据第二分类的分类结果获得第二分类的分类损失;及
模型更新模块,用于基于模型兼容损失和第二分类的分类损失,对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练,获得训练完成的特征提取模型。
第三方面,本申请还提供了一种计算机设备。所述计算机设备包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现本申请各方法实施例的步骤。
第四方面,本申请还提供了一种计算机可读存储介质。所述计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现本申请各方法实施例的步骤。
第五方面,本申请还提供了一种计算机程序产品。所述计算机程序产品,包括计算机可读指令,该计算机可读指令被处理器执行时实现本申请各方法实施例的步骤。
第六方面,本申请提供了一种特征提取方法。所述方法由计算机设备执行,包括:
获取待处理图像;及
通过特征提取模型,对待处理图像进行特征提取,得到待处理图像的待处理图像特征;
其中,特征提取模型,是基于模型兼容损失和第二分类的分类损失对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练得到的,模型兼容损失,是通过与已训练完成的历史特征提取模型联合训练得到的历史图像分类模型,基于第二图像特征进行第一分类,并通过继承参数对第一分类的分类损失进行调整得到的,第二图像特征,是通过待训练的特征提取模型从样本图像中提取得到的,继承参数,是基于样本图像的第一图像特征所反映的特征鉴别力确定的,第一图像特征,是由历史特征提取模型从样本图像中提取得到的,第二分类的分类损失,是通过待训练的图像分类模型基于第二图像特征进行第二分类得到的。
第七方面,本申请还提供了一种特征提取装置。所述装置包括:
图像获取模块,用于获取待处理图像;及
特征提取处理模块,用于通过特征提取模型,对待处理图像进行特征提取,得到待处理图像的待处理图像特征;
其中,特征提取模型,是基于模型兼容损失和第二分类的分类损失对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练得到的,模型兼容损失,是通过与已训练完成的历史特征提取模型联合训练得到的历史图像分类模型,基于第二图像特征进行第一分类,并通过继承参数对第一分类的分类损失进行调整得到的,第二图像特征,是通过待训练的特征提取模型从样本图像中提取得到的,继承参数,是基于样本图像的第一图像特征所反映的特征鉴别力确定的,第一图像特征,是由历史特征提取模型从样本图像中提取得到的,第二分类的分类损失,是通过待训练的图像分类模型基于第二图像特征进行第二分类得到的。
第八方面,本申请还提供了一种计算机设备。所述计算机设备包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现本申请各方法实施例的步骤。
第九方面,本申请还提供了一种计算机可读存储介质。所述计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现本申请各方法实施例的步骤。
第十方面,本申请还提供了一种计算机程序产品。所述计算机程序产品,包括计算机可读指令,该计算机可读指令被处理器执行时实现本申请各方法实施例的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
为了更清楚地说明本申请实施例或传统技术中的技术方案,下面将对实施例或传统技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据公开的附图获得其他的附图。
图1为一个实施例中特征提取模型处理方法的应用环境图。
图2为一个实施例中特征提取模型处理方法的流程示意图。
图3为一个实施例中确定继承参数的流程示意图。
图4为一个实施例中特征提取方法的流程示意图。
图5为一个实施例中不同模型升级范式类中心变化对比示意图。
图6为一个实施例中不同模型升级范式效果对比示意图。
图7为一个实施例中特征提取模型的结构示意图。
图8为一个实施例中鉴别力度量的流程示意图。
图9为一个实施例中后向兼容的序列化模型升级中特征变化示意图。
图10为一个实施例中特征提取模型处理中特征变化示意图。
图11为一个实施例中特征提取模型处理装置的结构框图。
图12为一个实施例中特征提取装置的结构框图。
图13为一个实施例中计算机设备的内部结构图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例提供的特征提取模型处理方法,可以应用于如图1所示的应用环境中。其中,终端102通过网络与服务器104进行通信。数据存储系统可以存储服务器104需要处理的数据。数据存储系统可以集成在服务器104上,也可以放在云上或其他服务器上。终端102可以将样本图像发送至服务器104,服务器104通过与历史特征提取模型联合训练得到的历史图像分类模型,基于待训练的特征提取模型从接收的样本图像中提取的第二图像特征进行第一分类,并通过继承参数对第一分类的分类损失进行调整,得到模型兼容损失,继承参数基于历史特征提取模型从样本图像中提取第一图像特征所反映的特征鉴别力得到,通过待训练的图像分类模型基于第二图像特征进行第二分类,基于模型兼容损失和第二分类的分类损失进行模型更新训练,在训练完成时得到训练完成的特征提取模型。训练完成的特征提取模型可以针对输入的图像进行特征提取,输出所输入图像的图像特征。服务器104可以将训练完成的特征提取模型移植到终端102中,以便终端102通过训练完成的特征提取模型对输入的图像进行特征提取。服务器104也可以接收终端102发送的图像,通过训练完成的特征提取模型对终端102发送的图像进行特征提取。
本申请实施例提供的特征提取方法,也可以应用于如图1所示的应用环境中。终端102或服务器104中可以存储有预先训练完成的特征提取模型,终端102或服务器104可以获取图像,并将获得的图像输入到特征提取模型中,由特征提取模型进行图像提取并输出提取得到的图像的图像特征。其中,预先训练完成的特征提取模型,可以通过本申请实施例提供的特征提取模型处理方法进行训练得到。
其中,终端102可以但不限于是各种台式计算机、笔记本电脑、智能手机、平板电脑、物联网设备和便携式可穿戴设备,物联网设备可为智能音箱、智能电视、智能空调、智能车载设备等。便携式可穿戴设备可为智能手表、智能手环、头戴设备等。服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一个实施例中,如图2所示,提供了一种特征提取模型处理方法,该方法由计算机设备执行,具体可以由终端或服务器等计算机设备单独执行,也可以由终端和服务器共同执行,
在本申请实施例中,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:
步骤202,获取样本图像和样本图像的继承参数,继承参数,是基于样本图像的第一图像特征所反映的特征鉴别力确定的,第一图像特征,是由已训练完成的历史特征提取模型从样本图像中提取得到的。
其中,特征提取模型可以包括基于机器学习构建的人工神经网络模型,其能够针对输入的图像进行特征提取,输出提取得到的图像特征,提取得到的图像特征可以用于图像匹配、图像分类、图像优化等各种处理。机器学习(Machine Learning,ML)是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。机器学习是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域。机器学习和深度学习通常包括人工神经网络、置信网络、强化学习、迁移学习、归纳学习、式教学习等技术。样本图像为训练特征提取模型的样本。历史特征提取模型是已训练完成的模型,在模型更新、升级处理中,历史特征提取模型属于需要针对进行升级、更新的模型,即历史特征提取模型属于旧模型,而重新训练得到的特征提取模型属于新模型。例如,历史特征提取模型可以为历史版本的特征提取模型,而重新训练得到的特征提取模型可以为最新版本的特征提取模型。
通过历史特征提取模型对样本图像进行特征提取,可以提取得到样本图像的第一图像特征。基于第一图像特征可以进行图像分类、图像匹配等各种图像处理,特征鉴别力表征基于第一图像特征进行图像分类、图像匹配等各种图像处理时,针对不同图像的鉴别能力,图像的特征鉴别力的量化数值越高,则表明用于鉴别该图像的特征越明显。例如,在基于第一图像特征进行图像分类时,特征鉴别力可以为针对不同图像类别的鉴别能力。通过第一图像特征进行图像分类的准确性,与第一图像特征所反映的特征鉴别力呈正相关关系,即特征鉴别力越强,则表明第一图像特征所反映分类特征越明显,越有利于进行分类,即利用第一图像特征越能够进行准确的图像分类处理。又如,基于第一图像特征进行图像匹配时,特征鉴别力可以为针对不同图像的鉴别能力,即特征鉴别力越强,则图像越能够与其他图像进行准确匹配,从而鉴别出相似或不同的图片。即图像特征所反映的特征鉴别力越强,则该图像特征越能准确表达图像的特性,基于该图像特征进行处理,可以获得越准确的处理结果。
对于同一图像,通过不同的特征提取模型进行特征提取,提取得到的不同图像特征具有不同的特征鉴别力。如利用提取的图像特征进行图像分类时,分类结果可以不同,分类结果越准确,则提取的图像特征的特征鉴别力越强。特征鉴别力可以针对提取的图像特征进行特征鉴别力分析得到,如可以利用提取的图像特征进行分类处理,基于分类结果确定各图像特征的特征鉴别力。又如,可以利用提取的图像特征进行匹配处理,基于匹配结果确定各图像特征的特征鉴别力。在具体应用中,可以针对特征鉴别力进行量化处理,如可以量化得到特征鉴别参数,具体可以是取值范围为0-100之间的量化数值,也可以是经过归一化后取值范围为0-1之间的量化数值,从而能够利用特征鉴别参数,对各个图像的图像特征的特征鉴别力进行量化对比。
继承参数基于图像特征所反映的特征鉴别力确定,每个样本图像可以具有对应的继承参数。图像特征所反映的特征鉴别力越强,利用图像特征进行图像处理能够获得越准确的结果,则该图像特征越能准确表达相应的图像,该图像特征越值得新模型进行继承和学习。继承参数可以用于表征对图像特征的继承程度,具体可以表示通过旧模型提取得到的图像特征对于新模型提取的图像特征的贡献值,继承参数的表示贡献值越高,则旧模型提取的图像特征对于新模型的特征提取结果影响越大。如继承参数可以包括继承权重,对于值得新模型进行继承和学习的图像特征,即对于特征鉴别力强的图像特征,可以具有较高的继承权重;而对于特征鉴别力弱的图像特征,可以具有较低的继承权重,从而针对图像特征的所反映的特征鉴别力,由新模型进行选择性地继承和学习,以便新模型能够学习到有效地图像特征知识。例如,对于图像特征A、图像特征B和图像特征C,若对于特征鉴别力,图像特征A>图像特征
B>和图像特征C,则对于对应设置的继承权重,也可以为图像特征A>图像特征B>和图像特征C,从而能够使新模型重点学习和继承特征鉴别力强的图像特征,以提高图像特征提取的有效性。此外,继承参数也可以包括继承次数,对于特征鉴别力强的图像特征,可以提高该图像特征的继承次数,即提高针对该图像特征的兼容训练的重要程度;而对于特征鉴别力弱的图像特征,可以降低该图像特征的继承次数,即降低针对该图像特征的兼容训练的重要程度。
具体地,服务器可以获取样本图像以及样本图像的继承参数。其中,样本图像的继承参数,可以由服务器预先通过已训练完成的历史特征提取模型从样本图像中提取得到第一图像特征,并基于第一图像特征所反映的特征鉴别力确定。在具体实现中,服务器可以建立继承参数与样本图像之间的映射关系,通过查询该映射关系,可以获得样本图像的继承参数。例如,服务器在确定样本图像的继承参数后,服务器可以将继承参数写入样本图像的图像属性信息中,在训练新模型获得样本图像后,服务器可以从样本图像的图像属性信息中提取得到继承参数。
步骤204,通过待训练的特征提取模型从样本图像中提取得到第二图像特征。
其中,待训练的特征提取模型是需要重新训练的特征提取模型,属于新模型,为了兼容已训练完成的历史特征提取模型,待训练的特征提取模型需要针对旧模型提取的特征进行兼容性处理,以使训练得到的新模型能够有效地兼容旧模型。第二图像特征是通过需要训练的新模型,即通过待训练的特征提取模型从样本图像中提取得到的。具体地,服务器确定待训练的特征提取模型,并通过待训练的特征提取模型对样本图像进行特征提取,如可以将样本图像输入至待训练的特征提取模型中,得到样本图像的第二图像特征。
步骤206,通过与历史特征提取模型联合训练得到的历史图像分类模型,基于第二图像特征进行第一分类,得到第一分类的分类结果,根据第一分类的分类结果确定第一分类的分类损失,并通过继承参数对第一分类的分类损失进行调整,得到模型兼容损失。
其中,历史图像分类模型是已经训练完成的用于进行图像分类的模型,历史图像分类模型与历史特征提取模型联合训练得到,即历史图像分类模型是与历史特征提取模型同步进行训练得到的。具体地,可以利用历史特征提取模型对训练的样本图像提取图像特征,并由历史图像分类模型对提取的图像特征进行图像分类处理,基于图像分类结果对历史图像分类模型和历史特征提取模型分别进行更新,如更新历史图像分类模型和历史特征提取模型各自的模型参数后继续训练,直到训练结束,得到训练完成的历史特征提取模型和历史图像分类模型。其中,训练完成的历史特征提取模型可以对输入的图像进行特征提取,提取得到的图像特征可以用于对图像进行处理,如图像分类、图像匹配等;训练完成的历史图像分类模型可以对输入的图像特征进行图像分类,以确定图像所属的类别。
第一分类是指通过历史图像分类模型,对待训练的特征提取模型提取的第二图像特征进行图像分类的处理,通过针对第二图像特征进行第一分类的处理,可以获得第一分类的分类损失。具体可以得到第一分类的分类结果后,基于第一分类的分类结果进一步确定第一分类的分类损失,第一分类的分类损失可以基于第一分类的分类结果和样本图像真实的类别标签之间的差异确定。第一分类的分类损失的具体形式可以根据实际需要进行设置,如可以包括但不限于包括对数似然损失、合页损失、交叉熵损失、Softmax损失、ArcFace(Additive Angular Margin,加性角度间隔)损失等各种损失函数的形式。模型兼容损失是通过继承参数对第一分类的分类损失进行调整后得到的损失。通过继承参数对第一分类的分类损失进行调整,可以利用继承参数所体现的特征鉴别力,对历史特征提取模型中携带的第一图像特征进行选择性继承和学习,具体可以降低差样本的权重,提高好样本的权重,从而有效继承和学习旧模型所包括的知识。模型兼容损失反映了新模型对旧模型进行兼容时的损失,即待训练的特征提取模型对历史特征提取模型进行兼容时的损失。
具体地,服务器可以获取已经训练完成的历史图像分类模型,历史图像分类模型可以是与历史特征提取模型联合训练得到分类器模型,用于对提取的图像特征进行图像分类处理。
服务器通过历史图像分类模型基于第二图像特征进行第一分类,得到第一分类的分类结果,并基于第一分类的分类结果确定第一分类的分类损失,如服务器可以根据第一分类的分类结合和样本图像真实的类别标签之间的差异,得到第一分类的分类损失。服务器通过继承参数对第一分类的分类损失进行调整,如继承参数包括继承权重时,可以按照继承权重对第一分类的分类损失进行加权处理,得到模型兼容损失。
步骤208,通过待训练的图像分类模型基于第二图像特征进行第二分类,得到第二分类的分类结果,并根据第二分类的分类结果获得第二分类的分类损失。
其中,待训练的图像分类模型为重新训练的图像分类模型,用于对待训练的特征提取模型提取的图像特征进行图像分类处理,即待训练的图像分类模型和待训练的特征提取模型也进行联合训练,以同时训练得到图像分类模型和特征提取模型。通过待训练的图像分类模型基于第二图像特征进行第二分类,是通过新的图像分类模型,对新的特征提取模型提取的特征进行分类,可以得到第二分类的分类损失,具体可以得到第二分类的分类结果后,基于第二分类的分类结果进一步确定第二分类的分类损失,第二分类的分类损失可以基于第二分类的分类结果和样本图像真实的类别标签之间的差异确定。
具体地,服务器可以通过与待训练的特征提取模型进行联合训练的图像分类模型,基于待训练的特征提取模型提取的第二图像特征进行第二分类,获得第二分类的分类结果,并基于第二分类的分类结果确定第二分类的分类损失。具体可以由服务器根据第二分类的分类结果与样本图像真实的类别标签之间的差异,确定第二分类的分类损失。第二分类的分类损失的具体形式可以根据实际需要进行设置,如可以包括但不限于包括对数似然损失、合页损失、交叉熵损失、Softmax损失、ArcFace损失等各种形式的损失。
步骤210,基于模型兼容损失和第二分类的分类损失,对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练,获得训练完成的特征提取模型。
其中,待训练的特征提取模型和待训练的图像分类模型进行联合训练,即根据训练中的损失,对待训练的特征提取模型和待训练的图像分类模型各自的模型参数分别进行更新后继续进行训练。模型参数可以包括模型中的各种层结构的参数,如权重参数、超参数等。训练中的损失包括模型兼容损失和第二分类的分类损失,具体可以根据模型兼容损失与第二分类的分类损失之间的和,得到训练中的损失,并基于该训练中的损失对待训练的特征提取模型和待训练的图像分类模型进行更新后继续进行联合训练,从而得到训练完成的特征提取模型。
具体地,服务器可以根据模型兼容损失和第二分类的分类损失,对训练的新模型,包括待训练的特征提取模型和待训练的图像分类模型分别进行更新,具体可以对待训练的特征提取模型和待训练的图像分类模型各自的模型参数分别进行更新,在模型更新后继续进行联合训练,即利用下一样本图像进行联合训练,直至训练完成,如训练满足收敛条件、模型精度满足预设精度条件、训练样本数量达到数量条件等,获得训练完成的特征提取模型和图像分类模型。其中,训练完成的特征提取模型可以对输入的图像进行特征提取,提取得到输入图像的图像特征;而训练完成的图像分类模型可以对输入的图像特征,具体可以是对训练完成的特征提取模型提取得到的图像特征进行图像分类,以确定图像特征来源图像所属的图像类别。在具体应用中,图像分类模型用于辅助特征提取模型的训练,最终可以获得训练完成的特征提取模型,以通过训练完成的特征提取模型针对图像进行特征提取处理。
上述特征提取模型处理方法中,通过与历史特征提取模型联合训练得到的历史图像分类模型,基于待训练的特征提取模型从样本图像中提取的第二图像特征进行第一分类,并通过继承参数对第一分类的分类损失进行调整,得到模型兼容损失,继承参数基于历史特征提取模型从样本图像中提取第一图像特征所反映的特征鉴别力得到,通过待训练的图像分类模型基于第二图像特征进行第二分类,基于模型兼容损失和第二分类的分类损失进行模型更新训练,可以通过历史特征提取模型提取的特征所确定的继承参数,对历史特征提取模型提取的特征进行选择性继承,能够有效学习到历史特征提取模型的知识,使得训练得到的特征提取
模型能够在确保针对历史特征提取模型的模型兼容性的同时,提高图像特征提取的有效性。
在一个实施例中,如图3所示,特征提取模型处理方法还包括确定继承参数的处理,具体包括:
步骤302,通过历史特征提取模型从样本图像中提取得到第一图像特征。
其中,历史特征提取模型是已经训练完成的旧特征提取模型,重新训练的新特征提取模型需要针对历史特征提取模型进行兼容,即兼容历史特征提取模型的特征提取结果。第一图像特征是通过旧特征提取模型,即通过历史特征提取模型对样本图像进行特征提取得到的图像特征。
具体地,服务器可以获取已经训练完成的历史特征提取模型,在存在多个旧特征提取模型时,历史特征提取模型的版本可以根据实际需要进行选定。历史特征提取模型可以是新特征提取模型,即可以是待训练的特征提取模型需要进行兼容的旧特征提取模型。服务器通过历史特征提取模型对样本图像进行特征提取,具体可以将样本图像输入到历史特征提取模型中,由历史特征提取模型输出提取得到的第一图像特征,第一图像特征可以反映历史特征提取模型针对样本图像的特征提取表现。第一图像特征对样本图像的表达越准确有效,则表明历史特征提取模型的图像特征提取的准确性越高。
步骤304,通过历史图像分类模型对第一图像特征进行图像分类,获得图像类别分类结果。
其中,历史图像分类模型是已经训练完成的旧图像分类模型,重新训练的新特征提取模型需要针对历史图像分类模型进行兼容,即兼容历史图像分类模型的图像分类结果。历史图像分类模型与历史特征提取模型联合训练得到,即历史图像分类模型与历史特征提取模型存在对应关系。图像类别分类结果是历史图像分类模型对历史特征提取模型提取的第一图像特征进行图像分类,所得到的图像分类结果。图像类别分类结果中可以包括样本图像对应到各个图像类别的概率分布。
具体地,服务器可以获取已经训练完成的历史图像分类模型,历史图像分类模型与历史特征提取模型存在对应关系,历史图像分类模型和历史特征提取模型是联合训练得到的。在确定历史特征提取模型后,服务器可以根据联合训练的对应关系,确定历史图像分类模型。服务器通过历史图像分类模型对第一图像特征进行图像分类,具体可以将第一图像特征输入到历史图像分类模型中,由历史图像分类模型输出图像类别分类结果。基于图像类别分类结果可以确定历史图像分类模型基于第一图像特征,对样本图像的图像分类结果,即确定对样本图像的分类类别。
步骤306,根据图像类别分类结果确定样本图像的继承参数。
其中,继承参数基于图像特征所反映的特征鉴别力确定,继承参数可以用于表征对图像特征的继承程度,如继承参数可以包括继承权重,对于值得新模型进行继承和学习的图像特征,即对于特征鉴别力强的图像特征,可以具有较高的继承权重。
具体地,服务器基于图像类别分类结果确定样本图像的继承参数,具体可以根据图像类别分类结果中各个图像类别相应概率分布的离散程度,确定样本图像的继承参数。各个图像类别相应概率分布的离散性越强,表明针对第一图像特征进行图像分类时,各个类别的概率分布不明显,第一图像特征的特征鉴别力有限。例如,对于不同样本图像的图像类别分类结果分别为(1,0,0,0)、(0.8,0,0.2,0)、(0.5,0.3,0.1,0.1)以及(0.2,0.2,0.2,0.4),对于图像类别分类结果(1,0,0,0),其对应的各类别的概率最集中,则该图像类别分类结果对应的图像特征的特征分类鉴别力最强,可以基于该图像特征进行准确的图像分类,则可以确定该样本图像为优质样本,则可以增加该样本的继承权重,从而得到样本图像的继承参数。
本实施例中,服务器通过历史特征提取模型提取样本图像的第一图像特征,并通过历史图像分类模型对第一图像特征进行图像分类,服务器根据得到的图像类别分类结果确定样本图像的继承参数,能够基于样本图像通过旧模型进行图像分类的分类表现确定样本图像的继承参数,继承参数可以反映了旧模型从样本图像提取的图像特征的特征鉴别力,使得训练的
特征提取模型能够对历史特征提取模型提取的特征进行选择性继承,能够有效学习到历史特征提取模型的知识,从而在确保训练得到的特征提取模型针对历史特征提取模型的模型兼容性的同时,提高图像特征提取的有效性。
在一个实施例中,根据图像类别分类结果确定样本图像的继承参数,包括:基于图像类别分类结果确定类别交叉熵参数;针对类别交叉熵参数进行归一化处理,得到鉴别力参数,鉴别力参数用于度量第一图像特征的特征鉴别力;根据鉴别力参数确定样本图像的继承参数。
其中,图像类别分类结果中可以包括样本图像对应到各个图像类别的概率分布,类别交叉熵参数是基于图像类别分类结果确定的交叉熵。通过图像类别分类结果之间的交叉熵,可以来度量第一图像特征的特征鉴别力。类别交叉熵参数与第一图像特征的特征鉴别力呈负相关关系,即第一图像特征的特征鉴别力越强,则第一图像特征的特征越明显,其类别交叉熵参数的数值则越小,即类别分别越集中;而第一图像特征的特征鉴别力越弱,则第一图像特征的特征越不明显,其类别交叉熵参数的数值则越大,即类别分布越分散。归一化处理是一种无量纲处理手段,使物理系统数值的绝对值变成某种相对值关系,具体可以通过归一化处理将类别交叉熵参数映射到0至1的区间范围内。鉴别力参数是对类别交叉熵参数进行归一化处理后的处理结果,鉴别力参数可以用于度量第一图像特征的特征鉴别力,基于鉴别力参数可以确定样本图像的继承参数。例如,继承参数包括继承权重时,可以将鉴别力参数转换成0至1范围内的权重,从而得到样本图像的继承权重。
具体地,服务器可以基于图像类别分类结果确定类别交叉熵参数,如可以通过计算图像类别分类结果中各个图像类别相应概率分布各自的交叉熵,得到类别交叉熵参数。服务器对类别交叉熵参数进行归一化处理,得到鉴别力参数。鉴别力参数可以用于度量第一图像特征的特征鉴别力。例如,在鉴别力参数为数值型参数时,鉴别力参数的数值大小可以与第一图像特征的特征鉴别力呈负相关关系,即第一图像特征的特征鉴别力越强,则鉴别力参数的数值越小。服务器根据鉴别力参数确定样本图像的继承参数,具体可以由服务器基于鉴别力参数设置样本图像的继承权重,并将继承权重作为样本图像的继承参数。
本实施例中,通过图像类别分类结果的交叉熵确定度量第一图像特征的特征鉴别力的鉴别力参数,并基于鉴别力参数确定样本图像的继承参数,从而使继承参数能够有效地反映旧模型从样本图像提取的图像特征的特征鉴别力,基于继承参数使得训练的特征提取模型能够对历史特征提取模型提取的特征进行选择性继承,从而能够在确保训练得到的特征提取模型针对历史特征提取模型的模型兼容性的同时,提高图像特征提取的有效性。
在一个实施例中,继承参数包括继承权重,继承权重的数值与特征鉴别力的度量数值呈正相关关系,通过继承参数对第一分类的分类损失进行调整,得到模型兼容损失,包括:按照继承权重对第一分类的分类损失进行加权处理,得到模型兼容损失。
其中,继承权重的数值与特征鉴别力的度量数值呈正相关关系,特征鉴别力的度量数值是用于度量特征鉴别力强弱的量化参数,图像特征的特征鉴别力越强,特征鉴别力的度量数值越大,则对应的继承权重的数值越大,从而能够突出针对特征鉴别力强的图像特征的继承和学习。第一分类的分类损失反映了通过历史图像分类模型对第二图像特征进行图像分类的分类表现,可以通过设计的分类损失函数确定得到。模型兼容损失是通过继承参数对第一分类的分类损失进行调整后得到的损失,模型兼容损失反映了新模型对旧模型进行兼容时的损失,即待训练的特征提取模型对历史特征提取模型进行模型兼容时的损失。模型兼容损失的数值越大,表明待训练的特征提取模型为兼容历史特征提取模型,对本身的特征提取有效性的不利影响越大。
具体地,继承参数包括继承权重,继承权重的数值与特征鉴别力的度量数值呈正相关关系,服务器可以获取第一分类的分类损失,具体可以根据第一分类的分类结果确定第一分类的分类损失,也可以根据第二图像特征与历史图像分类模型的模型参数,确定第一分类的分类损失。第一分类的分类损失的确定方式可以根据实际涉及的损失函数进行确定。服务器按照继承参数中的继承权重,对第一分类的分类损失进行加权处理,具体可以将同一训练批次
中的各个样本图像的分类损失进行加权求和,得到该训练批次的模型兼容损失。不同的样本图像可以对应于不同的继承权重,通过继承权重调整不同样本图像的分类损失,从而调整特征提取模型的训练,使特征提取模型在训练过程中能够重点继承好样本的特征,实现对特征的选择性继承。
本实施例中,服务器可以通过继承参数中包括的继承权重,对第一分类的分类损失进行加权处理,得到模型兼容损失,利用模型兼容损失调整特征提取模型的训练,使得特征提取模型在训练过程中能够重点继承好样本的特征,实现对特征的选择性继承,从而能够在确保训练得到的特征提取模型针对历史特征提取模型的模型兼容性的同时,提高图像特征提取的有效性。
在一个实施例中,通过与历史特征提取模型联合训练得到的历史图像分类模型,基于第二图像特征进行第一分类,得到第一分类的分类结果,包括:确定与历史特征提取模型联合训练得到的历史图像分类模型以及样本图像的类别标签;基于类别标签,确定历史图像分类模型针对样本图像所属类别的历史分类模型参数;及根据第二图像特征和历史分类模型参数,得到第一分类的分类结果。
其中,类别标签是指样本图像真实所属的类别。历史分类模型参数可以包括历史图像分类模型中针对属于类别标签的图像进行分类处理时的权重参数,即属于相同类别标签的图像可以对应于相同的历史分类模型参数。历史分类模型参数具体可以包括类别标签指示的图像类别在历史图像分类模型中的权重数值,利用历史分类模型参数和第二图像特征可以计算得到样本图像属于该类别标签指示的图像类别的概率值,从而实现历史图像分类模型针对样本图像的第一分类处理,得到历史图像分类模型针对样本图像进行第一分类的分类结果。
具体地,服务器可以确定与历史特征提取模型联合训练得到的历史图像分类模型,历史图像分类模型是与历史特征提取模型同步进行训练得到的。示例性地,可以利用历史特征提取模型对训练的样本图像提取图像特征,并由历史图像分类模型对提取的图像特征进行图像分类处理,基于图像分类结果对历史图像分类模型和历史特征提取模型分别进行更新,如更新历史图像分类模型和历史特征提取模型各自的模型参数后继续训练,直到训练结束,得到训练完成的历史特征提取模型和历史图像分类模型。服务器确定样本图像的类别标签,类别标签用于指示样本图像真实所属的图像类别。服务器基于样本图像的类别标签,确定历史图像分类模型针对样本图像所属类别的历史分类模型参数,具体可以基于历史图像分类模型对各种类别的图像的分类结果,确定针对样本图像所属类别的历史分类模型参数,具体可以包括类别标签指示的图像类别在历史图像分类模型中的权重数值。服务器可以根据第二图像特征和历史分类模型参数,得到第一分类的分类结果,如可以根据第二图像特征和历史分类模型参数的乘积,得到第一分类的分类结果,从而实现历史图像分类模型针对样本图像的第一分类处理。
本实施例中,服务器根据第二图像特征与历史图像分类模型中历史分类模型参数得到第一分类的分类结果,从而通过历史图像分类模型针对样本图像进行分类处理,基于第一分类的分类结果可以确定第一分类的分类损失,通过第一分类的分类损失能够准确表达出第一分类的分类表现,有利于确保特征提取模型的训练效果,既能提高特征提取模型的性能,也能提高训练效率。
在一个实施例中,根据第一分类的分类结果确定第一分类的分类损失,包括:基于第二图像特征与第一分类的分类结果中的历史分类模型参数之间的角度间隔,得到第一分类的分类损失。
其中,历史分类模型参数包括历史图像分类模型中针对属于类别标签的图像进行分类处理时的权重参数,即属于相同类别标签的图像可以对应于相同的历史分类模型参数。根据第二图像特征与历史分类模型参数之间的角度间隔,可以确定第一分类的分类损失。
具体地,服务器通过ArcFace损失函数的形式构建第一分类的分类损失。服务器可以从第一分类的分类结果中确定历史分类模型参数,并基于第二图像特征与第一分类的分类结果
中的历史分类模型参数确定第一分类的分类损失。服务器可以确定第二图像特征与历史分类模型参数之间的角度间隔,具体可由服务器将第二图像特征与历史分类模型参数分别进行归一化,并确定归一化后的第二图像特征与历史分类模型参数之间的夹角,添加角度间隔,基于添加角度间隔后的构建Softmax函数,得到ArcFace形式的损失函数,作为第一分类的分类损失。
本实施例中,通过第二图像特征与第一分类的分类结果中历史分类模型参数之间的角度间隔,构建得到第一分类的分类损失,从而能够通过分类损失准确表达出第一分类的分类表现,有利于确保特征提取模型的训练效果,既能提高特征提取模型的性能,也能提高训练效率。
在一个实施例中,根据第一分类的分类结果确定第一分类的分类损失,包括:基于第一分类的分类结果与样本图像的类别标签之间的差异,确定第一分类的分类损失。
具体地,服务器可以确定第一分类的分类结果与样本图像的类别标签之间的差异,差异可以表征出第一分类的分类结果的准确程度,服务器基于第一分类的分类结果与样本图像的类别标签之间的差异,可以按照对数似然损失、合页损失、交叉熵损失、Softmax损失等各种损失函数的形式,确定第一分类的分类损失。
本实施例中,服务器可以直接利用第一分类的分类结果与样本图像的类别标签之间的差异确定分类损失,从而能够通过各种形式的分类损失准确表达出第一分类的分类表现,有利于确保特征提取模型的训练效果,能够提高特征提取模型的性能。
在一个实施例中,通过待训练的图像分类模型基于第二图像特征进行第二分类,得到第二分类的分类结果,并根据第二分类的分类结果获得第二分类的分类损失,包括:通过待训练的图像分类模型基于第二图像特征进行第二分类,得到第二分类的分类结果;及基于第二分类的分类结果和样本图像携带的类别标签之间的差异,确定第二分类的分类损失。
其中,第二分类的分类损失用于表示第二分类的分类效果,通过第二分类的分类结果样本图像携带的类别标签之间的差异,可以对第二分类的分类效果进行量化分析,得到第二分类的分类损失。具体地,服务器可以通过待训练的图像分类模型基于第二图像特征进行第二分类,具体可以将第二图像特征输入到待训练的图像分类模型中,以由待训练的图像分类模型输出第二分类的分类结果。服务器获取样本图像携带的类别标签,并确定类别标签与第二分类的分类结果之间的分类差异,基于该分类差异计算得到第二分类的分类损失。在具体应用中,对于设计的不同的分类损失形式,可以通过不同的计算方式计算第二分类的分类损失。例如,也可以通过ArcFace损失函数的形式构建第二分类的分类损失,从而得到ArcFace形式的损失函数,作为第二分类的分类损失。
本实施例中,通过待训练的图像分类模型对第二图像特征进行第二分类,基于第二分类的分类结果和样本图像携带的类别标签之间的差异,确定第二分类的分类损失,从而能够通过分类损失准确表达出第二分类的分类表现,有利于确保特征提取模型的训练效果,既能提高特征提取模型的性能,也能提高训练效率。
在一个实施例中,基于模型兼容损失和第二分类的分类损失,对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练,获得训练完成的特征提取模型,包括:根据模型兼容损失和第二分类的分类损失之间的和得到训练中的损失;及基于训练中的损失,对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练,直至满足训练结束条件时结束训练,获得训练完成的特征提取模型。
其中,训练结束条件用于判定是否结束联合训练,具体可以包括但不限于包括训练满足收敛条件、模型精度满足预设精度条件、训练样本数量达到数量条件中至少一种条件。具体地,服务器可以根据模型兼容损失和第二分类的分类损失之间的和得到训练中的损失,即可以将模型兼容损失和第二分类的分类损失的和作为训练中的损失。示例性地,服务器还可以将模型兼容损失和第二分类的分类损失进行加权求和,即按照模型兼容损失和第二分类的分
类损失各自的权重进行加权求和,得到训练中的损失。模型兼容损失和第二分类的分类损失各自的权重可以根据实际需要进行设置,例如可以根据经验值进行设定,经验值可以经过多次试验得到。服务器利用训练中的损失对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新,并在更新后继续进行联合训练,直至满足训练结束条件时结束训练,如训练满足收敛条件、模型精度满足预设精度条件或者训练样本数量达到数量条件时,结束训练,得到训练完成的特征提取模型。
本实施例中,服务器利用模型兼容损失和第二分类的分类损失之间的和进行模型更新后继续训练,可以综合模型兼容损失和第二分类的分类损失准确调整模型参数,有利于确保特征提取模型的训练效果,从而能够提高特征提取模型的性能。
在一个实施例中,特征提取模型处理方法还包括:通过待训练的特征进化模型对第一图像特征进行特征映射,得到第一图像特征的映射特征;及通过待训练的图像分类模型基于映射特征进行第三分类,得到第三分类的分类结果,并根据第三分类的分类结果得到第三分类的分类损失;基于模型兼容损失和第二分类的分类损失,对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练,获得训练完成的特征提取模型,包括:基于模型兼容损失、第二分类的分类损失以及第三分类的分类损失,对待训练的特征提取模型、待训练的图像分类模型以及待训练的特征进化模型各自的模型参数分别进行更新后继续进行联合训练,获得训练完成的特征提取模型。
其中,特征进化模型用于对输入的图像特征(由旧模型提取得到)进行特征映射处理,从而能够实现对输入图像特征的进化,以优化输入的图像特征。待训练的特征进化模型可以与待训练的特征提取模型、待训练的图像分类模型进行联合训练,即可以同时训练特征提取模型、图像分类模型和特征进化模型,在训练完成时可以得到训练完成的特征提取模型、图像分类模型和特征进化模型。其中,训练完成的特征提取模型可以对输入的图像进行特征提取,输出图像特征;训练完成的图像分类模型可以对输入的图像特征进行图像分类,输出图像分类类别;特征进化模型可以对输入的图像特征进行特征映射,输出映射后的图像特征,映射后的图像特征可以用于图像处理,如图像分类、图像匹配等。
第一图像特征的映射特征,是通过特征进化模型对第一图像特征进行特征映射后得到的图像特征,通过添加的特征进化模型,可以对历史特征提取模型从样本图像中提取的第一图像特征进行特征优化,以使第一图像特征朝着更好的特征隐空间进行进化,有利于对图像库中各图像的特征进行优化。第三分类是指由待训练的图像分类模型基于映射特征进行图像分类的处理,进一步结合第三分类的分类损失,对特征提取模型、图像分类模型和特征进化模型进行联合训练,得到训练完成的特征提取模型。
具体地,服务器可以确定待训练的特征进化模型,特征进化模型训练用于对历史特征提取模型提取的特征进行优化,以一种轻量高效的方式实现特征回填,进一步提升检索系统模型升级带来的增益。服务器可以通过特征进化模型对第一图像特征进行特征映射,具体可以将第一图像特征输入到待训练的特征进化模型中,以由待训练的特征进化模型输出第一图像特征的映射特征。服务器通过待训练的图像分类模型基于映射特征进行第三分类,具体可以将映射特征输入到待训练的图像分类模型中,由待训练的图像分类模型进行图像分类,得到第三分类的分类结果,服务器基于第三分类的分类结果可以获得第三分类的分类损失,具体可以根据第三分类的分类结果与样本图像真实的类别标签之间的差异确定第三分类的分类损失。第三分类的分类损失的损失函数具体形式可以根据实际需要进行灵活设置,如可以包括但不限于包括对数似然损失、合页损失、交叉熵损失、Softmax损失、ArcFace损失等各种损失函数的形式。服务器基于模型兼容损失、第二分类的分类损失以及第三分类的分类损失,对待训练的特征提取模型、待训练的图像分类模型以及待训练的特征进化模型各自的模型参数分别进行更新后继续进行联合训练,直至训练完成,获得训练完成的特征提取模型。在具体应用中,服务器可以根据模型兼容损失、第二分类的分类损失以及第三分类的分类损失得到联合训练的目标损失,并基于该目标损失对待训练的特征提取模型、待训练的图像分类模
型以及待训练的特征进化模型分别进行更新,具体可以对各待训练模型的模型参数进行更新,并在更新后继续进行训练,直至训练结束得到训练完成的特征提取模型。
本实施例中,通过特征进化模型对历史特征提取模型提取的图像特征进行特征映射,通过待训练的图像分类模型对得到的映射特征进行第三分类,并基于第三分类的分类损失,对待训练的特征提取模型、待训练的图像分类模型以及待训练的特征进化模型分别进行更新后继续进行联合训练,可以对历史特征提取模型从样本图像中提取的第一图像特征进行特征优化,以使第一图像特征朝着更好的特征隐空间进行进化,有利于对图像库中各图像的特征进行优化。
在一个实施例中,基于模型兼容损失、第二分类的分类损失以及第三分类的分类损失,对待训练的特征提取模型、待训练的图像分类模型以及待训练的特征进化模型各自的模型参数分别进行更新后继续进行联合训练,包括:根据模型兼容损失、第二分类的分类损失以及第三分类的分类损失,获得联合训练的目标损失;及基于目标损失对待训练的特征提取模型、待训练的图像分类模型以及待训练的特征进化模型各自的模型参数分别进行更新后继续进行联合训练。
其中,目标损失是指对待训练的特征提取模型、待训练的图像分类模型以及待训练的特征进化模型进行联合训练的整体损失,具体可以根据模型兼容损失、第二分类的分类损失以及第三分类的分类损失构建得到,如可以将模型兼容损失、第二分类的分类损失以及第三分类的分类损失的和作为联合训练的目标损失。
具体地,服务器根据模型兼容损失、第二分类的分类损失以及第三分类的分类损失,构建得到联合训练的目标损失。如服务器可以直接将模型兼容损失、第二分类的分类损失以及第三分类的分类损失的和,作为联合训练的目标损失,即作为联合训练的整体训练目标。服务器基于目标损失进行联合训练,即基于目标损失对待训练的特征提取模型、待训练的图像分类模型以及待训练的特征进化模型分别进行更新,如对各待训练模型的模型参数分别进行更新后继续进行联合训练,直至训练结束,得到训练完成的特征提取模型。
本实施例中,根据模型兼容损失、第二分类的分类损失以及第三分类的分类损失,构建整体的目标损失,并通过目标损失对待训练的特征提取模型、待训练的图像分类模型以及待训练的特征进化模型进行联合训练,可以从多维度训练特征提取模型,使得训练得到的特征提取模型能够在确保针对历史特征提取模型的模型兼容性的同时,提高图像特征提取的有效性。
在一个实施例中,根据模型兼容损失、第二分类的分类损失以及第三分类的分类损失,获得联合训练的目标损失,包括:根据模型兼容损失、第二分类的分类损失以及第三分类的分类损失的和,得到联合训练的目标损失。
具体地,服务器可以根据模型兼容损失、第二分类的分类损失以及第三分类的分类损失的和得到联合训练的目标损失。在具体实现中,服务器还可以将模型兼容损失、第二分类的分类损失以及第三分类的分类损失进行加权求和,即按照模型兼容损失、第二分类的分类损失以及第三分类的分类损失各自的权重进行加权求和,得到联合训练的目标损失。模型兼容损失、第二分类的分类损失以及第三分类的分类损失各自的权重可以根据实际需要进行设置,例如可以根据经验值进行设定,经验值可以经过多次试验得到。
本实施例中,服务器利用模型兼容损失、第二分类的分类损失以及第三分类的分类损失的和确定目标损失,可以综合模型兼容损失、第二分类的分类损失以及第三分类的分类损失准确调整模型参数,有利于确保特征提取模型的训练效果,从而能够提高特征提取模型的性能。
在一个实施例中,特征提取模型处理方法还包括:确定与历史特征提取模型关联的待查询图像特征库,待查询图像特征库包括各待查询图像各自的待查询图像特征,待查询图像特征,是由历史特征提取模型针对各待查询图像进行提取得到的;通过训练完成的特征进化模型,对各待查询图像特征分别进行特征映射,得到各待查询图像各自的待查询图像映射特征;
及基于各待查询图像映射特征更新待查询图像特征库,得到与训练完成的特征提取模型关联的待查询图像特征库。
其中,待查询图像特征库与历史特征提取模型存在关联关系,即待查询图像特征库中包括的待查询图像特征,是由历史特征提取模型对各待查询图像进行提取得到的。通过历史特征提取模型提取得到各待查询图像的待查询图像特征,并构建历史特征提取模型关联的待查询图像特征库,在用户输入查询图像进行图像查询时,服务器可以通过历史特征提取模型对查询图像进行特征提取,并将提取的图像特征与待查询图像特征库中各待查询图像特征进行匹配,从而根据匹配结果得到与查询图像相匹配的图像,如得到与查询图像相似的图像,从而实现对查询图像的检索处理。待查询图像映射特征通过训练完成的特征进化模型,对待查询图像特征进行特征映射后得到。通过训练完成的特征进化模型对待查询图像特征库中的各待查询图像特征进行特征映射,从而实现对待查询图像特征库的优化更新,得到与训练完成的特征提取模型关联的待查询图像特征库,优化更新后的待查询图像特征库支持训练完成的特征提取模型进行准确的图像查询处理。
具体地,服务器可以查询与历史特征提取模型关联的待查询图像特征库,待查询图像特征库中包括各待查询图像各自的待查询图像特征,待查询图像特征,是由历史特征提取模型针对各待查询图像进行提取得到的。即待查询图像特征库中的待查询图像特征,作为通过历史特征提取模型进行图像匹配时的图像底库特征。服务器获取训练完成的特征进化模型,并通过训练完成的特征进化模型对各待查询图像特征分别进行特征映射,得到各待查询图像各自的待查询图像映射特征。服务器基于各待查询图像映射特征更新待查询图像特征库,得到与训练完成的特征提取模型关联的待查询图像特征库。通过训练完成的特征进化模型对各待查询图像特征进行特征映射,以实现对待查询图像特征库的更新,更新后的待查询图像特征库中的待查询图像映射特征,适用于作为通过训练完成的特征提取模型进行图像匹配时的图像底库特征。进一步地,在用户输入查询图像后,服务器可以通过训练完成的特征提取模型对查询图像进行特征提取,并将提取的图像特征在训练完成的特征提取模型关联的待查询图像特征库中进行特征匹配,即将提取的图像特征与各待查询图像映射特征进行特征匹配,基于特征匹配结果可以确定与查询图像相匹配的图像,如与查询图像相同或相似的图像。
本实施例中,通过训练完成的特征进化模型对历史特征提取模型关联的待查询图像特征库进行更新,得到与训练完成的特征提取模型关联的待查询图像特征库,从而能够直接基于特征进化模型进行底库特征更新,以一种轻量高效的方式实现特征回填,有利于提高底库特征质量,并提高待查询图像特征库的更新处理效率。
在一个实施例中,如图4所示,提供了一种特征提取方法,该方法由计算机设备执行,具体可以由终端或服务器等计算机设备单独执行,也可以由终端和服务器共同执行,在本申请实施例中,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:
步骤402,获取待处理图像。
其中,待处理图像为需要进行特征提取处理的目标图像,具体可以为用户通过终端向服务器发送的图像。具体地,服务器可以获取需要进行特征提取处理的待处理图像。
步骤404,通过特征提取模型,对待处理图像进行特征提取,得到待处理图像的待处理图像特征;其中,特征提取模型,是基于模型兼容损失和第二分类的分类损失对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练得到的,模型兼容损失,是通过与已训练完成的历史特征提取模型联合训练得到的历史图像分类模型,基于第二图像特征进行第一分类,并通过继承参数对第一分类的分类损失进行调整得到的,第二图像特征,是通过待训练的特征提取模型从样本图像中提取得到的,继承参数,是基于样本图像的第一图像特征所反映的特征鉴别力确定的,第一图像特征,是由历史特征提取模型从样本图像中提取得到的,第二分类的分类损失,是通过待训练的图像分类模型基于第二图像特征进行第二分类得到的。
其中,特征提取模型是预先训练完成的模型,用于对输入的图像进行特征提取,具体可
以对输入的待处理图像进行特征提取,输出待处理图像的待处理图像特征。待处理图像特征用于表征待处理图像的图像特性,基于该待处理图像特征可以对待处理图像进行图像匹配、图像分类等各种后续处理。对于特征提取模型的训练处理,可以基于上述涉及的特征提取模型处理方法实现。
具体地,服务器可以获取预先训练的特征提取模型,通过特征提取模型对待处理图像进行特征提取,如可以将待处理图像输入到特征提取模型中,得到待处理图像的待处理图像特征。进一步地,在预先训练特征提取模型时,服务器可以获取样本图像以及样本图像的继承参数,样本图像的继承参数由服务器预先通过已训练完成的历史特征提取模型从样本图像中提取得到第一图像特征,并基于第一图像特征所反映的特征鉴别力确定。服务器通过待训练的特征提取模型对样本图像进行特征提取,得到样本图像的第二图像特征。服务器通过已经训练完成的历史图像分类模型基于第二图像特征进行第一分类,得到第一分类的分类损失,并通过继承参数对第一分类的分类损失进行调整,得到模型兼容损失。服务器通过与待训练的特征提取模型进行联合训练的图像分类模型,基于待训练的特征提取模型提取的第二图像特征进行第二分类,获得第二分类的分类损失。服务器根据模型兼容损失和第二分类的分类损失,对训练的新模型,包括待训练的特征提取模型和待训练的图像分类模型分别进行更新,在模型更新后继续进行联合训练,即利用下一样本图像进行联合训练,直至训练完成,获得训练完成的特征提取模型。训练完成的特征提取模型可以对输入的图像进行特征提取,输出用于表征所输入图像的图像特征。
上述特征提取方法中,通过预先训练的特征提取模型对待处理图像进行特征提取,而在特征提取模型的训练处理中,通过与历史特征提取模型联合训练得到的历史图像分类模型,基于待训练的特征提取模型从样本图像中提取的第二图像特征进行第一分类,并通过继承参数对第一分类的分类损失进行调整,得到模型兼容损失,继承参数基于历史特征提取模型从样本图像中提取第一图像特征所反映的特征鉴别力得到,通过待训练的图像分类模型基于第二图像特征进行第二分类,基于模型兼容损失和第二分类的分类损失进行模型更新训练,可以通过历史特征提取模型提取的特征所确定的继承参数,对历史特征提取模型提取的特征进行选择性继承,能够有效学习到历史特征提取模型的知识,使得训练得到的特征提取模型能够在确保针对历史特征提取模型的模型兼容性的同时,提高图像特征提取的有效性。
在一个实施例中,特征提取方法还包括:确定待查询图像特征库;将待处理图像特征在待查询图像特征库中进行特征匹配,得到与待处理图像特征相匹配的待查询图像特征;根据待查询图像特征关联的图像,确定针对待处理图像的图像查询结果。
其中,待查询图像特征库中包括各待查询图像各自的待查询图像特征,待查询图像特征,是由特征提取模型针对各待查询图像进行特征提取得到的。服务器在获得训练完成的特征提取模型后,可以通过特征提取模型分别对各待查询图像进行特征提取,并将提取得到的待查询图像特征汇聚构建待查询图像特征库,通过待查询图像特征进行特征匹配,可以实现图像查询处理。
具体地,服务器确定待查询图像特征库,待查询图像特征库与特征提取模型关联,适用于通过特征提取模型提取的图像特征进行图像查询处理。服务器将待处理图像特征在待查询图像特征库中进行特征匹配,具体可以将待处理图像特征与待查询图像特征库中的各待查询图像特征分别进行特征匹配,如可以确定待处理图像特征与待查询图像特征之间的特征相似度。服务器可以基于特征匹配结果确定与待处理图像特征相匹配的待查询图像特征,如可以将相似度大于相似度阈值的待查询图像特征,确定为属于与待处理图像特征相匹配的待查询图像特征。服务器确定待查询图像特征关联的图像,并基于待查询图像特征关联的图像确定针对待处理图像的图像查询结果。例如,服务器可以将与待处理图像特征相匹配的待查询图像特征所关联的图像,作为与待处理图像相匹配的图像进行返回,从而得到针对待处理图像的图像查询结果。
本实施例中,由预先训练的特征提取模型提取得到待处理图像的待处理图像特征,通过
将待处理图像特征在待查询图像特征库中进行特征匹配,基于相匹配的待查询图像特征关联的图像,确定针对待处理图像的图像查询结果,可以提高图像查询的准确性。
本申请还提供一种应用场景,该应用场景应用上述的特征提取模型处理方法和特征提取方法。具体地,该特征提取模型处理方法和特征提取方法在该应用场景的应用如下:
服务器可以构建样本图像,各个样本图像可以划分成属于不同的类别。服务器通过与历史特征提取模型联合训练得到的历史图像分类模型,基于待训练的特征提取模型从样本图像中提取的第二图像特征进行第一分类,并通过继承参数对第一分类的分类损失进行调整,得到模型兼容损失,继承参数基于历史特征提取模型从样本图像中提取第一图像特征所反映的特征鉴别力得到,通过待训练的图像分类模型基于第二图像特征进行第二分类,基于模型兼容损失和第二分类的分类损失进行模型更新训练,直至训练结束,得到训练完成的特征提取模型。进一步地,服务器可以接收终端发送的待分类图像,服务器可以通过训练完成的特征提取模型对待分类图像进行特征提取,并通过分类器对提取得到的待分类图像的图像特征进行图像分类,以确定待分类图像所属的图像类别,如为风景图像、人物图像等。
本申请还提供一种应用场景,该应用场景应用上述的特征提取模型处理方法和特征提取方法。具体地,该特征提取模型处理方法和特征提取方法在该应用场景的应用如下:
在图像检索系统中,一般包含一个特征提取器或模型以及存储海量底库图片特征的数据库,当用户输入查询图片进行搜索时,图像检索系统将利用特征提取器提取查询图片的特征,并在已有数据库中进行相似度比较,进而返回给用户与查询图片相同或相似的图片,实现对输入图片的查询处理。对于图像检索系统而言,传统的模型升级范式需要在部署新模型之前使用新模型将所有底库特征重新更新一遍,称之为特征回填。而考虑到工业界数以亿计的图片,特征回填过程极其耗时且代价高昂。进一步地,可以基于后向兼容的模型升级范式来避免特征回填,具体而言,在新模型训练过程中引入与旧模型特征兼容的额外约束条件,但是仍面临一个进退两难的困境,即新模型需要在自身模型鉴别能力和新-旧模型兼容性之间进行权衡,而原因在于无差别化的兼容约束训练。本实施例提出的达尔文模型升级新范式(Darwinian Model Upgrades,DMU),该范式将模型升级过程中的继承与进化阶段解耦,通过选择性后向兼容训练实现对旧特征的继承,通过一个轻量化的前向进化分支实现对旧特征的进化。在大规模图像检索数据集,包括地标检索数据集以及人脸识别数据集上进行详细充实的实验验证,表明本实施例提出的特征提取模型处理方法和特征提取方法能够有效缓解新模型自身鉴别力的损失,同时又能够提升新-旧模型兼容性。
在后向兼容训练(BCT,Backward-Compatible representation learning)中,在训练新模型时引入一个影响损失函数(Influence Loss)来指导新特征去靠近旧特征的类中心,其中旧分类器的参数作为旧类中心的参照。后向兼容训练可以满足初步的兼容性能要求,但新模型需要牺牲自身鉴别力来保证与旧模型的兼容性。本实施例为解决现有兼容方法存在的新模型鉴别力与新-旧模型兼容性之间此消彼长的困境,提出了达尔文模型升级新范式,该范式将模型升级过程中的继承与进化阶段解耦,通过选择性后向兼容训练实现对旧特征的继承,通过一个轻量化的前向进化分支实现对旧特征的进化。
进一步地,如图5所示,左侧的图(a)表示基于后向兼容的模型升级范式在无差别化地继承旧特征,面临新模型鉴别能力与新-旧兼容性不可兼得的困境,即为了有效兼容旧模型,加入新特征后形成的新的类中心与新特征的相关性较低,影响了新模型鉴别能力,无法提取有效的图像特征。右侧的图(b)表示本实施例中的达尔文式模型升级,该范式通过选择性后向兼容继承好的旧特征,并通过前向进化分支更新差的旧特征,能够有效避免之前存在的困境。具体来说,通过对旧特征进行特征进化,并通过兼容权重进行调节,使得加入新特征后形成的新的类中心与新特征的相关性较高,如图(b)中新特征与新的类中心之间的距离较近,从而能够有效缓解新模型自身鉴别力的损失,同时又能够提升新-旧模型兼容性。在具体应用时,如图6所示,在地标检索数据集Google Landmark上的实验结果,本实施例相较传统升级范式一(BCT(CVPR’20))和传统升级范式二(UniBCT(IJCAI’22)),具有更高的增益,且
具备更低的损失,即能够有效缓解新模型鉴别力损失的问题,同时又能进一步提升新-旧模型兼容性。
具体地,本实施例提供的特征提取模型处理方法和特征提取方法,提出了通用后向兼容表征学习的新问题,并提出统一的后向兼容训练范式,且在各种真实的兼容训练场景下达到了最优的性能。本实施例提供的达尔文模型升级新范式,该范式能够有效缓解后向兼容造成的新模型自身鉴别力的下降问题,同时又能进一步提升新-旧模型之间的兼容性能,使得检索模型的升级变得更加高效,降低业界升级成本。
在图像检索场景中,给定一张查询图片(Query,记为Q),图片检索指的是能够从大规模候选图片库(Gallery,记为G)中正确检索具有相同内容或者物体的图片。用D表示训练数据集,表示模型。任意一张在新训练数据集中的图片x∈D被新模型,即被新训练的特征提取模型提取的特征可以表示为本实施例中选择ArcFace损失函数形式的分类任务作为前置任务。若图片x对应的标签为y,该损失函数可以表示为如下式(1)所示,
其中,是模型提取的特征;ω(y)是类别对应的分类器中的权重数值,与ω(y)相乘结果表示x属于y这个类别的概率数值,即表示分类结果;m为超参数,表示角度之间的间距;s是缩放因子;ω表示分类器。其中,核函数定义为<·,·>表示向量内积。
进一步地,对于基于后向兼容的模型升级处理,将检索系统的性能记为M(·,·),将新旧图片特征提取器和旧图片特征提取器分别记为基于后向兼容的模型升级通过改善查询图片的特征来提升检索性能,具体目标如下式(2)所示,
为了简化表示,可以按顺序省略Q和G,将简化为
定义性能增益Δ↑如下式(3)所示,
定义鉴别力损失Δ↓如下式(4)所示,
其中,表示不加兼容约束的纯模型。
具体地,本实施例提出的达尔文式模型升级范式包含一个后向兼容的新模型以及一个轻量的前向进化分支(ψ),如图7所示。针对同一样本集,通过新、旧特征提取模型分别进行特征提取,对于旧特征提取模型提取的旧特征,一方面通过前向进化分支进行特征映射,以使旧特征进化,再通过新分类器进行分类处理,得到前向进化损失;另一方面,通过对旧特征进行鉴别力度量,确定各个样本图像的继承权重,并基于该继承权重对新特征提取模型提取的新特征,通过旧分类器进行分类处理,得到选择性后向兼容损失。其中,对于鉴别力度量的处理,如图8所示,旧特征提取模型提取的特征通过旧分类器进行分类处理后,得到对应到各类别的概率分布,基于该概率分布计算交叉熵,并进行归一化处理,构建得到样本图像对应的继承权重,如可以为0.3。对于新特征提取模型提取的新特征,通过新分裂期进行分类,得到分类损失。将前向进化损失、选择性后向兼容损失和分类损失的和,作为训练的整体目标。
为了解决性能增益与鉴别力损失之间的两难,可以通过选择性后向兼容训练来继承好的旧知识,同时通过前向进化分支将旧特征朝着更好的特征隐空间进化。达尔文式模型升级整体的训练目标可以表示为如下式(5)所示,
其中Lnew表示选择性后向兼容损失,LSBC表示前向进化损失,LFA表示分类损失函数。
对于分类损失,在每个批次batch(记为B)内,新模型自身的鉴别力损失函数表示为如下式(6)所示,
对于选择性后向兼容处理,造成新模型鉴别力损失的主要因素是无差别化兼容约束,其中模型需要同时继承好的以及差的旧知识。可以通过对后向兼容目标进行权重重分配来缓解上述问题,具体而言通过熵来度量特征的鉴别力,定义如下式(7)所示,
其中|C|表示类别的数量,ω表示分类器,pi(x)为各个类别的概率分布,鉴别力参数Λ与特征鉴别力成反比。为了缓解差的旧知识带来的负面影响,可以通过降低这些差样本的继承权重,同时提升好样本的继承权重。对于选择性后向兼容损失,其定义可以如下式(8)所示,
其中,λ(x)为样本图像的继承权重。
对于前向进化损失,通过设计一个轻量化的前向进化分支(ψ)使得旧特征朝着更好的特征隐空间进行进化,定义如下式(9)所示,
进一步地,如图9所示,在基于后向兼容的序列化模型升级中,在特征提取模型从旧模型更新成为第一代新模型和第二代新模型的过程中,针对查询图像进行特征提取的特征会产生变化,从Qold变化为和但对于底库特征却依然是旧模型的底库特征Gold,而未跟随进行变化。而本实施例提供的达尔文模型升级范式中,如图10所示,在特征提取模型从旧模型更新成为第一代新模型和第二代新模型的过程中,针对查询图像进行特征提取的特征会产生变化,从Qold变化为和而且底库特征也会对应变化,具体通过的作用从旧底库特征Gold变化为第一代底库
特征在的作用下从第一代底库特征变化为第二代底库特征针对查询图像进行特征提取的特征可以兼容就版本的底库特征。即本实施例提供的达尔文模型升级范式可以通过选择性后向兼容训练获得的新模型来改善查询特征的质量,同时通过前向升级分支改善底库特征质量。
在具体应用时,利用本实施例提出的达尔文模型升级范式,可以很好地缓解由于兼容训练带来的新模型鉴别力损失,同时又能进一步提升新-旧模型兼容性,从而将其推往更加广泛的应用领域。本实施例提供的达尔文模型升级范式在多个大规模图像检索数据集Google Landmark、Revisited Oxford、Revisited Paris、MS1Mv3、以及IJB-C上进行验证。
在验证时,关于评价指标的设定,对于地标检索任务(包含Google Landmark、Revisited Oxford及Revisited Paris三个数据集),可以使用平均精度均值(mean Average Precision,mAP)来进行度量。对于人脸识别任务(包含人脸识别数据集MS1Mv3及IJB-C),可以针对不同的模板对(template pairs)计算在不同错误接受率(False Acceptance Rates,FAR)下的正确接受率(True Acceptance Rates,TAR),简写为TAR@FAR。
验证的实验结果如下表1以及表2所示,本实施例在不同兼容场景下均超过了现有方法,不仅缓解了新模型鉴别力损失的程度,同时提升了新-旧模型检索之间的兼容性能,实验结果印证了本实施例的有效性。
表1
具体地,本实施例提出的达尔文模型升级范式(DMU)与基准模型(BCT)在不同兼容场景下的性能比较,oracle为不加兼容约束的纯模型,测试集为地标检索数据集(Google Landmark,ROxford,RParis)。表1模拟了四种不同的兼容场景,(1)30%data->100%data表示旧模型使用30%数据训练,新模型使用100%数据对旧模型进行兼容训练;(2)30%data->70%data表示新模型使用70%数据(与旧训练数据集不重叠,但是共享类别)对旧模型进行兼容训练;(3)30%class->100%class表示旧模型使用30%类别进行训练,新模型使用全部类别对旧模型进行兼容训练;(4)resnet50->resnet101表示旧模型采用ResNet50作为主干网络,30%数据进行训练,而新模型采用ResNet101作为主干网络,100%数据对旧模型进行兼容训练。
表2
具体地,在人脸识别数据集的测试集中,本实施例提出的达尔文模型升级范式可以缓解新模型鉴别力损失的程度,同时提升了新-旧模型检索之间的兼容性能。
应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。
基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的特征提取模型处理方法的特征提取模型处理装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个特征提取模型处理装置实施例中的具体限定可以参见上文中对于特征提取模型处理方法的限定,在此不再赘述。
在一个实施例中,如图11所示,提供了一种特征提取模型处理装置1100,包括:样本图像获取模块1102、第二图像特征提取模块1104、模型兼容损失获得模块1106、第二分类损失获得模块1108和模型更新模块1110,其中:
样本图像获取模块1102,用于获取样本图像和样本图像的继承参数,继承参数,是基于样本图像的第一图像特征所反映的特征鉴别力确定的,第一图像特征,是由已训练完成的历史特征提取模型从样本图像中提取得到的;
第二图像特征提取模块1104,用于通过待训练的特征提取模型从样本图像中提取得到第二图像特征;
模型兼容损失获得模块1106,用于通过与历史特征提取模型联合训练得到的历史图像分类模型,基于第二图像特征进行第一分类,得到第一分类的分类结果,根据第一分类的分类结果确定第一分类的分类损失,并通过继承参数对第一分类的分类损失进行调整,得到模型兼容损失;
第二分类损失获得模块1108,用于通过待训练的图像分类模型基于第二图像特征进行第二分类,得到第二分类的分类结果,并根据第二分类的分类结果获得第二分类的分类损失;及
模型更新模块1110,用于基于模型兼容损失和第二分类的分类损失,对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练,获得训练完成的特征提取模型。
在一个实施例中,还包括第一图像特征提取模块、类别分布获取模块和继承参数确定模块;其中:第一图像特征提取模块,用于通过历史特征提取模型从样本图像中提取得到第一图像特征;类别分布获取模块,用于通过历史图像分类模型对第一图像特征进行图像分类,获得图像类别分类结果;及继承参数确定模块,用于根据图像类别分类结果确定样本图像的继承参数。
在一个实施例中,继承参数确定模块包括交叉熵确定模块、归一化处理模块和鉴别力参数处理模块;其中:交叉熵确定模块,用于基于图像类别分类结果确定类别交叉熵参数;归一化处理模块,用于针对类别交叉熵参数进行归一化处理,得到鉴别力参数,鉴别力参数用于度量第一图像特征的特征鉴别力;及鉴别力参数处理模块,用于根据鉴别力参数确定样本图像的继承参数。
在一个实施例中,继承参数包括继承权重,继承权重的数值与特征鉴别力的度量数值呈正相关关系,模型兼容损失获得模块1106,还用于按照继承权重对第一分类的分类损失进行加权处理,得到模型兼容损失。
在一个实施例中,模型兼容损失获得模块1106,还用于确定与历史特征提取模型联合训
练得到的历史图像分类模型以及样本图像的类别标签;基于类别标签,确定历史图像分类模型针对样本图像所属类别的历史分类模型参数;及根据第二图像特征和历史分类模型参数,得到第一分类的分类结果。
在一个实施例中,模型兼容损失获得模块1106,还用于基于第二图像特征与第一分类的分类结果中的历史分类模型参数之间的角度间隔,得到第一分类的分类损失。
在一个实施例中,模型兼容损失获得模块1106,还用于基于第一分类的分类结果与样本图像的类别标签之间的差异,确定第一分类的分类损失。
在一个实施例中,第二分类损失获得模块1108,还用于通过待训练的图像分类模型基于第二图像特征进行第二分类,得到第二分类的分类结果;及基于第二分类的分类结果和样本图像携带的类别标签之间的差异,确定第二分类的分类损失。
在一个实施例中,模型更新模块1110,还用于根据模型兼容损失和第二分类的分类损失之间的和得到训练中的损失;及基于训练中的损失,对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练,直至满足训练结束条件时结束训练,获得训练完成的特征提取模型。
在一个实施例中,还包括特征映射模块和第三分类模块;其中:特征映射模块,用于通过待训练的特征进化模型对第一图像特征进行特征映射,得到第一图像特征的映射特征;及第三分类模块,用于通过待训练的图像分类模型基于映射特征进行第三分类,得到第三分类的分类结果,并根据第三分类的分类结果得到第三分类的分类损失;模型更新模块1110,还用于基于模型兼容损失、第二分类的分类损失以及第三分类的分类损失,对待训练的特征提取模型、待训练的图像分类模型以及待训练的特征进化模型各自的模型参数分别进行更新后继续进行联合训练,获得训练完成的特征提取模型。
在一个实施例中,模型更新模块1110,还用于根据模型兼容损失、第二分类的分类损失以及第三分类的分类损失,获得联合训练的目标损失;基于目标损失对待训练的特征提取模型、待训练的图像分类模型以及待训练的特征进化模型各自的模型参数分别进行更新后继续进行联合训练。
在一个实施例中,模型更新模块1110,还用于根据模型兼容损失、第二分类的分类损失以及第三分类的分类损失的和,得到联合训练的目标损失。
在一个实施例中,还包括特征库确定模块、特征库特征映射模块和特征库更新模块;其中:特征库确定模块,用于确定与历史特征提取模型关联的待查询图像特征库,待查询图像特征库包括各待查询图像各自的待查询图像特征,待查询图像特征,是由历史特征提取模型针对各待查询图像进行提取得到的;特征库特征映射模块,用于通过训练完成的特征进化模型,对各待查询图像特征分别进行特征映射,得到各待查询图像各自的待查询图像映射特征;及特征库更新模块,用于基于各待查询图像映射特征更新待查询图像特征库,得到与训练完成的特征提取模型关联的待查询图像特征库。
基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的特征提取方法的特征提取装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个特征提取装置实施例中的具体限定可以参见上文中对于特征提取方法的限定,在此不再赘述。
在一个实施例中,如图12所示,提供了一种特征提取装置1200,包括:图像获取模块1202和特征提取处理模块1204,其中:
图像获取模块1202,用于获取待处理图像;
特征提取处理模块1204,用于通过特征提取模型,对待处理图像进行特征提取,得到待处理图像的待处理图像特征;
其中,特征提取模型,是基于模型兼容损失和第二分类的分类损失对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练得到的,模型兼容损失,是通过与已训练完成的历史特征提取模型联合训练得到的历史图像分类模型,基于
第二图像特征进行第一分类,并通过继承参数对第一分类的分类损失进行调整得到的,第二图像特征,是通过待训练的特征提取模型从样本图像中提取得到的,继承参数,是基于样本图像的第一图像特征所反映的特征鉴别力确定的,第一图像特征,是由历史特征提取模型从样本图像中提取得到的,第二分类的分类损失,是通过待训练的图像分类模型基于第二图像特征进行第二分类得到的。
在一个实施例中,还包括特征库确定模块、特征匹配模块和查询结果确定模块;其中:特征库确定模块,用于确定待查询图像特征库;特征匹配模块,用于将待处理图像特征在待查询图像特征库中进行特征匹配,得到与待处理图像特征相匹配的待查询图像特征;及查询结果确定模块,用于根据待查询图像特征关联的图像,确定针对待处理图像的图像查询结果。
上述特征提取模型处理装置和特征提取装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器或终端,其内部结构图可以如图13所示。该计算机设备包括处理器、存储器、输入/输出接口(Input/Output,简称I/O)和通信接口。其中,处理器、存储器和输入/输出接口通过系统总线连接,通信接口通过输入/输出接口连接到系统总线。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储各种模型数据。该计算机设备的输入/输出接口用于处理器与外部设备之间交换信息。该计算机设备的通信接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种特征提取模型处理方法或一种特征提取方法中的至少一种方法。
本领域技术人员可以理解,图13中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,还提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机可读指令,该处理器执行计算机可读指令时实现上述各方法实施例中的步骤。
在一个实施例中,提供了一种计算机可读存储介质,存储有计算机可读指令,该计算机可读指令被处理器执行时实现上述各方法实施例中的步骤。
在一个实施例中,提供了一种计算机程序产品,包括计算机可读指令,该计算机可读指令被处理器执行时实现上述各方法实施例中的步骤。
需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随
机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。
Claims (20)
- 一种特征提取模型处理方法,由计算机设备执行,包括:获取样本图像和所述样本图像的继承参数,所述继承参数,是基于所述样本图像的第一图像特征所反映的特征鉴别力确定的,所述第一图像特征,是由已训练完成的历史特征提取模型从所述样本图像中提取得到的;通过待训练的特征提取模型从所述样本图像中提取得到第二图像特征;通过与所述历史特征提取模型联合训练得到的历史图像分类模型,基于所述第二图像特征进行第一分类,得到所述第一分类的分类结果,根据所述第一分类的分类结果确定所述第一分类的分类损失,并通过所述继承参数对所述第一分类的分类损失进行调整,得到模型兼容损失;通过待训练的图像分类模型基于所述第二图像特征进行第二分类,得到所述第二分类的分类结果,并根据所述第二分类的分类结果获得所述第二分类的分类损失;及基于所述模型兼容损失和所述第二分类的分类损失,对所述待训练的特征提取模型和所述待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练,获得训练完成的特征提取模型。
- 根据权利要求1所述的方法,所述方法还包括:通过所述历史特征提取模型从所述样本图像中提取得到第一图像特征;通过所述历史图像分类模型对所述第一图像特征进行图像分类,获得图像类别分类结果;及根据所述图像类别分类结果确定所述样本图像的继承参数。
- 根据权利要求2所述的方法,所述根据所述图像类别分类结果确定所述样本图像的继承参数,包括:基于所述图像类别分类结果确定类别交叉熵参数;针对所述类别交叉熵参数进行归一化处理,得到鉴别力参数,所述鉴别力参数用于度量所述第一图像特征的特征鉴别力;及根据所述鉴别力参数确定所述样本图像的继承参数。
- 根据权利要求1至3任意一项所述的方法,所述继承参数包括继承权重,所述继承权重的数值与所述特征鉴别力的度量数值呈正相关关系,所述通过所述继承参数对所述第一分类的分类损失进行调整,得到模型兼容损失,包括:按照所述继承权重对所述第一分类的分类损失进行加权处理,得到模型兼容损失。
- 根据权利要求1至4任意一项所述的方法,所述通过与所述历史特征提取模型联合训练得到的历史图像分类模型,基于所述第二图像特征进行第一分类,得到所述第一分类的分类结果,包括:确定与所述历史特征提取模型联合训练得到的历史图像分类模型以及所述样本图像的类别标签;基于所述类别标签,确定所述历史图像分类模型针对所述样本图像所属类别的历史分类模型参数;及根据所述第二图像特征和所述历史分类模型参数,得到所述第一分类的分类结果。
- 根据权利要求5所述的方法,所述根据所述第一分类的分类结果确定所述第一分类的分类损失,包括:基于所述第二图像特征与所述第一分类的分类结果中的所述历史分类模型参数之间的角度间隔,得到所述第一分类的分类损失。
- 根据权利要求1至6任意一项所述的方法,所述根据所述第一分类的分类结果确定所述第一分类的分类损失,包括:基于所述第一分类的分类结果与所述样本图像的类别标签之间的差异,确定所述第一分类的分类损失。
- 根据权利要求1至7任意一项所述的方法,所述通过待训练的图像分类模型基于所述第二图像特征进行第二分类,得到所述第二分类的分类结果,并根据所述第二分类的分类结果获得所述第二分类的分类损失,包括:通过待训练的图像分类模型基于所述第二图像特征进行第二分类,得到所述第二分类的分类结果;及基于所述第二分类的分类结果和所述样本图像携带的类别标签之间的差异,确定所述第二分类的分类损失。
- 根据权利要求1至8任意一项所述的方法,所述基于所述模型兼容损失和所述第二分类的分类损失,对所述待训练的特征提取模型和所述待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练,获得训练完成的特征提取模型,包括:根据所述模型兼容损失和所述第二分类的分类损失之间的和得到训练中的损失;及基于所述训练中的损失,对所述待训练的特征提取模型和所述待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练,直至满足训练结束条件时结束训练,获得训练完成的特征提取模型。
- 根据权利要求1至8任意一项所述的方法,所述方法还包括:通过待训练的特征进化模型对所述第一图像特征进行特征映射,得到所述第一图像特征的映射特征;及通过所述待训练的图像分类模型基于所述映射特征进行第三分类,得到所述第三分类的分类结果,并根据所述第三分类的分类结果得到所述第三分类的分类损失;所述基于所述模型兼容损失和所述第二分类的分类损失,对所述待训练的特征提取模型和所述待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练,获得训练完成的特征提取模型,包括:基于所述模型兼容损失、所述第二分类的分类损失以及所述第三分类的分类损失,对所述待训练的特征提取模型、所述待训练的图像分类模型以及所述待训练的特征进化模型各自的模型参数分别进行更新后继续进行联合训练,获得训练完成的特征提取模型。
- 根据权利要求10所述的方法,所述基于所述模型兼容损失、所述第二分类的分类损失以及所述第三分类的分类损失,对所述待训练的特征提取模型、所述待训练的图像分类模型以及所述待训练的特征进化模型各自的模型参数分别进行更新后继续进行联合训练,包括:根据所述模型兼容损失、所述第二分类的分类损失以及所述第三分类的分类损失,获得联合训练的目标损失;及基于所述目标损失对所述待训练的特征提取模型、所述待训练的图像分类模型以及所述待训练的特征进化模型各自的模型参数分别进行更新后继续进行联合训练。
- 根据权利要求11所述的方法,所述根据所述模型兼容损失、所述第二分类的分类损失以及所述第三分类的分类损失,获得联合训练的目标损失,包括:根据所述模型兼容损失、所述第二分类的分类损失以及所述第三分类的分类损失的和,得到联合训练的目标损失。
- 根据权利要求10所述的方法,所述方法还包括:确定与所述历史特征提取模型关联的待查询图像特征库,所述待查询图像特征库包括各待查询图像各自的待查询图像特征,所述待查询图像特征,是由所述历史特征提取模型针对所述各待查询图像进行提取得到的;通过训练完成的特征进化模型,对各所述待查询图像特征分别进行特征映射,得到所述各待查询图像各自的待查询图像映射特征;及基于各所述待查询图像映射特征更新所述待查询图像特征库,得到与所述训练完成的特征提取模型关联的待查询图像特征库。
- 一种特征提取方法,由计算机设备执行,所述方法包括:获取待处理图像;及通过特征提取模型,对所述待处理图像进行特征提取,得到所述待处理图像的待处理图像特征;其中,所述特征提取模型,是基于模型兼容损失和第二分类的分类损失对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练得到的,所述模型兼容损失,是通过与已训练完成的历史特征提取模型联合训练得到的历史图像分类模型,基于第二图像特征进行第一分类,并通过继承参数对所述第一分类的分类损失进行调整得到的,所述第二图像特征,是通过所述待训练的特征提取模型从样本图像中提取得到的,所述继承参数,是基于所述样本图像的第一图像特征所反映的特征鉴别力确定的,所述第一图像特征,是由所述历史特征提取模型从所述样本图像中提取得到的,所述第二分类的分类损失,是通过所述待训练的图像分类模型基于所述第二图像特征进行第二分类得到的。
- 根据权利要求14所述的方法,所述方法还包括:确定待查询图像特征库;将所述待处理图像特征在所述待查询图像特征库中进行特征匹配,得到与所述待处理图像特征相匹配的待查询图像特征;及根据所述待查询图像特征关联的图像,确定针对所述待处理图像的图像查询结果。
- 一种特征提取模型处理装置,所述装置包括:样本图像获取模块,用于获取样本图像和所述样本图像的继承参数,所述继承参数,是基于所述样本图像的第一图像特征所反映的特征鉴别力确定的,所述第一图像特征,是由已训练完成的历史特征提取模型从所述样本图像中提取得到的;第二图像特征提取模块,用于通过待训练的特征提取模型从所述样本图像中提取得到第二图像特征;模型兼容损失获得模块,用于通过与所述历史特征提取模型联合训练得到的历史图像分类模型,基于所述第二图像特征进行第一分类,得到所述第一分类的分类结果,根据所述第一分类的分类结果确定所述第一分类的分类损失,并通过所述继承参数对所述第一分类的分类损失进行调整,得到模型兼容损失;第二分类损失获得模块,用于通过待训练的图像分类模型基于所述第二图像特征进行第二分类,得到所述第二分类的分类结果,并根据所述第二分类的分类结果获得所述第二分类的分类损失;及模型更新模块,用于基于所述模型兼容损失和所述第二分类的分类损失,对所述待训练的特征提取模型和所述待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练,获得训练完成的特征提取模型。
- 一种特征提取装置,所述装置包括:图像获取模块,用于获取待处理图像;及特征提取处理模块,用于通过特征提取模型,对所述待处理图像进行特征提取,得到所述待处理图像的待处理图像特征;其中,所述特征提取模型,是基于模型兼容损失和第二分类的分类损失对待训练的特征提取模型和待训练的图像分类模型各自的模型参数进行更新后继续进行联合训练得到的,所述模型兼容损失,是通过与已训练完成的历史特征提取模型联合训练得到的历史图像分类模型,基于第二图像特征进行第一分类,并通过继承参数对所述第一分类的分类损失进行调整得到的,所述第二图像特征,是通过所述待训练的特征提取模型从样本图像中提取得到的,所述继承参数,是基于所述样本图像的第一图像特征所反映的特征鉴别力确定的,所述第一图像特征,是由所述历史特征提取模型从所述样本图像中提取得到的,所述第二分类的分类损失,是通过所述待训练的图像分类模型基于所述第二图像特征进行第二分类得到的。
- 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现权利要求1至15中任一项所述的方法的步骤。
- 一种计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处 理器执行时实现权利要求1至15中任一项所述的方法的步骤。
- 一种计算机程序产品,包括计算机可读指令,该计算机可读指令被处理器执行时实现权利要求1至15中任一项所述的方法的步骤。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US18/592,346 US20240203106A1 (en) | 2022-10-11 | 2024-02-29 | Feature extraction model processing |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211242030.4A CN117011536A (zh) | 2022-10-11 | 2022-10-11 | 特征提取模型处理及特征提取方法、装置和计算机设备 |
CN202211242030.4 | 2022-10-11 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US18/592,346 Continuation US20240203106A1 (en) | 2022-10-11 | 2024-02-29 | Feature extraction model processing |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024078299A1 true WO2024078299A1 (zh) | 2024-04-18 |
Family
ID=88560659
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/120674 WO2024078299A1 (zh) | 2022-10-11 | 2023-09-22 | 发明名称:特征提取模型处理及特征提取方法、装置和计算机设备 |
Country Status (3)
Country | Link |
---|---|
US (1) | US20240203106A1 (zh) |
CN (1) | CN117011536A (zh) |
WO (1) | WO2024078299A1 (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11216697B1 (en) * | 2020-03-11 | 2022-01-04 | Amazon Technologies, Inc. | Backward compatible and backfill-free image search system |
CN114187486A (zh) * | 2021-12-09 | 2022-03-15 | 北京达佳互联信息技术有限公司 | 模型训练方法及相关设备 |
CN114330703A (zh) * | 2021-11-15 | 2022-04-12 | 腾讯科技(深圳)有限公司 | 搜索模型的更新方法、装置、设备及计算机可读存储介质 |
CN114565807A (zh) * | 2022-03-03 | 2022-05-31 | 腾讯科技(深圳)有限公司 | 训练目标图像检索模型的方法和装置 |
CN115146092A (zh) * | 2022-04-15 | 2022-10-04 | 腾讯科技(深圳)有限公司 | 特征模型的获取方法、图像处理方法、装置及计算机设备 |
-
2022
- 2022-10-11 CN CN202211242030.4A patent/CN117011536A/zh active Pending
-
2023
- 2023-09-22 WO PCT/CN2023/120674 patent/WO2024078299A1/zh unknown
-
2024
- 2024-02-29 US US18/592,346 patent/US20240203106A1/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11216697B1 (en) * | 2020-03-11 | 2022-01-04 | Amazon Technologies, Inc. | Backward compatible and backfill-free image search system |
CN114330703A (zh) * | 2021-11-15 | 2022-04-12 | 腾讯科技(深圳)有限公司 | 搜索模型的更新方法、装置、设备及计算机可读存储介质 |
CN114187486A (zh) * | 2021-12-09 | 2022-03-15 | 北京达佳互联信息技术有限公司 | 模型训练方法及相关设备 |
CN114565807A (zh) * | 2022-03-03 | 2022-05-31 | 腾讯科技(深圳)有限公司 | 训练目标图像检索模型的方法和装置 |
CN115146092A (zh) * | 2022-04-15 | 2022-10-04 | 腾讯科技(深圳)有限公司 | 特征模型的获取方法、图像处理方法、装置及计算机设备 |
Non-Patent Citations (1)
Title |
---|
BINJIE ZHANG: "Darwinian Model Upgrades: Model Evolving with Selective Compatibility", PROCEEDINGS OF THE AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE, vol. 37, no. 3, 13 October 2010 (2010-10-13), pages 3393 - 3400, XP093159487, ISSN: 2159-5399, DOI: 10.1609/aaai.v37i3.25447 * |
Also Published As
Publication number | Publication date |
---|---|
US20240203106A1 (en) | 2024-06-20 |
CN117011536A (zh) | 2023-11-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111724083B (zh) | 金融风险识别模型的训练方法、装置、计算机设备及介质 | |
WO2022077646A1 (zh) | 一种用于图像处理的学生模型的训练方法及装置 | |
CN112819023B (zh) | 样本集的获取方法、装置、计算机设备和存储介质 | |
WO2021089013A1 (zh) | 空间图卷积网络的训练方法、电子设备及存储介质 | |
WO2020238229A1 (zh) | 交易特征生成模型的训练、交易特征的生成方法和装置 | |
WO2023093205A1 (zh) | 一种实体标签关联预测方法、装置及计算机可读存储介质 | |
CN110442516B (zh) | 信息处理方法、设备及计算机可读存储介质 | |
WO2020232874A1 (zh) | 基于迁移学习的建模方法、装置、计算机设备和存储介质 | |
CN114169442B (zh) | 基于双原型网络的遥感图像小样本场景分类方法 | |
CN113821670B (zh) | 图像检索方法、装置、设备及计算机可读存储介质 | |
CN114841257A (zh) | 一种基于自监督对比约束下的小样本目标检测方法 | |
WO2023020214A1 (zh) | 检索模型的训练和检索方法、装置、设备及介质 | |
CN114565807A (zh) | 训练目标图像检索模型的方法和装置 | |
WO2021258482A1 (zh) | 基于迁移与弱监督的美丽预测方法、装置及存储介质 | |
CN117435685A (zh) | 文档检索方法、装置、计算机设备、存储介质和产品 | |
CN112818068A (zh) | 基于大数据和多维特征的数据溯源方法及系统 | |
WO2024078299A1 (zh) | 发明名称:特征提取模型处理及特征提取方法、装置和计算机设备 | |
CN108733702B (zh) | 用户查询上下位关系提取的方法、装置、电子设备和介质 | |
JP2022104911A (ja) | エンベッディング正規化方法およびこれを利用した電子装置 | |
CN117217929A (zh) | 注册对象风险识别方法、装置、计算机设备和存储介质 | |
CN113779248A (zh) | 数据分类模型训练方法、数据处理方法及存储介质 | |
CN111091198A (zh) | 一种数据处理方法及装置 | |
WO2024021526A1 (zh) | 训练样本的生成方法、装置、设备和存储介质 | |
US11829735B2 (en) | Artificial intelligence (AI) framework to identify object-relational mapping issues in real-time | |
CN113869516B (zh) | 知识图谱嵌入模型训练方法、装置、电子设备及介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23876504 Country of ref document: EP Kind code of ref document: A1 |