Feature extraction model processing, feature extraction methods, apparatus and computer equipment

By jointly training with historical feature extraction models and adjusting the classification loss, the contradiction between the compatibility of the new model and the feature extraction capability is resolved, thereby improving the effectiveness of image feature extraction while maintaining compatibility.

CN117011536BActive Publication Date: 2025-10-31TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211242030.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-11
Publication Date
2025-10-31
Estimated Expiration
2042-10-11

AI Technical Summary

Technical Problem

When upgrading an image feature extraction model, the new model sacrifices some of its feature extraction capabilities in order to achieve compatibility with the old model, resulting in the inability to extract effective image features.

Method used

By jointly training with the historical feature extraction model, the classification loss is adjusted using inherited parameters to obtain the model compatibility loss. Based on the model compatibility loss and the classification loss of the second classification, the feature extraction model and the image classification model to be trained are updated and trained, which ensures model compatibility while improving the effectiveness of image feature extraction.

Benefits of technology

The trained feature extraction model can improve the effectiveness of image feature extraction while ensuring model compatibility, learn from the knowledge of historical feature extraction models, and enhance the feature extraction capabilities of the new model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117011536B_ABST
    Figure CN117011536B_ABST
Patent Text Reader

Abstract

This application relates to a feature extraction model processing method, apparatus, computer device, storage medium, and computer program product. The method involves machine learning and includes: acquiring a sample image and inherited parameters determined based on the feature discrimination power reflected by first image features of the sample image; extracting second image features from the sample image using a feature extraction model; performing a first classification based on the second image features using a historical image classification model, adjusting the classification loss of the first classification using the inherited parameters to obtain a model compatibility loss; performing a second classification based on the second image features using an image classification model; updating the feature extraction model and the image classification model based on the model compatibility loss and the classification loss of the second classification, and continuing joint training until training is complete to obtain a trained feature extraction model. This method can improve the effectiveness of image feature extraction while ensuring model compatibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This 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. Background Technology

[0002] With the development of computer technology, retrieval techniques for finding specific resources on the internet are no longer limited to text retrieval but also support image retrieval. For example, a user can input a query image to search for similar images in a database. Image retrieval technology often involves extracting image features, such as using image feature extraction models, and then comparing the similarity of these extracted features to achieve image retrieval.

[0003] However, when image feature extraction models are upgraded or updated, the new model sacrifices some of its own feature extraction capabilities in order to achieve compatibility with the old model, which may result in the new model being unable to extract effective image features. Summary of the Invention

[0004] Therefore, it is necessary to provide a feature extraction model processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can ensure model compatibility while improving the effectiveness of image feature extraction, as well as a feature extraction method, apparatus, computer equipment, storage medium, and computer program product, to address the above-mentioned technical problems.

[0005] Firstly, this application provides a feature extraction model processing method. The method includes:

[0006] Obtain the sample image and its inherited parameters; the inherited parameters are determined based on the feature discrimination power reflected by the first image feature of the sample image; the first image feature is extracted from the sample image by the trained historical feature extraction model;

[0007] The second image features are extracted from the sample image using the feature extraction model to be trained.

[0008] The historical image classification model, which is jointly trained with the historical feature extraction model, performs the first classification based on the second image features, and adjusts the classification loss of the first classification by inheriting parameters to obtain the model compatibility loss.

[0009] The image classification model to be trained performs a second classification based on the features of the second image, and the classification loss of the second classification is obtained.

[0010] Based on model compatibility loss and second classification loss, the feature extraction model and the image classification model to be trained are updated and then jointly trained until training is completed, thus obtaining the trained feature extraction model.

[0011] Secondly, this application also provides a feature extraction model processing apparatus. The apparatus includes:

[0012] The sample image acquisition module is used to acquire sample images and their inherited parameters. The inherited parameters are determined based on the feature discrimination power reflected by the first image feature of the sample image. The first image feature is extracted from the sample image by a trained historical feature extraction model.

[0013] The second image feature extraction module is used to extract second image features from the sample image through the feature extraction model to be trained.

[0014] The model compatibility loss acquisition module is used to obtain the model compatibility loss by performing a first classification based on the second image features of the historical image classification model jointly trained with the historical feature extraction model, and by adjusting the classification loss of the first classification through inherited parameters.

[0015] The second classification loss acquisition module is used to perform a second classification based on the second image features using the image classification model to be trained, and obtain the classification loss for the second classification.

[0016] The model update module is used to update the feature extraction model and the image classification model to be trained based on model compatibility loss and second classification loss, and then continue joint training until training is completed, thus obtaining the trained feature extraction model.

[0017] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0018] Obtain the sample image and its inherited parameters; the inherited parameters are determined based on the feature discrimination power reflected by the first image feature of the sample image; the first image feature is extracted from the sample image by the trained historical feature extraction model;

[0019] The second image features are extracted from the sample image using the feature extraction model to be trained.

[0020] The historical image classification model, which is jointly trained with the historical feature extraction model, performs the first classification based on the second image features, and adjusts the classification loss of the first classification by inheriting parameters to obtain the model compatibility loss.

[0021] The image classification model to be trained performs a second classification based on the features of the second image, and the classification loss of the second classification is obtained.

[0022] Based on model compatibility loss and second classification loss, the feature extraction model and the image classification model to be trained are updated and then jointly trained until training is completed, thus obtaining the trained feature extraction model.

[0023] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0024] Obtain the sample image and its inherited parameters; the inherited parameters are determined based on the feature discrimination power reflected by the first image feature of the sample image; the first image feature is extracted from the sample image by the trained historical feature extraction model;

[0025] The second image features are extracted from the sample image using the feature extraction model to be trained.

[0026] The historical image classification model, which is jointly trained with the historical feature extraction model, performs the first classification based on the second image features, and adjusts the classification loss of the first classification by inheriting parameters to obtain the model compatibility loss.

[0027] The image classification model to be trained performs a second classification based on the features of the second image, and the classification loss of the second classification is obtained.

[0028] Based on model compatibility loss and second classification loss, the feature extraction model and the image classification model to be trained are updated and then jointly trained until training is completed, thus obtaining the trained feature extraction model.

[0029] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0030] Obtain the sample image and its inherited parameters; the inherited parameters are determined based on the feature discrimination power reflected by the first image feature of the sample image; the first image feature is extracted from the sample image by the trained historical feature extraction model;

[0031] The second image features are extracted from the sample image using the feature extraction model to be trained.

[0032] The historical image classification model, which is jointly trained with the historical feature extraction model, performs the first classification based on the second image features, and adjusts the classification loss of the first classification by inheriting parameters to obtain the model compatibility loss.

[0033] The image classification model to be trained performs a second classification based on the features of the second image, and the classification loss of the second classification is obtained.

[0034] Based on model compatibility loss and second classification loss, the feature extraction model and the image classification model to be trained are updated and then jointly trained until training is completed, thus obtaining the trained feature extraction model.

[0035] The aforementioned feature extraction model processing method, apparatus, computer equipment, storage medium, and computer program product, through joint training with a historical feature extraction model to obtain a historical image classification model, performs a first classification based on the second image features extracted from sample images by the feature extraction model to be trained, and adjusts the classification loss of the first classification through inheritance parameters to obtain a model compatibility loss. The inheritance parameters are obtained based on the feature discrimination power reflected by the first image features extracted from sample images by the historical feature extraction model. The image classification model to be trained performs a second classification based on the second image features, and updates the model training based on the model compatibility loss and the classification loss of the second classification. By selectively inheriting the features extracted by the historical feature extraction model through 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, 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.

[0036] Sixthly, this application provides a feature extraction method. The method includes:

[0037] Acquire the target image;

[0038] The target image features are obtained by extracting features from the target image using a feature extraction model.

[0039] The feature extraction model is obtained by updating the feature extraction model and the image classification model to be trained based on model compatibility loss and the classification loss of the second classification, and then continuing to train them until training is complete. The model compatibility loss is obtained by training a historical image classification model jointly with a historically trained feature extraction model, performing a first classification based on the second image features, and adjusting the classification loss of the first classification through inheritance parameters. The second image features are extracted from the sample images by the feature extraction model to be trained. The inheritance parameters are determined based on the feature discrimination power reflected by the first image features of the sample images. The first image features are extracted from the sample images by the historical feature extraction model. The classification loss of the second classification is obtained by performing a second classification based on the second image features by the image classification model to be trained.

[0040] Seventhly, this application also provides a feature extraction apparatus. The apparatus includes:

[0041] The target image acquisition module is used to acquire the target image;

[0042] The feature extraction processing module is used to extract features from the target image using a feature extraction model to obtain the target image features.

[0043] The feature extraction model is obtained by updating the feature extraction model and the image classification model to be trained based on model compatibility loss and the classification loss of the second classification, and then continuing to train them until training is complete. The model compatibility loss is obtained by training a historical image classification model jointly with a historically trained feature extraction model, performing a first classification based on the second image features, and adjusting the classification loss of the first classification through inheritance parameters. The second image features are extracted from the sample images by the feature extraction model to be trained. The inheritance parameters are determined based on the feature discrimination power reflected by the first image features of the sample images. The first image features are extracted from the sample images by the historical feature extraction model. The classification loss of the second classification is obtained by performing a second classification based on the second image features by the image classification model to be trained.

[0044] Eighthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0045] Acquire the target image;

[0046] The target image features are obtained by extracting features from the target image using a feature extraction model.

[0047] The feature extraction model is obtained by updating the feature extraction model and the image classification model to be trained based on model compatibility loss and the classification loss of the second classification, and then continuing to train them until training is complete. The model compatibility loss is obtained by training a historical image classification model jointly with a historically trained feature extraction model, performing a first classification based on the second image features, and adjusting the classification loss of the first classification through inheritance parameters. The second image features are extracted from the sample images by the feature extraction model to be trained. The inheritance parameters are determined based on the feature discrimination power reflected by the first image features of the sample images. The first image features are extracted from the sample images by the historical feature extraction model. The classification loss of the second classification is obtained by performing a second classification based on the second image features by the image classification model to be trained.

[0048] Ninthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0049] Acquire the target image;

[0050] The target image features are obtained by extracting features from the target image using a feature extraction model.

[0051] The feature extraction model is obtained by updating the feature extraction model and the image classification model to be trained based on model compatibility loss and the classification loss of the second classification, and then continuing to train them until training is complete. The model compatibility loss is obtained by training a historical image classification model jointly with a historically trained feature extraction model, performing a first classification based on the second image features, and adjusting the classification loss of the first classification through inheritance parameters. The second image features are extracted from the sample images by the feature extraction model to be trained. The inheritance parameters are determined based on the feature discrimination power reflected by the first image features of the sample images. The first image features are extracted from the sample images by the historical feature extraction model. The classification loss of the second classification is obtained by performing a second classification based on the second image features by the image classification model to be trained.

[0052] Tenthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0053] Acquire the target image;

[0054] The target image features are obtained by extracting features from the target image using a feature extraction model.

[0055] The feature extraction model is obtained by updating the feature extraction model and the image classification model to be trained based on model compatibility loss and the classification loss of the second classification, and then continuing to train them until training is complete. The model compatibility loss is obtained by training a historical image classification model jointly with a historically trained feature extraction model, performing a first classification based on the second image features, and adjusting the classification loss of the first classification through inheritance parameters. The second image features are extracted from the sample images by the feature extraction model to be trained. The inheritance parameters are determined based on the feature discrimination power reflected by the first image features of the sample images. The first image features are extracted from the sample images by the historical feature extraction model. The classification loss of the second classification is obtained by performing a second classification based on the second image features by the image classification model to be trained.

[0056] The aforementioned feature extraction methods, apparatuses, computer devices, storage media, and computer program products extract features from target images using a pre-trained feature extraction model. During the training of this model, a historical image classification model, jointly trained with a historical feature extraction model, performs a first classification based on the second image features extracted from sample images by the feature extraction model to be trained. The classification loss of the first classification is adjusted using inheritance parameters to obtain a model compatibility loss. These inheritance parameters are based on the feature discrimination power reflected by the first image features extracted from sample images by the historical feature extraction model. A second classification is then performed using the second image features by 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. By selectively inheriting features extracted by the historical feature extraction model using inheritance parameters determined by the historical feature extraction model, the model can effectively learn the knowledge of the historical feature extraction model. This allows the trained feature extraction model to improve the effectiveness of image feature extraction while ensuring model compatibility with the historical feature extraction model. Attached Figure Description

[0057] Figure 1 This is an application environment diagram of the feature extraction model processing method in one embodiment;

[0058] Figure 2 This is a flowchart illustrating a feature extraction model processing method in one embodiment;

[0059] Figure 3 This is a flowchart illustrating the process of determining inheritance parameters in one embodiment;

[0060] Figure 4 This is a flowchart illustrating a feature extraction method in one embodiment;

[0061] Figure 5This is a schematic diagram comparing the changes in class centers of different model upgrade paradigms in one embodiment.

[0062] Figure 6 This is a schematic diagram comparing the effects of different model upgrade paradigms in one embodiment;

[0063] Figure 7 This is a schematic diagram of the feature extraction model in one embodiment;

[0064] Figure 8 This is a flowchart illustrating the process of identifying force in one embodiment;

[0065] Figure 9 This is a schematic diagram illustrating feature changes during a backward-compatible serialization model upgrade in one embodiment.

[0066] Figure 10 This is a schematic diagram illustrating feature changes during feature extraction model processing in one embodiment;

[0067] Figure 11 This is a structural block diagram of a feature extraction model processing device in one embodiment;

[0068] Figure 12 This is a structural block diagram of a feature extraction device in one embodiment;

[0069] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0070] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0071] Artificial Intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to have perception, reasoning, and decision-making capabilities. AI technology is a comprehensive discipline involving a wide range of fields, encompassing both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly include computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0072] Computer vision (CV) is a science that studies how to enable machines to "see." More specifically, it refers to machine vision, which uses cameras and computers to replace human eyes in tasks such as target recognition, tracking, and measurement, and further performs image processing to create images more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), and other technologies, as well as common biometric recognition technologies such as facial recognition and fingerprint recognition. The solutions provided in this application's embodiments involve artificial intelligence computer vision technology, machine learning, and other technologies, specifically illustrated through the following embodiments.

[0073] The feature extraction model processing method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on the cloud or other servers. Terminal 102 can send sample images to server 104. Server 104, using a historical image classification model jointly trained with a historical feature extraction model, performs a first classification based on the second image features extracted from the received sample images by the feature extraction model to be trained. The classification loss of the first classification is adjusted using inheritance parameters to obtain a model compatibility loss. The inheritance parameters are obtained based on the feature discrimination power reflected by the first image features extracted from the sample images by the historical feature extraction model. A second classification is performed using the image classification model to be trained based on the second image features. The model is updated and trained based on the model compatibility loss and the classification loss of the second classification. Upon completion of training, a trained feature extraction model is obtained. The trained feature extraction model can extract features from the input image and output the image features of the input image. Server 104 can port the trained feature extraction model to terminal 102 so that terminal 102 can extract features from the input image using the trained feature extraction model. Server 104 can also receive target images sent by terminal 102 and extract features from the target images sent by terminal 102 using a trained feature extraction model.

[0074] The feature extraction method provided in this application embodiment can also be applied to, for example, Figure 1 In the application environment shown, the terminal 102 or server 104 can store a pre-trained feature extraction model. The terminal 102 or server 104 can acquire a target image and input the acquired target image into the feature extraction model. The feature extraction model then performs image extraction and outputs the extracted target image features. The pre-trained feature extraction model can be trained using the feature extraction model processing method provided in this application embodiment.

[0075] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0076] In one embodiment, such as Figure 2As shown, a feature extraction model processing method is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking the server in the example, the following steps are included:

[0077] Step 202: Obtain the sample image and its inherited parameters; the inherited parameters are determined based on the feature discrimination power reflected by the first image feature of the sample image; the first image feature is extracted from the sample image by the trained historical feature extraction model.

[0078] Feature extraction models can include artificial neural network models built on machine learning. These models can extract features from input images and output the extracted image features, which can be used for various processing tasks such as image matching, image classification, and image optimization. Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can 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 span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning. Sample images are used to train the feature extraction model. Historical feature extraction models are models that have already been trained. In model updates and upgrades, historical feature extraction models are models that need to be upgraded or updated; that is, historical feature extraction models are old models, while retrained feature extraction models are new models. For example, a historical feature extraction model can be a feature extraction model of a historical version, while a retrained feature extraction model can be a feature extraction model of the latest version.

[0079] By extracting features from sample images using a historical feature extraction model, the first image features of the sample images can be obtained. Based on these first image features, various image processing operations such as image classification and image matching can be performed. Feature discriminative power characterizes the ability to distinguish between different images when performing image classification, image matching, and other image processing based on the first image features. For example, in image classification based on the first image features, feature discriminative power can be the ability to distinguish between different image categories. The accuracy of image classification using the first image features is positively correlated with the feature discriminative power reflected by the first image features; that is, the stronger the feature discriminative power, the more obvious the classification features reflected by the first image features, and the more conducive it is to classification. In other words, the more accurate the image classification processing can be using the first image features, the better. Similarly, in image matching based on the first image features, feature discriminative power can be the ability to distinguish between different images; that is, the stronger the feature discriminative power, the more accurately the image feature can express the characteristics of the image, and the more accurate the processing results can be obtained based on the image feature.

[0080] For the same image, different feature extraction models will yield different feature discriminative power for the extracted image features. For example, when using extracted image features for image classification, the classification results may differ; the more accurate the classification result, the stronger the feature discriminative power of the extracted image features. Feature discriminative power can be obtained through feature discriminative power analysis of the extracted image features. For instance, extracted image features can be used for classification processing, and the feature discriminative power of each image feature can be determined based on the classification results. Similarly, extracted image features can be used for matching processing, and the feature discriminative power of each image feature can be determined based on the matching results. In practical applications, feature discriminative power can be quantified, such as by obtaining feature discrimination parameters. These parameters can then be used to quantitatively compare the feature discriminative power of image features from different images.

[0081] Inheritance parameters are determined based on the feature discrimination power reflected by image features. Each sample image can have corresponding inheritance parameters. The stronger the feature discrimination power reflected by an image feature, the more accurate the image processing results can be obtained using the image feature. Therefore, the more accurately the image feature can represent the corresponding image, and the more worthy the new model is to inherit and learn it. Inheritance parameters can be used to characterize the degree of inheritance of image features. For example, inheritance parameters can include inheritance weights. Image features with strong feature discrimination power that are worthy of inheritance and learning by the new model can have higher inheritance weights, while those with weak feature discrimination power can have lower inheritance weights. Thus, the new model selectively inherits and learns image features based on their feature discrimination power, enabling it to learn effective image feature knowledge. For example, for image features A, B, and C, if the feature discrimination power is A > B > C, then the corresponding inheritance weights can also be set to A > B > C. This allows the new model to focus on learning and inheriting image features with strong feature discrimination power, thereby improving the effectiveness of image feature extraction. In addition, the inheritance parameter can also include the number of inheritances. For image features with strong discriminative power, the inheritance weight of the image feature can be increased, that is, the importance of compatibility training for the image feature can be increased; while for image features with weak discriminative power, the inheritance weight of the image feature can be decreased, that is, the importance of compatibility training for the image feature can be decreased.

[0082] Specifically, the server can obtain sample images and their inherited parameters. The inherited parameters can be pre-determined by the server using a pre-trained historical feature extraction model to extract first image features from the sample images, and based on the feature discrimination power reflected by these first image features. In a concrete implementation, the server can establish a mapping relationship between the inherited parameters and the sample images. By querying this mapping relationship, the inherited parameters of the sample images can be obtained. For example, after determining the inherited parameters of the sample images, the server can write the inherited parameters into the image attribute information of the sample images. After training a new model to obtain sample images, the server can extract the inherited parameters from the image attribute information of the sample images.

[0083] Step 204: Extract the second image features from the sample image using the feature extraction model to be trained.

[0084] The feature extraction model to be trained is a new model that needs to be retrained. To ensure compatibility with previously trained historical feature extraction models, the new model needs to undergo compatibility processing for the features extracted by the old model, so that the trained new model can effectively be compatible with the old model. The second image feature is extracted from the sample image through the new model to be trained, i.e., the feature extraction model to be trained. Specifically, the server determines the feature extraction model to be trained and extracts features from the sample image using 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.

[0085] Step 206: The historical image classification model, jointly trained with the historical feature extraction model, performs the first classification based on the second image features, and adjusts the classification loss of the first classification by inheriting parameters to obtain the model compatibility loss.

[0086] The historical image classification model is a pre-trained model for image classification. It is jointly trained with the historical feature extraction model, meaning the historical image classification model is trained synchronously with the historical feature extraction model. Specifically, the historical feature extraction model extracts image features from the training sample images, and the historical image classification model performs image classification processing on these extracted features. Based on the image classification results, both the historical image classification model and the historical feature extraction model are updated, such as by updating their respective model parameters, and training continues until completion, resulting in the trained historical feature extraction model and 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 for image processing, such as image classification and image matching. The trained historical image classification model can classify the input image features to determine the image's category.

[0087] The first classification refers to the image classification process performed using the second image features extracted by the feature extraction model to be trained, based on historical image classification models. The classification loss for the first classification is determined by the difference between the classification result and the class label of the sample image. The specific form of the first classification loss can be set according to actual needs, and may include, but is not limited to, various loss functions such as log-likelihood loss, hinge loss, cross-entropy loss, softmax loss, and ArcFace (Additive Angular Margin) loss. The model compatibility loss is the loss obtained by adjusting the first classification loss using inheritance parameters. By adjusting the first classification loss using inheritance parameters, the feature discrimination power embodied in the inheritance parameters can be utilized to selectively inherit and learn the first image features carried in the historical feature extraction model. Specifically, the weight of poor samples can be reduced, and the weight of good samples 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.

[0088] Specifically, the server can obtain a pre-trained historical image classification model. This model can be a classifier model jointly trained with a historical feature extraction model, used to classify the extracted image features. The server performs a first classification based on the second image features using the historical image classification model, obtaining the classification loss for the first classification. For example, the server can determine the classification loss based on the combination of the first classification and the difference between the category labels of the sample images. The server adjusts the classification loss for the first classification using inherited parameters. If the inherited parameters include inheritance weights, the classification loss for the first classification can be weighted according to these weights to obtain the model compatibility loss.

[0089] Step 208: Perform a second classification based on the second image features using the image classification model to be trained, and obtain the classification loss for the second classification.

[0090] The image classification model to be trained is a retrained model used to classify image features extracted by the feature extraction model to be trained. In other words, the image classification model and the feature extraction model are jointly trained to simultaneously obtain both models. A second classification is performed based on the second image features using the retrained image classification model. This involves classifying the features extracted by the new feature extraction model using the new image classification model, resulting in a classification loss for the second classification.

[0091] Specifically, the server can use an image classification model jointly trained with the feature extraction model to be trained, and perform a second classification based on the second image features extracted by the feature extraction model to be trained, thus obtaining the classification loss for the second classification. Specifically, the server can determine the classification loss for the second classification based on the difference between the classification result of the second classification and the class label of the sample image. The specific form of the classification loss for the second classification can be set according to actual needs, and may include, but is not limited to, various forms of loss such as log-likelihood loss, hinge loss, cross-entropy loss, softmax loss, and ArcFace loss.

[0092] Step 210: Based on model compatibility loss and classification loss of the second classification, update the feature extraction model and the image classification model to be trained and continue joint training until training is completed, and obtain the trained feature extraction model.

[0093] In this process, the feature extraction model and the image classification model to be trained are jointly trained. Specifically, based on the training loss, both the feature extraction model and the image classification model are updated separately before further training. The training loss includes model compatibility loss and the second classification loss. Specifically, the training loss can be obtained by summing the model compatibility loss and the second classification loss, and then used to update both the feature extraction model and the image classification model before joint training.

[0094] Specifically, the server can update the newly trained model, including the feature extraction model and the image classification model, based on the model compatibility loss and the classification loss of the second classification. After the model is updated, joint training continues, i.e., joint training is performed using the next sample image, until training is complete. This process is repeated if convergence conditions are met, model accuracy meets preset accuracy conditions, and the number of training samples reaches a certain threshold. The trained feature extraction model can then extract features from the input image, while the trained image classification model can classify the input image features (specifically, the features extracted by the trained feature extraction model) to determine the image category to which the features belong. In practical applications, the image classification model assists in training the feature extraction model, ultimately resulting in a trained feature extraction model that can be used to perform feature extraction processing on images.

[0095] In the above feature extraction model processing method, a historical image classification model is obtained by jointly training with a historical feature extraction model. Based on the second image features extracted from the sample image by the feature extraction model to be trained, a first classification is performed. The classification loss of the first classification is adjusted by inheritance parameters to obtain the model compatibility loss. The inheritance parameters are obtained based on the feature discrimination power reflected by the first image features extracted from the sample image by the historical feature extraction model. The image classification model to be trained performs a second classification based on the second image features. The model is updated and trained based on the model compatibility loss and the classification loss of the second classification. By selectively inheriting the features extracted by the historical feature extraction model through 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. This allows the trained feature extraction model to improve the effectiveness of image feature extraction while ensuring model compatibility with the historical feature extraction model.

[0096] In one embodiment, such as Figure 3 As shown, the feature extraction model processing method also includes the process of determining inheritance parameters, specifically including:

[0097] Step 302: Extract the first image features from the sample images using the historical feature extraction model.

[0098] Among them, the historical feature extraction model is an old feature extraction model that has already been trained. The new feature extraction model that is retrained 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 the image feature obtained by extracting features from the sample image through the old feature extraction model, that is, through the historical feature extraction model.

[0099] Specifically, the server can obtain pre-trained historical feature extraction models. When multiple older feature extraction models exist, the version of the historical model can be selected according to actual needs. The historical feature extraction model can be a new feature extraction model, that is, an older feature extraction model that the model to be trained needs to be compatible with. The server extracts features from the sample image using the historical feature extraction model. Specifically, the sample image can be input into the historical feature extraction model, and the historical feature extraction model outputs the extracted first image features. The first image features reflect the feature extraction performance of the historical feature extraction model for the sample image. The more accurate and effective the first image features are in representing the sample image, the higher the accuracy of the image feature extraction by the historical feature extraction model.

[0100] Step 304: Classify the first image features using a historical image classification model to obtain the image category distribution.

[0101] The historical image classification model is an older, already trained image classification model. The newly trained feature extraction model needs to be compatible with the historical image classification model, meaning it must be compatible with the image classification results of the historical model. The historical image classification model and the historical feature extraction model are jointly trained, indicating a correspondence between them. The image category distribution is the image classification result obtained by the historical image classification model classifying the images based on the first image features extracted by the historical feature extraction model. The image category distribution can include the probability distribution of sample images corresponding to each image category.

[0102] Specifically, the server can obtain a pre-trained historical image classification model. This historical image classification model corresponds to a historical feature extraction model, and the two models are jointly trained. After determining the historical feature extraction model, the server can determine the historical image classification model based on the correspondence established during joint training. The server then uses the historical image classification model to classify the first image features. Specifically, the first image features can be input into the historical image classification model, which outputs an image category distribution. Based on this image category distribution, the server can determine the image classification result of the historical image classification model based on the first image features, thus determining the classification category of the sample image.

[0103] Step 306: Determine the inheritance parameters of the sample images based on the image category distribution.

[0104] Among them, the inheritance parameters are determined based on the feature discrimination power reflected by the image features. The inheritance parameters can be used to characterize the degree of inheritance of image features. For example, the inheritance parameters can include inheritance weights. For image features that are worth inheriting and learning by the new model, that is, for image features with strong feature discrimination power, they can have higher inheritance weights.

[0105] Specifically, the server determines the inheritance parameters of the sample images based on the image category distribution. Specifically, the inheritance parameters can be determined based on the dispersion of the image category distribution. The stronger the dispersion of the image category distribution, the less distinct the probability distribution of each category is when classifying images based on the first image feature, and the limited discriminative power of the first image feature. For example, for different sample images with image category distributions of (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 image category distribution (1,0,0,0) has the most concentrated probability distribution for each category. Therefore, the image feature corresponding to this distribution has the strongest discriminative power, allowing for accurate image classification. This indicates that the sample image is a high-quality sample, and its inheritance weight can be increased to obtain the inheritance parameters of the sample image.

[0106] In this embodiment, the server extracts the first image features of the sample image through a historical feature extraction model, and performs image classification on the first image features through a historical image classification model. The server determines the inheritance parameters of the sample image based on the obtained image category distribution. The inheritance parameters of the sample image can be determined based on the classification performance of the sample image by the old model. The inheritance parameters can reflect the feature discrimination power of the image features extracted by the old model from the sample image, so that the trained feature extraction model can selectively inherit the features extracted by the historical feature extraction model and effectively learn the knowledge of the historical feature extraction model. Thus, while ensuring the model compatibility of the trained feature extraction model with respect to the historical feature extraction model, the effectiveness of image feature extraction is improved.

[0107] In one embodiment, determining the inheritance parameters of a sample image based on the image category distribution includes: determining the category distribution cross-entropy based on the image category distribution; normalizing the category distribution cross-entropy to obtain a discrimination parameter used to measure the feature discrimination power of the first image feature; and determining the inheritance parameters of the sample image based on the discrimination parameter.

[0108] The image category distribution can include the probability distribution of sample images corresponding to each image category. The category distribution cross-entropy is a cross-entropy determined based on the image category distribution. The cross-entropy between image category distributions can be used to measure the feature discrimination power of the first image feature. The category distribution cross-entropy and the feature discrimination power of the first image feature are negatively correlated; that is, the stronger the feature discrimination power of the first image feature, the more obvious its feature, and the smaller its category distribution cross-entropy value, indicating a more concentrated category distribution. Conversely, the weaker the feature discrimination power of the first image feature, the less obvious its feature, and the larger its category distribution cross-entropy value, indicating a more dispersed category distribution. Normalization is a dimensionless processing method that transforms the absolute values ​​of physical system values ​​into relative values. Specifically, normalization can map the category distribution cross-entropy to the range of 0 to 1. The discrimination power parameter is the result of normalizing the category distribution cross-entropy. The discrimination power parameter can be used to measure the feature discrimination power of the first image feature, and based on the discrimination power parameter, the inherited parameters of the sample image can be determined. For example, when the inheritance parameter includes inheritance weight, the discrimination parameter can be converted into a weight in the range of 0 to 1, thereby obtaining the inheritance weight of the sample image.

[0109] Specifically, the server can determine the cross-entropy of the image category distribution based on the image category distribution. For example, it can obtain the cross-entropy of the category distribution by calculating the cross-entropy of the image category distribution. The server normalizes the cross-entropy of the category distribution to obtain the discriminative power parameter. The discriminative power parameter can be used to measure the feature discriminative power of the first image feature. For example, when the discriminative power parameter is a numerical parameter, the value of the discriminative power parameter can be negatively correlated with the feature discriminative power of the first image feature; that is, the stronger the feature discriminative power of the first image feature, the smaller the value of the discriminative power parameter. The server determines the inheritance parameters of the sample images based on the discriminative power parameter. Specifically, the server can set the inheritance weights of the sample images based on the discriminative power parameter and use the inheritance weights as the inheritance parameters of the sample images.

[0110] In this embodiment, the discrimination parameter for measuring the feature discrimination power of the first image feature is determined by the cross-entropy of the image category distribution, and the inheritance parameter for the sample image is determined based on the discrimination parameter. This allows the inheritance parameter to effectively reflect the feature discrimination power of the image features extracted by the old model from the sample image. Based on the inheritance parameter, the trained feature extraction model can selectively inherit the features extracted by the historical feature extraction model. This ensures the model compatibility of the trained feature extraction model with respect to the historical feature extraction model while improving the effectiveness of image feature extraction.

[0111] In one embodiment, the inheritance parameters include inheritance weights that are positively correlated with feature discriminative power; adjusting the classification loss of the first category using the inheritance parameters to obtain the model compatibility loss includes: obtaining the classification loss of the first category; and weighting the classification loss of the first category according to the inheritance weights to obtain the model compatibility loss.

[0112] The inheritance weight is positively correlated with the feature discrimination power; that is, the stronger the feature discrimination power of an image feature, the larger the corresponding inheritance weight, thus emphasizing the inheritance and learning of image features with strong discrimination power. The classification loss for the first category reflects the classification performance of the second image feature using the historical image classification model, and can be determined through the designed classification loss function. The model compatibility loss is obtained by adjusting the classification loss for the first category using the inheritance parameters. It reflects the loss when the new model is compatible with the old model, i.e., the loss when the feature extraction model to be trained is compatible with the historical feature extraction model. The larger the model compatibility loss, the greater the negative impact on the effectiveness of feature extraction of the new model itself.

[0113] Specifically, the inheritance parameters include inheritance weights that are positively correlated with feature discrimination power. The server can obtain the classification loss for the first category, which can be determined based on the classification result of the first category or on the model parameters of the second image features and the historical image classification model. The method for determining the classification loss for the first category can be determined based on the actual loss function involved. The server weights the classification loss for the first category according to the inheritance weights in the inheritance parameters. Specifically, the classification losses of each sample image in the same training batch can be weighted and summed to obtain the model compatibility loss for that training batch. Different sample images can correspond to different inheritance weights. By adjusting the classification loss of different sample images through inheritance weights, the training of the feature extraction model can be adjusted, enabling the feature extraction model to selectively inherit the features of the samples during training.

[0114] In this embodiment, the server can use the inheritance weights included in the inheritance parameters to weight the classification loss of the first category to obtain the model compatibility loss. The model compatibility loss is then used to adjust the training of the feature extraction model, so that the feature extraction model can focus on inheriting the features of the samples during the training process, achieving selective inheritance of features. This ensures the model compatibility of the trained feature extraction model with respect to historical feature extraction models while improving the effectiveness of image feature extraction.

[0115] In one embodiment, obtaining the classification loss for the first category includes: determining the category label of the sample image; determining the historical classification model parameters of the historical image classification model for the category to which the sample image belongs, based on the category label; and obtaining the classification loss for the first category based on the angular interval between the second image features and the historical classification model parameters.

[0116] Here, the category label refers to the true category to which the sample image belongs. Historical classification model parameters can include model parameters from historical image classification models, specifically the weight parameters used when classifying the input image features. The classification loss for the first category is constructed based on the angular interval between the second image features and the historical classification model parameters.

[0117] Specifically, the server constructs the classification loss for the first category using the ArcFace loss function. The server determines the category label of the sample image and, based on this label, determines the parameters of the historical image classification model for the category to which the sample image belongs. The server determines the angular interval between the second image features and the historical classification model parameters. Specifically, the server normalizes both the second image features and the historical classification model parameters, determines the angle between the normalized second image features and the historical classification model parameters, adds the angular interval, and constructs a softmax function based on the added angular interval to obtain the ArcFace-style loss function, which serves as the classification loss for the first category.

[0118] In this embodiment, the classification loss of the first category is constructed by the angular interval between the second image features and the parameters of the historical classification model in the historical image classification model. This allows the classification loss to accurately express the classification performance of the first category, which helps to ensure the training effect of the feature extraction model. It can improve both the performance of the feature extraction model and the training efficiency.

[0119] In one embodiment, the classification loss of the second classification is obtained by performing a second classification based on the second image features using the image classification model to be trained, including: performing a second classification based on the second image features using the image classification model to be trained, and obtaining 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.

[0120] The classification loss for the second classification is used to represent the classification performance of the second classification. By analyzing the differences between the class labels carried by the sample images in the second classification results, the classification performance of the second classification can be quantified, resulting in the classification loss. Specifically, the server can perform second classification based on the second image features using the image classification model to be trained. The second image features can be input into the image classification model to be trained, and the model will output the second classification result. The server obtains the class labels carried by the sample images and determines the classification difference between the class labels and the second classification result. Based on this difference, the classification loss for the second classification is calculated. In practical applications, different calculation methods can be used to calculate the classification loss for the second classification for different designed classification loss forms. For example, the classification loss for the second classification can also be constructed using the ArcFace loss function, resulting in an ArcFace-style loss function as the classification loss for the second classification.

[0121] In this embodiment, the second image features are classified in the second way using the image classification model to be trained. 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 determined. Thus, the classification performance of the second classification can be accurately expressed through the classification loss, which helps to ensure the training effect of the feature extraction model. This can improve both the performance of the feature extraction model and the training efficiency.

[0122] In one embodiment, the feature extraction model processing method further includes: performing feature mapping on the first image features through the feature evolution model to be trained to obtain the mapped features of the first image features; performing a third classification based on the mapped features through the image classification model to be trained to obtain the classification loss of the third classification; and updating the feature extraction model to be trained, the image classification model to be trained, and the feature evolution model to be trained based on the model compatibility loss, the classification loss of the second classification, and the classification loss of the third classification, and then continuing joint training until training is completed to obtain the trained feature extraction model.

[0123] The feature evolution model is used to perform feature mapping on the input image features (extracted from the old model), thereby evolving and optimizing the input image features. The feature evolution model to be trained can be jointly trained with the feature extraction model and the image classification model, meaning that the feature extraction model, image classification model, and feature evolution model can be trained simultaneously. Upon completion of training, the trained feature extraction model, image classification model, and feature evolution model are obtained. The trained feature extraction model extracts features from the input image and outputs image features; the trained image classification model classifies the input image features and outputs the image classification category; the feature evolution model performs feature mapping on the input image features and outputs the mapped image features. These mapped image features can be used for image processing, such as image classification and image matching.

[0124] The first image feature mapping feature is the image feature obtained after mapping the first image feature through a feature evolution model. By adding the feature evolution model, the first image feature extracted from the sample images by the historical feature extraction model can be optimized, so that the first image feature evolves towards a better latent feature space, which is beneficial for optimizing the features of each image in the image library. The third classification refers to the image classification process performed by the image classification model to be trained based on the mapping feature. Further combining the classification loss of the third classification, the feature extraction model, the image classification model, and the feature evolution model are jointly trained to obtain the trained feature extraction model.

[0125] Specifically, the server can determine the feature evolution model to be trained. The feature evolution model training optimizes the features extracted by the historical feature extraction model, achieving feature backfilling in a lightweight and efficient manner, further enhancing the gains brought by the retrieval system model upgrade. The server can perform feature mapping on the first image features through the feature evolution model. Specifically, the first image features can be input into the feature evolution model to be trained, and the model outputs the mapped features of the first image features. The server performs third classification based on the mapped features using the image classification model to be trained. Specifically, the mapped features can be input into the image classification model to be trained, and the model performs image classification, obtaining the classification loss for the third classification. The specific form of the loss function for the third classification can be flexibly 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 loss, etc. Based on the model compatibility loss, the second classification loss, and the third classification loss, the server updates the feature extraction model, the image classification model, and the feature evolution model to be trained, and continues joint training until training is complete, obtaining the trained feature extraction model. In practical applications, the server can 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 this target loss, the feature extraction model, the image classification model, and the feature evolution model to be trained can be updated respectively. Specifically, the model parameters of each model to be trained can be updated, and training can continue after the update until the training is completed and the trained feature extraction model is obtained.

[0126] In this embodiment, the image features extracted by the historical feature extraction model are mapped using a feature evolution model. The mapped features are then classified into a third category using an image classification model to be trained. Based on the classification loss of the third category, the feature extraction model, the image classification model, and the feature evolution model to be trained are updated and then jointly trained. This allows for feature optimization of the first image features extracted from the sample images by the historical feature extraction model, enabling the first image features to evolve towards a better latent feature space. This is beneficial for optimizing the features of each image in the image library.

[0127] In one embodiment, based on the model compatibility loss, the classification loss of the second classification, and the classification loss of the third classification, the feature extraction model, the image classification model, and the feature evolution model to be trained are updated respectively before joint training is performed. This includes: obtaining the target loss for joint training based on the model compatibility loss, the classification loss of the second classification, and the classification loss of the third classification; and updating the feature extraction model, the image classification model, and the feature evolution model to be trained based on the target loss before joint training is performed.

[0128] The target loss refers to the overall loss of the joint training of the feature extraction model, the image classification model, and the feature evolution model. Specifically, it can be constructed based on 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.

[0129] Specifically, the server constructs the target loss for joint training based on the model compatibility loss, the classification loss for the second classification, and the classification loss for the third classification. Alternatively, the server can directly use the sum of the model compatibility loss, the classification loss for the second classification, and the classification loss for the third classification as the target loss for joint training, i.e., as the overall training objective. The server performs joint training based on the target loss, that is, it updates the feature extraction model, the image classification model, and the feature evolution model to be trained based on the target loss. For example, after updating the parameters of each training model, joint training continues until training is complete, resulting in a trained feature extraction model.

[0130] In this embodiment, 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 target loss is then used to jointly train the feature extraction model, the image classification model, and the feature evolution model to be trained. This allows for multi-dimensional training of the feature extraction model, ensuring model compatibility with historical feature extraction models while improving the effectiveness of image feature extraction.

[0131] In one embodiment, the feature extraction model processing method further includes: determining a query image feature library associated with a historical feature extraction model; the query image feature library includes query image features for each query image; the query image features are extracted by the historical feature extraction model for each query image; through a trained feature evolution model, feature mapping is performed on each query image feature to obtain query image mapping features for each query image; and the query image feature library is updated based on the query image mapping features to obtain a query image feature library associated with the trained feature extraction model.

[0132] The query image feature library is associated with the historical feature extraction model. Specifically, the query image features included in the library are extracted from each query image by the historical feature extraction model. The historical feature extraction model extracts the query image features for each image and constructs the query image feature library associated with it. When a user inputs a query image, the server can extract features from the query image using the historical feature extraction model and match these extracted features with the query image features in the library. Based on the matching results, images matching the query image are obtained, such as images similar to the query image, thus enabling the retrieval of the query image. The query image mapping features are obtained by mapping the query image features using a trained feature evolution model. This optimized and updated feature library supports the trained feature extraction model in performing accurate image query processing.

[0133] Specifically, the server can query the image feature library associated with the historical feature extraction model. This library includes the individual image features for each image being queried, extracted by the historical feature extraction model for each image. In other words, the image features in the library serve as the base image features for image matching using the historical feature extraction model. The server acquires the trained feature evolution model and performs feature mapping on each image feature to obtain the individual image mapping features for each image. The server updates the image feature library based on these mapping features, resulting in the image feature library associated with the trained feature extraction model. The updated image feature library, with its updated mapping features, is suitable as the base image features for image matching using the trained feature extraction model. Furthermore, after the user inputs a query image, the server can extract features from the query image using a trained feature extraction model, and then perform feature matching on the extracted image features in the query image feature library associated with the trained feature extraction model. In other words, the extracted image features are matched with the mapping features of each query image. Based on the feature matching results, images that match the query image can be identified, such as images that are the same as or similar to the query image.

[0134] In this embodiment, the feature evolution model, which has been trained, is used to update the image feature library associated with the historical feature extraction model. This results in an image feature library associated with the trained feature extraction model, which allows for direct updating of the base library features based on the feature evolution model. This lightweight and efficient approach to feature backfilling improves the quality of the base library features and increases the efficiency of updating the image feature library.

[0135] In one embodiment, such as Figure 4 As shown, a feature extraction method is provided. This method is executed by a computer device, specifically a terminal or server, or both. In this embodiment, the method is applied to... Figure 1 Taking the server in the example, the following steps are included:

[0136] Step 402: Obtain the target image.

[0137] The target image is the image that needs feature extraction processing, which can be an image sent by the user to the server via a terminal. Specifically, the server can obtain the target image that needs feature extraction processing.

[0138] Step 404: The target image is feature-extracted using a feature extraction model to obtain target image features. The feature extraction model is obtained by updating the feature extraction model and the image classification model to be trained using model compatibility loss and the classification loss of the second classification, and then continuing joint training until training is complete. The model compatibility loss is obtained by using a historical image classification model, jointly trained with a previously trained historical feature extraction model, to perform a first classification based on the second image features, and adjusting the classification loss of the first classification using inheritance parameters. The second image features are extracted from sample images using the feature extraction model to be trained. The inheritance parameters are determined based on the feature discrimination power reflected by the first image features of the sample images. The first image features are extracted from sample images by the historical feature extraction model. The classification loss of the second classification is obtained by performing a second classification based on the second image features using the image classification model to be trained.

[0139] The feature extraction model is a pre-trained model used to extract features from the input image, specifically from the input target image, and output the target image features. These target image features characterize the image properties of the target image, and based on these features, various subsequent processing methods such as image matching and image classification can be performed. The training of the feature extraction model can be implemented based on the aforementioned feature extraction model processing methods.

[0140] Specifically, the server can acquire a pre-trained feature extraction model and use it to extract features from the target image. For example, the target image can be input into the feature extraction model to obtain the target image features. Further, during the pre-training of the feature extraction model, the server can acquire sample images and their inherited parameters. The inherited parameters are obtained by the server using a pre-trained historical feature extraction model to extract first image features from the sample images, and the parameters are determined based on the feature discrimination power reflected by these first image features. The server then uses the feature extraction model to be trained to extract features from the sample images, obtaining second image features. The server then uses a pre-trained historical image classification model to perform a first classification based on these second image features, obtaining the classification loss for the first classification. This first classification loss is then adjusted using the inherited parameters to obtain the model compatibility loss. Finally, the server uses an image classification model jointly trained with the feature extraction model to be trained, and performs a second classification based on the second image features extracted by the feature extraction model to be trained, obtaining the classification loss for the second classification. The server updates the newly trained model, including the feature extraction model and the image classification model, based on model compatibility loss and second-class classification loss. After the model update, joint training continues using the next sample image until training is complete, resulting in a trained feature extraction model. The trained feature extraction model can extract features from the input image and output image features that represent the input image.

[0141] In the above feature extraction method, features are extracted from the target image through a pre-trained feature extraction model. During the training process of the feature extraction model, a historical image classification model is jointly trained with a historical feature extraction model. Based on the second image features extracted from the sample image by the feature extraction model to be trained, a first classification is performed. The classification loss of the first classification is adjusted by inheritance parameters to obtain the model compatibility loss. The inheritance parameters are obtained based on the feature discrimination power reflected by the first image features extracted from the sample image by the historical feature extraction model. The image classification model to be trained performs a second classification based on the second image features. The model is updated and trained based on the model compatibility loss and the classification loss of the second classification. By selectively inheriting the features extracted by the historical feature extraction model through 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. This allows the trained feature extraction model to improve the effectiveness of image feature extraction while ensuring model compatibility with the historical feature extraction model.

[0142] In one embodiment, the feature extraction method further includes: determining a feature library of images to be queried; performing feature matching on the target image features in the feature library of images to be queried to obtain the feature features of images to be queried that match the target image features; and determining the image query result for the target image based on the images associated with the feature features of images to be queried.

[0143] The query image feature library includes the individual query image features of each query image. These features are extracted by the feature extraction model for each query image. After obtaining the trained feature extraction model, the server can extract features from each query image using the model, and then aggregate the extracted query image features to construct the query image feature library. By performing feature matching based on these query image features, image query processing can be achieved.

[0144] Specifically, the server determines a feature library for the image to be queried. This feature library 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 target image features within the feature library. Specifically, it can perform feature matching between the target image features and each individual query image feature in the feature library, such as determining the feature similarity between the target image features and the query image features. Based on the feature matching results, the server can determine the query image features that match the target image features. For example, query image features with a similarity greater than a similarity threshold can be identified as matching the target image features. The server determines the images associated with the query image features and, based on these associated images, determines the image query results for the target image. For instance, the server can return images associated with query image features that match the target image features as matching images of the target image, thus obtaining the image query results for the target image.

[0145] In this embodiment, the target image features of the target image are extracted by a pre-trained feature extraction model. By performing feature matching of the target image features in the query image feature library, and determining the image query results for the target image based on the images associated with the matching query image features, the accuracy of image query can be improved.

[0146] This application also provides an application scenario in which the above-described feature extraction model processing method and feature extraction method are applied. Specifically, the application of the feature extraction model processing method and feature extraction method in this application scenario is as follows:

[0147] The server can construct sample images, each of which can be classified into different categories. The server uses a historical image classification model jointly trained with a historical feature extraction model. Based on the second image features extracted from the sample images by the feature extraction model to be trained, it performs a first classification. The classification loss for the first classification is adjusted using inherited parameters to obtain a model compatibility loss. These inherited parameters are based on the feature discrimination power reflected by the first image features extracted from the sample images by the historical feature extraction model. The image classification model to be trained then performs a second classification based on the second image features. The model is updated and trained based on the model compatibility loss and the classification loss of the second classification until training is complete, resulting in a trained feature extraction model. Furthermore, the server can receive images to be classified sent by the terminal. The server can extract features from the images to be classified using the trained feature extraction model and then use a classifier to classify the extracted image features to determine the image category to which the image belongs, such as a landscape image, a portrait image, etc.

[0148] This application also provides an application scenario in which the above-described feature extraction model processing method and feature extraction method are applied. Specifically, the application of the feature extraction model processing method and feature extraction method in this application scenario is as follows:

[0149] Image retrieval systems typically include a feature extractor or model and a database storing massive amounts of image features. When a user inputs a query image, the system uses the feature extractor to extract features from the query image and compares them against the existing database for similarity. It then returns images that are identical or similar to the query image, thus processing the input image query. Traditional model upgrade paradigms for image retrieval systems require updating all database features with the new model before deployment—a process known as feature backfilling. Considering the hundreds of millions of images in industry, feature backfilling is extremely time-consuming and costly. Further, a backward-compatible model upgrade paradigm can be used to avoid feature backfilling. Specifically, additional constraints compatible with the old model's features are introduced during the training of the new model. However, this still faces a dilemma: the new model needs to balance its own discriminative capabilities with the compatibility between the new and old models, due to the undifferentiated compatibility constraints during training. This embodiment proposes a novel Darwinian Model Upgrades (DMU) paradigm. This paradigm decouples the inheritance and evolution stages in the model upgrade process. It achieves the inheritance of old features through selective backward compatibility training and the evolution of old features through a lightweight forward evolutionary branch. Detailed and comprehensive experimental verification on large-scale image retrieval datasets, including landmark retrieval datasets and face recognition datasets, demonstrates that the feature extraction model processing method and feature extraction method proposed in this embodiment can effectively mitigate the loss of the new model's own discriminative power while improving the compatibility between the new and old models.

[0150] In Backward-Compatible Representation Learning (BCT), an influence loss function is introduced when training a new model to guide new features to approach the class centers of old features, where the parameters of the old classifier serve as a reference for the old class centers. Backward-Compatible Learning can meet initial compatibility performance requirements, but the new model must sacrifice its own discriminative power to ensure compatibility with the old model. This embodiment addresses the dilemma of the trade-off between the discriminative power of the new model and the compatibility between the new and old models in existing compatibility methods by proposing a new Darwinian model upgrade paradigm. This paradigm decouples the inheritance and evolution stages in the model upgrade process, achieving inheritance of old features through selective backward-compatibility training and evolution of old features through a lightweight forward evolutionary branch.

[0151] Furthermore, such as Figure 5As shown, Figure (a) on the left illustrates that the backward-compatible model upgrade paradigm faces a dilemma where the new model's discriminative power and new-old compatibility cannot be simultaneously achieved by indiscriminately inheriting old features. Specifically, to ensure effective compatibility with the old model, the new class centers formed after adding new features have low correlation with the new features, affecting the new model's discriminative power and preventing the extraction of effective image features. Figure (b) on the right illustrates the Darwinian model upgrade in this embodiment. This paradigm effectively avoids the previous dilemma by selectively inheriting good old features through backward compatibility and updating poor old features through forward evolution branches. Specifically, by performing feature evolution on old features and adjusting through compatibility weights, the new class centers formed after adding new features have high correlation with the new features, as shown in Figure (b) where the distance between the new features and the new class centers is close. This effectively alleviates the loss of the new model's own discriminative power while improving new-old model compatibility. In practical applications, such as... Figure 6 As shown in the experimental results on the Google Landmark retrieval dataset, this embodiment has higher gain and lower loss compared to the traditional upgrade paradigm one (BCT (CVPR'20)) and the traditional upgrade paradigm two (UniBCT (IJCAI'22)). This effectively alleviates the problem of loss of discrimination power of the new model and further improves the compatibility between the new and old models.

[0152] Specifically, the feature extraction model processing method and feature extraction method provided in this embodiment address a new problem of general backward-compatible representation learning and propose a unified backward-compatible training paradigm, achieving optimal performance in various real-world compatible training scenarios. The new Darwin model upgrade paradigm provided in this embodiment effectively alleviates the decline in the discriminative power of the new model caused by backward compatibility, while further improving the compatibility performance between the new and old models, making the upgrade of retrieval models more efficient and reducing industry upgrade costs.

[0153] In image retrieval scenarios, given a query image (Q), image retrieval refers to the ability to correctly retrieve images with the same content or object from a large-scale candidate image library (Gallery, G). Let D represent the training dataset. The model can be represented as follows: For any image x∈D in the new training dataset, the features extracted by the new model, i.e., the newly trained feature extraction model, can be represented as: In this embodiment, a classification task with an ArcFace loss function is selected as the pre-classification task. If the label corresponding to image x is y, the loss function can be expressed as shown in equation (1) below.

[0154]

[0155] Where m is a hyperparameter representing the distance between angles, s is a scaling factor, and ω represents the classifier. The kernel function is defined as follows: ·,> represents the vector dot product.

[0156] Furthermore, for the backward-compatible model upgrade process, the performance of the retrieval system is denoted as M(·,·), and the new and old image feature extractors and the old image feature extractor are denoted as respectively. The backward-compatible model upgrade improves retrieval performance by enhancing the features of the query images, with the specific objective shown in equation (2) below.

[0157]

[0158] To simplify the representation, Q and G can be omitted in sequence, and... Simplified to

[0159] Define performance gain Δ ↑ As shown in equation (3) below,

[0160]

[0161] Define the loss of discrimination Δ ↓ As shown in equation (4) below,

[0162]

[0163] in, This represents a pure model without compatibility constraints.

[0164] Specifically, the Darwinian model upgrade paradigm proposed in this embodiment includes a backward-compatible new model. And a lightweight forward evolutionary branch (ψ), such as Figure 7 As shown. For the same sample set, features are extracted using both new and old feature extraction models. For the old features extracted by the old feature extraction model, on the one hand, feature mapping is performed through a forward evolutionary branch to evolve the old features, which are then classified by the new classifier, resulting in a forward evolutionary loss. On the other hand, a discriminative weight is applied to the old features to determine the inheritance weight of each sample image, and based on this inheritance weight, the new features extracted by the new feature extraction model are classified by the old classifier, resulting in a selective backward compatibility loss. The processing of the discriminative weight is as follows... Figure 8As shown, the features extracted by the old feature extraction model are classified by the old classifier to obtain the probability distributions corresponding to each category. Based on these probability distributions, cross-entropy is calculated and normalized to construct the inheritance weights corresponding to the sample images, which can be as low as 0.3. For the new features extracted by the new feature extraction model, classification is performed through a new split phase to obtain the classification loss. The sum of the forward evolutionary loss, selective backward compatibility loss, and classification loss is used as the overall training objective.

[0165] To resolve the dilemma between performance gain and discriminative loss, selective backward compatibility training can be used to inherit good old knowledge, while forward evolution branches evolve old features towards a better latent space. This Darwinian model upgrade aims to improve the overall training objective. It can be expressed as shown in the following formula (5),

[0166]

[0167] Where L new L represents the selective backward compatibility loss. SBC L represents the forward evolution loss. FA This represents the classification loss function.

[0168] For the classification loss, within each batch (denoted as B), the discrimination loss function of the new model itself is expressed as shown in equation (6) below.

[0169]

[0170] For selective backward compatibility processing, the main factor causing the loss of discriminative power in the new model is the undifferentiated compatibility constraint, in which the model needs to inherit both good and bad old knowledge. This problem can be alleviated by redistributing the weights of the backward compatibility objective. Specifically, the discriminative power of features can be measured by entropy, defined as shown in equation (7).

[0171]

[0172]

[0173] Where |C| represents the number of categories, ω represents the classifier, and p i (x) represents the probability distribution of each category, and the discriminative power parameter Λ is inversely proportional to the feature discriminative power. To mitigate the negative impact of poor prior knowledge, the inheritance weight of these poor samples can be reduced while the inheritance weight of good samples is increased. The selective backward compatibility loss is defined as shown in equation (8).

[0174]

[0175]

[0176] Where λ(x) is the inheritance weight of the sample image.

[0177] For the forward evolution loss, a lightweight forward evolution branch (ψ) is designed to allow the old features to evolve towards a better feature latent space, as defined in equation (9).

[0178]

[0179] Furthermore, such as Figure 9 As shown, in the upgrade of the backward-compatible serialization model, the feature extraction model is upgraded from the old model. Updated to become the first generation of new models Second generation new model During the process, the features extracted from the query image will change, from Q old Change to and However, the base library features are still the old model's base library features G. old However, it did not follow the changes. In the Darwinian model upgrade paradigm provided in this embodiment, such as... Figure 10 As shown, in the feature extraction model, the old model Updated to become the first generation of new models Second generation new model During the process, the features extracted from the query image will change, from Q old Change to and Furthermore, the characteristics of the base database will also change accordingly, specifically through... The function of G from the old base inventory features old The changes are characteristic of the first-generation base database. exist Under the influence of the first generation of base database features The changes are characterized by the second-generation base database. The features extracted from the query image are compatible with the existing database features. That is, the Darwin model upgrade paradigm provided in this embodiment can improve the quality of query features through a new model obtained by selective backward compatibility training, while simultaneously improving the quality of database features through a forward upgrade branch.

[0180] In practical applications, the Darwin model upgrade paradigm proposed in this embodiment can effectively mitigate the loss of discriminative power in the new model caused by compatibility training, while further improving the compatibility between the new and old models, thus enabling its application in a wider range of fields. The Darwin model upgrade paradigm provided in this embodiment has been validated on multiple large-scale image retrieval datasets, including Google Landmark, Revisited Oxford, Revisited Paris, MS1Mv3, and IJB-C.

[0181] During validation, regarding the setting of evaluation metrics, for landmark retrieval tasks (including the Google Landmark, Revisited Oxford, and Revisited Paris datasets), the mean average precision (mAP) can be used. For face recognition tasks (including the MS1Mv3 and IJB-C face recognition datasets), the true acceptance rate (TAR) at different false acceptance rates (FAR) can be calculated for different template pairs, abbreviated as TAR@FAR.

[0182] The experimental results are shown in Tables 1 and 2 below. This embodiment outperforms existing methods in different compatible scenarios, not only alleviating the degree of loss of the new model's discriminative power, but also improving the compatibility performance between the new and old model retrieval. The experimental results confirm the effectiveness of this embodiment.

[0183] Table 1

[0184]

[0185] Specifically, this embodiment compares the performance of the Darwin Model Upgrade Paradigm (DMU) and the baseline model (BCT) under different compatibility scenarios. Oracle is a pure model without compatibility constraints, and the test set is the landmark retrieval dataset (Google Landmark, ROXford, RPAris). Table 1 simulates four different compatibility scenarios: (1) 30% data->100% data means that the old model is trained using 30% of the data, and the new model is trained using 100% of the data for compatibility training; (2) 30% data->70% data means that the new model is trained using 70% of the data (which does not overlap with the old training dataset but shares the same categories); (3) 30% class->100% class means that the old model is trained using 30% of the categories, and the new model is trained using all categories for compatibility training; (4) resnet50->resnet101 means that the old model uses ResNet50 as the backbone network and is trained using 30% of the data, while the new model uses ResNet101 as the backbone network and is trained using 100% of the data for compatibility training.

[0186] Table 2

[0187]

[0188] Specifically, in the test set of the face recognition dataset, the Darwin model upgrade paradigm proposed in this embodiment can alleviate the degree of loss of the new model's discriminative power, while improving the compatibility performance between the new and old model retrieval.

[0189] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0190] Based on the same inventive concept, this application also provides a feature extraction model processing apparatus for implementing the feature extraction model processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more feature extraction model processing apparatus embodiments provided below can be found in the limitations of the feature extraction model processing method described above, and will not be repeated here.

[0191] In one embodiment, such as Figure 11 As shown, a feature extraction model processing device 1100 is provided, including: 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 update module 1110, wherein:

[0192] The sample image acquisition module 1102 is used to acquire sample images and their inherited parameters; the inherited parameters are determined based on the feature discrimination power reflected by the first image feature of the sample image; the first image feature is extracted from the sample image by a trained historical feature extraction model;

[0193] The second image feature extraction module 1104 is used to extract second image features from the sample image through the feature extraction model to be trained.

[0194] The model compatibility loss acquisition module 1106 is used to obtain the model compatibility loss by performing a first classification based on the second image features of the historical image classification model jointly trained with the historical feature extraction model, and by adjusting the classification loss of the first classification through inherited parameters.

[0195] The second classification loss acquisition module 1108 is used to perform a second classification based on the second image features through the image classification model to be trained, and obtain the classification loss of the second classification.

[0196] The model update module 1110 is used to update the feature extraction model and the image classification model to be trained based on model compatibility loss and second classification loss, and then continue joint training until training is completed to obtain the trained feature extraction model.

[0197] In one embodiment, the system further 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 first image features from the sample image through a historical feature extraction model; the category distribution acquisition module is used to classify the first image features through a historical image classification model to obtain the image category distribution; and the inheritance parameter determination module is used to determine the inheritance parameters of the sample image based on the image category distribution.

[0198] In one embodiment, the inheritance parameter determination module includes a cross-entropy determination module, a normalization processing module, and a discrimination parameter processing module; wherein: the cross-entropy determination module is used to determine the cross-entropy of the category distribution based on the image category distribution; the normalization processing module is used to normalize the cross-entropy of the category distribution to obtain a discrimination parameter for measuring the feature discrimination power of the first image feature; and the discrimination parameter processing module is used to determine the inheritance parameters of the sample image based on the discrimination parameter.

[0199] In one embodiment, the inheritance parameters include inheritance weights that are positively correlated with feature discriminative power; the model compatibility loss acquisition module 1106 is also used to obtain the classification loss of the first category; the classification loss of the first category is weighted according to the inheritance weights to obtain the model compatibility loss.

[0200] In one embodiment, the model compatibility loss acquisition module 1106 includes a category label determination module, a model parameter determination module, and a first classification loss determination module; wherein: the category label determination module is used to determine the category label of the sample image; the model parameter determination module is used to determine the historical classification model parameters of the historical image classification model for the category to which the sample image belongs, based on the category label; and the first classification loss determination module is used to obtain the classification loss of the first classification based on the angular interval between the second image features and the historical classification model parameters.

[0201] In one embodiment, the second classification loss acquisition module 1108 is further configured to perform a second classification based on the second image features using the image classification model to be trained, and obtain the 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.

[0202] In one embodiment, the system further 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 features through the feature evolution model to be trained, to obtain the mapped features of the first image features; the third classification module is used to perform third classification based on the mapped features through the image classification model to be trained, to obtain the classification loss of the third classification; the model update module 1110 is also used to update the feature extraction model to be trained, the image classification model to be trained, and the feature evolution model to be trained based on the model compatibility loss, the classification loss of the second classification, and the classification loss of the third classification, and then continue joint training until training is completed, to obtain the trained feature extraction model.

[0203] In one embodiment, the model update module 1110 is further configured to obtain the target loss for joint training based on the model compatibility loss, the classification loss of the second classification, and the classification loss of the third classification; and to continue joint training after updating the feature extraction model, the image classification model, and the feature evolution model to be trained based on the target loss.

[0204] In one embodiment, the system further 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 query image feature library associated with the historical feature extraction model; the query image feature library includes the query image features of each query image; the query image features are extracted by the historical feature extraction model for each query image; the feature library feature mapping module is used to perform feature mapping on each query image feature using the trained feature evolution model to obtain the query image mapping features of each query image; the feature library update module is used to update the query image feature library based on the query image mapping features to obtain the query image feature library associated with the trained feature extraction model.

[0205] Based on the same inventive concept, this application also provides a feature extraction apparatus for implementing the feature extraction method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more feature extraction apparatus embodiments provided below can be found in the limitations of the feature extraction method described above, and will not be repeated here.

[0206] In one embodiment, such as Figure 12 As shown, a feature extraction device 1200 is provided, including: a target image acquisition module 1202 and a feature extraction processing module 1204, wherein:

[0207] Target image acquisition module 1202 is used to acquire target images;

[0208] The feature extraction processing module 1204 is used to extract features from the target image through a feature extraction model to obtain the target image features.

[0209] The feature extraction model is obtained by updating the feature extraction model and the image classification model to be trained based on model compatibility loss and the classification loss of the second classification, and then continuing to train them until training is complete. The model compatibility loss is obtained by training a historical image classification model jointly with a historically trained feature extraction model, performing a first classification based on the second image features, and adjusting the classification loss of the first classification through inheritance parameters. The second image features are extracted from the sample images by the feature extraction model to be trained. The inheritance parameters are determined based on the feature discrimination power reflected by the first image features of the sample images. The first image features are extracted from the sample images by the historical feature extraction model. The classification loss of the second classification is obtained by performing a second classification based on the second image features by the image classification model to be trained.

[0210] In one embodiment, the system further 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 of the target image features in the feature library of the image to be queried to obtain the query image features that match the target image features; and the query result determination module is used to determine the image query result for the target image based on the images associated with the query image features.

[0211] The aforementioned feature extraction model processing device and each module in the feature extraction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0212] In one embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows: Figure 13As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores various model data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a feature extraction model processing method or at least one of the feature extraction methods.

[0213] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0214] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0215] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0216] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0217] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0218] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this 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), magnetic 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0219] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0220] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A feature extraction model processing method, characterized in that, The method includes: Obtain a sample image and its inherited parameters; the inherited parameters are determined based on the feature discrimination power reflected by the first image feature of the sample image; the first image feature is extracted from the sample image by a trained historical feature extraction model; The second image features are extracted from the sample image using the feature extraction model to be trained; The historical image classification model, jointly trained with the historical feature extraction model, performs a first classification based on the second image features, and adjusts the classification loss of the first classification using the inheritance parameters to obtain the model compatibility loss. The image classification model to be trained performs a second classification based on the second image features, and the classification loss of the second classification is obtained. Based on the model compatibility loss and the classification loss of the second classification, the feature extraction model and the image classification model to be trained are updated and then jointly trained until training is completed, thus obtaining the trained feature extraction model.

2. The method according to claim 1, characterized in that, The method further includes: The first image feature is extracted from the sample image using the historical feature extraction model. The first image features are classified using the historical image classification model to obtain the image category distribution; The inheritance parameters of the sample images are determined based on the image category distribution.

3. The method according to claim 2, characterized in that, The step of determining the inheritance parameters of the sample images based on the image category distribution includes: Determine the category distribution cross-entropy based on the image category distribution; The cross-entropy of the category distribution is normalized to obtain the discriminative power parameter used to measure the discriminative power of the first image features; The inheritance parameters of the sample image are determined based on the discriminative power parameters.

4. The method according to claim 1, characterized in that, The inheritance parameters include inheritance weights that are positively correlated with the feature discriminative power; adjusting the classification loss of the first classification using the inheritance parameters to obtain the model compatibility loss includes: Obtain the classification loss for the first category; The classification loss of the first category is weighted according to the inheritance weights to obtain the model compatibility loss.

5. The method according to claim 4, characterized in that, The step of obtaining the classification loss of the first category includes: Determine the category label of the sample image; Based on the category label, determine the historical classification model parameters of the historical image classification model for the category to which the sample image belongs; The classification loss of the first classification is obtained based on the angular interval between the second image features and the parameters of the historical classification model.

6. The method according to claim 1, characterized in that, The step of performing a second classification based on the second image features using the image classification model to be trained, and obtaining the classification loss for the second classification, includes: The image classification model to be trained performs a second classification based on the second image features to obtain the classification result of the second classification. 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.

7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: The first image features are mapped by the feature evolution model to be trained, and the mapped features of the first image features are obtained. The image classification model to be trained performs a third classification based on the mapping features, and the classification loss of the third classification is obtained. 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, the image classification model, and the feature evolution model to be trained are updated respectively and then jointly trained until training is completed, thus obtaining the trained feature extraction model.

8. The method according to claim 7, characterized in that, The process involves updating the feature extraction model, image classification model, and feature evolution model based on the model compatibility loss, the classification loss of the second classification, and the classification loss of the third classification, followed by joint training. Based on the model compatibility loss, the classification loss of the second category, and the classification loss of the third category, the target loss for joint training is obtained; After updating the feature extraction model, the image classification model, and the feature evolution model to be trained based on the target loss, joint training is then performed.

9. The method according to claim 7, characterized in that, The method further includes: A query image feature library is determined and associated with the historical feature extraction model; the query image feature library includes the query image features of each query image; the query image features are extracted by the historical feature extraction model for each query image; The trained feature evolution model is used to perform feature mapping on each of the query image features to obtain the query image mapping features for each query image. The query image feature library is updated based on the mapping features of each of the query images to obtain the query image feature library associated with the trained feature extraction model.

10. A feature extraction method, characterized in that, The method includes: Acquire the target image; The target image features are obtained by extracting features from the target image using a feature extraction model. The feature extraction model is obtained by updating the feature extraction model and the image classification model to be trained based on model compatibility loss and the classification loss of the second classification, and then continuing to train them together until training is complete. The model compatibility loss is obtained by training a historical image classification model jointly with a historically trained feature extraction model, performing a first classification based on the second image features, and adjusting the classification loss of the first classification through inheritance parameters. The second image features are extracted from the sample images by the feature extraction model to be trained. The inheritance parameters are determined based on the feature discrimination power reflected by the first image features of the sample images. The first image features are extracted from the sample images by the historical feature extraction model. The classification loss of the second classification is obtained by the image classification model to be trained performing a second classification based on the second image features.

11. The method according to claim 10, characterized in that, The method further includes: Determine the image feature library to be queried; The target image features are matched in the query image feature library to obtain query image features that match the target image features; Based on the images associated with the features of the image to be queried, determine the image query results for the target image.

12. A feature extraction model processing device, characterized in that, The device includes: The sample image acquisition module is used to acquire sample images and their inherited parameters; the inherited parameters are determined based on the feature discrimination power reflected by the first image feature of the sample image; the first image feature is extracted from the sample image by a trained historical feature extraction model; The second image feature extraction module is used to extract second image features from the sample image through the feature extraction model to be trained; The model compatibility loss acquisition module is used to perform a first classification based on the second image features using a historical image classification model jointly trained with the historical feature extraction model, and to adjust the classification loss of the first classification using the inheritance parameters to obtain the model compatibility loss. The second classification loss acquisition module is used to perform a second classification based on the second image features using the image classification model to be trained, and obtain the classification loss of the second classification. The model update module is used to update the feature extraction model 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 joint training until training is completed to obtain the trained feature extraction model.

13. A feature extraction device, characterized in that, The device includes: The target image acquisition module is used to acquire the target image; The feature extraction processing module is used to extract features from the target image using a feature extraction model to obtain the target image features. The feature extraction model is obtained by updating the feature extraction model and the image classification model to be trained based on model compatibility loss and the classification loss of the second classification, and then continuing to train them together until training is complete. The model compatibility loss is obtained by training a historical image classification model jointly with a historically trained feature extraction model, performing a first classification based on the second image features, and adjusting the classification loss of the first classification through inheritance parameters. The second image features are extracted from the sample images by the feature extraction model to be trained. The inheritance parameters are determined based on the feature discrimination power reflected by the first image features of the sample images. The first image features are extracted from the sample images by the historical feature extraction model. The classification loss of the second classification is obtained by the image classification model to be trained performing a second classification based on the second image features.

14. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.

16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Model training method, electronic equipment and computer readable storage medium

    CN114005015A

  • Image processing and image classification method and device, equipment and storage medium

    CN114693993A