CN116777814A - Image processing methods, devices, computer equipment, storage media and program products - Google Patents
Image processing methods, devices, computer equipment, storage media and program products Download PDFInfo
- Publication number
- CN116777814A CN116777814A CN202210217587.6A CN202210217587A CN116777814A CN 116777814 A CN116777814 A CN 116777814A CN 202210217587 A CN202210217587 A CN 202210217587A CN 116777814 A CN116777814 A CN 116777814A
- Authority
- CN
- China
- Prior art keywords
- image
- recognition
- image recognition
- sample
- model
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Biophysics (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Quality & Reliability (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
Abstract
本申请提供一种图像处理方法、装置、计算机设备、存储介质及程序产品,涉及图像处理领域。图像处理方法包括:获取待识别图像,基于权重预测模型确定至少两个图像识别模型分别针对待识别图像的权重系数;其中,每一图像识别模型的权重系数与图像识别模型针对待识别图像的识别准确度成正比;基于至少两个图像识别模型分别识别待识别图像,得到每一图像识别模型的预测标签;基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果。本发明实施例可应用于地图领域,可以强调识别准确度较高的图像识别模型的预测标签,忽略识别准确度较低的图像识别模型的预测标签,从而提高最终识别结果的准确率。
This application provides an image processing method, device, computer equipment, storage medium and program product, relating to the field of image processing. The image processing method includes: obtaining an image to be recognized, and determining weight coefficients of at least two image recognition models respectively for the image to be recognized based on the weight prediction model; wherein the weight coefficient of each image recognition model is consistent with the recognition of the image to be recognized by the image recognition model. The accuracy is directly proportional; the image to be recognized is recognized based on at least two image recognition models respectively, and the predicted label of each image recognition model is obtained; the weight coefficient of the image to be recognized and the weight coefficient of each image recognition model based on at least two image recognition models are obtained. Predict labels to determine the recognition results of the image to be recognized. Embodiments of the present invention can be applied to the map field, and can emphasize the prediction labels of image recognition models with higher recognition accuracy and ignore the prediction labels of image recognition models with lower recognition accuracy, thereby improving the accuracy of the final recognition result.
Description
技术领域Technical field
本申请涉及图像处理技术领域,本申请涉及一种图像处理方法、装置、计算机设备、存储介质及程序产品。This application relates to the technical field of image processing. This application relates to an image processing method, device, computer equipment, storage medium and program product.
背景技术Background technique
随着信息技术的迅速发展,针对数据样本,例如图像通常存在多种工具,如多种不同的模型对这些图像进行处理,由于提取的特征不同,不同模型在不同的数据上表现能力存在差异。基于特定的融合策略,选择表现最好的模型,可以得到一个整体表现较好的图像处理结果。With the rapid development of information technology, there are usually multiple tools for data samples, such as images, such as multiple different models to process these images. Due to different features extracted, different models have different performance capabilities on different data. Based on a specific fusion strategy, selecting the best-performing model can result in an image processing result with better overall performance.
目前针对图像处理模型的融合,可以先设置正负样本,根据正负样本的特征向量的夹角计算置信度从而设置两个图像处理模型的权重,针对不同的待处理图像,融合后的两个图像处理模型的精确度可能不稳定。Currently, for the fusion of image processing models, you can first set the positive and negative samples, calculate the confidence based on the angle between the feature vectors of the positive and negative samples, and then set the weights of the two image processing models. For different images to be processed, the two fused The accuracy of image processing models can be unstable.
发明内容Contents of the invention
本申请提供了一种图像处理方法、装置、计算机设备、存储介质及程序产品,可以解决相关技术中针对不同的待处理图像无法确保融合后的模型精确度的问题。所述技术方案如下:This application provides an image processing method, device, computer equipment, storage medium and program product, which can solve the problem in related technologies that the accuracy of the fused model cannot be ensured for different images to be processed. The technical solutions are as follows:
一方面,提供了一种图像处理方法,方法包括:On the one hand, an image processing method is provided, and the method includes:
获取待识别图像,基于权重预测模型确定至少两个图像识别模型分别针对待识别图像的权重系数;其中,每一图像识别模型的权重系数与图像识别模型针对待识别图像的识别准确度成正比;Obtain the image to be recognized, and determine the weight coefficients of at least two image recognition models for the image to be recognized 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 recognized;
基于至少两个图像识别模型分别识别待识别图像,得到每一图像识别模型的预测标签;Respectively identify images to be recognized based on at least two image recognition models, and obtain predicted labels for each image recognition model;
基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果。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 predicted labels of each image recognition model.
在一个可能实现方式中,权重预测模型基于如下方式训练得到:In a possible implementation, the weight prediction model is trained based on the following method:
获取多个样本图像;每一样本图像设置有对应的样本标准标注;Acquire multiple sample images; each sample image is set with a corresponding sample standard annotation;
针对每一样本图像,将样本图像分别输入到至少两个图像识别模型中,得到每一图像识别模型的样本预测标注;For each sample image, input the sample image into at least two image recognition models respectively to obtain sample prediction annotations for each image recognition model;
基于样本标准标注和每一图像识别模型的样本预测标注,确定每一图像识别模型针对样本图像的识别准确度;Based on the sample standard annotation and the sample prediction annotation of each image recognition model, determine the recognition accuracy of each image recognition model for the sample image;
基于每一图像识别模型针对样本图像的识别准确度获取权重预测模型。A weight prediction model is obtained based on the recognition accuracy of each image recognition model for the sample image.
在一个可能实现方式中,基于样本标准标注和每一图像识别模型的样本预测标注,确定每一图像识别模型针对样本图像的识别准确度,包括:In one possible implementation, based on the sample standard annotation and the sample prediction annotation of each image recognition model, the recognition accuracy of each image recognition model for the sample image is determined, including:
将每一图像识别模型的样本预测标注与样本标准标注进行匹配,得到每一样本预测标注的匹配度;Match the sample prediction annotation of each image recognition model with the sample standard annotation to obtain the matching degree of the predicted annotation of each sample;
将每一样本预测标注的匹配度设为对应的图像识别模型的识别准确度。The matching degree of the predicted annotation of each sample is set to the recognition accuracy of the corresponding image recognition model.
在一个可能实现方式中,基于每一图像识别模型针对样本图像的识别准确度获取权重预测模型,包括:In one possible implementation, the weight prediction model is obtained based on the recognition accuracy of each image recognition model for the sample image, including:
基于每一图像识别模型的识别准确度确定针对样本图像识别准确度最高的图像识别模型;Determine the image recognition model with the highest recognition accuracy for the sample image based on the recognition accuracy of each image recognition model;
基于每一样本图像、针对每一样本图像识别准确度最高的图像识别模型获取权重预测模型。Based on each sample image, a weight prediction model is obtained for the image recognition model with the highest recognition accuracy for each sample image.
在一个可能实现方式中,基于每一样本图像、针对每一样本图像识别准确度最高的图像识别模型获取权重预测模型,包括:In one possible implementation, the weight prediction model is obtained based on each sample image and the image recognition model with the highest recognition accuracy for each sample image, including:
针对每一样本图像,将样本图像的识别准确度最高的图像识别模型的模型类别设为样本分类标签;For each sample image, set the model category of the image recognition model with the highest recognition accuracy of the sample image as the sample classification label;
基于每一样本图像、每一样本图像对应的样本分类标签对初始权重预测模型进行训练,得到权重预测模型。The initial weight prediction model is trained based on each sample image and the sample classification label corresponding to each sample image to obtain a weight prediction model.
在一个可能实现方式中,基于权重预测模型确定至少两个图像识别模型分别针对待识别图像的权重系数,包括:In one possible implementation, the weight coefficients of at least two image recognition models for the image to be recognized are determined based on the weight prediction model, including:
将待识别图像输入权重预测模型中,得到待识别图像分别属于至少两个图像识别模型的分类标签的概率;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 label of at least two image recognition models;
基于待识别图像分别属于至少两个图像识别模型的分类标签的概率确定每一图像识别模型的权重系数。The weight coefficient of each image recognition model is determined based on the probability that the images to be recognized respectively belong to the classification labels of at least two image recognition models.
在一个可能实现方式中,针对每一图像识别模型,待识别图像属于图像识别模型的分类标签的概率与图像识别模型的权重系数成正比。In one 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.
在一个可能实现方式中,基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果,包括:In one possible implementation, the recognition result of the image to be recognized is determined based on the weight coefficient of the image to be recognized and the predicted label of each image recognition model based on at least two image recognition models, including:
基于至少两个图像识别模型分别针对待识别图像的权重系数,确定每一图像识别模型的预测标签的加权和,得到识别结果。Based on the weight coefficients of at least two image recognition models respectively for the image to be recognized, a weighted sum of predicted labels of each image recognition model is determined to obtain a recognition result.
在一个可能实现方式中,基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果,包括:In one possible implementation, the recognition result of the image to be recognized is determined based on the weight coefficient of the image to be recognized and the predicted label of each image recognition model based on at least two image recognition models, including:
从至少两个图像识别模型中确定出权重系数大于预设系数的图像识别模型;Determine an image recognition model whose weight coefficient is greater than a preset coefficient from at least two image recognition models;
将权重系数大于预设系数的图像识别模型的预测标签进行融合,得到识别结果。The predicted labels of the image recognition models whose weight coefficients are greater than the preset coefficients are fused to obtain the recognition results.
在一个可能实现方式中,基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果,包括:In one possible implementation, the recognition result of the image to be recognized is determined based on the weight coefficient of the image to be recognized and the predicted label of each image recognition model based on at least two image recognition models, including:
从至少两个图像识别模型中确定出权重系数最高的预设个数的图像识别模型;Determine a preset number of image recognition models with the highest weight coefficients from at least two image recognition models;
将权重系数最高的预设个数的图像识别模型的预测标签进行融合,得到识别结果。The predicted labels of the preset number of image recognition models with the highest weight coefficients are fused to obtain the recognition results.
另一方面,提供了一种图像处理装置,装置包括:On the other hand, an image processing device is provided, and the device includes:
第一确定模块,用于获取待识别图像,基于权重预测模型确定至少两个图像识别模型分别针对待识别图像的权重系数;其中,每一图像识别模型的权重系数与图像识别模型针对待识别图像的识别准确度成正比;The first determination module is used to obtain the image to be recognized, and determine the weight coefficients of at least two image recognition models for the image to be recognized based on the weight prediction model; wherein the weight coefficient of each image recognition model and the image recognition model for the image to be recognized are is directly proportional to the recognition accuracy;
识别模块,用于基于至少两个图像识别模型分别识别待识别图像,得到每一图像识别模型的预测标签;A recognition module, configured to respectively identify images to be recognized based on at least two image recognition models, and obtain predicted labels for each image recognition model;
第二确定模块,用于基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果。The second determination module is configured to determine the recognition result of the image to be recognized based on the weight coefficient of the image to be recognized and the predicted label of each image recognition model based on at least two image recognition models.
在一个可能实现方式中,还包括训练模块,用于:In a possible implementation, a training module is also included for:
获取多个样本图像;每一样本图像设置有对应的样本标准标注;Acquire multiple sample images; each sample image is set with a corresponding sample standard annotation;
针对每一样本图像,将样本图像分别输入到至少两个图像识别模型中,得到每一图像识别模型的样本预测标注;For each sample image, input the sample image into at least two image recognition models respectively to obtain sample prediction annotations for each image recognition model;
基于样本标准标注和每一图像识别模型的样本预测标注,确定每一图像识别模型针对样本图像的识别准确度;Based on the sample standard annotation and the sample prediction annotation of each image recognition model, determine the recognition accuracy of each image recognition model for the sample image;
基于每一图像识别模型针对样本图像的识别准确度获取权重预测模型。A weight prediction model is obtained based on the recognition accuracy of each image recognition model for the sample image.
在一个可能实现方式中,训练模块在基于样本标准标注和每一图像识别模型的样本预测标注,确定每一图像识别模型针对样本图像的识别准确度时,具体用于:In one possible implementation, the training module is specifically used to 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:
将每一图像识别模型的样本预测标注与样本标准标注进行匹配,得到每一样本预测标注的匹配度;Match the sample prediction annotation of each image recognition model with the sample standard annotation to obtain the matching degree of the predicted annotation of each sample;
将每一样本预测标注的匹配度设为对应的图像识别模型的识别准确度。The matching degree of the predicted annotation of each sample is set to the recognition accuracy of the corresponding image recognition model.
在一个可能实现方式中,训练模块在基于每一图像识别模型针对样本图像的识别准确度获取权重预测模型时,具体用于: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 to:
基于每一图像识别模型的识别准确度确定针对样本图像识别准确度最高的图像识别模型;Determine the image recognition model with the highest recognition accuracy for the sample image based on the recognition accuracy of each image recognition model;
基于每一样本图像、针对每一样本图像识别准确度最高的图像识别模型获取权重预测模型。Based on each sample image, a weight prediction model is obtained for the image recognition model with the highest recognition accuracy for each sample image.
在一个可能实现方式中,训练模块在基于每一样本图像、针对每一样本图像识别准确度最高的图像识别模型获取权重预测模型时,具体用于:In a possible implementation, when the training module obtains the weight prediction model based on each sample image and the image recognition model with the highest recognition accuracy for each sample image, it is specifically used to:
针对每一样本图像,将样本图像的识别准确度最高的图像识别模型的模型类别设为样本分类标签;For each sample image, set the model category of the image recognition model with the highest recognition accuracy of the sample image as the sample classification label;
基于每一样本图像、每一样本图像对应的样本分类标签对初始权重预测模型进行训练,得到权重预测模型。The initial weight prediction model is trained based on each sample image and the sample classification label corresponding to each sample image to obtain a weight prediction model.
在一个可能实现方式中,第一确定模块在基于权重预测模型确定至少两个图像识别模型分别针对待识别图像的权重系数时,具体用于:In a possible implementation, when the first determination module determines the weight coefficients of at least two image recognition models respectively for the image to be recognized based on the weight prediction model, it is specifically used to:
将待识别图像输入权重预测模型中,得到待识别图像分别属于至少两个图像识别模型的分类标签的概率;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 label of at least two image recognition models;
基于待识别图像分别属于至少两个图像识别模型的分类标签的概率确定每一图像识别模型的权重系数。The weight coefficient of each image recognition model is determined based on the probability that the images to be recognized respectively belong to the classification labels of at least two image recognition models.
在一个可能实现方式中,针对每一图像识别模型,待识别图像属于图像识别模型的分类标签的概率与图像识别模型的权重系数成正比。In one 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.
在一个可能实现方式中,第二确定模块在基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果时,具体用于:In one possible implementation, when determining the recognition result of the image to be recognized based on at least two image recognition models for the weight coefficient of the image to be recognized and the prediction label of each image recognition model, the second determination module is specifically used to:
基于至少两个图像识别模型分别针对待识别图像的权重系数,确定每一图像识别模型的预测标签的加权和,得到识别结果。Based on the weight coefficients of at least two image recognition models respectively for the image to be recognized, a weighted sum of predicted labels of each image recognition model is determined to obtain a recognition result.
在一个可能实现方式中,第二确定模块在基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果时,具体用于:In one possible implementation, when determining the recognition result of the image to be recognized based on at least two image recognition models for the weight coefficient of the image to be recognized and the prediction label of each image recognition model, the second determination module is specifically used to:
从至少两个图像识别模型中确定出权重系数大于预设系数的图像识别模型;Determine an image recognition model whose weight coefficient is greater than a preset coefficient from at least two image recognition models;
将权重系数大于预设系数的图像识别模型的预测标签进行融合,得到识别结果。The predicted labels of the image recognition models whose weight coefficients are greater than the preset coefficients are fused to obtain the recognition results.
在一个可能实现方式中,第二确定模块在基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果时,具体用于:In one possible implementation, when determining the recognition result of the image to be recognized based on at least two image recognition models for the weight coefficient of the image to be recognized and the prediction label of each image recognition model, the second determination module is specifically used to:
从至少两个图像识别模型中确定出权重系数最高的预设个数的图像识别模型;Determine a preset number of image recognition models with the highest weight coefficients from at least two image recognition models;
将权重系数最高的预设个数的图像识别模型的预测标签进行融合,得到识别结果。The predicted labels of the preset number of image recognition models with the highest weight coefficients are fused to obtain the recognition results.
在一个可能实现方式中,第二确定模块在基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果时,具体用于:In one possible implementation, when determining the recognition result of the image to be recognized based on at least two image recognition models for the weight coefficient of the image to be recognized and the prediction label of each image recognition model, the second determination module is specifically used to:
从至少两个图像识别模型中确定出权重系数大于预设系数的目标识别模型;Determine a target recognition model with a weight coefficient greater than a preset coefficient from at least two image recognition models;
基于所确定的目标识别模型的权重系数将目标识别模型的预测标签进行融合,得到识别结果。Based on the determined weight coefficient of the target recognition model, the predicted labels of the target recognition model are fused to obtain the recognition result.
另一方面,提供了一种计算机设备,包括存储器、处理器及存储在存储器上的计算机程序,处理器执行计算机程序以实现上述的图像处理方法。On the other hand, a computer device is provided, including a memory, a processor, and a computer program stored on the memory. The processor executes the computer program to implement the above image processing method.
另一方面,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述的图像处理方法。On the other hand, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above image processing method is implemented.
另一方面,提供了一种计算机程序产品,包括计算机程序,计算机程序被处理器执行时实现上述的图像处理方法。On the other hand, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the above image processing method is implemented.
本申请提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solution provided by this application are:
通过权重预测模型来预测针对至少两个图像识别模型分别针对所述待识别图像的权重系数,每一所述图像识别模型的权重系数与所述图像识别模型针对所述待识别图像的识别准确度成正比,再基于不同图像识别模型的权重系数以及每一图像识别模型的预测标签来确定最终的识别结果,可以强调识别准确度较高的图像识别模型的预测标签,忽略识别准确度较低的图像识别模型的预测标签,从而提高最终识别结果的准确率。A weight prediction model is used to predict the weight coefficients of at least two image recognition models for the image to be recognized, and the weight coefficient of each image recognition model is related to the recognition accuracy of the image recognition model for the image to be recognized. Proportional to each other, 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. The predicted labels of the image recognition models with higher recognition accuracy can be emphasized and the prediction labels with lower recognition accuracy can be ignored. The predicted labels of the image recognition model, thereby improving the accuracy of the final recognition results.
进一步的,通过每一样本图像、针对每一样本图像识别准确度最高的图像识别模型对初始权重预测模型进行训练,使得权重预测模型可以输出与所述图像识别模型针对所述待识别图像的识别准确度成正比的权重系数,从而提高最终识别结果的准确率。Further, the initial weight prediction model is trained through 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 same recognition as the image recognition model for the image to be recognized. The weight coefficient is proportional to the accuracy, thereby improving the accuracy of the final recognition result.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对本申请实施例描述中所需要使用的附图作简单地介绍。In order to explain the technical solutions in the embodiments of the present application more clearly, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced below.
图1为本申请实施例提供的一种图像处理方法的实施环境示意图;Figure 1 is a schematic diagram of the implementation environment of an image processing method provided by an embodiment of the present application;
图2为本申请实施例提供的一种图像处理方法的流程示意图;Figure 2 is a schematic flow chart of an image processing method provided by an embodiment of the present application;
图3为本申请实施例提供的权重预测模型的获取方案的示意图;Figure 3 is a schematic diagram of the acquisition scheme of the weight prediction model provided by the embodiment of the present application;
图4为本申请示例提供的识别结果的获取的方案的示意图;Figure 4 is a schematic diagram of a scheme for obtaining recognition results provided by the example of this application;
图5为本申请示例提供的识别结果的获取的方案的示意图;Figure 5 is a schematic diagram of a scheme for obtaining recognition results provided by the example of this application;
图6为本申请示例提供的表情处理方案的示意图;Figure 6 is a schematic diagram of the expression processing solution provided by this application example;
图7为本申请实施例提供的一种图像处理装置的结构示意图;Figure 7 is a schematic structural diagram of an image processing device provided by an embodiment of the present application;
图8为本申请实施例提供的一种计算机设备的结构示意图。FIG. 8 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合本申请中的附图描述本申请的实施例。应理解,下面结合附图所阐述的实施方式,是用于解释本申请实施例的技术方案的示例性描述,对本申请实施例的技术方案不构成限制。The embodiments of the present application are described below with reference to the drawings in the present application. It should be understood that the embodiments described below in conjunction with the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and do not limit the technical solutions of the embodiments of the present application.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本申请实施例所使用的术语“包括”以及“包含”是指相应特征可以实现为所呈现的特征、信息、数据、步骤、操作、元件和/或组件,但不排除实现为本技术领域所支持其他特征、信息、数据、步骤、操作、元件、组件和/或它们的组合等。应该理解,当我们称一个元件被“连接”或“耦接”到另一元件时,该一个元件可以直接连接或耦接到另一元件,也可以指该一个元件和另一元件通过中间元件建立连接关系。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的术语“和/或”指示该术语所限定的项目中的至少一个,例如“A和/或B”指示实现为“A”,或者实现为“A”,或者实现为“A和B”。Those skilled in the art will understand that, unless expressly stated otherwise, the singular forms "a", "an", "the" and "the" used herein may also include the plural form. It should be further understood that the terms "comprising" and "including" used in the embodiments of this 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 Implementation is other features, information, data, steps, operations, elements, components and/or their combinations supported by the technical field. It should be understood that when we refer to an element being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, or one element and the other element may be connected to the other element through intervening elements. Establish connections. Additionally, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and/or" as used herein indicates at least one of the items defined by the term, for example, "A and/or B" indicates implemented as "A", or implemented as "A", or implemented as "A and B" ".
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, 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 accompanying drawings.
随着信息技术的迅速发展,存在大量数据样本,通常存在多种工具(如模型)对这些数据进行处理,由于提取的特征不同,不同模型在不同的数据上表现能力存在差异。考虑到这一点,基于特定的融合策略,在局部空间上动态选择表现最好的模型,可以得到一个整体表现较好的融合模型。通常而言,随着集成中个体模型数目的增大,集成的错误率将指数级下降,但不同模型表现差距过大时,模型融合的结果反而比单个模型的精度更低。With the rapid development of information technology, there are a large number of data samples, and there are usually multiple tools (such as models) to process these data. Due to different extracted features, different models have different performance capabilities on different data. Taking this into account, based on a specific fusion strategy and dynamically selecting the best performing model in the local space, 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. However, when the performance gap between different models is too large, the result of model fusion will be lower than the accuracy of a single model.
相关技术通过分类阈值确定多个分类模型中的每个的用于对多个训练样本进行分类的分类阈值;针对多个分类模型中的每个空间,将该分类模型关于多个训练样本的输出得分根据各个输出得分的概率密度划分成多个子空间,从而确定多个子空间内的各个单元的置信度,该置信度表示各个单元的输出得分的置信水平,再基于多个分类模型中的每个的预定权重和各个分类模型的分类阈值,对多个分类模型的分类阈值进行融合。The related technology determines a classification threshold for classifying multiple training samples for each of the multiple classification models through the classification threshold; for each space in the multiple classification models, outputs of the classification model with respect to the multiple training samples are The score is divided into multiple subspaces according to the probability density of each output score, thereby determining the confidence of each unit in the multiple subspaces. The confidence indicates the confidence level of the output score of each unit, and then based on each of the multiple classification models The predetermined weights and the classification thresholds of each classification model are used to fuse the classification thresholds of multiple classification models.
这种方式只是简单的根据正负样本指标计算分类阈值,该阈值与最终模型预测的结果没有直接联系,只是通过最终结果间接改进模型融合策略。This method simply calculates the classification threshold based on positive and negative sample indicators. This threshold is not directly related to the results predicted by the final model, but only indirectly improves the model fusion strategy through the final results.
还有一些相关技术中求取所述正样本和所述负样本中每个人脸图像的特征向量;根据所述特征向量,分别求取所述两个人脸识别模型对所述正样本和负样本中的人脸图像的特征向量的夹角,得到对应人脸识别模型的置信度;将所述两个人脸识别模型的置信度的结果进行比较,根据比较结果得到两个人脸识别模型的权重值的组合;根据所述权重值的组合,对所述两个人脸识别模型的权重计算,确定所述人脸识别融合模型,以确保利用所述两个人脸识别模型所生成的人脸识别融合模型的人脸识别精确度比单个人脸识别模型的精确度要高。In some related technologies, the feature vector of each face image in the positive sample and the negative sample is obtained; according to the feature vector, the two face recognition models are respectively obtained for the positive sample and the negative sample. The angle between the feature vectors of the face image in can be used to obtain the confidence of the corresponding face recognition model; compare the confidence results of the two face recognition models, and obtain the weight values of the two face recognition models based on the comparison results. The combination; according to the combination of the weight values, calculate the weight of the two face recognition models and determine the face recognition fusion model to ensure that the face recognition fusion model generated by using the two face recognition models The face recognition accuracy is higher than the accuracy of a single face recognition model.
这种方式依据特征向量的夹角计算置信度,从而间接设置权重,且模型数量有所限制,针对不同的待识别图像并不能确保识别结果的准确度。This method calculates the confidence based on the angle of the feature vector, thereby indirectly setting the weight, and the number of models is limited. It cannot ensure the accuracy of the recognition results for different images to be recognized.
本申请通过权重预测模型强调表现较好的模型,忽略表现较差的模型,即便不同模型表现差距较大,也可以取得较好的融合效果,得到的识别结果准确率较高。This application uses the weight prediction model to emphasize models with better performance and ignore models with poorer performance. Even if the performance gap between different models is large, a better fusion effect can be achieved, and the accuracy of the obtained recognition results is higher.
本申请实施例可应用于各种场景,包括但不限于人工智能等。示例性的,本申请提供的图像处理方法,可以应用于水体识别,通过已有数据集训练得到多个图像语义分割模型,每个模型在不同地区的表现效果不同,通过基于权重预测的图像识别模型融合策略,可以扬长避短,充分发挥多个图像识别模型的优势,得到精准的识别结果。The embodiments of this application can be applied to various scenarios, including but not limited to artificial intelligence. For example, the image processing method provided by this application can be applied to water body recognition. Multiple image semantic segmentation models are obtained through training on existing data sets. Each model has different performance effects in different regions. Through image recognition based on weight prediction The model fusion strategy can maximize strengths and avoid weaknesses, give full play to the advantages of multiple image recognition models, and obtain accurate recognition results.
人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个综合技术,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。Artificial Intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is the study of the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.
人工智能技术是一门综合学科,涉及领域广泛,既有硬件层面的技术也有软件层面的技术。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、语音处理技术、自然语言处理技术以及机器学习/深度学习、自动驾驶、智慧交通等几大方向。Artificial intelligence technology is a comprehensive subject that covers a wide range of fields, including both hardware-level technology and software-level technology. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, machine learning/deep learning, autonomous driving, smart transportation and other major directions.
机器学习(Machine Learning,ML)是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。机器学习是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域。机器学习和深度学习通常包括人工神经网络、置信网络、强化学习、迁移学习、归纳学习、式教学习等技术。Machine Learning (ML) is a multi-field interdisciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers can simulate or implement human learning behavior to acquire new knowledge or skills, and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, teaching learning and other technologies.
图1是本发明实施例提供的一种图像处理方法的实施环境的示意图,参见图1,具体的,根据至少两个图像识别模型分别识别样本图像,得到样本预测标注,从而确定每一图像识别模型针对样本图像的识别准确度,再利用每一图像识别模型的识别准确度和样本图像对初始权重预测模型进行训练,得到权重预测模型,利用权重预测模型确定至少两个图像识别模型分别针对所述待识别图像的权重系数,再根据每一图像识别模型针对待识别图像的预测标签和权重系数确定最终的识别结果。Figure 1 is a schematic diagram of the implementation environment of an image processing method provided by an embodiment of the present invention. Refer to Figure 1. Specifically, sample images are respectively identified according to at least two image recognition models, and sample prediction annotations are obtained, thereby determining each image recognition The model aims at the recognition accuracy of the sample image, and then uses the recognition accuracy of each image recognition model and the sample image to train the initial weight prediction model to obtain the weight prediction model. The weight prediction model is used to determine at least two image recognition models that are respectively suitable for the target. The weight coefficient of the image to be recognized is described, and then the final recognition result is determined based on the predicted label and weight coefficient of each image recognition model for the image to be recognized.
可以理解的是,图1表示的是一个示例中的应用场景,并不对本申请的图像处理方法的应用场景进行限定。It can be understood that Figure 1 represents an application scenario in an example and does not limit the application scenarios of the image processing method of the present application.
图2为本申请实施例提供的一种图像处理方法的流程示意图。该方法的执行主体可以为计算机设备。如图2所示,该方法可以包括以下步骤:FIG. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present application. The execution subject of this method may be a computer device. As shown in Figure 2, the method may include the following steps:
步骤201,获取待识别图像,基于权重预测模型确定至少两个图像识别模型分别针对待识别图像的权重系数。Step 201: Obtain the image to be recognized, and determine the weight coefficients of at least two image recognition models for the image to be recognized based on the weight prediction model.
其中,每一图像识别模型的权重系数与图像识别模型针对待识别图像的识别准确度成正比。Among them, 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.
其中,图像识别模型可以是语义分割网络,例如,全卷积网络(Fully ConvolutionNetwork,FCN)、UNet网络、UNet++网络、HRNet网络(高分辨率网络);其中,UNet网络和UNet++网络均为全卷机神经网络,是像素级分类,输出的则是每个像素点的类别。Among them, the image recognition model can be a semantic segmentation network, such as a fully convolution network (FCN), UNet network, UNet++ network, HRNet network (high-resolution network); among them, UNet network and UNet++ network are both full-volume Machine neural network is a pixel-level classification, and the output is the category of each pixel.
具体的,图像识别模型对图像进行识别的过程可以是语义分割网络对图像逐像素点进行预测的过程。Specifically, the process of image recognition by the image recognition model can be the process of predicting the image pixel by pixel by the semantic segmentation network.
以Unet++为例,Unet++引入了一个内置的深度可变的UNet集合,可为不同大小的对象提供改进的分割性能,并重新设计了UNet++中的跳接,从而在解码器中实现了灵活的特征融合,通过设计了一种方案来剪枝经过训练的UNet++,在保持其性能的同时加快其推理速度,同时训练嵌入在UNet++体系结构中的多深度UNet可以激发组成UNet之间的协作学习,与单独训练具有相同体系结构的隔离UNet相比,可以带来更好的性能。Taking Unet++ as an example, Unet++ introduces a built-in variable-depth UNet collection that provides improved segmentation performance for objects of different sizes, and redesigns jumpers in UNet++ to enable flexible features in the decoder. Fusion, by designing a scheme to prune the trained UNet++ to speed up its inference while maintaining its performance, while training multi-depth UNet embedded in the UNet++ architecture can stimulate collaborative learning among the component UNet, and It can lead to better performance than training isolated UNet with the same architecture separately.
以HRNet为例,HRnet将高低分辨率之间的链接由串联改为并联,在整个网络结构中都保持了高分辨率的表征,并在高低分辨率中引入了交互来提高模型性能。Taking HRNet as an example, HRnet changes the link between high and low resolutions from series to parallel, maintains high-resolution representation throughout the network structure, and introduces interaction between high and low resolutions to improve model performance.
其中,权重预测模型可以是卷积神经网络,权重预测模型的输入为图像,输出图像分别适合被至少两个图像识别模型进行识别的概率,即输出为不同图像识别模型的概率。The weight prediction model may be a convolutional neural network. The input of the weight prediction model is an image, and the output image is a probability that it is suitable for recognition by at least two image recognition models, that is, the probability that the output is a different image recognition model.
以权重预测模型为BagNet为例,其中,BagNet为一种图像分类的卷积神经网络,BagNet不考虑空间排序,而是根据图像的小型局部特征对图像进行分类,其对局部特征的约束可以直接分析图像的每个部分是如何影响分类,这种方式使其更注重于图像的整体信息,能够较好地学习到有用的空间信息,摒除噪声数据的影响。其简要流程如下:Take the weight prediction model BagNet as an example. BagNet is a convolutional neural network for image classification. BagNet does not consider spatial sorting, but classifies images based on small local features of the image. Its constraints on local features can be directly Analyze how each part of the image affects classification. This method makes it focus more on the overall information of the image, and can better learn useful spatial information and eliminate the influence of noisy data. The brief process is as follows:
1)将输入的图像截取为一定大小像素的图像块;1) Cut the input image into image blocks of a certain size of pixels;
2)在截取图像块之后,在每一个图像块上使用1×1卷积的深度网络进而获得类别向量;2) After intercepting the image blocks, use a 1×1 convolutional deep network on each image block to obtain the category vector;
3)依照空间对所有输出的类别向量进行求和处理;3) Sum all output category vectors according to space;
4)通过类别向量最大的元素计数预测分类类别,输出每个类别的预测概率。得到每个类别的概率,即为图像分别适合被至少两个图像识别模型进行识别的概率。4) Predict the classification category through the largest element count of the category vector, and output the predicted probability of each category. The probability obtained for each category is the probability that the image is suitable for recognition by at least two image recognition models.
具体的,可以分别基于至少两个图像识别模型对样本图像进行识别,确定每一图像识别模型针对样本图像的识别准确度,从而判断针对不同图像识别模型适用于什么样的样本图像,再基于不同图像识别模型的识别准确度和样本图像训练得到权重预测模型,具体针对权重预测模型的获取过程将在下文进行进一步详细阐述。Specifically, the sample images can be recognized based on at least two image recognition models, and the recognition accuracy of each image recognition model for the sample images can be determined, so as to determine what kind of sample images are suitable for different image recognition models, and then based on different The recognition accuracy of the image recognition model and the sample image training are used to obtain the weight prediction model. The specific acquisition process of the weight prediction model will be further elaborated below.
步骤202,基于至少两个图像识别模型分别识别待识别图像,得到每一图像识别模型的预测标签。Step 202: Recognize the image to be recognized based on at least two image recognition models, and obtain the predicted label of each image recognition model.
其中,图像识别模型是基于训练样本和训练样本对应的训练标签所训练得到的。Among them, the image recognition model is trained based on the training samples and the training labels corresponding to the training samples.
具体的,将待识别图像分别输入到不同的图像识别模型中,得到不同的图像识别模型针对待识别图像的预测标签。Specifically, the images to be recognized are input into different image recognition models respectively, and the predicted labels of the images to be recognized by different image recognition models are obtained.
步骤203,基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果。Step 203: 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 labels of each image recognition model.
在一些实施方式中,可以基于权重系数,选择权重系数最大的图像识别模型的预测标签,确定识别结果。In some implementations, based on the weight coefficient, the predicted label of the image recognition model with the largest weight coefficient can be selected to determine the recognition result.
在另一些实施方式中,可以基于不同图像识别模型的权重系数,从多个图像识别模型中,选取权重系数大于预设阈值的图像识别模型,基于所选取的图像识别模型的预测标签来确定识别结果。In other embodiments, based on the weight coefficients of different image recognition models, an image recognition model with a weight coefficient greater than a preset threshold can be selected from multiple image recognition models, and the recognition can be determined based on the predicted label of the selected image recognition model. result.
在还有一些实施方式中,还可以基于不同图像识别模型的权重系数,将不同图像识别模型的预测标签进行融合,得到识别结果,具体针对识别结果的获取过程,将在下文进行进一步详细阐述。In some embodiments, the prediction labels of different image recognition models can also be fused based on the weight coefficients of different image recognition models to obtain recognition results. The specific process of obtaining the recognition results will be further elaborated below.
上述实施例中,通过权重预测模型来预测针对至少两个图像识别模型分别针对待识别图像的权重系数,每一图像识别模型的权重系数与图像识别模型针对待识别图像的识别准确度成正比,再基于不同图像识别模型的权重系数以及每一图像识别模型的预测标签来确定最终的识别结果,可以强调识别准确度较高的图像识别模型的预测标签,忽略识别准确度较低的图像识别模型的预测标签,从而提高最终识别结果的准确率。In the above embodiment, the weight prediction model is used to predict the weight coefficients of at least two image recognition models for the image to be recognized, and 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 final recognition result is then determined based on the weight coefficients of different image recognition models and the predicted labels of each image recognition model. The predicted labels of the image recognition models with higher recognition accuracy can be emphasized and the image recognition models with lower recognition accuracy can be ignored. predicted labels, thereby improving the accuracy of the final recognition result.
以下将结合实施例进一步阐述获取权重预测模型的过程。The process of obtaining the weight prediction model will be further explained below with reference to embodiments.
在一个可能实现方式中,如图3所示,权重预测模型可以基于如下方式训练得到:In a possible implementation, as shown in Figure 3, the weight prediction model can be trained based on the following method:
步骤S301,获取多个样本图像。Step S301: Obtain multiple sample images.
其中,每一样本图像设置有对应的样本标准标注,样本标准标注可以接近或理想情况下等同于样本的真实标注。Among them, each sample image is set with a corresponding sample standard annotation, and the sample standard annotation can be close to or ideally equivalent to the real annotation of the sample.
步骤S302,针对每一样本图像,将样本图像分别输入到至少两个图像识别模型中,得到每一图像识别模型的样本预测标注。Step S302: For each sample image, input the sample image into at least two image recognition models respectively to obtain sample prediction annotations for each image recognition model.
其中,图像识别模型为已经经过训练的模型。Among them, the image recognition model is a model that has been trained.
可以理解的是,这里的样本图像输入到图像识别模型,目的并不是为了对图像识别模型进行训练,而是判断已经经过训练的图像识别模型针对样本图像的识别准确度。It can be understood that the purpose of inputting the sample images here to the image recognition model is not to train the image recognition model, but to judge the recognition accuracy of the trained image recognition model for the sample images.
步骤S303,基于样本标准标注和每一图像识别模型的样本预测标注,确定每一图像识别模型针对样本图像的识别准确度。Step S303: 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.
具体的,步骤S303基于样本标准标注和每一图像识别模型的样本预测标注,确定每一图像识别模型针对样本图像的识别准确度,可以包括:Specifically, step S303 determines 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, which may include:
(1)将每一图像识别模型的样本预测标注与样本标准标注进行匹配,得到每一样本预测标注的匹配度;(1) Match the sample prediction annotation of each image recognition model with the sample standard annotation to obtain the matching degree of the predicted annotation of each sample;
(2)将每一样本预测标注的匹配度设为对应的图像识别模型的识别准确度。(2) Set the matching degree of the predicted annotation of each sample to the recognition accuracy of the corresponding image recognition model.
具体的,可以通过计算相似度的方式来计算样本预测标注与样本标准标注之间的匹配度,还可以通过例如计算交并比的方式来计算样本预测标注与样本标准标注之间的重合度,即匹配度,具体确定匹配度的方式在此不作限定。Specifically, the matching degree between the sample prediction annotation and the sample standard annotation can be calculated by calculating the similarity. The coincidence degree between the sample prediction annotation and the sample standard annotation can also be calculated by, for example, calculating the intersection ratio. That is, the matching degree. The specific method of determining the matching degree is not limited here.
步骤S304,基于每一图像识别模型针对样本图像的识别准确度获取权重预测模型。Step S304: Obtain a weight prediction model based on the recognition accuracy of each image recognition model for the sample image.
具体的,步骤S304基于每一图像识别模型针对样本图像的识别准确度获取权重预测模型,可以包括:Specifically, step S304 obtains a weight prediction model based on the recognition accuracy of each image recognition model for the sample image, which may include:
(1)基于每一图像识别模型的识别准确度确定针对样本图像识别准确度最高的图像识别模型;(1) Based on the recognition accuracy of each image recognition model, determine the image recognition model with the highest accuracy for sample image recognition;
(2)基于每一样本图像、针对每一样本图像识别准确度最高的图像识别模型获取权重预测模型。(2) Based on each sample image, obtain the weight prediction model for the image recognition model with the highest recognition accuracy for each sample image.
在具体实施过程中,基于每一样本图像、针对每一样本图像识别准确度最高的图像识别模型获取权重预测模型,可以包括:In the specific implementation process, the weight prediction model is obtained based on each sample image and the image recognition model with the highest recognition accuracy for each sample image, which may include:
a、针对每一样本图像,将样本图像的识别准确度最高的图像识别模型的模型类别设为样本分类标签;a. For each sample image, set the model category of the image recognition model with the highest recognition accuracy of the sample image as the sample classification label;
b、基于每一样本图像、每一样本图像对应的样本分类标签对初始权重预测模型进行训练,得到权重预测模型。b. 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.
在具体实施过程中,通过每一样本图像、每一样本图像对应的样本分类标签对初始权重预测模型进行训练,使得初始权重预测模型输出的最高概率的样本分类标签尽可能为识别准确度最高的图像识别模型。During the specific implementation process, the initial weight prediction model is trained through each sample image and the 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 one with the highest recognition accuracy as much as possible. Image recognition model.
具体的,样本图像输入到权重预测模型,会得到不同图像识别模型的候选分类标签的概率,进一步输出概率最高的图像识别模型的样本分类标签。Specifically, when the sample image is input to the weight prediction model, the probability of candidate classification labels of different image recognition models will be obtained, and the sample classification label of the image recognition model with the highest probability will be further output.
上述实施例中,通过每一样本图像、针对每一样本图像识别准确度最高的图像识别模型对初始权重预测模型进行训练,使得权重预测模型可以输出与图像识别模型针对待识别图像的识别准确度成正比的权重系数,从而提高最终识别结果的准确率。In the above embodiment, the initial weight prediction model is trained through 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 same recognition accuracy as the image recognition model for the image to be recognized. Proportional weight coefficient, thereby improving the accuracy of the final recognition result.
上述实施例阐述了获取权重预测模型的过程的具体获取过程,以下将结合附图和实施例进一步阐述权重系数的过程。The above embodiments illustrate the specific acquisition process of obtaining the weight prediction model. The process of obtaining the weight coefficient will be further explained below with reference to the accompanying drawings and embodiments.
在一个可能实现方式中,步骤S201基于权重预测模型确定至少两个图像识别模型分别针对待识别图像的权重系数,可以包括:In one possible implementation, step S201 determines the weight coefficients of at least two image recognition models respectively for the image to be recognized based on the weight prediction model, which may include:
(1)将待识别图像输入权重预测模型中,得到待识别图像分别属于至少两个图像识别模型的分类标签的概率;(1) Input the image to be recognized into the weight prediction model and obtain the probability that the image to be recognized belongs to the classification label of at least two image recognition models;
(2)基于待识别图像分别属于至少两个图像识别模型的分类标签的概率确定每一图像识别模型的权重系数。(2) Determine the weight coefficient of each image recognition model based on the probability that the image to be recognized belongs to the classification labels of at least two image recognition models.
具体的,针对每一图像识别模型,分类标签的概率越高,该分类标签对应的图像识别模型越有可能针对待识别图像取得更好的识别效果,即待识别图像属于图像识别模型的分类标签的概率与图像识别模型的权重系数成正比。Specifically, for each image recognition model, the higher the probability of the classification label, the more likely the image recognition model corresponding to the classification label will achieve better recognition results for the image to be recognized, that is, the image to be recognized belongs to the classification label of the image recognition model The probability is proportional to the weight coefficient of the image recognition model.
在具体实施过程中,可以直接将待识别图像属于图像识别模型的分类标签的概率设为图像识别模型的权重系数。In the specific implementation process, the probability that the image to be recognized belongs to the classification label of the image recognition model can be directly set as the weight coefficient of the image recognition model.
上述实施例阐述了权重系数的确定过程,以下将结合附图和实施例进一步阐述图像的识别结果的具体获取过程。The above embodiments illustrate the determination process of the weight coefficient, and the specific acquisition process of the image recognition result will be further elaborated below with reference to the accompanying drawings and embodiments.
在一些可能的实施方式中,可以将所有图像识别模型的预测标签进行融合,得到识别结果。In some possible implementations, the predicted labels of all image recognition models can be fused to obtain the recognition result.
具体的,步骤S203基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果,可以包括:Specifically, step S203 determines the recognition result of the image to be recognized based on the weight coefficient of the image to be recognized and the prediction label of each image recognition model based on at least two image recognition models, which may include:
基于至少两个图像识别模型分别针对待识别图像的权重系数,确定每一图像识别模型的预测标签的加权和,得到识别结果。Based on the weight coefficients of at least two image recognition models respectively for the image to be recognized, a weighted sum of predicted labels of each image recognition model is determined to obtain a recognition result.
具体的,如图4所示,将所有图像识别模型的预测标签基于各自的权重系数计算加权和,得到识别结果。Specifically, as shown in Figure 4, the weighted sum of the predicted labels of all image recognition models is calculated based on their respective weight coefficients to obtain the recognition results.
在一些可能的实施方式中,可以基于权重系数最高的预设个数的图像识别模型确定识别结果。In some possible implementations, the recognition result may be determined based on a preset number of image recognition models with the highest weight coefficients.
具体的,步骤S203基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果,可以包括:Specifically, step S203 determines the recognition result of the image to be recognized based on the weight coefficient of the image to be recognized and the prediction label of each image recognition model based on at least two image recognition models, which may include:
基于至少两个图像识别模型分别针对待识别图像的权重系数,确定权重系数最高的预设个数的图像识别模型;Based on the weight coefficients of at least two image recognition models for the image to be recognized, determine a preset number of image recognition models with the highest weight coefficients;
将权重系数最高的预设个数的图像识别模型的预测标签进行融合,得到识别结果。The predicted labels of the preset number of image recognition models with the highest weight coefficients are fused to obtain the recognition results.
具体的,确定出权重系数最高的预设个数的图像识别模型后,可以对这些图像识别模型的权重系数按比例进行处理。Specifically, after a preset number of image recognition models with the highest weight coefficients are determined, the weight coefficients of these image recognition models can be processed proportionally.
如图5所示,权重系数最高的两个图像识别模型的权重系数分别为0.5和0.3,则可以对这些权重系数按比例调整为0.625和0.375。As shown in Figure 5, the weight coefficients of the two image recognition models with the highest weight coefficients are 0.5 and 0.3 respectively. These weight coefficients can be adjusted proportionally to 0.625 and 0.375.
在又一些可能的实施方式中,可以将权重系数较大的图像识别模型的预测标签进行融合,得到识别结果。In some possible implementations, prediction labels of image recognition models with larger weight coefficients can be fused to obtain recognition results.
具体的,步骤S203基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果,可以包括:Specifically, step S203 determines the recognition result of the image to be recognized based on the weight coefficient of the image to be recognized and the prediction label of each image recognition model based on at least two image recognition models, which may include:
从至少两个图像识别模型中确定出权重系数大于预设系数的图像识别模型;Determine an image recognition model whose weight coefficient is greater than a preset coefficient from at least two image recognition models;
将权重系数大于预设系数的图像识别模型的预测标签进行融合,得到识别结果。The predicted labels of the image recognition models whose weight coefficients are greater than the preset coefficients are fused to obtain the recognition results.
具体的,可以先根据权重系数对图像识别模型进行筛选,判断权重系数是否大于预设系数,确定出权重系数大于预设系数的图像识别模型后,可以对这些图像识别模型的权重系数按比例进行处理,具体过程可以参见上文的处理方式,在此不再进行赘述。Specifically, the image recognition models can be screened based on the weight coefficients to determine whether the weight coefficients are greater than the preset coefficients. After determining the image recognition models whose weight coefficients are greater than the preset coefficients, the weight coefficients of these image recognition models can be proportionally calculated. Processing, the specific process can be found in the above processing method, and will not be repeated here.
为了更清楚的阐述本申请的图像处理方法,以下将结合示例对本申请的图像处理方法进行进一步说明。In order to explain the image processing method of the present application more clearly, the image processing method of the present application will be further described below with examples.
如图6所示,在一个示例中,本申请的图像处理方法,可以包括如下步骤:As shown in Figure 6, in one example, the image processing method of this application may include the following steps:
1)获取多个样本图像,即图中所示的源数据测试集图像;每一样本图像设置有对应的样本标准标注,即图中所示的源数据测试集标注;1) Acquire multiple sample images, that is, the source data test set images shown in the figure; each sample image is set with a corresponding sample standard annotation, that is, the source data test set annotation shown in the figure;
2)针对每一样本图像,将样本图像分别输入到至少两个图像识别模型中,得到每一图像识别模型的样本预测标注;其中,图像识别模型是基于初始样本和初始标注训练得到的,即图中所示的源数据训练集图像和源数据训练集标注训练得到的;2) For each sample image, input the sample image into at least two image recognition models respectively to obtain the sample prediction annotation of each image recognition model; wherein, the image recognition model is trained based on the initial sample and initial annotation, that is, The source data training set images shown in the figure and the source data training set annotation training are obtained;
3)将样本标准标注和每一图像识别模型的样本预测标注进行匹配,即图中所示的评测指标计算;3) Match the sample standard annotation with the sample prediction annotation of each image recognition model, that is, the evaluation index calculation shown in the figure;
4)确定每一图像识别模型针对样本图像的识别准确度,用图中每一图像识别模型对应的模型分数表示;4) Determine the recognition accuracy of each image recognition model for the sample image, expressed by the model score corresponding to each image recognition model in the figure;
5)选取模型分数最高的图像识别模型,将该图像识别模型的模型类别设为样本分类标签,即图中所示的标注类别;5) Select the image recognition model with the highest model score, and set the model category of the image recognition model to the sample classification label, that is, the annotation category shown in the figure;
6)根据基于每一样本图像、每一样本图像对应的样本分类标签对初始权重预测模型进行训练,得到权重预测模型,即得到图中所示的神经网络;6) Train the 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, that is, obtain the neural network shown in the figure;
7)将待识别图像输入权重预测模型中,得到待识别图像分别属于至少两个图像识别模型的分类标签的概率,即图中所示的类别1概率、类别2概率……类别n概率;7) Input the image to be recognized into the weight prediction model, and obtain the probability that the image to be recognized belongs to the classification label of at least two image recognition models, that is, the probability of category 1, the probability of category 2, and the probability of category n shown in the figure;
8)基于待识别图像分别属于至少两个图像识别模型的分类标签的概率确定每一图像识别模型的权重系数;8) Determine the weight coefficient of each image recognition model based on the probability that the image to be recognized belongs to the classification label of at least two image recognition models;
9)基于至少两个图像识别模型分别识别待识别图像,得到每一图像识别模型的预测标签;基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果。9) Respectively identify the image to be recognized based on at least two image recognition models, and obtain the predicted label of each image recognition model; based on the weight coefficient of the image to be recognized and the predicted label of each image recognition model based on at least two image recognition models, Determine the recognition result of the image to be recognized.
上述图像处理方法,通过权重预测模型来预测针对至少两个图像识别模型分别针对待识别图像的权重系数,每一图像识别模型的权重系数与图像识别模型针对待识别图像的识别准确度成正比,再基于不同图像识别模型的权重系数以及每一图像识别模型的预测标签来确定最终的识别结果,可以强调识别准确度较高的图像识别模型的预测标签,忽略识别准确度较低的图像识别模型的预测标签,从而提高最终识别结果的准确率。The above image processing method uses a weight prediction model to predict the weight coefficients of at least two image recognition models for the image to be recognized, and 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 final recognition result is then determined based on the weight coefficients of different image recognition models and the predicted labels of each image recognition model. The predicted labels of the image recognition models with higher recognition accuracy can be emphasized and the image recognition models with lower recognition accuracy can be ignored. predicted labels, thereby improving the accuracy of the final recognition result.
进一步的,通过每一样本图像、针对每一样本图像识别准确度最高的图像识别模型对初始权重预测模型进行训练,使得权重预测模型可以输出与图像识别模型针对待识别图像的识别准确度成正比的权重系数,从而提高最终识别结果的准确率。Further, the initial weight prediction model is trained through 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 an output proportional to the image recognition model's recognition accuracy for the image to be recognized. weight coefficient, thereby improving the accuracy of the final recognition result.
图7为本申请实施例提供的一种图像处理装置的结构示意图。如图7所示,该装置包括:FIG. 7 is a schematic structural diagram of an image processing device provided by an embodiment of the present application. As shown in Figure 7, the device includes:
第一确定模块701,用于获取待识别图像,基于权重预测模型确定至少两个图像识别模型分别针对待识别图像的权重系数;其中,每一图像识别模型的权重系数与图像识别模型针对待识别图像的识别准确度成正比;The first determination module 701 is used to obtain the image to be recognized, and determine the weight coefficients of at least two image recognition models for the image to be recognized based on the weight prediction model; wherein the weight coefficient of each image recognition model and the image recognition model for the image to be recognized are The recognition accuracy of the image is directly proportional;
识别模块702,用于基于至少两个图像识别模型分别识别待识别图像,得到每一图像识别模型的预测标签;The identification module 702 is used to identify images to be recognized based on at least two image recognition models, and obtain predicted labels for each image recognition model;
第二确定模块703,用于基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果。The second determination module 703 is configured to determine the recognition result of the image to be recognized based on the weight coefficient of the image to be recognized and the prediction label of each image recognition model of at least two image recognition models.
在一个可能实现方式中,还包括训练模块,用于:In a possible implementation, a training module is also included for:
获取多个样本图像;每一样本图像设置有对应的样本标准标注;Acquire multiple sample images; each sample image is set with a corresponding sample standard annotation;
针对每一样本图像,将样本图像分别输入到至少两个图像识别模型中,得到每一图像识别模型的样本预测标注;For each sample image, input the sample image into at least two image recognition models respectively to obtain sample prediction annotations for each image recognition model;
基于样本标准标注和每一图像识别模型的样本预测标注,确定每一图像识别模型针对样本图像的识别准确度;Based on the sample standard annotation and the sample prediction annotation of each image recognition model, determine the recognition accuracy of each image recognition model for the sample image;
基于每一图像识别模型针对样本图像的识别准确度获取权重预测模型。A weight prediction model is obtained based on the recognition accuracy of each image recognition model for the sample image.
在一个可能实现方式中,训练模块在基于样本标准标注和每一图像识别模型的样本预测标注,确定每一图像识别模型针对样本图像的识别准确度时,具体用于:In one possible implementation, the training module is specifically used to 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:
将每一图像识别模型的样本预测标注与样本标准标注进行匹配,得到每一样本预测标注的匹配度;Match the sample prediction annotation of each image recognition model with the sample standard annotation to obtain the matching degree of the predicted annotation of each sample;
将每一样本预测标注的匹配度设为对应的图像识别模型的识别准确度。The matching degree of the predicted annotation of each sample is set to the recognition accuracy of the corresponding image recognition model.
在一个可能实现方式中,训练模块在基于每一图像识别模型针对样本图像的识别准确度获取权重预测模型时,具体用于: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 to:
基于每一图像识别模型的识别准确度确定针对样本图像识别准确度最高的图像识别模型;Determine the image recognition model with the highest recognition accuracy for the sample image based on the recognition accuracy of each image recognition model;
基于每一样本图像、针对每一样本图像识别准确度最高的图像识别模型获取权重预测模型。Based on each sample image, a weight prediction model is obtained for the image recognition model with the highest recognition accuracy for each sample image.
在一个可能实现方式中,训练模块在基于每一样本图像、针对每一样本图像识别准确度最高的图像识别模型获取权重预测模型时,具体用于:In a possible implementation, when the training module obtains the weight prediction model based on each sample image and the image recognition model with the highest recognition accuracy for each sample image, it is specifically used to:
针对每一样本图像,将样本图像的识别准确度最高的图像识别模型的模型类别设为样本分类标签;For each sample image, set the model category of the image recognition model with the highest recognition accuracy of the sample image as the sample classification label;
基于每一样本图像、每一样本图像对应的样本分类标签对初始权重预测模型进行训练,得到权重预测模型。The initial weight prediction model is trained based on each sample image and the sample classification label corresponding to each sample image to obtain a weight prediction model.
在一个可能实现方式中,第一确定模块701在基于权重预测模型确定至少两个图像识别模型分别针对待识别图像的权重系数时,具体用于:In one possible implementation, when the first determination module 701 determines the weight coefficients of at least two image recognition models respectively for the image to be recognized based on the weight prediction model, it is specifically used to:
将待识别图像输入权重预测模型中,得到待识别图像分别属于至少两个图像识别模型的分类标签的概率;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 label of at least two image recognition models;
基于待识别图像分别属于至少两个图像识别模型的分类标签的概率确定每一图像识别模型的权重系数。The weight coefficient of each image recognition model is determined based on the probability that the images to be recognized respectively belong to the classification labels of at least two image recognition models.
在一个可能实现方式中,针对每一图像识别模型,待识别图像属于图像识别模型的分类标签的概率与图像识别模型的权重系数成正比。In one 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.
在一个可能实现方式中,第二确定模块703在基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果时,具体用于:In one possible implementation, when the second determination module 703 determines the recognition result of the image to be recognized based on the weight coefficient of the image to be recognized and the prediction label of each image recognition model based on at least two image recognition models, it is specifically used to: :
基于至少两个图像识别模型分别针对待识别图像的权重系数,确定每一图像识别模型的预测标签的加权和,得到识别结果。Based on the weight coefficients of at least two image recognition models respectively for the image to be recognized, a weighted sum of predicted labels of each image recognition model is determined to obtain a recognition result.
在一个可能实现方式中,第二确定模块703在基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果时,具体用于:In one possible implementation, when the second determination module 703 determines the recognition result of the image to be recognized based on the weight coefficient of the image to be recognized and the prediction label of each image recognition model based on at least two image recognition models, it is specifically used to: :
从至少两个图像识别模型中确定出权重系数大于预设系数的图像识别模型;Determine an image recognition model whose weight coefficient is greater than a preset coefficient from at least two image recognition models;
将权重系数大于预设系数的图像识别模型的预测标签进行融合,得到识别结果。The predicted labels of the image recognition models whose weight coefficients are greater than the preset coefficients are fused to obtain the recognition results.
在一个可能实现方式中,第二确定模块703在基于至少两个图像识别模型分别针对待识别图像的权重系数以及每一图像识别模型的预测标签,确定待识别图像的识别结果时,具体用于:In one possible implementation, when the second determination module 703 determines the recognition result of the image to be recognized based on the weight coefficient of the image to be recognized and the prediction label of each image recognition model based on at least two image recognition models, it is specifically used to: :
从至少两个图像识别模型中确定出权重系数最高的预设个数的图像识别模型;Determine a preset number of image recognition models with the highest weight coefficients from at least two image recognition models;
将权重系数最高的预设个数的图像识别模型的预测标签进行融合,得到识别结果。The predicted labels of the preset number of image recognition models with the highest weight coefficients are fused to obtain the recognition results.
上述的图像处理装置,通过权重预测模型来预测针对至少两个图像识别模型分别针对待识别图像的权重系数,每一图像识别模型的权重系数与图像识别模型针对待识别图像的识别准确度成正比,再基于不同图像识别模型的权重系数以及每一图像识别模型的预测标签来确定最终的识别结果,可以强调识别准确度较高的图像识别模型的预测标签,忽略识别准确度较低的图像识别模型的预测标签,从而提高最终识别结果的准确率。The above image processing device uses a weight prediction model to predict the weight coefficients of at least two image recognition models for the image to be recognized, and 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. , and then determine the final recognition result based on the weight coefficients of different image recognition models and the predicted labels of each image recognition model. The predicted labels of the image recognition models with higher recognition accuracy can be emphasized and the image recognition with lower recognition accuracy can be ignored. model’s predicted labels, thereby improving the accuracy of the final recognition result.
进一步的,通过每一样本图像、针对每一样本图像识别准确度最高的图像识别模型对初始权重预测模型进行训练,使得权重预测模型可以输出与图像识别模型针对待识别图像的识别准确度成正比的权重系数,从而提高最终识别结果的准确率。Further, the initial weight prediction model is trained through 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 an output proportional to the image recognition model's recognition accuracy for the image to be recognized. weight coefficient, thereby improving the accuracy of the final recognition result.
另一方面,提供了一种计算机设备,包括存储器、处理器及存储在存储器上的计算机程序,处理器执行计算机程序以实现上述的图像处理方法。On the other hand, a computer device is provided, including a memory, a processor, and a computer program stored on the memory. The processor executes the computer program to implement the above image processing method.
图8是本申请实施例中提供了一种计算机设备的结构示意图。如图8所示,该计算机设备包括:存储器和处理器;至少一个程序,存储于存储器中,用于被处理器执行时,与现有技术相比可实现:Figure 8 is a schematic structural diagram of a computer device provided in an embodiment of the present application. As shown in Figure 8, the computer device includes: a memory and a processor; at least one program is stored in the memory and used for execution by the processor. Compared with the existing technology, it can achieve:
通过权重预测模型来预测针对至少两个图像识别模型分别针对所述待识别图像的权重系数,每一所述图像识别模型的权重系数与所述图像识别模型针对所述待识别图像的识别准确度成正比,再基于不同图像识别模型的权重系数以及每一图像识别模型的预测标签来确定最终的识别结果,可以强调识别准确度较高的图像识别模型的预测标签,忽略识别准确度较低的图像识别模型的预测标签,从而提高最终识别结果的准确率。A weight prediction model is used to predict the weight coefficients of at least two image recognition models for the image to be recognized, and the weight coefficient of each image recognition model is related to the recognition accuracy of the image recognition model for the image to be recognized. Proportional to each other, 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. The predicted labels of the image recognition models with higher recognition accuracy can be emphasized and the prediction labels with lower recognition accuracy can be ignored. The predicted labels of the image recognition model, thereby improving the accuracy of the final recognition results.
在一个可选实施例中提供了一种计算机设备,如图8所示,图8所示的计算机设备800包括:处理器801和存储器803。其中,处理器801和存储器803相连,如通过总线802相连。可选地,计算机设备800还可以包括收发器804,收发器804可以用于该计算机设备与其他计算机设备之间的数据交互,如数据的发送和/或数据的接收等。需要说明的是,实际应用中收发器804不限于一个,该计算机设备800的结构并不构成对本申请实施例的限定。In an optional embodiment, a computer device is provided, as shown in Figure 8. The computer device 800 shown in Figure 8 includes: a processor 801 and a memory 803. Among them, the processor 801 is connected to the memory 803, such as through a bus 802. Optionally, the computer device 800 may also include a transceiver 804, which may be used for data interaction between the computer device and other computer devices, such as data transmission and/or data reception. It should be noted that in practical applications, the number of transceivers 804 is not limited to one, and the structure of the computer device 800 does not constitute a limitation on the embodiments of the present application.
处理器801可以是CPU(Central Processing Unit,中央处理器),通用处理器,DSP(Digital Signal Processor,数据信号处理器),ASIC(Application SpecificIntegrated Circuit,专用集成电路),FPGA(Field Programmable Gate Array,现场可编程门阵列)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器801也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等。The processor 801 may be a CPU (Central Processing Unit, central processing unit), a general-purpose processor, a DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit, application specific integrated circuit), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with this disclosure. The processor 801 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
总线802可包括一通路,在上述组件之间传送信息。总线802可以是PCI(Peripheral Component Interconnect,外设部件互连标注)总线或EISA(ExtendedIndustry Standard Architecture,扩展工业标注结构)总线等。总线802可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。Bus 802 may include a path that carries information between the above-mentioned components. The bus 802 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industrial Standard Architecture) bus, etc. The bus 802 can be divided into an address bus, a data bus, a control bus, etc. For ease of presentation, only one thick line is used in Figure 8, but it does not mean that there is only one bus or one type of bus.
存储器803可以是ROM(Read Only Memory,只读存储器)或可存储静态信息和指令的其他类型的静态存储设备,RAM(Random Access Memory,随机存取存储器)或者可存储信息和指令的其他类型的动态存储设备,也可以是EEPROM(Electrically ErasableProgrammable Read Only Memory,电可擦可编程只读存储器)、CD-ROM(Compact DiscRead Only Memory,只读光盘)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。The memory 803 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, RAM (Random Access Memory, random access memory) or other types that can store information and instructions. Dynamic storage devices can also be EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact DiscRead Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, Laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, or any other device capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer medium, but not limited to this.
存储器803用于存储执行本申请方案的应用程序代码(计算机程序),并由处理器801来控制执行。处理器801用于执行存储器803中存储的应用程序代码,以实现前述方法实施例所示的内容。The memory 803 is used to store application code (computer program) for executing the solution of the present application, and is controlled by the processor 801 for execution. The processor 801 is used to execute the application program code stored in the memory 803 to implement the contents shown in the foregoing method embodiments.
其中,计算机设备包括但不限于:虚拟化的计算机设备、虚拟机、服务器、服务集群、用户的终端等。Among them, computer equipment includes but is not limited to: virtualized computer equipment, virtual machines, servers, service clusters, user terminals, etc.
本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,当其在计算机上运行时,使得计算机可以执行前述方法实施例中图像处理方法的相应内容。Embodiments of the present application provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. When run on a computer, the computer can execute the corresponding content of the image processing method in the foregoing method embodiment.
本申请实施例提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述的图像处理方法。Embodiments of the present application provide a computer program product or computer program. The computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above image processing method.
应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although various steps in the flowchart of the accompanying drawings are shown in sequence as indicated by arrows, these steps are not necessarily performed in the order indicated by arrows. Unless explicitly stated in this article, the execution of these steps is not strictly limited in order, and they can be executed in other orders. Moreover, at least some of the steps in the flow chart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and their execution order is also It does not necessarily need to be performed sequentially, but may be performed in turn or alternately with other steps or sub-steps of other steps or at least part of the stages.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmed read-only memory (EPROM or flash memory), fiber optics, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In this disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device . Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wire, optical cable, RF (radio frequency), etc., or any suitable combination of the above.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; it may also exist independently without being assembled into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备执行上述实施例所示的方法。The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device performs the method shown in the above embodiment.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional Procedural programming language—such as "C" or a similar programming language. The program code may 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 situations involving remote computers, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider through Internet connection).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or operations. , or can be implemented using a combination of specialized hardware and computer instructions.
描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定,例如,第一确定模块还可以被描述为“用于确定权重系数的模块”。The modules involved in the embodiments of the present disclosure can be implemented in software or hardware. The name of a module does not constitute a limitation on the module itself under certain circumstances. For example, the first determination module can also be described as a "module for determining weight coefficients."
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a description of the preferred embodiments of the present disclosure and the technical principles applied. Those skilled in the art should understand that the disclosure scope involved in the present disclosure is not limited to technical solutions composed of specific combinations of the above technical features, but should also cover solutions composed of the above technical features or without departing from the above disclosed concept. Other technical solutions formed by any combination of equivalent features. For example, a technical solution is formed by replacing the above features with technical features with similar functions disclosed in this disclosure (but not limited to).
Claims (14)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210217587.6A CN116777814A (en) | 2022-03-07 | 2022-03-07 | Image processing methods, devices, computer equipment, storage media and program products |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210217587.6A CN116777814A (en) | 2022-03-07 | 2022-03-07 | Image processing methods, devices, computer equipment, storage media and program products |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116777814A true CN116777814A (en) | 2023-09-19 |
Family
ID=88008591
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210217587.6A Pending CN116777814A (en) | 2022-03-07 | 2022-03-07 | Image processing methods, devices, computer equipment, storage media and program products |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116777814A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117273166A (en) * | 2023-09-21 | 2023-12-22 | 北京火山引擎科技有限公司 | An information processing method and device |
| CN117314909A (en) * | 2023-11-29 | 2023-12-29 | 无棣源通电子科技有限公司 | Circuit board defect detection method, device, equipment and medium based on artificial intelligence |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20200293824A1 (en) * | 2019-05-29 | 2020-09-17 | Beijing Dajia Internet Information Technology Co., Ltd. | Method and apparatus for recognizing image and storage medium |
| WO2020213750A1 (en) * | 2019-04-16 | 2020-10-22 | 엘지전자 주식회사 | Artificial intelligence device for recognizing object, and method therefor |
| CN113052159A (en) * | 2021-04-14 | 2021-06-29 | 中国移动通信集团陕西有限公司 | Image identification method, device, equipment and computer storage medium |
| CN113378969A (en) * | 2021-06-28 | 2021-09-10 | 北京百度网讯科技有限公司 | Fusion method, device, equipment and medium of target detection results |
| CN113887416A (en) * | 2021-09-30 | 2022-01-04 | 苏州市科远软件技术开发有限公司 | Training method of face recognition model, face recognition method and electronic device |
-
2022
- 2022-03-07 CN CN202210217587.6A patent/CN116777814A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2020213750A1 (en) * | 2019-04-16 | 2020-10-22 | 엘지전자 주식회사 | Artificial intelligence device for recognizing object, and method therefor |
| US20200293824A1 (en) * | 2019-05-29 | 2020-09-17 | Beijing Dajia Internet Information Technology Co., Ltd. | Method and apparatus for recognizing image and storage medium |
| CN113052159A (en) * | 2021-04-14 | 2021-06-29 | 中国移动通信集团陕西有限公司 | Image identification method, device, equipment and computer storage medium |
| CN113378969A (en) * | 2021-06-28 | 2021-09-10 | 北京百度网讯科技有限公司 | Fusion method, device, equipment and medium of target detection results |
| CN113887416A (en) * | 2021-09-30 | 2022-01-04 | 苏州市科远软件技术开发有限公司 | Training method of face recognition model, face recognition method and electronic device |
Non-Patent Citations (1)
| Title |
|---|
| 晏明莉: "基于属性特征融合的歧视图像识别方法研究", 中国优秀硕士学位论文全文数据库 信息科技辑, no. 03, 15 March 2021 (2021-03-15) * |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117273166A (en) * | 2023-09-21 | 2023-12-22 | 北京火山引擎科技有限公司 | An information processing method and device |
| US12481927B2 (en) | 2023-09-21 | 2025-11-25 | Beijing Volcano Engine Technology Co., Ltd. | Information processing method and apparatus |
| CN117314909A (en) * | 2023-11-29 | 2023-12-29 | 无棣源通电子科技有限公司 | Circuit board defect detection method, device, equipment and medium based on artificial intelligence |
| CN117314909B (en) * | 2023-11-29 | 2024-02-09 | 无棣源通电子科技有限公司 | Circuit board defect detection method, device, equipment and medium based on artificial intelligence |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112906502B (en) | Training method, device, equipment and storage medium of target detection model | |
| US20250272945A1 (en) | Data processing method and apparatus | |
| CN113642431B (en) | Training method and device, electronic equipment and storage medium for target detection model | |
| EP3757905A1 (en) | Deep neural network training method and apparatus | |
| CN112183577A (en) | A training method, image processing method and device for a semi-supervised learning model | |
| CN111507378A (en) | Method and apparatus for training image processing model | |
| WO2020182121A1 (en) | Expression recognition method and related device | |
| CN113449548B (en) | Method and device for updating object recognition model | |
| CN114332578A (en) | Image anomaly detection model training method, image anomaly detection method and device | |
| CN107291822A (en) | Deep learning-based problem classification model training method, classification method and device | |
| CN113592060A (en) | Neural network optimization method and device | |
| CN115797736A (en) | Object detection model training and object detection method, device, equipment and medium | |
| CN112420125A (en) | Molecular property prediction method, device, intelligent device and terminal | |
| CN117636457A (en) | Knowledge distillation methods and electronic devices | |
| CN116486296A (en) | Target detection method, device and computer readable storage medium | |
| CN118762075B (en) | End-to-end multi-person head pose estimation method and device based on 6D rotation representation | |
| CN115131604A (en) | Multi-label image classification method and device, electronic equipment and storage medium | |
| Cao et al. | Real-time gesture recognition based on feature recalibration network with multi-scale information | |
| WO2022100607A1 (en) | Method for determining neural network structure and apparatus thereof | |
| CN116777814A (en) | Image processing methods, devices, computer equipment, storage media and program products | |
| CN116579345A (en) | Named entity recognition model training method, named entity recognition method and named entity recognition device | |
| CN113570512A (en) | Image data processing method, computer and readable storage medium | |
| CN116452966A (en) | Target detection method, device and equipment for underwater image and storage medium | |
| CN115359296A (en) | Image recognition method and device, electronic equipment and storage medium | |
| Wang et al. | Mnat-net: Multi-scale neighborhood aggregation transformer network for point cloud classification and segmentation |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |