Image processing method and device, computer device, storage medium and program product

By dynamically selecting the weight coefficients of the image recognition model through a weight prediction model, and predicting the label synthesis result based on the model with high recognition accuracy, the problem of unstable accuracy of the image processing model is solved, and the recognition accuracy is improved.

CN116777814BActive Publication Date: 2026-02-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210217587.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-07
Publication Date
2026-02-03
Estimated Expiration
2042-03-07

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of the fused image processing model is unstable for different images to be processed, and the recognition accuracy cannot be guaranteed.

Method used

The weight coefficients of each image recognition model are determined by a weight prediction model. The weight coefficients are proportional to the recognition accuracy. The predicted labels of models with high recognition accuracy are emphasized, while the predicted labels of models with low recognition accuracy are ignored. The final recognition result is then synthesized.

Benefits of technology

The final accuracy of image recognition is improved by dynamically selecting the best-performing model for fusion, thereby enhancing the accuracy of the recognition results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116777814B_ABST
    Figure CN116777814B_ABST
Patent Text Reader

Abstract

The application provides an image processing method and device, computer equipment, a storage medium and a program product, and relates to the field of image processing. The image processing method comprises: acquiring a to-be-recognized image, determining weight coefficients of at least two image recognition models for the to-be-recognized image based on a weight prediction model; wherein the weight coefficient of each image recognition model is proportional to the recognition accuracy of the image recognition model for the to-be-recognized image; identifying the to-be-recognized image based on the at least two image recognition models to obtain a predicted label of each image recognition model; and determining a recognition result of the to-be-recognized image based on the weight coefficients of the at least two image recognition models for the to-be-recognized image and the predicted label of each image recognition model. The embodiment of the application can be applied to the field of maps, can emphasize the predicted label of an image recognition model with high recognition accuracy and ignore the predicted label of an image recognition model with low recognition accuracy, thereby improving the accuracy of the final recognition result.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and relates to an image processing method and device, a computer device, a storage medium and a program product. BACKGROUND

[0002] With the rapid development of information technology, there are usually various tools for data samples such as images, such as various models for processing these images. Due to different extracted features, different models have different performance capabilities on different data. Based on a specific fusion strategy, the best-performing model is selected to obtain an overall good image processing result.

[0003] Currently, for image processing model fusion, positive and negative samples can be set first, and the confidence is calculated according to the angle between the feature vectors of the positive and negative samples to set the weights of the two image processing models. For different images to be processed, the accuracy of the fused two image processing models can be unstable. SUMMARY

[0004] The present application provides an image processing method, device, computer device, storage medium and program product, which can solve the problem that the accuracy of the fused model cannot be ensured for different images to be processed in related technologies. The technical solution is as follows:

[0005] In one aspect, an image processing method is provided, which includes:

[0006] An image to be recognized is obtained, and a weight prediction model is used to determine the weight coefficients of at least two image recognition models for the image to be recognized. The weight coefficient of each image recognition model is proportional to the recognition accuracy of the image recognition model for the image to be recognized.

[0007] The image to be recognized is recognized by the at least two image recognition models respectively, and the prediction label of each image recognition model is obtained.

[0008] The recognition result of the image to be recognized is determined based on the weight coefficients of the at least two image recognition models for the image to be recognized and the prediction label of each image recognition model.

[0009] In one possible implementation, the weight prediction model is obtained by training based on the following method:

[0010] A plurality of sample images are obtained, and each sample image is provided with a corresponding sample standard label.

[0011] For each sample image, the sample image is input into the at least two image recognition models respectively, and the sample prediction label of each image recognition model is obtained.

[0012] determine the recognition accuracy of each image recognition model for the sample image based on the sample standard annotation and the sample prediction annotation of each image recognition model;

[0013] obtain the weight prediction model based on the recognition accuracy of each image recognition model for the sample image.

[0014] In one possible implementation, the determining of the recognition accuracy of each image recognition model for the sample image based on the sample standard annotation and the sample prediction annotation of each image recognition model comprises:

[0015] matching the sample prediction annotation of each image recognition model with the sample standard annotation to obtain the matching degree of each sample prediction annotation;

[0016] setting the matching degree of each sample prediction annotation as the recognition accuracy of the corresponding image recognition model.

[0017] In one possible implementation, the obtaining of the weight prediction model based on the recognition accuracy of each image recognition model for the sample image comprises:

[0018] determining the image recognition model with the highest recognition accuracy for the sample image based on the recognition accuracy of each image recognition model;

[0019] obtaining the weight prediction model based on each sample image and the image recognition model with the highest recognition accuracy for each sample image.

[0020] In one possible implementation, the obtaining of the weight prediction model based on each sample image and the image recognition model with the highest recognition accuracy for each sample image comprises:

[0021] for each sample image, setting the model category of the image recognition model with the highest recognition accuracy for the sample image as a sample classification label;

[0022] training an initial weight prediction model based on each sample image and the sample classification label corresponding to each sample image to obtain the weight prediction model.

[0023] In one possible implementation, the determining of the weight coefficient of each image recognition model for the to-be-recognized image based on the weight prediction model comprises:

[0024] inputting the to-be-recognized image into the weight prediction model to obtain the probability that the to-be-recognized image belongs to the classification label of each image recognition model;

[0025] determining the weight coefficient of each image recognition model based on the probability that the to-be-recognized image belongs to the classification label of each image recognition model.

[0026] In a possible implementation, for each image recognition model, the probability that the image to be recognized belongs to the classification label of the image recognition model is proportional to the weight coefficient of the image recognition model.

[0027] In a possible implementation, the determining of the recognition result of the image to be recognized based on the weight coefficients of the at least two image recognition models for the image to be recognized and the predicted labels of each image recognition model includes:

[0028] The determining of the predicted label of each image recognition model based on the weight coefficients of the at least two image recognition models for the image to be recognized includes:

[0029] In a possible implementation, the determining of the recognition result of the image to be recognized based on the weight coefficients of the at least two image recognition models for the image to be recognized and the predicted labels of each image recognition model includes:

[0030] The image recognition model with the weight coefficient greater than the preset coefficient is determined from the at least two image recognition models.

[0031] The predicted labels of the image recognition models with the weight coefficients greater than the preset coefficient are fused to obtain the recognition result.

[0032] In a possible implementation, the determining of the recognition result of the image to be recognized based on the weight coefficients of the at least two image recognition models for the image to be recognized and the predicted labels of each image recognition model includes:

[0033] The preset number of image recognition models with the highest weight coefficients are determined from the at least two image recognition models.

[0034] The predicted labels of the preset number of image recognition models with the highest weight coefficients are fused to obtain the recognition result.

[0035] In another aspect, an image processing apparatus is provided, and the apparatus includes:

[0036] A first determining module is configured to acquire an image to be recognized, and determine weight coefficients of at least two image recognition models for the image to be recognized based on a weight prediction model, wherein the weight coefficient of each image recognition model is proportional to the recognition accuracy of the image recognition model for the image to be recognized.

[0037] An identifying module is configured to identify the image to be recognized based on the at least two image recognition models to obtain a predicted label of each image recognition model.

[0038] A second determining module is configured to determine a recognition result of the image to be recognized based on the weight coefficients of the at least two image recognition models for the image to be recognized and the predicted labels of each image recognition model.

[0039] In a possible implementation, the training module is further configured to:

[0040] obtain a plurality of sample images, each of which is provided with a corresponding sample standard label;

[0041] for each sample image, input the sample image into at least two image recognition models respectively to obtain a sample prediction label of each image recognition model;

[0042] determine, based on the sample standard label and the sample prediction label of each image recognition model, an identification accuracy of each image recognition model for the sample image;

[0043] obtain a weight prediction model based on the identification accuracy of each image recognition model for the sample image.

[0044] In a possible implementation, when determining, based on the sample standard label and the sample prediction label of each image recognition model, the identification accuracy of each image recognition model for the sample image, the training module is specifically configured to:

[0045] match the sample prediction label of each image recognition model with the sample standard label to obtain a matching degree of each sample prediction label;

[0046] set the matching degree of each sample prediction label as the identification accuracy of the corresponding image recognition model.

[0047] In a possible implementation, when obtaining the weight prediction model based on the identification accuracy of each image recognition model for the sample image, the training module is specifically configured to:

[0048] determine, based on the identification accuracy of each image recognition model, an image recognition model with the highest identification accuracy for the sample image;

[0049] obtain the weight prediction model based on each sample image and the image recognition model with the highest identification accuracy for each sample image.

[0050] In a possible implementation, when obtaining the weight prediction model based on each sample image and the image recognition model with the highest identification accuracy for each sample image, the training module is specifically configured to:

[0051] for each sample image, set a model category of the image recognition model with the highest identification accuracy for the sample image as a sample classification label;

[0052] train an initial weight prediction model based on each sample image and the sample classification label corresponding to each sample image to obtain the weight prediction model.

[0053] In a possible implementation, the first determining module, when determining the weight coefficients of the at least two image recognition models for the to-be-recognized image based on the weight prediction model, is specifically configured to:

[0054] inputting the to-be-recognized image into the weight prediction model to obtain probabilities of the to-be-recognized image belonging to classification labels of the at least two image recognition models respectively;

[0055] determining the weight coefficient of each image recognition model based on the probabilities of the to-be-recognized image belonging to the classification labels of the at least two image recognition models respectively.

[0056] In a possible implementation, for each image recognition model, the probability of the to-be-recognized image belonging to the classification label of the image recognition model is proportional to the weight coefficient of the image recognition model.

[0057] In a possible implementation, the second determining module, when determining the recognition result of the to-be-recognized image based on the weight coefficients of the at least two image recognition models for the to-be-recognized image and the predicted labels of each image recognition model, is specifically configured to:

[0058] determining a weighted sum of the predicted labels of each image recognition model based on the weight coefficients of the at least two image recognition models for the to-be-recognized image, to obtain the recognition result.

[0059] In a possible implementation, the second determining module, when determining the recognition result of the to-be-recognized image based on the weight coefficients of the at least two image recognition models for the to-be-recognized image and the predicted labels of each image recognition model, is specifically configured to:

[0060] determining, from the at least two image recognition models, image recognition models with weight coefficients greater than a preset coefficient;

[0061] fusing the predicted labels of the image recognition models with the weight coefficients greater than the preset coefficient to obtain the recognition result.

[0062] In a possible implementation, the second determining module, when determining the recognition result of the to-be-recognized image based on the weight coefficients of the at least two image recognition models for the to-be-recognized image and the predicted labels of each image recognition model, is specifically configured to:

[0063] determining, from the at least two image recognition models, a preset number of image recognition models with the highest weight coefficients;

[0064] fusing the predicted labels of the preset number of image recognition models with the highest weight coefficients to obtain the recognition result.

[0065] In a possible implementation, the second determining module is configured to:

[0066] determine a target recognition model with a weight coefficient greater than a preset coefficient from the at least two image recognition models;

[0067] fuse the predicted label of the target recognition model based on the weight coefficient of the determined target recognition model to obtain the recognition result.

[0068] In another aspect, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the image processing method described above.

[0069] In another aspect, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the image processing method described above.

[0070] In another aspect, a computer program product is provided, which includes a computer program. The computer program is executed by a processor to implement the image processing method described above.

[0071] The technical scheme provided in the present application has the following beneficial effects:

[0072] The weight prediction model is used to predict the weight coefficient of each image recognition model for the to-be-identified image. The weight coefficient of each image recognition model is proportional to the recognition accuracy of the image recognition model for the to-be-identified image. Then, the final recognition result is determined based on the weight coefficient of each image recognition model and the predicted label of each image recognition model. The predicted label of the image recognition model with high recognition accuracy is emphasized, and the predicted label of the image recognition model with low recognition accuracy is ignored, thereby improving the accuracy of the final recognition result.

[0073] Further, the initial weight prediction model is trained by each sample image and the image recognition model with the highest recognition accuracy for each sample image. The weight prediction model can output a weight coefficient proportional to the recognition accuracy of the image recognition model for the to-be-identified image, thereby improving the accuracy of the final recognition result. BRIEF DESCRIPTION OF DRAWINGS

[0074] In order to more clearly illustrate the technical schemes in the embodiments of the present application, the drawings needed in the description of the embodiments of the present application will be briefly introduced.

[0075] Figure 1An implementation environment schematic diagram of an image processing method provided by an embodiment of the present application is provided.

[0076] Figure 2 A flowchart schematic diagram of an image processing method provided by an embodiment of the present application is provided.

[0077] Figure 3 A schematic diagram of a weight prediction model acquisition scheme provided by an embodiment of the present application is provided.

[0078] Figure 4 A schematic diagram of an identification result acquisition scheme provided by an embodiment of the present application is provided.

[0079] Figure 5 A schematic diagram of an identification result acquisition scheme provided by an embodiment of the present application is provided.

[0080] Figure 6 A schematic diagram of an expression processing scheme provided by an embodiment of the present application is provided.

[0081] Figure 7 A schematic diagram of an image processing device provided by an embodiment of the present application is provided.

[0082] Figure 8 A schematic diagram of a computer device provided by an embodiment of the present application is provided. DETAILED DESCRIPTION

[0083] The embodiments of the present application will be described below in conjunction with the accompanying drawings. It should be understood that the embodiments described below in conjunction with the accompanying drawings are exemplary descriptions of the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions of the embodiments of the present application.

[0084] Those skilled in the art can understand that the singular forms "a", "an" and "the" used herein include plural forms unless specifically stated otherwise. It should be further understood that the terms "include" and "contain" used by the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude other features, information, data, steps, operations, elements, components and / or their combinations supported by the present technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the element can be directly connected or coupled to the other element, or it can mean that the element and the other element are connected through an intermediate element. In addition, the "connection" or "coupling" used herein can include wireless connection or wireless coupling. The term "and / or" used herein indicates that at least one of the items defined by the term, for example, "A and / or B" indicates that "A" is implemented, or "A" is implemented, or "A and B" are implemented.

[0085] In order to make the purposes, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0086] With the rapid development of information technology, there are a large number of data samples, and usually there are multiple tools (such as models) to process these data. Due to different extracted features, different models have different performance capabilities on different data. Considering this, based on a specific fusion strategy, the best-performing model is dynamically selected in the local space, and a fusion model with better overall performance can be obtained. Generally speaking, as the number of individual models in the ensemble increases, the error rate of the ensemble will decrease exponentially, but when the performance gap between different models is too large, the result of model fusion is lower than the accuracy of a single model.

[0087] The related art determines a classification threshold for each of a plurality of classification models for classifying a plurality of training samples by a classification threshold; for each space in the plurality of classification models, the output scores of the classification model with respect to the plurality of training samples are divided into a plurality of subspaces according to the probability density of each output score, thereby determining the confidence of each cell in the plurality of subspaces, the confidence representing the confidence level of the output score of each cell, and then based on the predetermined weight of each of the plurality of classification models and the classification threshold of each classification model, the classification thresholds of the plurality of classification models are fused.

[0088] This way is simply to calculate the classification threshold according to the positive and negative sample indicators, which has no direct connection with the result predicted by the final model, and only indirectly improves the model fusion strategy through the final result.

[0089] In some related art, a feature vector of each face image in the positive sample and the negative sample is calculated; according to the feature vector, the included angle of the feature vector of the face image in the positive sample and the negative sample with respect to the two face recognition models is calculated respectively, and the confidence of the corresponding face recognition model is obtained; the results of the confidence of the two face recognition models are compared, and the combination of the weight values of the two face recognition models is obtained according to the comparison result; the weight of the two face recognition models is calculated according to the combination of the weight values, and the face recognition fusion model is determined to ensure that the face recognition accuracy of the face recognition fusion model generated by the two face recognition models is higher than the accuracy of a single face recognition model.

[0090] This way calculates the confidence according to the included angle of the feature vector, thereby indirectly setting the weight, and the number of models is limited, and the accuracy of the recognition result cannot be ensured for different images to be recognized.

[0091] The application emphasizes the models with better performance through the weight prediction model, ignores the models with poor performance, and can achieve good fusion effect even if the performance of different models is greatly different, and the recognition result is more accurate.

[0092] The embodiment of the application can be applied to various scenes, including but not limited to artificial intelligence and the like. For example, the image processing method provided by the application can be applied to water body identification, a plurality of image semantic segmentation models are trained through an existing data set, each model has different performance effects in different regions, and through the image recognition model fusion strategy based on weight prediction, the advantages of the plurality of image recognition models can be fully played, and accurate recognition results are obtained.

[0093] Artificial intelligence (AI) is to use a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which tries to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machine has the functions of perception, reasoning and decision-making.

[0094] Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, both hardware and software technologies. Artificial intelligence basic technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, automatic driving, intelligent transportation and several other major directions.

[0095] Machine learning (ML) is a multi-disciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It is a subject that studies how computers simulate or implement human learning behavior to acquire new knowledge or skills, and reorganize existing knowledge structure to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental approach to making computers intelligent, and its applications are widespread in various fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and example-based learning.

[0096] Figure 1 is a schematic diagram of an implementation environment of an image processing method provided by an embodiment of the application, see Figure 1Specifically, the sample image is identified according to each of the at least two image recognition models to obtain a sample prediction label, so as to determine the recognition accuracy of each image recognition model for the sample image, and then the initial weight prediction model is trained by using the recognition accuracy of each image recognition model and the sample image to obtain a weight prediction model, the weight prediction model is used to determine the weight coefficient of each image recognition model for the to-be-recognized image, and finally the recognition result is determined according to the prediction label and the weight coefficient of each image recognition model for the to-be-recognized image.

[0097] It can be understood that, Figure 1 The application scenario shown in the figure is an example and does not limit the application scenario of the image processing method.

[0098] Figure 2 A flowchart of an image processing method provided by an embodiment of the present application is shown in the figure. The execution subject of the method can be a computer device. As shown in the figure, Figure 2 The method can include the following steps:

[0099] Step 201, obtaining a to-be-recognized image, and determining the weight coefficient of each of the at least two image recognition models for the to-be-recognized image based on a weight prediction model.

[0100] The weight coefficient of each image recognition model is proportional to the recognition accuracy of the image recognition model for the to-be-recognized image.

[0101] The image recognition model can be a semantic segmentation network, for example, a Fully Convolution Network (FCN), a UNet network, a UNet++ network, or a HRNet network (High Resolution Network). The UNet network and the UNet++ network are both fully convolutional neural networks, which are pixel-level classification, and the output is the class of each pixel.

[0102] Specifically, the process of image recognition by the image recognition model can be the process of pixel-by-pixel prediction of the image by the semantic segmentation network.

[0103] Taking Unet++ as an example, Unet++ introduces a built-in deep variable UNet set, which can provide improved segmentation performance for objects of different sizes, and redesigns the skip connection in Unet++, so as to realize flexible feature fusion in the decoder, and a scheme is designed to prune the trained Unet++, which can speed up the inference speed while maintaining its performance. Training multiple deep UNets embedded in the Unet++ architecture can stimulate collaborative learning between the constituent UNets, which can bring better performance compared with training isolated UNets with the same architecture.

[0104] For example, HRNet changes the link between high and low resolution from series to parallel, maintains high resolution representation in the entire network structure, and introduces interaction between high and low resolution to improve model performance.

[0105] The weight prediction model can be a convolutional neural network, and the input of the weight prediction model is an image, and the output of the image is the probability of being suitable for being recognized by at least two image recognition models, that is, the probability of different image recognition models.

[0106] For example, the weight prediction model is BagNet, wherein BagNet is a convolutional neural network for image classification. BagNet does not consider spatial ordering, but classifies images according to small local features of images. The constraint on local features can directly analyze how each part of the image affects classification. This way makes it pay more attention to the overall information of the image, can learn useful spatial information better, and eliminate the influence of noise data. The brief process is as follows:

[0107] 1) The input image is cut into an image block of a certain size of pixels;

[0108] 2) After cutting the image block, a 1x1 convolutional deep network is used on each image block to obtain a class vector;

[0109] 3) Sum all output class vectors according to space;

[0110] 4) The classification class is predicted by counting the maximum element of the class vector, and the prediction probability of each class is output. The probability of each class is the probability that the image is suitable for being recognized by at least two image recognition models.

[0111] Specifically, the sample image can be recognized based on at least two image recognition models respectively, the recognition accuracy of each image recognition model for the sample image is determined, so as to determine what kind of sample image is suitable for different image recognition models, and then the weight prediction model is trained based on the recognition accuracy of different image recognition models and the sample image. The specific process of obtaining the weight prediction model will be further described below.

[0112] Step 202, identifying the to-be-identified image based on at least two image recognition models respectively, to obtain the predicted label of each image recognition model.

[0113] The image recognition model is trained based on the training sample and the training label corresponding to the training sample.

[0114] Specifically, the to-be-identified image is input into different image recognition models respectively to obtain predicted labels of the to-be-identified image by the different image recognition models.

[0115] In step 203, the recognition result of the to-be-identified image is determined based on the weight coefficients of the at least two image recognition models for the to-be-identified image and the predicted labels of each image recognition model.

[0116] In some embodiments, the predicted label of the image recognition model with the largest weight coefficient can be selected based on the weight coefficients to determine the recognition result.

[0117] In some other embodiments, the image recognition model with a weight coefficient greater than a preset threshold can be selected from the plurality of image recognition models based on the weight coefficients of the different image recognition models, and the recognition result can be determined based on the predicted label of the selected image recognition model.

[0118] In still some other embodiments, the predicted labels of the different image recognition models can be fused based on the weight coefficients of the different image recognition models to obtain the recognition result. The process of obtaining the recognition result will be further described in detail below.

[0119] In the above embodiments, the weight prediction model is used to predict the weight coefficients of the at least two image recognition models for the to-be-identified image. The weight coefficient of each image recognition model is proportional to the recognition accuracy of the image recognition model for the to-be-identified image. The final recognition result is determined based on the weight coefficients of the different image recognition models and the predicted labels of each image recognition model. The predicted label of the image recognition model with high recognition accuracy can be emphasized, and the predicted label of the image recognition model with low recognition accuracy can be ignored, thereby improving the accuracy of the final recognition result.

[0120] The process of obtaining the weight prediction model will be further described below with reference to an embodiment.

[0121] In one possible implementation, as shown in FIG. 3, the weight prediction model can be trained based on the following manner. Figure 3

[0122] In step S301, a plurality of sample images are obtained.

[0123] Each sample image is provided with a corresponding sample standard label, which can be close to or ideally equal to the true label of the sample.

[0124] In step S302, each sample image is input into at least two image recognition models respectively to obtain sample predicted labels of each image recognition model.

[0125] ​The image recognition model is a trained model.

[0126] It can be understood that the sample image is input into the image recognition model, and the purpose is not to train the image recognition model, but to determine the recognition accuracy of the trained image recognition model for the sample image.

[0127] In step S303, the recognition accuracy of each image recognition model for the sample image is determined based on the sample standard label and the sample prediction label of each image recognition model.

[0128] Specifically, step S303 determines the recognition accuracy of each image recognition model for the sample image based on the sample standard label and the sample prediction label of each image recognition model, which can include:

[0129] (1) Matching the sample prediction label of each image recognition model with the sample standard label to obtain the matching degree of each sample prediction label;

[0130] (2) Setting the matching degree of each sample prediction label as the recognition accuracy of the corresponding image recognition model.

[0131] Specifically, the matching degree between the sample prediction label and the sample standard label can be calculated by calculating the similarity, and the matching degree between the sample prediction label and the sample standard label can also be calculated by calculating the intersection ratio, i.e. the matching degree. The specific determination of the matching degree is not limited here.

[0132] In step S304, the weight prediction model is obtained based on the recognition accuracy of each image recognition model for the sample image.

[0133] Specifically, step S304 obtains the weight prediction model based on the recognition accuracy of each image recognition model for the sample image, which can include:

[0134] (1) Based on the recognition accuracy of each image recognition model, determine the image recognition model with the highest recognition accuracy for the sample image;

[0135] (2) Based on each sample image, the image recognition model with the highest recognition accuracy for each sample image to obtain the weight prediction model.

[0136] In the specific implementation process, based on each sample image, the image recognition model with the highest recognition accuracy for each sample image to obtain the weight prediction model can include:

[0137] a. For each sample image, set the model category of the image recognition model with the highest recognition accuracy for the sample image as the sample classification label;

[0138] b. training the initial weight prediction model based on each sample image and a sample classification label corresponding to each sample image to obtain a weight prediction model.

[0139] In the implementation process, the initial weight prediction model is trained by each sample image and a sample classification label corresponding to each sample image, so that the sample classification label with the highest probability output by the initial weight prediction model is the image recognition model with the highest recognition accuracy as much as possible.

[0140] Specifically, when the sample image is input into the weight prediction model, the probability of the candidate classification label of the different image recognition models can be obtained, and the sample classification label of the image recognition model with the highest probability is further output.

[0141] In the above embodiment, the initial weight prediction model is trained by each sample image and the image recognition model with the highest recognition accuracy for each sample image, so that the weight prediction model can output a weight coefficient proportional to the recognition accuracy of the image recognition model for the to-be-recognized image, thereby improving the accuracy of the final recognition result.

[0142] The above embodiment describes the specific acquisition process of the weight prediction model, and the process of the weight coefficient will be further described in combination with the drawings and embodiments.

[0143] In one possible implementation, step S201 of determining the weight coefficients of the at least two image recognition models for the to-be-recognized image based on the weight prediction model can include:

[0144] (1) inputting the to-be-recognized image into the weight prediction model to obtain the probability that the to-be-recognized image belongs to the classification label of the at least two image recognition models;

[0145] (2) determining the weight coefficient of each image recognition model based on the probability that the to-be-recognized image belongs to the classification label of the at least two image recognition models.

[0146] Specifically, for each image recognition model, the higher the probability of the classification label, the more likely it is that the image recognition model corresponding to the classification label will achieve better recognition results for the to-be-recognized image, that is, the probability that the to-be-recognized image belongs to the classification label of the image recognition model is proportional to the weight coefficient of the image recognition model.

[0147] In the implementation process, the probability that the to-be-recognized image belongs to the classification label of the image recognition model can be directly set as the weight coefficient of the image recognition model.

[0148] The above embodiment describes the determination process of the weight coefficient, and the specific acquisition process of the recognition result of the image will be further described in combination with the drawings and embodiments.

[0149] In some possible implementation manners, the prediction labels of all the image recognition models can be fused to obtain the recognition result.

[0150] Specifically, the step S203 can include the following steps.

[0151] The weighted sum of the prediction labels of each image recognition model is determined based on the weight coefficients of the at least two image recognition models for the to-be-recognized image, to obtain the recognition result.

[0152] Specifically, as shown in FIG. 3, the weighted sum of the prediction labels of all the image recognition models is calculated based on the respective weight coefficients, to obtain the recognition result. Figure 4

[0153] In some possible implementation manners, the recognition result can be determined based on a preset number of image recognition models with the highest weight coefficients.

[0154] Specifically, the step S203 can include the following steps.

[0155] The preset number of image recognition models with the highest weight coefficients are determined based on the weight coefficients of the at least two image recognition models for the to-be-recognized image.

[0156] The prediction labels of the preset number of image recognition models with the highest weight coefficients are fused to obtain the recognition result.

[0157] Specifically, after the preset number of image recognition models with the highest weight coefficients are determined, the weight coefficients of these image recognition models can be processed in proportion.

[0158] As shown in FIG. 4, the weight coefficients of the two image recognition models with the highest weight coefficients are 0.5 and 0.3 respectively, and the weight coefficients can be adjusted in proportion to 0.625 and 0.375. Figure 5

[0159] In some possible implementation manners, the prediction labels of image recognition models with larger weight coefficients can be fused to obtain the recognition result.

[0160] Specifically, the step S203 can include the following steps.

[0161] ​​determine an image recognition model with a weight coefficient greater than a preset coefficient from the at least two image recognition models;

[0162] fuse the predicted labels of the image recognition model with the weight coefficient greater than the preset coefficient to obtain a recognition result.

[0163] Specifically, the image recognition models can be first screened according to the weight coefficients, and it is determined whether the weight coefficients are greater than the preset coefficient. After the image recognition models with the weight coefficients greater than the preset coefficient are determined, the weight coefficients of these image recognition models can be processed in proportion. The specific process can be referred to the processing mode described above, and will not be described here.

[0164] In order to more clearly illustrate the image processing method of the present application, the image processing method of the present application will be further described below in conjunction with examples.

[0165] As shown in the figure, in one example, the image processing method of the present application can include the following steps: Figure 6

[0166] 1) Obtain a plurality of sample images, i.e., the source data test set images shown in the figure; each sample image is provided with a corresponding sample standard label, i.e., the source data test set label shown in the figure;

[0167] 2) For each sample image, input the sample image into at least two image recognition models respectively to obtain sample prediction labels of each image recognition model; wherein the image recognition model is trained based on initial samples and initial labels, i.e., the source data training set images and the source data training set labels shown in the figure;

[0168] 3) Match the sample standard label and the sample prediction label of each image recognition model, i.e., calculate the evaluation index shown in the figure;

[0169] 4) Determine the recognition accuracy of each image recognition model for the sample image, which is represented by the model score corresponding to each image recognition model in the figure;

[0170] 5) Select the image recognition model with the highest model score, and set the model class of the image recognition model as the sample classification label, i.e., the label class shown in the figure;

[0171] 6) Train the initial weight prediction model based on each sample image and the sample classification label corresponding to each sample image to obtain a weight prediction model, i.e., obtain the neural network shown in the figure;

[0172] 7) Input the image to be recognized into the weight prediction model to obtain the probability that the image to be recognized belongs to the classification labels of the at least two image recognition models, i.e., the probabilities of class 1, class 2, …, and class n shown in the figure.​

[0173] 8) determining a weight coefficient of each image recognition model based on probabilities that the to-be-recognized image respectively belongs to classification labels of the at least two image recognition models;

[0174] 9) identifying the to-be-recognized image based on the at least two image recognition models respectively to obtain a predicted label of each image recognition model; and determining a recognition result of the to-be-recognized image based on the weight coefficient of the at least two image recognition models respectively and the predicted label of each image recognition model.

[0175] The image processing method described above predicts the weight coefficient of the at least two image recognition models respectively for the to-be-recognized image through the weight prediction model, the weight coefficient of each image recognition model is proportional to the recognition accuracy of the image recognition model for the to-be-recognized image, and the final recognition result is determined based on the weight coefficient of different image recognition models and the predicted label of each image recognition model, so that the predicted label of the image recognition model with higher recognition accuracy can be emphasized and the predicted label of the image recognition model with lower recognition accuracy can be ignored, thereby improving the accuracy of the final recognition result.

[0176] Further, the initial weight prediction model is trained by each sample image and the image recognition model with the highest recognition accuracy for each sample image, so that the weight prediction model can output the weight coefficient proportional to the recognition accuracy of the image recognition model for the to-be-recognized image, thereby improving the accuracy of the final recognition result.

[0177] Figure 7 A structural schematic diagram of an image processing device provided by an embodiment of the present application is shown in FIG. 7. As shown in FIG. 7, the device includes: Figure 7

[0178] The first determining module 701 is configured to acquire a to-be-recognized image, and determine a weight coefficient of at least two image recognition models respectively for the to-be-recognized image based on a weight prediction model; wherein the weight coefficient of each image recognition model is proportional to the recognition accuracy of the image recognition model for the to-be-recognized image.

[0179] The identifying module 702 is configured to identify the to-be-recognized image based on the at least two image recognition models respectively to obtain a predicted label of each image recognition model.

[0180] The second determining module 703 is configured to determine a recognition result of the to-be-recognized image based on the weight coefficient of the at least two image recognition models respectively and the predicted label of each image recognition model.

[0181] In one possible implementation, the device further includes a training module configured to:

[0182] ​Acquire multiple sample images; each sample image has a corresponding sample standard label.

[0183] For each sample image, the sample image is input into at least two image recognition models to obtain the sample prediction label for each image recognition model;

[0184] Based on the standard annotation of the samples and the sample prediction annotation of each image recognition model, the recognition accuracy of each image recognition model for the sample images is determined.

[0185] The weighted prediction model is obtained based on the recognition accuracy of each image recognition model for the sample image.

[0186] In one possible implementation, the training module, when determining the recognition accuracy of each image recognition model for a sample image based on the standard annotations of the samples and the sample prediction annotations of each image recognition model, specifically uses the following:

[0187] The sample prediction labels of each image recognition model are matched with the standard sample labels to obtain the matching degree of each sample prediction label.

[0188] Set the matching degree of each sample prediction label as the recognition accuracy of the corresponding image recognition model.

[0189] In one possible implementation, when the training module obtains the weight prediction model based on the recognition accuracy of each image recognition model for the sample image, it is specifically used for:

[0190] Based on the recognition accuracy of each image recognition model, determine the image recognition model with the highest recognition accuracy for the sample image;

[0191] For each sample image, a weighted prediction model is obtained from the image recognition model with the highest recognition accuracy for that sample image.

[0192] In one possible implementation, when the training module obtains the weight prediction model based on the image recognition model with the highest recognition accuracy for each sample image, it is specifically used for:

[0193] For each sample image, the model category of the image recognition model with the highest recognition accuracy is set as the sample classification label;

[0194] The initial weight prediction model is trained based on each sample image and the corresponding sample classification label to obtain the weight prediction model.

[0195] In one possible implementation, when the first determining module 701 determines the weight coefficients of at least two image recognition models for the image to be recognized based on the weight prediction model, it is specifically used for:

[0196] inputting the to-be-identified image into the weight prediction model to obtain probabilities that the to-be-identified image respectively belongs to classification labels of the at least two image recognition models;

[0197] determining the weight coefficients of each image recognition model based on the probabilities that the to-be-identified image respectively belongs to classification labels of the at least two image recognition models.

[0198] In one possible implementation, for each image recognition model, the probability that the to-be-identified image belongs to the classification label of the image recognition model is directly proportional to the weight coefficient of the image recognition model.

[0199] In one possible implementation, the second determination module 703, when determining the recognition result of the to-be-identified image based on the weight coefficients of the at least two image recognition models respectively for the to-be-identified image and the predicted labels of each image recognition model, is specifically configured to:

[0200] determining a weighted sum of the predicted labels of each image recognition model based on the weight coefficients of the at least two image recognition models respectively for the to-be-identified image, to obtain the recognition result.

[0201] In one possible implementation, the second determination module 703, when determining the recognition result of the to-be-identified image based on the weight coefficients of the at least two image recognition models respectively for the to-be-identified image and the predicted labels of each image recognition model, is specifically configured to:

[0202] determining, from the at least two image recognition models, image recognition models with weight coefficients greater than a preset coefficient;

[0203] fusing the predicted labels of the image recognition models with weight coefficients greater than the preset coefficient to obtain the recognition result.

[0204] In one possible implementation, the second determination module 703, when determining the recognition result of the to-be-identified image based on the weight coefficients of the at least two image recognition models respectively for the to-be-identified image and the predicted labels of each image recognition model, is specifically configured to:

[0205] determining, from the at least two image recognition models, a preset number of image recognition models with the highest weight coefficients;

[0206] fusing the predicted labels of the preset number of image recognition models with the highest weight coefficients to obtain the recognition result.

[0207] The image processing device can predict the weight coefficients of the at least two image recognition models for the to-be-recognized image through the weight prediction model, the weight coefficient of each image recognition model is proportional to the recognition accuracy of the image recognition model for the to-be-recognized image, and the final recognition result is determined based on the weight coefficients of different image recognition models and the predicted labels of each image recognition model, so that the predicted label of the image recognition model with higher recognition accuracy can be emphasized, the predicted label of the image recognition model with lower recognition accuracy can be ignored, and the accuracy of the final recognition result is improved.

[0208] Further, the initial weight prediction model is trained by each sample image and the image recognition model with the highest recognition accuracy for each sample image, so that the weight prediction model can output the weight coefficients proportional to the recognition accuracy of the image recognition model for the to-be-recognized image, and the accuracy of the final recognition result is improved.

[0209] In another aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the image processing method.

[0210] Figure 8 The computer device provided in the embodiments of the present application is a structure schematic diagram of a computer device. As shown in Figure 8 The computer device includes a memory and a processor, and at least one program stored in the memory, which can be executed by the processor to implement the following technical effects compared with the prior art:

[0211] The weight prediction model is used to predict the weight coefficients of the at least two image recognition models for the to-be-recognized image, the weight coefficient of each image recognition model is proportional to the recognition accuracy of the image recognition model for the to-be-recognized image, and the final recognition result is determined based on the weight coefficients of different image recognition models and the predicted labels of each image recognition model, so that the predicted label of the image recognition model with higher recognition accuracy can be emphasized, the predicted label of the image recognition model with lower recognition accuracy can be ignored, and the accuracy of the final recognition result is improved.

[0212] In an optional embodiment, a computer device is provided, as shown in Figure 8 Figure 8 ​The computer device 800 shown includes a processor 801 and a memory 803. The processor 801 and the memory 803 are connected, for example, through a bus 802. Optionally, the computer device 800 can also include a transceiver 804, which can be used for data interaction, such as data sending and / or data receiving, between the computer device and other computer devices. It should be noted that the transceiver 804 is not limited to one in actual application, and the structure of the computer device 800 does not constitute a limitation to the embodiments of the present application.

[0213] The processor 801 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in combination with the disclosure of the present application. The processor 801 can also be a combination of computing functions, such as one or more microprocessor combinations, combinations of DSP and microprocessor, etc.

[0214] The bus 802 can include a path for transmitting information between the above-mentioned components. The bus 802 can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 802 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the middle, but it does not mean that there is only one bus or one type of bus.

[0215] The memory 803 can be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of storing desired program codes in the form of instructions or data structures and accessible by a computer, but is not limited thereto.

[0216] The memory 803 is configured to store application program codes (computer programs) for implementing the solutions of the present application, and the processor 801 is configured to control the execution of the application program codes. The processor 801 is configured to execute the application program codes stored in the memory 803 to implement the content shown in the foregoing method embodiments.

[0217] The computer device includes, but is not limited to, a virtualized computer device, a virtual machine, a server, a service cluster, a terminal of a user, and the like.

[0218] The computer readable storage medium provided by the embodiments of the present application stores computer programs, and when the computer programs run on a computer, the computer can execute the corresponding content of the image processing method in the foregoing method embodiments.

[0219] The embodiments of the present application provide a computer program product or a computer program, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the image processing method described above.

[0220] It should be understood that although the steps in the flowcharts of the drawings are shown in a sequential order, such processes can be practiced with the steps in different orders. Further, some steps can be performed simultaneously. Moreover, some steps can be omitted, or other steps can be added. Additionally, some steps can be performed by different components or a combination thereof. For example, at least some of the steps in the flowcharts of the drawings can be performed by the processor 102 of the electronic device 100, or a combination thereof.

[0221] It should be understood that the computer-readable medium described above in the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium may, for example, but is not limited to, be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination thereof. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave in a propagated data signal, in which the computer-readable program code is contained. Such a propagated data signal can take many forms, including but not limited to, an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium that is not a storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained in the computer-readable medium can be transmitted using any suitable medium, including but not limited to, wire, cable, RF (radio frequency), or the like, or any suitable combination thereof.

[0222] The computer-readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device and be not assembled into the electronic device.

[0223] The computer-readable medium described above carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the embodiments described above.

[0224] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0225] The computer program instructions can also be loaded onto a computer or other programmable information processing apparatus to cause a series of operations to be performed on the computer or other programmable information processing apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable information processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0226] The modules involved in the embodiments of the present disclosure can be implemented in the manner of software or hardware. Among them, the name of the module does not constitute the limitation of the module itself in some cases. For example, the first determining module can also be described as a "module for determining weight coefficients".

[0227] The above description is merely preferred embodiments of the present disclosure and a description of the principles of the technology used. Those skilled in the art should understand that the disclosed range of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features disclosed in the present disclosure (but not limited to) having similar functions to form technical solutions.

Claims

1. An image processing method, characterized in that, The method includes: Obtain the image to be identified, and determine the weight coefficients of at least two image recognition models for the image to be identified based on the weight prediction model; The weight coefficient of each image recognition model is proportional to the recognition accuracy of the image recognition model for the image to be recognized. The image to be identified is identified based on the at least two image recognition models respectively, and the predicted label of each image recognition model is obtained; Based on the weight coefficients of the at least two image recognition models for the image to be recognized and the predicted label of each image recognition model, the recognition result of the image to be recognized is determined. The weight prediction model is trained in the following manner: Multiple sample images are acquired; each sample image is assigned a corresponding sample standard label. For each sample image, the sample image is input into the at least two image recognition models respectively to obtain the sample prediction label of each image recognition model; Based on the standard annotation of the samples and the sample prediction annotation of each of the image recognition models, the recognition accuracy of each of the image recognition models for the sample images is determined; The weight prediction model is obtained based on the recognition accuracy of each image recognition model for the sample image.

2. The image processing method according to claim 1, characterized in that, The determination of the recognition accuracy of each image recognition model for the sample image, based on the sample standard annotation and the sample prediction annotation of each image recognition model, includes: The sample prediction label of each image recognition model is matched with the sample standard label to obtain the matching degree of each sample prediction label; The matching degree of each sample prediction label is set as the recognition accuracy of the corresponding image recognition model.

3. The image processing method according to claim 1, characterized in that, The step of obtaining the weight prediction model based on the recognition accuracy of each image recognition model for the sample image includes: Based on the recognition accuracy of each of the image recognition models, the image recognition model with the highest recognition accuracy for the sample image is determined; The weight prediction model is obtained based on the image recognition model with the highest recognition accuracy for each sample image.

4. The image processing method according to claim 3, characterized in that, The process of obtaining the weight prediction model based on the image recognition model with the highest recognition accuracy for each sample image includes: For each sample image, the model category of the image recognition model with the highest recognition accuracy for that sample image is set as the sample classification label; The initial weight prediction model is trained based on each sample image and the corresponding sample classification label to obtain the weight prediction model.

5. The image processing method according to claim 4, characterized in that, The determination of weight coefficients for at least two image recognition models for the image to be recognized based on the weight prediction model includes: The image to be identified is input into the weight prediction model to obtain the probability that the image to be identified belongs to the classification label of the at least two image recognition models respectively; The weight coefficient of each image recognition model is determined based on the probability that the image to be recognized belongs to the classification label of the at least two image recognition models.

6. The image processing method according to claim 5, characterized in that, For each of the image recognition models, the probability that the image to be recognized belongs to the classification label of the image recognition model is proportional to the weight coefficient of the image recognition model.

7. The image processing method according to claim 1, characterized in that, The step of determining the recognition result of the image to be recognized based on the weight coefficients of the at least two image recognition models for the image to be recognized and the predicted label of each image recognition model includes: Based on the weight coefficients of the at least two image recognition models for the image to be recognized, the weighted sum of the predicted labels of each image recognition model is determined to obtain the recognition result.

8. The image processing method according to claim 1, characterized in that, The step of determining the recognition result of the image to be recognized based on the weight coefficients of the at least two image recognition models for the image to be recognized and the predicted label of each image recognition model includes: From at least two image recognition models, determine the image recognition model whose weight coefficient is greater than a preset coefficient; The predicted labels of the image recognition model with weight coefficients greater than the preset coefficient are fused to obtain the recognition result.

9. The image processing method according to claim 1, characterized in that, The step of determining the recognition result of the image to be recognized based on the weight coefficients of the at least two image recognition models for the image to be recognized and the predicted label of each image recognition model includes: From at least two image recognition models, determine the preset number of image recognition models with the highest weight coefficients; The predicted labels of the image recognition models with the highest preset weight coefficients are fused to obtain the recognition result.

10. An image processing apparatus, characterized in that, The device includes: The first determining module is used to acquire the image to be identified and determine the weight coefficients of at least two image recognition models for the image to be identified based on the weight prediction model; wherein, the weight coefficient of each image recognition model is proportional to the recognition accuracy of the image recognition model for the image to be identified; The recognition module is used to recognize the image to be recognized based on the at least two image recognition models respectively, and obtain the predicted label of each image recognition model; The second determining module is used to determine the recognition result of the image to be recognized based on the weight coefficients of the at least two image recognition models for the image to be recognized and the predicted label of each image recognition model. The training module is used for: Multiple sample images are acquired; each sample image is assigned a corresponding sample standard label. For each sample image, the sample image is input into the at least two image recognition models respectively to obtain the sample prediction label of each image recognition model; Based on the standard annotation of the samples and the sample prediction annotation of each of the image recognition models, the recognition accuracy of each of the image recognition models for the sample images is determined; The weight prediction model is obtained based on the recognition accuracy of each image recognition model for the sample image.

11. The image processing apparatus according to claim 10, characterized in that, When determining the recognition accuracy of each image recognition model for the sample image based on the standard annotation of the samples and the sample prediction annotation of each image recognition model, the training module is specifically used for: The sample prediction label of each image recognition model is matched with the sample standard label to obtain the matching degree of each sample prediction label; The matching degree of each sample prediction label is set as the recognition accuracy of the corresponding image recognition model.

12. The image processing apparatus according to claim 10, characterized in that, When the training module obtains the weight prediction model based on the recognition accuracy of each image recognition model for the sample image, it is specifically used for: Based on the recognition accuracy of each of the image recognition models, the image recognition model with the highest recognition accuracy for the sample image is determined; The weight prediction model is obtained based on the image recognition model with the highest recognition accuracy for each sample image.

13. The image processing apparatus according to claim 12, characterized in that, When the training module obtains the weight prediction model based on the image recognition model with the highest recognition accuracy for each sample image, it is specifically used for: For each sample image, the model category of the image recognition model with the highest recognition accuracy for that sample image is set as the sample classification label; The initial weight prediction model is trained based on each sample image and the corresponding sample classification label to obtain the weight prediction model.

14. The image processing apparatus according to claim 13, characterized in that, When the first determining module determines the weight coefficients of at least two image recognition models for the image to be recognized based on the weight prediction model, it is specifically used for: The image to be identified is input into the weight prediction model to obtain the probability that the image to be identified belongs to the classification label of the at least two image recognition models respectively; The weight coefficient of each image recognition model is determined based on the probability that the image to be recognized belongs to the classification label of the at least two image recognition models.

15. The image processing apparatus according to claim 14, characterized in that, For each of the image recognition models, the probability that the image to be recognized belongs to the classification label of the image recognition model is proportional to the weight coefficient of the image recognition model.

16. The image processing apparatus according to claim 10, characterized in that, When the second determining module determines the recognition result of the image to be recognized based on the weight coefficients of the at least two image recognition models for the image to be recognized and the predicted label of each image recognition model, it is specifically used for: Based on the weight coefficients of the at least two image recognition models for the image to be recognized, the weighted sum of the predicted labels of each image recognition model is determined to obtain the recognition result.

17. The image processing apparatus according to claim 10, characterized in that, When the second determining module determines the recognition result of the image to be recognized based on the weight coefficients of the at least two image recognition models for the image to be recognized and the predicted label of each image recognition model, it is specifically used for: From at least two image recognition models, determine the image recognition model whose weight coefficient is greater than a preset coefficient; The predicted labels of the image recognition model with weight coefficients greater than the preset coefficient are fused to obtain the recognition result.

18. The image processing apparatus according to claim 10, characterized in that, When the second determining module determines the recognition result of the image to be recognized based on the weight coefficients of the at least two image recognition models for the image to be recognized and the predicted label of each image recognition model, it is specifically used for: From at least two image recognition models, determine the preset number of image recognition models with the highest weight coefficients; The predicted labels of the image recognition models with the highest preset weight coefficients are fused to obtain the recognition result.

19. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the image processing method according to any one of claims 1 to 9.

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

21. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the image processing method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Target detection result fusion method and device, equipment and medium

    CN113378969A