Parameter adjustment method and device of image processing model, equipment and medium

By acquiring and reconstructing features in the image processing model, calculating feature differences, and optimizing parameters, the problems of low learning efficiency and difficult to process complex backgrounds in the prior art are solved, and higher prediction accuracy and stability are achieved.

CN119206393AInactive Publication Date: 2024-12-27XIAN JIAOTONG LIVERPOOL UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411221591.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing image processing models are computationally cost-effective in learning with few samples, over-reliance on model training period tasks, difficult to process complex backgrounds or high noise data, and inefficient, especially when classification categories increase.

Method used

By obtaining the optimized sample set, extracting the features of the first and second sample groups, calculating feature similarity, reconstructing the first image features, and calculating feature differences based on the similarity and labeling information, optimizing model parameters to improve the prediction accuracy of the model and stability.

Benefits of technology

It improves the prediction accuracy and stability of the model in a small sample environment, enhances the processing ability of complex backgrounds and high noise data, and improves the overall classification accuracy and the overall performance ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206393A_ABST
    Figure CN119206393A_ABST
Patent Text Reader

Abstract

The invention discloses a parameter adjustment method and device of an image processing model, equipment and a medium. The method comprises the following steps: acquiring an optimized sample set, wherein the optimized sample set comprises a first sample group and a second sample group; performing feature extraction on each sample in the first sample group to obtain at least one first image feature; performing feature extraction on each sample in the second sample group to obtain at least one second image feature; calculating the similarity between each first image feature and each second image feature; for each first image feature, reconstructing the first image feature to obtain a reconstructed first image feature; calculating the same difference between the first image features of the same annotation information and the corresponding reconstructed first image features, and the different differences between the first image features of different annotation information and the corresponding reconstructed first image features; and optimizing and adjusting parameters of a pre-trained image processing model. According to the embodiment of the invention, the model prediction accuracy is improved by enhancing features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, equipment and medium for adjusting parameters of an image processing model. Background Art

[0002] As deep learning has made significant progress in the field of image processing, its development mostly relies on a large amount of manually labeled data, which limits the scope of application of the model. At present, the research focus in this direction is on few-sample learning.

[0003] Currently, traditional few-shot learning methods are mainly implemented through methods under the meta-learning framework or by learning examples between global embeddings.

[0004] However, the above methods have high computational costs and are overly dependent on the tasks that the model has seen during training. They are too dependent on the embedding space and have difficulty handling complex backgrounds or high-noise data. As the number of classification categories increases, their efficiency decreases. Summary of the invention

[0005] The present invention provides a method, device, equipment and medium for adjusting parameters of an image processing model. The embodiments of the present invention improve the prediction accuracy of the model by enhancing features.

[0006] In a first aspect, an embodiment of the present invention provides a method for adjusting parameters of an image processing model, the method comprising:

[0007] Acquire an optimized sample set, where the optimized sample set includes a first sample group and a second sample group;

[0008] Extracting features from each sample in the first sample group to obtain at least one first image feature;

[0009] Extracting features from each sample in the second sample group to obtain at least one second image feature;

[0010] Calculating the similarity between each first image feature and each second image feature;

[0011] For each first image feature, reconstruct the first image feature according to the similarity between each second image feature and the first image feature to obtain a reconstructed first image feature;

[0012] Calculate, according to each reconstructed first image feature, the annotation information corresponding to each reconstructed first image feature, each first image feature and the annotation information corresponding to each first image feature, the same difference between the first image feature with the same annotation information and the corresponding reconstructed first image feature, and the different difference between the first image feature with different annotation information and the corresponding reconstructed first image feature;

[0013] According to the same differences and different differences of the first image features, the parameters of the pre-trained image processing model are optimized and adjusted.

[0014] In a second aspect, an embodiment of the present invention further provides a parameter adjustment device for an image processing model, the device comprising:

[0015] An optimized sample set acquisition module is used to acquire an optimized sample set, where the optimized sample set includes a first sample group and a second sample group;

[0016] A first sample group feature extraction module, used to extract features from each sample in the first sample group to obtain at least one first image feature;

[0017] A second sample group feature extraction module, used to extract features from each sample in the second sample group to obtain at least one second image feature;

[0018] A similarity calculation module, used to calculate the similarity between each first image feature and each second image feature;

[0019] An image feature reconstruction module, used for reconstructing the first image feature according to the similarity between each second image feature and the first image feature for each first image feature, so as to obtain a reconstructed first image feature;

[0020] The feature difference calculation module is used to calculate the same differences between the first image features with the same annotation information and the corresponding reconstructed first image features, and the different differences between the first image features with different annotation information and the corresponding reconstructed first image features, based on each reconstructed first image feature, the annotation information corresponding to each reconstructed first image feature, each first image feature and the annotation information corresponding to each first image feature.

[0021] The model parameter optimization module is used to optimize and adjust the parameters of the pre-trained image processing model according to the same differences and different differences of the first image features.

[0022] In a third aspect, an embodiment of the present invention further provides a parameter adjustment device for an image processing model, the parameter adjustment device for an image processing model comprising:

[0023] at least one processor; and

[0024] a memory communicatively connected to at least one processor; wherein,

[0025] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the parameter adjustment method of the image processing model according to any embodiment of the present invention.

[0026] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the parameter adjustment method of the image processing model of any embodiment of the present invention when executed.

[0027] The technical solution of the embodiment of the present invention reconstructs the first image feature by using similar image features extracted from samples in the second sample group, and based on a large number of reconstructed first image features and a large number of original first image features, selects the same differences between the reconstructed and unreconstructed first image features with the same annotations, and selects the different differences between the reconstructed and unreconstructed first image features with different annotations, and optimizes and adjusts the model again to improve the prediction accuracy of the model, calculates the similarity between the first image feature and the second image feature, and selects the second image feature based on the similarity to reconstruct the first image feature, so that the reconstructed first image feature contains the content of the similar second image feature, thereby making the content of the reconstructed first image feature richer and enhancing the representativeness of the reconstructed first image feature, and training the model in this way can enhance the prediction accuracy of the model; by comparing the reconstructed first image feature with its corresponding annotation information, the difference between the reconstructed first image feature and the original first image feature is calculated. The same differences between them are calculated. At the same time, for different annotations, the different differences between the first image features under different annotation information and the reconstructed first image features are calculated. The feature differences of the same annotation information mainly reflect the ability of the model in identifying features of the same category, while the feature differences of different annotation information reveal the performance of the model in distinguishing different categories. By calculating these differences separately, more accurate indicators can be obtained to reflect the discrimination performance of the model. According to the calculated same differences and different differences, the parameters of the pre-trained image processing model are optimized and adjusted. The model can better distinguish samples of different categories and more accurately identify samples of the same category, so that the model can make more accurate judgments when facing samples of the same category and different categories, thereby improving the accuracy of the overall classification. Through the precise calculation of the differences and the corresponding parameter adjustments, the overall stability and reliability of the model can be improved while improving the accuracy of the model, thereby enhancing the performance of the model in practical applications.

[0028] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0030] Figure 1a is a flow chart of a parameter adjustment method of an image processing model provided according to Embodiment 1 of the present invention;

[0031] Figure 1b is a schematic diagram of a parameter adjustment method of an image processing model provided according to Embodiment 2 of the present invention;

[0032] Figure 2a is a flow chart of a parameter adjustment method of an image processing model provided according to Embodiment 2 of the present invention;

[0033] Figure 2b is a framework diagram of a parameter adjustment method of an image processing model provided according to Embodiment 2 of the present invention;

[0034] Figure 3 is a structural schematic diagram of a parameter adjustment device for an image processing model provided according to Embodiment 3 of the present invention;

[0035] Figure 4 It is a structural schematic diagram of an electronic device for implementing the parameter adjustment method of the image processing model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0038] In the technical solution of the embodiment of the present invention, the acquisition, storage and application of the types of components involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0039] Embodiment 1

[0040] Figure 1a A flowchart of a method for adjusting parameters of an image processing model provided in Embodiment 1 of the present invention. The embodiment of the present invention is applicable to the parameter adjustment of an image processing model, and the method can be performed by a parameter adjustment device of an image processing model, and the parameter adjustment device of the image processing model can be implemented in the form of hardware and / or software, and the parameter adjustment device of the image processing model can be configured in a parameter adjustment device of the image processing model.

[0041] See also Figure 1a The parameter adjustment method of the image processing model shown includes:

[0042] S101: Obtain an optimized sample set, where the optimized sample set includes a first sample group and a second sample group.

[0043] The optimized sample set may refer to a sample set for re-optimizing the image processing model. The image processing model is a pre-trained model. The optimized sample set includes multiple samples, each sample includes a sample image and annotation information, and the sample images and annotation information of different samples are different. The annotation information corresponds to the function or application scenario of the image processing model. The purpose of the optimized sample set is to provide diverse samples to help the model recognize features of different categories.

[0044] Exemplarily, in a classification model for identifying various types of animals, the optimized sample set may refer to image data of various types of animals and annotation information corresponding to each image data, such as pictures of categories such as cats, dogs and birds, wherein the corresponding annotation information refers to the category label corresponding to each picture, such as labels such as "cat", "dog" and "bird"; in an image retrieval model for retrieving a certain type of bird, the optimized sample set may refer to image data of various types of birds and annotation information corresponding to each image data, such as pictures of sparrows, swallows and eagles, wherein the corresponding annotation information refers to the category label corresponding to each picture, such as labels such as "sparrow", "swallow" and "eagle"; in a classification model for facial emotion recognition, the optimized sample set may refer to video sequences or pictures of various human emotions, and annotation information corresponding to the video sequences or pictures, wherein a video sequence refers to continuous static image frames, such as video sequences or picture data of emotion categories such as happiness, sadness and anger, wherein the corresponding annotation information refers to the category expression corresponding to each picture, such as labels such as "happy", "sad", and "angry".

[0045] The optimized sample set can be divided into two groups, one is a first sample group and the other is a second sample group. The first sample group is used as a reference sample for training the model, and the second sample group is used to assist the reconstruction of the samples in the first sample group. The optimized sample set can be divided into two groups randomly or by selecting a preset strategy according to needs.

[0046] The first sample group refers to a subset of the optimized sample set, which is new data or task instances that require the model to make predictions or decisions. The role of the first sample group is to provide a benchmark that enables the model to better understand and optimize feature extraction and classification strategies when processing specific categories.

[0047] Exemplarily, the first sample group may refer to a query set, which includes a small amount of image data of various categories, the image data has label data, and the query set randomly selects a small number of samples from each category. The query set contains samples that the model needs to classify, and the query set serves as the main target for the model to make predictions. Therefore, the first sample group may select the query set as the first sample group, which helps to directly process these samples to be classified during feature extraction and optimization, so as to improve the classification accuracy of the model on these samples.

[0048] The second sample group refers to another subset of the optimized sample set, which is a data set or knowledge that helps the model understand and learn new tasks. The role of the second sample group is to provide the model with feature data that is different from the first sample group. The model can identify areas that need to be optimized, thereby improving its ability to handle new categories or unseen samples.

[0049] Exemplarily, the second sample group may refer to a support set, including a small amount of image data of various categories, the image data has label data, and the support set randomly selects a small number of samples from each category. The query set and the support set have the same number of categories of samples, but the samples they constitute are different. The support set contains samples with known category labels, and the role of the support set is to provide a reference standard for the model. Therefore, the second sample group can select the support set as the second sample group, and the model can use this known information to calculate the similarity with the query set samples, so as to better reconstruct and optimize the features of the query set samples, and ultimately improve the performance of the classification model.

[0050] The first sample group represents the core sample set in the optimized sample set, and the second sample group represents the auxiliary set samples in the optimized sample set, providing a comparative reference for feature extraction and reconstruction of the first sample group.

[0051] Optionally, before obtaining the optimized sample set, a training sample set is obtained; the training sample set includes at least one training image and annotation information corresponding to each training image; the value range of the annotation information in the training sample set is the same as the value range of the annotation information in the optimized sample set; the image processing model is trained using the training sample set to obtain a pre-trained image processing model.

[0052] The pre-trained image processing model may refer to a model with image processing functions. The training sample set and the optimized sample set are independent of each other and may be the same or different. The value ranges of the annotation information of the two sets are the same. In a specific example, the category ranges of the annotation information are the same. For the image processing model for image classification, the categories in the annotation information of the two sample sets belong to the same category range.

[0053] The image processing model is trained using a training sample set to obtain a pre-trained image processing model, which means that before the model is optimized, a specific training sample set is needed to perform preliminary training on the model, and the obtained model has certain image processing capabilities.

[0054] By pre-training the model before obtaining the optimized sample set, the model can master certain classification capabilities and feature extraction techniques before facing the optimized samples; the pre-trained model has established basic image processing capabilities. For example, the image processing model used for classification has classification capabilities, especially the generalization capability within the same category range. During further optimization, the embodiment of the present invention is optimized based on the trained model. Since the training sample set and the optimized sample set are consistent in category range, the model already has the feature extraction capability of the relevant category in the initial stage, ensuring that the goals of the subsequent optimization model are consistent with the pre-trained image processing model.

[0055] S102: Extract features from each sample in the first sample group to obtain at least one first image feature.

[0056] The first image feature refers to the feature extracted from each sample image of the first sample group in the optimized sample set by a pre-trained model. The first image feature provides the main information and features of the first sample group image, which are used by the model to understand and classify the image content. For example, in a classification task, the classification goal is to distinguish the categories of cats, dogs and birds. The first image feature refers to the features of cats, dogs and birds, and the extracted first image feature can be a vector.

[0057] Among them, performing feature extraction on each sample in the first sample group to obtain at least one first image feature means performing feature extraction on each sample in the first sample group through a feature extraction network to obtain corresponding image features.

[0058] In an example, the feature extraction network may refer to a convolutional neural network, which performs feature extraction on a sample in the first sample group to obtain a first image feature, and uses a pre-trained convolutional neural network to process each image sample data in each category in the first sample group to obtain a corresponding query image feature, wherein the first image feature may refer to the query image feature.

[0059] By extracting features from each sample in the first sample group to obtain at least one first image feature, a large amount of information in the original image is compressed into a multi-dimensional feature vector, which not only reduces the computational complexity, but also retains the main information of the image, making it easier to process later; ensuring that the visual features extracted from each category have sufficient information and discrimination, so that the model can effectively distinguish different categories in the subsequent learning and recognition process, thereby improving the overall recognition accuracy; the extracted image features provide a basis for calculating the similarity between different samples in subsequent steps.

[0060] S103: Extract features from each sample in the second sample group to obtain at least one second image feature.

[0061] The second image feature refers to the feature extracted from each sample image of the second sample group in the optimized sample set by a pre-trained model. The role of the second image feature is to provide the main features and information of the second sample group image, and these features are used by the model to understand and classify the image content. For example, in a classification task, the classification goal is to distinguish the categories of cats, dogs and birds. The second image feature refers to the features of cats, dogs and birds. Although the image categories extracted by the second image feature are the same, the extracted images are not the same images.

[0062] Among them, the similarities between the first image feature and the second image feature are that both are extracted from image data, and both obtain their respective image features through a feature extraction step; both are used to calculate the similarity between image features, and the image categories extracted by the first image feature and the second image feature are the same, therefore, there is at least one second image feature that is similar to the first image feature.

[0063] The difference between the first image feature and the second image feature is that the first image feature comes from the first sample group, and the second image feature comes from the second sample group. Although the image categories in the two sample groups are the same, they are not exactly the same pictures, so the two image features are not exactly the same. In this embodiment, the first image feature focuses on being reconstructed, and its reconstructed result is used to calculate the difference and guide the parameter optimization of the model. The second image feature focuses on being a benchmark for the first image feature and is used to calculate the similarity. The first image feature is reconstructed in reverse through multiple similarities.

[0064] In one example, the feature extraction network may refer to a convolutional neural network, which performs feature extraction on a sample in the second sample group to obtain a second image feature, and uses a pre-trained convolutional neural network to process each image sample data in each category in the second sample group to obtain corresponding supporting image features, wherein the second image feature may refer to a supporting image feature.

[0065] By extracting features from each sample in the second sample group to obtain at least one second image feature, the model can obtain more feature information. These features provide richer reference data for subsequent similarity calculations, feature reconstruction and other operations; extracting image features from the second sample group helps to form feature comparisons across sample groups, which can help the model better identify and distinguish similarities and differences between categories, thereby improving the discrimination ability in classification tasks; feature extraction from the second sample group provides necessary input for subsequent feature reconstruction, and by reconstructing and optimizing the first image features based on the second features, the model can perform more effective feature optimization, ultimately improving the performance of the image processing model.

[0066] S104: Calculate the similarity between each first image feature and each second image feature.

[0067] Here, similarity refers to the degree of similarity between the first image feature and the second image feature. The role of similarity is to measure the feature differences between different sample groups, so as to help the model to make accurate adjustments based on these differences during feature reconstruction and parameter optimization; by calculating similarity, the model can capture the subtle differences between different categories, thereby improving the accuracy of classification and the generalization ability of the model. Exemplarily, similarity can refer to the alignment score.

[0068] Calculating the similarity between the first image feature and each second image feature refers to calculating the similarity between the first image feature and the second image feature through a formula.

[0069] In one example, the purpose of calculating the similarity between the first image feature and each second image feature is to find a set of combinations of all second image features that is closest to the first image feature.

[0070] Exemplarily, the following formula may be used to calculate the similarity between the first image feature and the second image feature:

[0071]

[0072] In the formula, γ i is the similarity between the i-th second image feature and the first image feature, v q is the first image feature, is the i-th second image feature, and σ is the Gaussian width.

[0073] When the first image feature and the second image feature completely match, the similarity reaches a maximum value and decreases as the square of the first image feature and the second image feature decreases. The similarity determines the degree to which a second image feature can contribute to the reconstruction of the first image feature.

[0074] By calculating the similarity between each first image feature and each second image feature, the model can more accurately identify and distinguish samples with similar or different features, which helps to optimize feature matching and enables the model to more accurately judge the correlation between samples when classifying; the similarity calculation provides a key basis for subsequent feature reconstruction. By evaluating the similarity between image features, the model can selectively fuse and reconstruct features to generate more representative image features; by calculating the similarity, the model can effectively distinguish subtle differences between categories; this mechanism improves the model's ability to discriminate when processing complex data, enabling it to more accurately identify samples of different categories, thereby improving the accuracy and stability of classification.

[0075] S105 . For each first image feature, reconstruct the first image feature according to the similarity between each second image feature and the first image feature to obtain a reconstructed first image feature.

[0076] Among them, for each first image feature, the first image feature is reconstructed according to the similarity between each second image feature and the first image feature. The reconstructed first image feature means that based on the first image feature, according to the similarity between the second image feature and the first image feature, similar second image features are selected to adjust and reconstruct the first image feature so as to generate a more representative image feature. This step depends on the similarity calculated above, and the first image feature is improved and optimized through the information of the second image feature to make it more in line with the model's requirements for category discrimination.

[0077] In one example, the first image feature is compared with all the second image features and then reconstructed using the normalized distance as the attention weight. When the width parameter of the Gaussian is properly chosen, the distance between the support sample and the query will decrease rapidly.

[0078] Exemplarily, the reconstructed first image feature is calculated by the following formula:

[0079]

[0080] In the formula, is the first image feature reconstructed from the first image feature, is the i-th second image feature in the j-th category.

[0081] In a specific example, according to the above reconstruction process, the first image feature is first compared with all the second image features, and then the first image feature is reconstructed using the normalized distance as the attention weight. When the width parameter of the Gaussian is appropriately selected, the distance between the first image feature and the second image feature will decrease rapidly. Figure 1b This is a schematic diagram of a parameter adjustment method for an image processing model provided according to Embodiment 2 of the present invention. The data flow of the schematic diagram includes: first, comparing the first image feature with the second image feature, second, obtaining the distance matrix of each second image feature, thereby generating an attention weight, and then reconstructing the first image feature, wherein the second image feature with the largest contribution is selected in the distance matrix of each second image feature, and finally, obtaining an alignment score.

[0082] By reconstructing the first image features according to the similarity between each second image feature and the first image feature to obtain the reconstructed first image features, a richer and more accurate feature expression can be generated. This reconstruction process can effectively capture the potential correlation between samples and improve the model's ability to express image features. The reconstructed first image features not only retain the key information of the original features, but also introduce additional information through the fusion of similar features, so that the model can better cope with the diversity in the data set and improve its generalization performance in different scenarios. Through feature reconstruction, noise and irrelevant information can be eliminated, so that the reconstructed first image features are more focused on the key features required for classification.

[0083] S106. Calculate the same differences between first image features with the same annotation information and the corresponding reconstructed first image features, and the different differences between first image features with different annotation information and the corresponding reconstructed first image features, based on each reconstructed first image feature, the annotation information corresponding to each first image feature, and each first image feature and the annotation information corresponding to each first image feature.

[0084] Among them, annotation information refers to the category label, attribute information or other related metadata assigned to image data in image processing or machine learning tasks. The role of annotation information is to describe the content contained in the image so that the model can be trained and reasoned based on this information. For example, in an image classification task, if the model needs to distinguish between cats and dogs, the annotation information will assign a category label to each image, such as "cat" or "dog". The model learns how to identify cats or dogs in the image based on these labels.

[0085] The same difference refers to the difference between the original first image feature and its reconstructed first image feature in samples with the same annotation information. Since these samples have the same annotation information, the difference between the original feature and the reconstructed feature should be small. The role of the same difference is that by calculating the same difference of samples with the same annotation information, the model can evaluate whether the key attributes of the features within the category are retained during the reconstruction process. If the same difference is too large, it means that the model may not effectively retain the consistency of features in the same category, and the reconstruction strategy or parameters of the model need to be further adjusted; the size of the same difference can be used to adjust the classification boundary of the model, so that the samples of the same category are more closely distributed in the feature space, which helps to improve the classification accuracy of the model.

[0086] The difference is the difference between the original first image feature and its reconstructed first image feature in samples with different annotation information. Since these samples have different annotation information, ideally, the difference between the original feature and the reconstructed feature should be large. The role of the difference is that by calculating the difference of samples with different annotation information, the model can evaluate whether it effectively distinguishes different categories of features during feature reconstruction. If the difference is too small, it means that the model may not be able to fully distance the features of different categories; the difference can be used to guide the model to adjust the structure of the feature space so that samples of different categories are more separated in the feature space, thereby improving the model's discrimination ability.

[0087] By calculating the same differences between image features with the same annotation information, the model can better identify images of the same category and ensure that the features of these images remain consistent during the reconstruction process, which helps to improve the accuracy of the model; by calculating the different differences between image features with different annotation information, the model can more effectively separate image features of different categories, thereby enhancing the ability to distinguish between different categories, which helps the model to accurately define category boundaries when facing complex classification tasks, thereby reducing the risk of misclassification; based on these differences, the model can further adjust and optimize its parameters to maximize the differences between different categories while maintaining consistency in the same category, ensuring that the model not only performs well on the training data, but also has good generalization capabilities.

[0088] S107: Optimize and adjust the parameters of the pre-trained image processing model according to the same differences and different differences of the first image features.

[0089] Among them, optimizing and adjusting the parameters of the pre-trained image processing model according to the same differences and different differences of each first image feature refers to calculating the difference between the first image feature with the same annotation information (i.e., the same category) and its reconstructed feature and calculating the difference between the first image feature with different annotation information (i.e., different categories) and its reconstructed feature, and optimizing and adjusting the parameters based on the goals of minimizing the same differences and maximizing the different differences. By minimizing the same differences, the model can try to keep the image features of the same category from changing too much during the reconstruction process, thereby ensuring that the features of the samples of the same category are more centralized and consistent, and can improve the model's ability to capture the intrinsic similarity of the samples of the same category; by maximizing the different differences, the model can increase the differences between samples of different categories during the reconstruction process, thereby ensuring that the features of samples of different categories are more separated and obvious, and can improve the model's ability to identify the differences between different categories. Based on the above content, the pre-trained image processing model is optimized and adjusted, and the model can maintain consistency within the same category of samples, while maintaining sufficient distinction between different categories, thereby improving the model's discrimination ability and overall performance.

[0090] By optimizing and adjusting the parameters of the pre-trained image processing model according to the similarities and differences of the features of each first image, the model can more accurately maintain the feature consistency of images of the same category, thereby reducing the misclassification of samples of the same category. The model can distinguish different categories more effectively, thereby improving the clarity of classification boundaries between different categories and reducing cross-category misclassification; by comprehensively considering the similarities and differences, the model can show better robustness in various complex classification scenarios, that is, it can still maintain high accuracy when facing diverse data distributions and noise; it helps the model better adapt to unseen data, thereby improving the generalization ability of the model, making it more stable and accurate in practical applications outside of training data.

[0091] The technical solution of the embodiment of the present invention reconstructs the first image feature by using similar image features extracted from samples in the second sample group, and based on a large number of reconstructed first image features and a large number of original first image features, selects the same differences between the reconstructed and unreconstructed first image features with the same annotations, and selects the different differences between the reconstructed and unreconstructed first image features with different annotations, and optimizes and adjusts the model again to improve the prediction accuracy of the model, calculates the similarity between the first image feature and the second image feature, and selects the second image feature based on the similarity to reconstruct the first image feature, so that the reconstructed first image feature contains the content of the similar second image feature, thereby making the content of the reconstructed first image feature richer and enhancing the representativeness of the reconstructed first image feature, and training the model in this way can enhance the prediction accuracy of the model; by comparing the reconstructed first image feature with its corresponding annotation information, the difference between the reconstructed first image feature and the original first image feature is calculated. The same differences between them are calculated. At the same time, for different annotations, the different differences between the first image features under different annotation information and the reconstructed first image features are calculated. The feature differences of the same annotation information mainly reflect the ability of the model in identifying features of the same category, while the feature differences of different annotation information reveal the performance of the model in distinguishing different categories. By calculating these differences separately, more accurate indicators can be obtained to reflect the discrimination performance of the model. According to the calculated same differences and different differences, the parameters of the pre-trained image processing model are optimized and adjusted. The model can better distinguish samples of different categories and more accurately identify samples of the same category, so that the model can make more accurate judgments when facing samples of the same category and different categories, thereby improving the accuracy of the overall classification. Through the precise calculation of the differences and the corresponding parameter adjustments, the overall stability and reliability of the model can be improved while improving the accuracy of the model, thereby enhancing the performance of the model in practical applications.

[0092] Embodiment 2

[0093] Figure 2a A flow chart of a method for adjusting parameters of an image processing model provided in the second embodiment of the present invention. Based on the above embodiments, the embodiment of the present invention further refines the two processes of "calculating the similarity between each first image feature and each second image feature" and "optimizing and adjusting the parameters of the pre-trained image processing model according to the same differences and different differences of each first image feature". It should be noted that for the parts not described in detail in the embodiment of the present invention, reference can be made to the descriptions of other embodiments.

[0094] See also Figure 2a The parameter adjustment method of the image processing model shown includes:

[0095] S201: Obtain an optimized sample set, where the optimized sample set includes a first sample group and a second sample group.

[0096] S202: Extract features from each sample in the first sample group to obtain at least one first image feature.

[0097] S203: Extract features from each sample in the second sample group to obtain at least one second image feature.

[0098] S204: Calculate the similarity between each first image feature and each second image feature.

[0099] Optionally, before calculating the similarity between each first image feature and each second image feature, feature extraction is performed on the annotation information of each second image feature to obtain the second semantic feature of each first image feature; each first image feature and each second semantic feature is used as a node to construct a knowledge graph; each node in the knowledge graph is updated according to the association relationship and association weight between each node in the knowledge graph; and each first image feature is updated according to the nodes in the updated knowledge graph.

[0100] Among them, the second semantic feature refers to the semantic information extracted from the annotation information corresponding to the second image feature, and represents the expression of the content contained in these annotation information in the semantic space. The role of the second semantic feature is to help establish a more semantically related feature space before calculating the similarity between the first image feature and the second image feature. For example, assuming that the second image feature corresponds to annotation information such as "cat", "dog" and "bird", then the semantic features extracted from this annotation information are "cat", "dog" and "bird", which can help the system better understand the semantic content of the image.

[0101] The knowledge graph includes at least one node and edges connecting nodes. Nodes refer to the basic elements in the knowledge graph, representing image features or semantic features. A node can be regarded as a feature, image feature or semantic feature, and each node can be connected to other nodes with an associated relationship through edges. The role of nodes constitutes the basic structure of the knowledge graph. Through the association between nodes, image features and semantic features can be more deeply associated and understood. Structured information helps to reconstruct image features more accurately.

[0102] Knowledge graph refers to representing different entities and their relationships through nodes and edges. The role of knowledge graph helps the model to establish a more complex and semantically rich relationship network in the feature space, thereby improving the accuracy of feature reconstruction, and describing the relationship between the first image feature and the second semantic feature and its semantic association. Exemplarily, a large number of nodes are included in the knowledge graph, including a node A, which can represent the image feature of a cat; a node B, which can represent the image feature of a dog; a node C, which can represent the semantic feature of a cat; a node D, which can represent the semantic feature of a dog, wherein A, B, C and D nodes respectively have a large number of different nodes of the same type. Connected to node A can be a large number of semantic feature nodes associated with it, a large number of semantic feature nodes not associated with it; or a large number of image feature nodes, and node A can be connected to nodes of the same category as node A, or to nodes of different categories from node A. An association relationship refers to the connection relationship between two nodes in a knowledge graph. An association relationship is used to help describe the semantic connection between nodes and form a network structure in a knowledge graph.

[0103] The association weight refers to the importance or strength of the connection between two nodes in the knowledge graph. The role of the association weight determines which nodes have a greater impact on the final result when reconstructing the first image feature. By adjusting the association weight, the relationship between different features can be more accurately expressed, thereby improving the reconstruction effect. Exemplarily, when two nodes belong to the same category of image feature nodes, the association weight of the two nodes is strong; when the two nodes belong to different categories of image feature nodes, the association weight of the two nodes is weak; when a cat's image feature node is connected to the semantic feature node of "cat", the association weight of the two nodes is strong; when a cat's image feature node is connected to the semantic feature node of "dog", the association weight of the two nodes is weak.

[0104] Exemplarily, the association weight may refer to an edge weight, which is calculated by the following formula:

[0105] e(v q ,t;W in ,W out )=exp((W in v q )(Wout t))

[0106] In the formula, e is the weight of the edge, v q is the first image feature, t is the second semantic feature, W out and W in It is a linear transformation matrix used to adjust the information flow between nodes.

[0107] By extracting the annotation information of the second image feature before calculating the similarity and constructing a knowledge graph, the feature expression can be made richer and more semantic; by constructing a knowledge graph using each first image feature and each second semantic feature as a node, the model can better understand the relationship between these features; after updating the knowledge graph, each first image feature can make better use of the semantic information in the graph when reconstructing. This updated feature reconstruction method can better retain meaningful feature information and remove noise or irrelevant information, thereby improving the quality of reconstructed image features; the use and update of the knowledge graph enables the model to better capture the commonalities and differences between different samples when performing feature alignment and reconstruction; by constructing and updating the knowledge graph, the model can more intelligently select and weight the relationship between different features, thereby reducing the impact of redundant information.

[0108] In one example, based on the association relationship and association weight between the nodes of each first image feature and each second semantic feature in the knowledge graph, it is detected whether to merge each second semantic feature with each first image feature, and the nodes of each first image feature are updated.

[0109] Among them, according to the association relationship and association weight between the nodes of each first image feature and each second semantic feature in the knowledge graph, it is detected whether to merge each second semantic feature with each first image feature. Updating the nodes of each first image feature means judging whether it is necessary to merge the second semantic feature with the first image feature according to the strength of the relationship between the first image feature and the second semantic feature node connected to it in the knowledge graph. If the weight is high, it means that the two are closely related semantically and need to be merged; if the weight is low, it means that the two are not closely related semantically and do not need to be merged.

[0110] Exemplarily, node updating is achieved by the following formula:

[0111]

[0112] In the formula, represents the first image feature node in the updating process, t is the second semantic feature node connected to the nth node, It is the first image feature node that has been updated.

[0113] This update process will be repeated in the knowledge graph until all scheduled E rounds of iterations are completed. In each round of training, the nodes are updated according to the current knowledge graph structure. This update process will be repeated in the graph until all scheduled E rounds of iterations are completed. In this process, the results of each step will be used as input for the next step, gradually improving and strengthening the quality of query embedding. Through iterations, it is ensured that each update can be better adjusted and optimized, making the final model output more accurate and effective.

[0114] By fusing semantic information, image features can express image content more comprehensively. This enables the model to capture more key details and contextual information when processing complex images; the fused image features contain more semantic information, allowing the model to more accurately distinguish different categories or objects in classification or recognition tasks, thereby improving the overall performance of the model; by continuously updating nodes, the model can adapt to new data or tasks. This dynamicity ensures that the model can still maintain efficient feature extraction and recognition capabilities when facing changing inputs.

[0115] S205 . For each first image feature, reconstruct the first image feature according to the similarity between each second image feature and the first image feature to obtain a reconstructed first image feature.

[0116] S206. Calculate the same differences between first image features with the same annotation information and the corresponding reconstructed first image features, and the different differences between first image features with different annotation information and the corresponding reconstructed first image features, based on each reconstructed first image feature, the annotation information corresponding to each first image feature, and each first image feature and the annotation information corresponding to each first image feature.

[0117] S207: according to the same differences and different differences of the first image features.

[0118] The same differences and different differences of the first image features refer to calculating and analyzing the similarities and differences between the image features so as to optimize the parameters of the image processing model.

[0119] By distinguishing the same differences from the different differences of each first image feature, problems that may occur in the reconstruction process of the image features can be more accurately identified; understanding the differences between different categories can help reduce the situation where similar images are mistakenly classified into different categories and improve the accuracy of classification.

[0120] S208: Calculate the difference between the same difference and the different difference of each first image feature.

[0121] Calculating the difference between the same difference and the different difference of each first image feature refers to further analyzing the same difference and the different difference of the image features to generate an optimization loss and adjust the model parameters.

[0122] By calculating the difference between the same difference and different differences of each first image feature, it is possible to identify the categories in which the model performs poorly, so as to perform targeted optimization. For high-difference areas, the model parameters can be adjusted centrally to reduce errors. Understanding the differences between different categories helps optimize the model to reduce overfitting of the training data and make the model more generalizable.

[0123] S209 , accumulating the differences of the first image features to obtain the optimization loss.

[0124] Among them, optimization loss refers to the indicator used in the process of model training and parameter adjustment, which is used to measure the difference between the model's prediction results and the true labels. The role of optimization loss is to provide feedback on the current performance of the model. By minimizing the loss function, the model's parameters will be adjusted to improve the prediction accuracy; optimization loss is a key indicator to measure the effect of model training. It helps evaluate whether the model is learning the characteristics of the data and the accuracy of the prediction results. Optionally, optimization loss can refer to the ternary loss function.

[0125] By accumulating the differences of the first image features to obtain the optimization loss, an effective loss function can be generated, which provides a clear goal for model training and optimization. It not only helps to improve the performance and stability of the model, but also provides a consistent optimization standard during the training process.

[0126] Optionally, the differences of each first image feature are accumulated to obtain a first loss; feature extraction is performed on the annotation information of each first image feature to obtain a first semantic feature of each first image feature; feature extraction is performed on the annotation information of the reconstructed first image features having different annotation information from the first image features to obtain a reconstructed semantic feature of each first image feature; the boundary value of each first image feature is calculated based on the first semantic features of each first image feature and each reconstructed semantic feature; the difference between the first loss and the boundary value of each first image feature is calculated to obtain an optimized loss.

[0127] The first loss refers to the error value calculated after feature extraction and similarity calculation based on the difference between the first image feature of the same annotation information and the corresponding reconstructed first image feature, as well as the difference between image features of different annotation information. The first loss is used to measure the model's ability to distinguish features of different categories of images. By minimizing the first loss, the accuracy of the model in classification tasks can be improved, ensuring that the differences between features of the same category are minimized and the differences between features of different categories are maximized.

[0128] The boundary value refers to the threshold used to distinguish different categories. The boundary value is calculated by analyzing the difference between the first loss and the semantic features of the image features, and is used to define the decision boundary between categories. The role of the boundary value is to help the model define the boundaries of different categories in the feature space to ensure that the model can accurately classify the input image features. Dynamically adjusting the boundary value can improve the adaptability of the model under different data distributions and reduce misclassification.

[0129] First, the difference of each first image feature is calculated. These differences are the difference between the same type of features (image features with the same annotation information) and different types of features (image features with different annotation information). Then these differences are accumulated to obtain an overall error value, namely the first loss; then, the annotation information (such as image label or category) of each first image feature is feature extracted to generate semantic features related to these annotation information, namely the first semantic features; then, the annotation information of the reconstructed image features with different annotation information from each first image feature is also feature extracted to obtain the reconstructed semantic features of these different annotation information; the boundary value of each first image feature is calculated using the first semantic features extracted previously and the reconstructed semantic features; finally, the first loss is compared with the boundary value of each first image feature to calculate the difference between the two, which is the optimization loss.

[0130] In one example, ensuring that the distance between the first image feature and the first image feature of the reconstructed positive class is greater than the distance between the first image feature of the reconstructed negative class, can be expressed by the following formula:

[0131]

[0132] In the formula, is the first image feature (anchor point), is the first image feature of the positive class after reconstruction, is the first image feature of the reconstructed negative class, β is a constant that defines the boundary, Q represents the cardinality of the second image feature set, which is equal to N×M. This formula ensures that the inter-class distance is enlarged and the intra-class distance is reduced by defining a boundary β.

[0133] Exemplarily, an adaptive boundary β is calculated by the following formula i,k Calculation

[0134] {β i,k} k∈N\{i} =X({sim(t i ,t k )} k∈N\{i} )

[0135] Where X is a fully connected network, sim(t i ,tk ) is the similarity between the reconstructed semantic feature of the first image feature and the different annotation information of the first image feature.

[0136] By feeding these semantic similarities into a fully connected network, a flexible boundary β between classes is calculated. i,k .

[0137] Exemplarily, the flexible ternary loss function is implemented by the following formula

[0138]

[0139] Where f represents the feature extraction function and (·)+ represents the operation of taking the non-negative part.

[0140] S210, optimizing and adjusting the parameters of the pre-trained image processing model according to the optimization loss.

[0141] Among them, optimizing and adjusting the parameters of the pre-trained image processing model according to the optimization loss refers to further optimizing and adjusting the parameters of the pre-trained image processing model according to the optimization loss obtained above.

[0142] By optimizing and adjusting the parameters of the pre-trained image processing model according to the optimization loss, the model parameters are adjusted using the optimization loss, forming a feedback mechanism that enables the model training process to dynamically improve and adapt to different data features; by directly adjusting the parameters based on the optimization loss, the convergence process of the model can be accelerated, reducing training time and resource consumption.

[0143] Figure 2b It is a framework diagram of a parameter adjustment method of an image processing model provided according to the second embodiment of the present invention. The data flow of the framework diagram includes: first, the input of training data; dividing it into a support set and a query set; inputting the images in the support set and the query set into the image feature extraction module, which processes the image and extracts the first image feature and the second image feature respectively; at the same time, the semantic feature extraction module also extracts the semantic feature of the class name from the class name (such as bird, piano and cliff, etc.); the cross-modal guidance module receives input from the image feature and the semantic feature, in which the semantic feature is embedded into the image feature; the second image feature and the output of the cross-modal guidance module are input together into the neural decoding attention mechanism, and under the action of the cross-modal guidance module, the system reconstructs the first image feature; finally, according to the reconstructed first image feature, the original first image feature and its corresponding annotation information, the same difference between the samples with the same annotation information and the different difference between the samples with different annotation information are calculated for the calculation of the flexible ternary loss.

[0144] The embodiment of the present invention is a training process of a model. The training process is divided into multiple tasks, and the embodiment of the present invention is one of the subtasks. When the loss of the model reaches a stable and minimum level, the overall task process ends, and the model of the subtask is selected as the optimized model.

[0145] The embodiments of the present invention can process tasks such as classification tasks, image retrieval tasks and facial emotion recognition tasks. The present invention has achieved improvement effects on different data sets of various tasks.

[0146] Among them, in the classification task, the 5-Way 1-Shot task means that there are 5 different categories, and each category has only 1 example; the 5-Way 5-Shot task means that there are 5 different categories, and each category has 5 examples. The embodiment of the present invention achieved an accuracy of 67.46±0.54 in the 5-Way 1-Shot task of miniImageNet. An accuracy of 80.65±0.56 was achieved in the 5-Way5-Shot task. For the tieredImageNet dataset, the present invention achieved accuracies of 66.21±0.23 and 78.21±0.57 on 5-Way 1-Shot and 5-Way 5-Shot, respectively. When the present invention uses ResNet-12 as a feature extractor, the accuracy of the 5-Way 1-Shot task of mini ImageNet reaches 77.23±0.34, and the accuracy of 5-Way 5-Shot reaches 88.23±0.35. At the same time, the accuracy of 5-Way1-Shot and 5-Way 5-Shot of the tieredImageNet dataset reached 75.66±0.65 and 91.76±0.12. Finally, when the present invention uses the more advanced WRN-28-10 as a feature extractor, it achieves 85.40±0.21 on the 5-Way 1-Shot task of the miniImageNet dataset and 91.21±0.42 on the 5-Way 5-Shot task. Similarly, when using tieredImageNet for testing, the accuracy of 5-Way 1-Shot reaches 91.65±0.43, while 5-Way 5-Shot reaches 94.95±0.43.

[0147] In the image retrieval task, the embodiment of the present invention is also tested on the CUB-200-2011 dataset and the SOP dataset. The CUB-200-2011 dataset is a dataset containing 200 species of birds, with a total of 11,788 images. It contains 5,994 training sets and 5,794 validation sets. The SOP dataset is a dataset containing 22,634 object categories. The training set has 59,551 images (11,318 categories) and the test set has 60,502 images (11,316 categories). When the embodiment of the present invention uses BN-Inception as a feature extractor, the R@1 (Recall at 1, the first recall rate), R@2 (Recall at 1, the second recall rate), and NMI (Normalized Mutual Information) on the CUB-200-2011 dataset reach scores of 77.9 85.378.3 respectively. On the SOP dataset, the R@1, R@2, and NMI of the embodiment of the present invention reached 86.5 94.395.1 respectively. When the embodiment of the present invention used ResNet-50 as the feature extractor, R@1 reached 78.3, R@2 reached 86.6, and NMI reached 78.8. Similarly, the SOP dataset was also used and evaluated, and R@1, R@2, and NMI reached 87.0 94.8 95.6 respectively.

[0148] In the facial emotion recognition task, the present invention achieved an accuracy of 99.85% and 91.21% on the CK+ and Oulu-CASIA data sets respectively. The CK+ data set contains 593 video sequences from 123 subjects, of which 327 video sequences have emotion labels, containing 7 basic emotions (happiness, sadness, anger, surprise, fear, disgust and neutrality). The Oulu-CASIA data set contains the facial expressions of 80 subjects. Among them, 6 expressions (happiness, sadness, anger, surprise, fear and disgust) are marked, with a total of 2880 pictures.

[0149] Embodiment 3

[0150] Figure 3 The present invention is a schematic diagram of the structure of a parameter adjustment device for an image processing model provided in the third embodiment of the present invention. The present invention can be applied to the parameter adjustment of an image processing model, the device can execute the parameter adjustment method of the image processing model, the device can be implemented in the form of hardware and / or software, and the device can be configured in the parameter adjustment device of the image processing model.

[0151] See also Figure 3The parameter adjustment device of the image processing model shown in the figure comprises: an optimized sample set acquisition module 301, a first sample group feature extraction module 302, a second sample group feature extraction module 303, a similarity calculation module 304, an image feature reconstruction module 305, a feature difference calculation module 306 and a model parameter optimization module 307, wherein:

[0152] The optimized sample set acquisition module 301 is used to acquire an optimized sample set, where the optimized sample set includes a first sample group and a second sample group;

[0153] A first sample group feature extraction module 302, used to extract features from each sample in the first sample group to obtain at least one first image feature;

[0154] A second sample group feature extraction module 303, used to extract features from each sample in the second sample group to obtain at least one second image feature;

[0155] A similarity calculation module 304 is used to calculate the similarity between each first image feature and each second image feature;

[0156] An image feature reconstruction module 305 is used to reconstruct the first image feature according to the similarity between each second image feature and the first image feature for each first image feature, so as to obtain a reconstructed first image feature;

[0157] A feature difference calculation module 306 is used to calculate the same difference between the first image features with the same annotation information and the corresponding reconstructed first image features, and the different difference between the first image features with different annotation information and the corresponding reconstructed first image features according to each reconstructed first image feature, the annotation information corresponding to each reconstructed first image feature, each first image feature and the annotation information corresponding to each first image feature;

[0158] The model parameter optimization module 307 is used to optimize and adjust the parameters of the pre-trained image processing model according to the same differences and different differences of the first image features.

[0159] The technical solution of the embodiment of the present invention reconstructs the first image feature by using similar image features extracted from samples in the second sample group, and based on a large number of reconstructed first image features and a large number of original first image features, selects the same differences between the reconstructed and unreconstructed first image features with the same annotations, and selects the different differences between the reconstructed and unreconstructed first image features with different annotations, and optimizes and adjusts the model again to improve the prediction accuracy of the model, calculates the similarity between the first image feature and the second image feature, and selects the second image feature based on the similarity to reconstruct the first image feature, so that the reconstructed first image feature contains the content of the similar second image feature, thereby making the content of the reconstructed first image feature richer and enhancing the representativeness of the reconstructed first image feature, and training the model in this way can enhance the prediction accuracy of the model; by comparing the reconstructed first image feature with its corresponding annotation information, the difference between the reconstructed first image feature and the original first image feature is calculated. The same differences between them are calculated. At the same time, for different annotations, the different differences between the first image features under different annotation information and the reconstructed first image features are calculated. The feature differences of the same annotation information mainly reflect the ability of the model in identifying features of the same category, while the feature differences of different annotation information reveal the performance of the model in distinguishing different categories. By calculating these differences separately, more accurate indicators can be obtained to reflect the discrimination performance of the model. According to the calculated same differences and different differences, the parameters of the pre-trained image processing model are optimized and adjusted. The model can better distinguish samples of different categories and more accurately identify samples of the same category, so that the model can make more accurate judgments when facing samples of the same category and different categories, thereby improving the accuracy of the overall classification. Through the precise calculation of the differences and the corresponding parameter adjustments, the overall stability and reliability of the model can be improved while improving the accuracy of the model, thereby enhancing the performance of the model in practical applications.

[0160] Optionally, the image feature reconstruction module 305 includes:

[0161] The feature fusion and node updating unit performs weighted calculation on each second image feature according to the similarity between each second image feature and the first image feature to obtain a reconstructed first image feature.

[0162] Optionally, the model parameter optimization module 307 includes:

[0163] a difference calculation unit, configured to calculate the same difference and different difference according to each first image feature;

[0164] A difference accumulation unit, used for calculating the difference between the same difference and the different difference of each first image feature;

[0165] An optimization loss calculation unit, used for accumulating the difference of each first image feature to obtain an optimization loss;

[0166] Optimize the parameters of a pre-trained image processing model based on the optimization loss.

[0167] Specifically, the optimization loss calculation unit includes:

[0168] A first loss calculation subunit, used for accumulating the difference of each first image feature to obtain a first loss;

[0169] A first semantic feature extraction subunit is used to extract features from the annotation information of each first image feature to obtain a first semantic feature of each first image feature;

[0170] A reconstructed semantic feature extraction subunit, used to extract features according to the annotation information of the reconstructed first image features that are different from the annotation information of the first image features, to obtain the reconstructed semantic features of the first image features;

[0171] A boundary value calculation subunit, used to calculate the boundary value of each first image feature according to the first semantic feature and each reconstructed semantic feature of each first image feature;

[0172] The optimization loss calculation subunit is used to calculate the difference between the first loss and the boundary value of each first image feature to obtain the optimization loss.

[0173] Optionally, the similarity calculation module 340 further includes:

[0174] A second image feature annotation information extraction unit, used to extract features from the annotation information of each second image feature to obtain a second semantic feature of each first image feature;

[0175] A knowledge graph construction unit, used to construct a knowledge graph by taking each first image feature and each second semantic feature as a node;

[0176] A knowledge graph node updating unit, used to update each node in the knowledge graph according to the association relationship and association weight between each node in the knowledge graph;

[0177] The image feature updating unit is used to update each first image feature according to the nodes in the updated knowledge graph.

[0178] Specifically, the knowledge graph node update unit includes:

[0179] The feature fusion and node update subunit is used to detect whether to fuse each second semantic feature with each first image feature and update each first image feature node based on the association relationship and association weight between each first image feature node and each second semantic feature in the knowledge graph.

[0180] Optionally, the optimized sample set acquisition module 301 further includes:

[0181] A training sample set acquisition unit is used to acquire a training sample set; the training sample set includes at least one training image and annotation information corresponding to each training image; the value range of the annotation information in the training sample set is the same as the value range of the annotation information in the optimization sample set;

[0182] The image processing model training unit is used to train the image processing model using a training sample set to obtain a pre-trained image processing model.

[0183] The parameter adjustment device for the image processing model provided in the embodiment of the present invention can execute the parameter adjustment method for the image processing model provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0184] Embodiment 4

[0185] Figure 4 1 is a schematic diagram of the structure of an electronic device for implementing the parameter adjustment method of the image processing model of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0186] like Figure 4 As shown, the electronic device 400 includes at least one processor 401, and a memory connected to the at least one processor 401 in communication, such as a read-only memory (ROM) 402 and a random access memory (RAM) 403, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 401 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 402 or the computer program loaded from the storage unit 408 to the random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 can also be stored. The processor 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0187] A number of components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard and a mouse, etc.; an output unit 407, such as various types of displays and speakers, etc.; a storage unit 408, such as a disk and an optical disk, etc.; and a communication unit 409, such as a network card, a modem, and a wireless communication transceiver, etc. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0188] The processor 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, and microcontrollers. The processor 401 performs the various methods and processes described above, such as a parameter adjustment method for an image processing model.

[0189] In some embodiments, the parameter adjustment method of the image processing model may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the processor 401, one or more steps of the parameter adjustment method of the image processing model described above may be performed. Alternatively, in other embodiments, the processor 401 may be configured to execute the parameter adjustment method of the image processing model by any other appropriate means (e.g., by means of firmware).

[0190] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0191] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine or partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0192] In the context of the present invention, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. A more specific example of a machine readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0193] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0194] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0195] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0196] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0197] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for adjusting parameters of an image processing model, characterized in that: The method comprises: Acquire an optimized sample set, where the optimized sample set includes a first sample group and a second sample group; Extracting features from each sample in the first sample group to obtain at least one first image feature; Extracting features from each sample in the second sample group to obtain at least one second image feature; Calculating the similarity between each of the first image features and each of the second image features; For each of the first image features, reconstructing the first image feature according to the similarity between each of the second image features and the first image feature to obtain a reconstructed first image feature; Calculate, according to each of the reconstructed first image features, the annotation information corresponding to each of the reconstructed first image features, each of the first image features and the annotation information corresponding to each of the first image features, the same differences between the first image features with the same annotation information and the corresponding reconstructed first image features, and the different differences between the first image features with different annotation information and the corresponding reconstructed first image features; According to the same differences and different differences of the first image features, the parameters of the pre-trained image processing model are optimized and adjusted.

2. The method according to claim 1, characterized in that The reconstructing the first image features according to the similarity between each of the second image features and the first image features to obtain the reconstructed first image features includes: According to the similarity between each of the second image features and the first image features, weighted calculation is performed on each of the second image features to obtain a reconstructed first image feature.

3. The method according to claim 1, characterized in that The step of optimizing and adjusting the parameters of the pre-trained image processing model according to the same differences and different differences of the first image features includes: According to the same differences and different differences of each of the first image features; Calculating the difference between the same difference and the different difference of each of the first image features; Accumulating the differences of the first image features to obtain an optimization loss; The parameters of the pre-trained image processing model are optimized and adjusted according to the optimization loss.

4. The method according to claim 3, characterized in that The accumulating the differences of the first image features to obtain the optimization loss includes: Accumulating the differences of the first image features to obtain a first loss; Performing feature extraction on the annotation information of each of the first image features to obtain a first semantic feature of each of the first image features; Performing feature extraction based on the annotation information of the reconstructed first image features that is different from the annotation information of each of the first image features to obtain a reconstructed semantic feature of each of the first image features; Calculating a boundary value of each of the first image features according to the first semantic feature of each of the first image features and each of the reconstructed semantic features; The difference between the first loss and the boundary value of each of the first image features is calculated to obtain an optimization loss.

5. The method according to claim 1, characterized in that Before calculating the similarity between each of the first image features and each of the second image features, the method further includes: Performing feature extraction on the annotation information of each of the second image features to obtain a second semantic feature of each of the first image features; Using each of the first image features and each of the second semantic features as nodes to construct a knowledge graph; updating each node in the knowledge graph according to the association relationship and association weight between each node in the knowledge graph; The first image features are updated according to the nodes in the updated knowledge graph.

6. The method according to claim 5, characterized in that The updating of each node in the knowledge graph according to the association relationship and association weight between each node in the knowledge graph comprises: According to the association relationship and association weight between the nodes of each first image feature and each second semantic feature in the knowledge graph, it is detected whether to merge each second semantic feature with each first image feature, and the nodes of each first image feature are updated.

7. The method according to claim 1, characterized in that Before obtaining the optimized sample set, it also includes: Acquire a training sample set; the training sample set includes at least one training image and annotation information corresponding to each training image; the value range of the annotation information in the training sample set is the same as the value range of the annotation information in the optimization sample set; The image processing model is trained using the training sample set to obtain a pre-trained image processing model.

8. A parameter adjustment device for an image processing model, characterized in that: The device comprises: An optimized sample set acquisition module, used to acquire an optimized sample set, wherein the optimized sample set includes a first sample group and a second sample group; A first sample group feature extraction module, used to extract features from each sample in the first sample group to obtain at least one first image feature; A second sample group feature extraction module, used to extract features from each sample in the second sample group to obtain at least one second image feature; A similarity calculation module, used for calculating the similarity between each of the first image features and each of the second image features; an image feature reconstruction module, configured to reconstruct the first image feature according to the similarity between each of the second image features and the first image feature, so as to obtain a reconstructed first image feature; a feature difference calculation module, configured to calculate, based on each of the reconstructed first image features, the annotation information corresponding to each of the reconstructed first image features, each of the first image features and the annotation information corresponding to each of the first image features, the same differences between the first image features with the same annotation information and the corresponding reconstructed first image features, and the different differences between the first image features with different annotation information and the corresponding reconstructed first image features; The model parameter optimization module is used to optimize and adjust the parameters of the pre-trained image processing model according to the same differences and different differences of each of the first image features.

9. A parameter adjustment device for an image processing model, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the parameter adjustment method of the image processing model described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the parameter adjustment method of the image processing model described in any one of claims 1 to 7 when executed.

Citation Information

Patent Citations

  • Method and device for detecting image information and storage medium

    CN112818809A

  • Image recognition method and device and computer readable storage medium

    CN113076963A

  • Training method of image detection network, image detection method and system

    CN115578768A

  • Neural network training method and device

    CN116050508A