WO2023155299A1 - 图像增强处理方法、装置、计算机设备及存储介质 - Google Patents

图像增强处理方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2023155299A1
WO2023155299A1 PCT/CN2022/090167 CN2022090167W WO2023155299A1 WO 2023155299 A1 WO2023155299 A1 WO 2023155299A1 CN 2022090167 W CN2022090167 W CN 2022090167W WO 2023155299 A1 WO2023155299 A1 WO 2023155299A1
Authority
WO
WIPO (PCT)
Prior art keywords
target image
image
target
recognition model
images
Prior art date
Application number
PCT/CN2022/090167
Other languages
English (en)
French (fr)
Inventor
郑喜民
王颖妮
舒畅
陈又新
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2023155299A1 publication Critical patent/WO2023155299A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/217Validation; Performance evaluation; Active pattern learning techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • the present application relates to the field of neural network technology of artificial intelligence technology, in particular, the present application relates to an image enhancement processing method, device, computer equipment and storage medium.
  • the generalization ability of the model can be improved and overfitting can be reduced by using the data enhancement method, but the inventor realized that most of the existing data enhancement methods change the spatial position and size of the target through simple rotation, translation, etc., and the data
  • the enhanced image will also have Siamese, background noise, etc., and the quality is low.
  • the main purpose of the present application is to provide an image enhancement processing method, device, computer equipment and storage medium, so as to improve the quality of the image after data enhancement.
  • the present application provides an image enhancement processing method, which includes:
  • the data set includes images of multiple handwritten digits
  • Classify the target image by using a pre-trained digital recognition model to obtain the category of the target image, and filter out a correctly classified first target image and a wrongly classified second target image from the target image;
  • a second weight vector is generated according to the prediction result, and a quality-enhanced training image is obtained after multiplying the second weight vector by the second target image.
  • the present application also provides an image enhancement processing device, which includes:
  • An acquisition module configured to acquire a data set; wherein, the data set includes images of multiple handwritten digits;
  • An amplification module configured to amplify the images of the data set using a preset data enhancement algorithm to obtain a preset number of target images
  • the classification module is used to classify the target image by using a pre-trained digital recognition model to obtain the category of the target image, and screen out the correctly classified first target image and the incorrectly classified first target image from the target image.
  • a training module configured to obtain a first weight vector and a feature vector of each category of the first target image, and use the first target image to a pre-built image recognition model according to the first weight vector and feature vector Perform training to obtain a trained image recognition model;
  • a prediction module configured to use the trained image recognition model to predict the second target image to obtain a prediction result
  • a generating module configured to generate a second weight vector according to the prediction result, and obtain a training image with enhanced quality after multiplying the second weight vector by the second target image.
  • the present application also provides a computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, an image enhancement processing method is implemented, wherein the image enhancement processing method includes The following steps:
  • the data set includes images of multiple handwritten digits
  • Classify the target image by using a pre-trained digital recognition model to obtain the category of the target image, and filter out a correctly classified first target image and a wrongly classified second target image from the target image;
  • a second weight vector is generated according to the prediction result, and a quality-enhanced training image is obtained after multiplying the second weight vector by the second target image.
  • the present application also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, an image enhancement processing method is implemented, wherein the image enhancement processing method includes The following steps:
  • the data set includes images of multiple handwritten digits
  • Classify the target image by using a pre-trained digital recognition model to obtain the category of the target image, and filter out a correctly classified first target image and a wrongly classified second target image from the target image;
  • a second weight vector is generated according to the prediction result, and a quality-enhanced training image is obtained after multiplying the second weight vector by the second target image.
  • the image enhancement processing method, device, computer equipment and storage medium provided by the present application improve the efficiency of image enhancement processing.
  • FIG. 1 is a schematic flow diagram of an image enhancement processing method according to an embodiment of the present application
  • Fig. 2 is a schematic block diagram of the structure of an image enhancement processing device according to an embodiment of the present application
  • FIG. 3 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • This application proposes an image enhancement processing method, which relates to the neural network technology field of artificial intelligence technology.
  • the method includes the following steps:
  • the generalization ability of the model can be improved and overfitting can be reduced by using data augmentation, but most of the existing data augmentation methods change the spatial position, size, etc. Adjustment.
  • most of the existing data augmentation methods change the spatial position, size, etc. Adjustment.
  • this application can use certain technical methods to Fine-tuning and embellishing the data can improve the quality of the images to improve the classification accuracy of the model.
  • the data set includes multiple images of handwritten numerals, such as handwritten Roman numerals. Although there are only 10 types of handwritten Roman numerals, the recognition accuracy is quite high in most application scenarios. Because it is often used in finance, accounting and other aspects.
  • step S12 in the data set of handwritten Roman numerals, the total number of images in each data set is about 200. Therefore, it will be time-consuming and laborious to evaluate and modify the data quality through manual methods, and it will not be possible. Automate online applications. Therefore, this embodiment requires a preset data enhancement algorithm to amplify the images of the data set to obtain a preset number of target images.
  • Data enhancement methods can include rotation, translation, mirroring, zooming, etc.
  • One of the data enhancement methods can be used, or a combination of multiple data enhancement methods can be used to expand the data set to 2000 to provide enough training samples. Avoid overfitting of the network during training.
  • the pre-trained digital recognition model is used to classify the target image after data enhancement processing, and the first correct classification in the target image can be found through manual screening or machine screening.
  • the target image and the misclassified second target image are used to classify the target image after data enhancement processing, and the first correct classification in the target image.
  • the target image can be classified according to these 10 types using a pre-trained digital recognition model, and the correct classification in the target image can be found through manual screening or machine screening.
  • the first target image and the misclassified second target image can be found through manual screening or machine screening.
  • the first target image of each category corresponds to a unique first weight vector, for example, the first weight vector with a number of 1 corresponds to a1, and the first weight vector with a number of 2 corresponds to a2, so that By analogy; the feature vector of the first target image is generated based on its feature information.
  • the first weight vector and feature vector of the first target image of each category can be obtained.
  • the first A target image is used to train the pre-built image recognition model to obtain a trained image recognition model.
  • the cross-entropy loss function can be used to calculate the loss value of the trained image recognition model. After the loss value meets the requirements, the trained image recognition model can be obtained.
  • cross entropy is used to measure the difference between two probability distributions
  • the cross entropy loss function is used to measure the error between the final performance prediction probability and the real performance.
  • the image recognition model is a convolutional dynamic alignment network (Dynamic Alignment Network, DAU). Since the convolutional dynamic alignment network will align the weights with the input feature vectors during training, we can visualize the network weights. Get the input feature vector.
  • DAU Dynamic Alignment Network
  • the trained image recognition model can be used to predict the misclassified second target image to obtain the prediction result, and the prediction result includes information such as the location of the misclassified image and the reason for the misclassification , generate a second weight vector according to the prediction result, and multiply the second weight vector with the second target image to obtain a quality-enhanced training image, thereby suppressing the inherent noise in the second target image and obtaining a quality-enhanced second target image.
  • the correctly classified first target image it is directly amplified by methods such as mirroring, zooming, and rotation, so that the total number of amplified data is twice the original, and the amplified first target image is added to the training images to obtain higher quality training images.
  • An image enhancement processing method provided by this application is to obtain a data set, use a preset data enhancement algorithm to amplify the image of the data set, and obtain a preset number of target images; use a pre-trained digital recognition model to amplify the target Classify the image to obtain the category of the target image, and filter out the correctly classified first target image and the incorrectly classified second target image from the target image; obtain the first weight vector and feature vector of the first target image of each category , according to the first weight vector and feature vector, use the first target image to train the pre-built image recognition model to obtain the trained image recognition model; use the trained image recognition model to predict the second target image to obtain the predicted As a result, the second weight vector is generated according to the prediction result, and the quality-enhanced training image is obtained after multiplying the second weight vector by the second target image, so that the trained image recognition model can be obtained based on the first target image with correct classification , use the trained image recognition model to predict the misclassified second target image, and adjust the misclassified second target
  • the acquiring the first weight vector and feature vector of the first target image of each category may specifically include:
  • the comparison table records the weight vector corresponding to each category of image
  • the feature information of the first target image is acquired, and the feature information is converted into a vector form to obtain a feature vector of the first target image.
  • a comparison table can be pre-built to record the weight vector corresponding to each category of image, for example, the weight vector with a number of 1 corresponds to a1, and the first weight vector with a number of 2 corresponds to a2. And so on. Then, according to the category of the first target image, the corresponding weight vector is queried from the pre-built comparison table to obtain the first weight vector.
  • this embodiment can obtain the characteristic information of the first target image, which includes the shape of the handwritten digit, the difference from the standard digit, etc., convert the characteristic information into a vector form, and obtain the characteristic vector of the first target image, for example,
  • Each type of feature information is assigned a certain value as a feature value according to a preset rule, and feature values of various feature information are combined to obtain a feature vector of the first target image.
  • the acquiring the feature information of the first target image, converting the feature information into a vector form, and obtaining the feature vector of the first target image may specifically include:
  • this embodiment will further explore the potential consistency between different types of data, that is, it is hoped to find the feature vector that appears most frequently in multiple first target images, and use it as a basis for classification.
  • this embodiment may use a convolutional dynamic alignment network (Dynamic Alignment Network, DAU) to implement different types of feature matching.
  • DAU convolutional dynamic alignment network
  • the basic unit of the network consists of a linear operation and a nonlinear norm scaling module. It is hoped that the output of the network is maximized on the corresponding category, which is similar to the low-order matrix approximation problem. The process of maximizing the network output is equivalent to finding The input feature vector.
  • multiple first target images can be input into the convolutional dynamic registration network, and in the convolutional dynamic registration network, all feature information of each first target image can be obtained, and each feature information can be calculated in multiple The frequency of appearance of the first target image is selected from all the feature information with the highest frequency to obtain the target feature information, and the target feature information is converted into a vector form to obtain multiple feature vectors of the first target image.
  • the generating the second weight vector according to the prediction result may specifically include:
  • the error information of the classification error of the second target image is determined, and the reference error information of the second target image is obtained.
  • the reference error information of the second target image is obtained. For example, if the number 1 is classified according to the number 2, the information that the second target image is similar to the number 2 is used as Refer to the error information, calibrate the second target image according to the reference error information, obtain the calibration information, convert the calibration information into a word vector form, and obtain the second weight vector, such as adjusting the information similar to the number 2 of the second target image, Make it close to the number 1 to obtain calibration information, and use the calibration information to adjust the second target image to improve the quality of the second target image.
  • the training of the pre-built image recognition model by using the first target image to obtain the trained image recognition model may specifically include:
  • the preset loss function can be used to calculate the loss value of the image recognition model after each training, and when the loss value meets the preset threshold or is less than the preset loss value, that is, the requirements are met, indicating that the image recognition model meets the training requirements, and the training of the image recognition model is completed to improve the recognition effect of the image recognition model.
  • the loss function is used to evaluate the degree of difference between the predicted value of the image recognition model and the real value. The better the loss function is, the better the performance of the image recognition model is.
  • the judging whether the loss value is lower than the preset loss value it may further include:
  • the training is stopped, and a trained image recognition model is obtained.
  • the forward transfer can be performed in the neural network structure of the image recognition model according to the loss value, and the relevant parameters of the image recognition model can be adjusted, based on the new Set the relevant parameters to retrain the adjusted image recognition model until the loss value of the image recognition model is less than the preset loss value.
  • the image recognition model training is over, and the image recognition model whose training result meets the requirements is obtained, and then the trained image recognition model.
  • said using a preset data enhancement algorithm to amplify the images of the data set to obtain a preset number of target images may specifically include:
  • the data enhancement processing method may be one of rotating, translating, zooming, or flipping the image of the data set, or it may be a combination of multiple data enhancing processing methods to perform data processing on the image of the data set.
  • Amplify to obtain a preset number of target images for example, first rotate the images according to a preset angle, and then flip the rotated target to obtain a target image.
  • the data enhancement processing method at this time is generally an operation method that does not perform large-scale adjustments to the image, and generally only fine-tunes the image, such as The image is reduced according to a zoom ratio smaller than the preset zoom ratio, randomly flipped horizontally, randomly vertically flipped, randomly adjusted the brightness and contrast of the picture, rotated according to an angle smaller than the preset angle, or randomly adjusted the color of the target object Any at least one strategy for .
  • the target object may be a pedestrian, a human face, and the like.
  • an image enhancement processing device is also provided in the embodiment of the present application, including:
  • An acquisition module 11 configured to acquire a data set; wherein, the data set includes images of multiple handwritten digits;
  • the amplification module 12 is used to amplify the image of the data set using a preset data enhancement algorithm to obtain a preset number of target images;
  • the classification module 13 is used to classify the target image by using a pre-trained digital recognition model to obtain the category of the target image, and screen out the correctly classified first target image and the incorrectly classified first target image from the target image. the second target image;
  • the training module 14 is used to obtain the first weight vector and feature vector of the first target image of each category, and use the first target image to recognize the pre-built image according to the first weight vector and feature vector
  • the model is trained to obtain a trained image recognition model
  • a prediction module 15 configured to use the trained image recognition model to predict the second target image to obtain a prediction result
  • the generation module 16 is configured to generate a second weight vector according to the prediction result, and obtain a training image with enhanced quality after multiplying the second weight vector by the second target image.
  • the generalization ability of the model can be improved and overfitting can be reduced by using data augmentation, but most of the existing data augmentation methods change the spatial position, size, etc. Adjustment.
  • most of the existing data augmentation methods change the spatial position, size, etc. Adjustment.
  • this application can use certain technical methods to Fine-tuning and embellishing the data can improve the quality of the images to improve the classification accuracy of the model.
  • the data set includes multiple images of handwritten numerals, such as handwritten Roman numerals. Although there are only 10 types of handwritten Roman numerals, the recognition accuracy is quite high in most application scenarios, because it is often used in finance. , finance, etc.
  • this embodiment requires a preset data enhancement algorithm to amplify the images of the data set to obtain a preset number of target images.
  • Data enhancement methods can include rotation, translation, mirroring, zooming, etc.
  • One of the data enhancement methods can be used, or a combination of multiple data enhancement methods can be used to expand the data set to 2000 to provide enough training samples. Avoid overfitting of the network during training.
  • the pre-trained digital recognition model is used to classify the target image after data enhancement processing, and the first target image that is correctly classified and the first target image that is incorrectly classified in the target image can be found out by manual screening or machine screening. Two target images.
  • the target image can be classified according to these 10 types using a pre-trained digital recognition model, and the correct classification in the target image can be found through manual screening or machine screening.
  • the first target image and the misclassified second target image can be found through manual screening or machine screening.
  • the first target image of each category corresponds to a unique first weight vector, such as the first weight vector whose number is 1 corresponds to a1, the first weight vector whose number is 2 corresponds to a2, and so on;
  • the feature vector is generated based on its feature information.
  • the first weight vector and feature vector of each type of first target image can be obtained.
  • the first target image is used to pair the pre-built
  • the image recognition model is trained to obtain a trained image recognition model. After the image recognition model is trained, the cross-entropy loss function can be used to calculate the loss value of the trained image recognition model. After the loss value meets the requirements, the trained image recognition model can be obtained.
  • cross entropy is used to measure the difference between two probability distributions
  • the cross entropy loss function is used to measure the error between the final performance prediction probability and the real performance.
  • the image recognition model is a convolutional dynamic alignment network (Dynamic Alignment Network, DAU). Since the convolutional dynamic alignment network will align the weights with the input feature vectors during training, we can visualize the network weights. Get the input feature vector.
  • DAU Dynamic Alignment Network
  • the trained image recognition model can be used to predict the misclassified second target image, and the prediction result is obtained.
  • the prediction result includes information such as the location of the misclassified image and the reason for the misclassification, and the second weight vector is generated according to the prediction result. , after multiplying the second weight vector with the second target image, a quality-enhanced training image is obtained, thereby suppressing the inherent noise existing in the second target image, and obtaining a quality-enhanced second target image.
  • the correctly classified first target image it is directly amplified by methods such as mirroring, zooming, and rotation, so that the total number of amplified data is twice the original, and the amplified first target image is added to the training images to obtain higher quality training images.
  • the embodiment of the present application also provides a computer device, the internal structure of which may be shown in FIG. 3 .
  • the computer device includes a processor, memory, network interface and database connected by a system bus.
  • the processor designed by the computer is used to provide calculation and control capabilities.
  • the memory of the computer device includes a storage medium and an internal memory.
  • the storage medium stores an operating system, computer programs and databases.
  • the memory provides an environment for the operation of the operating system and computer programs in the storage medium.
  • the database of the computer equipment is used to store relevant data of the image enhancement processing method.
  • the network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, an image enhancement processing method is realized.
  • the above-mentioned processor executes the above-mentioned image enhancement processing method, including:
  • the data set includes images of multiple handwritten digits
  • Classify the target image by using a pre-trained digital recognition model to obtain the category of the target image, and filter out a correctly classified first target image and a wrongly classified second target image from the target image;
  • a second weight vector is generated according to the prediction result, and a quality-enhanced training image is obtained after multiplying the second weight vector by the second target image.
  • An embodiment of the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be non-volatile or volatile, and a computer program is stored thereon.
  • a computer program is stored thereon.
  • the data set includes images of multiple handwritten digits
  • Classify the target image by using a pre-trained digital recognition model to obtain the category of the target image, and filter out a correctly classified first target image and a wrongly classified second target image from the target image;
  • a second weight vector is generated according to the prediction result, and a quality-enhanced training image is obtained after multiplying the second weight vector by the second target image.
  • Nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in many forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • SRAM Static RAM
  • DRAM Dynamic RAM
  • SDRAM Synchronous DRAM
  • SSRSDRAM Double Data Rate SDRAM
  • ESDRAM Enhanced SDRAM
  • SLDRAM Synchronous Link (Synchlink) DRAM
  • SLDRAM Synchronous Link (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM
  • An image enhancement processing method, device, computer equipment, and storage medium obtained by the present application obtain a data set, and use a preset data enhancement algorithm to amplify the image of the data set to obtain a preset number of target images;
  • the trained digital recognition model classifies the target image to obtain the category of the target image, and screens out the first target image with correct classification and the second target image with incorrect classification from the target image; obtain the first target image of each category
  • the first weight vector and feature vector according to the first weight vector and feature vector, use the first target image to train the pre-built image recognition model to obtain the trained image recognition model; use the trained image recognition model to the second
  • the second target image is predicted to obtain the prediction result, and the second weight vector is generated according to the prediction result, and the second weight vector is multiplied by the second target image to obtain a quality-enhanced training image, so that based on the first target image with correct classification training the trained image recognition model, using the trained image recognition model to predict the misclassified second target image, and adjusting the misclassified

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

本申请为人工智能技术的神经网络技术领域,提供了一种图像增强处理方法、装置、计算机设备及存储介质,其中,该方法包括:利用数据增强算法对数据集的图像进行扩增,利用数字识别模型对目标图像进行分类,筛选出分类正确的第一目标图像及分类错误的第二目标图像;获取每种类别的第一目标图像的第一权重向量及特征向量,利用第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;利用训练好的图像识别模型对第二目标图像进行预测,得到预测结果,根据预测结果生成第二权重向量,将第二权重向量与第二目标图像进行相乘后,得到质量增强的训练图像,从而可以抑制第二目标图像中存在的固有噪声,提高数据增强后的图像的质量。

Description

图像增强处理方法、装置、计算机设备及存储介质
本申请要求于2022年2月21日提交中国专利局、申请号为优先权号202210156905.2,发明名称为“图像增强处理方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术的神经网络技术领域,具体而言,本申请涉及一种图像增强处理方法、装置、计算机设备及存储介质。
背景技术
当前,机器学习方法已经可以成熟地应用到各种高性能模型架构当中,但其泛化能力依然存在问题。就手写数字识别问题而言,在实际应用中获得的数据经常伴随着手写不规范、不同个体之间字迹存在差异以及存在不同程度的噪声等问题。
通过使用数据增强方法可以提高模型的泛化能力,减少过拟合,但发明人意识到现有的数据增强方法大多是通过简单的旋转、平移等来改变对目标的空间位置、大小等,数据增强后的图像还会存在连体、背景噪声等情况,质量较低。
技术问题
本申请的主要目的为提供一种图像增强处理方法、装置、计算机设备及存储介质,以提高数据增强后的图像的质量。
技术解决方案
本申请提供一种图像增强处理方法,其包括:
获取数据集;其中,所述数据集中包括多张手写数字的图像;
利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像;
利用预先训练好的数字识别模型对所述目标图像进行分类,得到所述目标图像的类别,并从所述目标图像中筛选出分类正确的第一目标图像及分类错误的第二目标图像;
获取每种类别的所述第一目标图像的第一权重向量及特征向量,根据所述第一权重向量及特征向量,利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;
利用训练好的图像识别模型对所述第二目标图像进行预测,得到预测结果;
根据所述预测结果生成第二权重向量,将所述第二权重向量与所述第二目标图像进行相乘后,得到质量增强的训练图像。
本申请还提供一种图像增强处理装置,其包括:
获取模块,用于获取数据集;其中,所述数据集中包括多张手写数字的图像;
扩增模块,用于利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像;
分类模块,用于利用预先训练好的数字识别模型对所述目标图像进行分类,得到所述目标图像的类别,并从所述目标图像中筛选出分类正确的第一目标图像及分类错误的第二目标图像;
训练模块,用于获取每种类别的所述第一目标图像的第一权重向量及特征向量,根据所述第一权重向量及特征向量,利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;
预测模块,用于利用训练好的图像识别模型对所述第二目标图像进行预测,得到预测结果;
生成模块,用于根据所述预测结果生成第二权重向量,将所述第二权重向量与所述第二目标图像进行相乘后,得到质量增强的训练图像。
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现一种图像增强处理方法,其中,所述图像增强处理方法包括以下步骤:
获取数据集;其中,所述数据集中包括多张手写数字的图像;
利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像;
利用预先训练好的数字识别模型对所述目标图像进行分类,得到所述目标图像的类别,并从所述目标图像中筛选出分类正确的第一目标图像及分类错误的第二目标图像;
获取每种类别的所述第一目标图像的第一权重向量及特征向量,根据所述第一权重向量及特征向量,利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;
利用训练好的图像识别模型对所述第二目标图像进行预测,得到预测结果;
根据所述预测结果生成第二权重向量,将所述第二权重向量与所述第二目标图像进行相乘后,得到质量增强的训练图像。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现一种图像增强处理方法,其中,所述图像增强处理方法包括以下步骤:
获取数据集;其中,所述数据集中包括多张手写数字的图像;
利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像;
利用预先训练好的数字识别模型对所述目标图像进行分类,得到所述目标图像的类别,并从所述目标图像中筛选出分类正确的第一目标图像及分类错误的第二目标图像;
获取每种类别的所述第一目标图像的第一权重向量及特征向量,根据所述第一权重向量及特征向量,利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;
利用训练好的图像识别模型对所述第二目标图像进行预测,得到预测结果;
根据所述预测结果生成第二权重向量,将所述第二权重向量与所述第二目标图像进行相乘后,得到质量增强的训练图像。
有益效果
本申请所提供的一种图像增强处理方法、装置、计算机设备及存储介质,提高图像增强处理的效率。
附图说明
图1为本申请一实施例的图像增强处理方法的流程示意图;
图2为本申请一实施例的图像增强处理装置的结构示意框图;
图3为本申请一实施例的计算机设备的结构示意框图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
本发明的最佳实施方式
本申请提出一种图像增强处理方法,涉及人工智能技术的神经网络技术领域,具体可参考图1,该方法包括以下步骤:
S11、获取数据集;其中,所述数据集中包括多张手写数字的图像;
S12、利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像;
S13、利用预先训练好的数字识别模型对所述目标图像进行分类,得到所述目标图像的类别,并从所述目标图像中筛选出分类正确的第一目标图像及分类错误的第二目标图像;
S14、获取每种类别的所述第一目标图像的第一权重向量及特征向量,根据所述第一权重向量及特征向量,利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;
S15、利用训练好的图像识别模型对所述第二目标图像进行预测,得到预测结果;
S16、根据所述预测结果生成第二权重向量,将所述第二权重向量与所述第二目标图像进行相乘后,得到质量增强的训练图像。
在本实施例中,通过使用数据增强可以提高模型的泛化能力,减少过拟合,但现有的数据增强方法大多是通过简单的旋转、平移等来改变对目标的空间位置、大小等进行调整。然而我们所获得的数据集中,来自不同区域的人书写风格是不同的,同时还会存在连体、背景噪声等情况,这给模型的识别增加了难度,因此本申请可通过一定的技术方法来对数据进行微调和修饰可以提高图像的质量,以提高模型的分类精度。
具体的,如上述步骤S11所述,数据集中包括多张手写数字的图像,如手写的罗马数字,手写罗马数字虽然只有10个种类,但大多数应用场景下对识别的精度还是相当高的,因为它经常被应用于金融、财务等方面。
如上述步骤S12所述,在手写罗马数字的数据集中,每个数据集的图像的总数大概都在200张左右,因此通过人工方法对数据质量进行评价和修改将是费时费力的,也无法实现自动化线上应用。因此本实施例需要预设的数据增强算法对数据集的图像进行扩增,得到预设数量的目标图像。
数据增强方法可包括旋转、平移、镜像、缩放等等,可以采用其中一种数据增强方法,也可以多种数据增强方法进行组合,对数据集扩增到2000张,以提供足够的训练样本,避免网络在训练过程中出现过拟合。
如上述步骤S13所述,本实施例使用预先训练好的数字识别模型对数据增强处理后的目标图像进行分类,并可通过人工筛选或机器筛选的方式分别找出目标图像中分类正确的第一目标图像及分类错误的第二目标图像。
例如,手写罗马数字虽然有10个种类,因此可使用预先训练好的数字识别模型将目标图像按照这10个种类进行分类,并可通过人工筛选或机器筛选的方式分别找出目标图像中分类正确的第一目标图像及分类错误的第二目标图像。
如上述步骤S14所述,每种类别的第一目标图像对应唯一的第一权重向量,如数字为1的第一权重向量对应为a1,数字为2的第一权重向量对应为a2,以此类推;第一目标图像的特征向量则基于其特征信息进行生成,本实施例可获取每种类别的第一目标图像的第一权重向量及特征向量,根据第一权重向量及特征向量,利用第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型。图像识别模型在训练后,可采用交叉熵损失函数计算训练后的图像识别模型的损失值,在损失值满足要求后,则得到训练好的图像识别模型。
其中,交叉熵用于度量两个概率分布间的差异性,交叉熵损失函数用来测量最终的性能预测概率与真实性能之间的误差。图像识别模型的交叉熵损失函数越小,适应度越小,则性能预测方法的预测效果越好。
对于分类正确的数据,我们认为它们之间具有较好的分布一致性,因此我们首先使用这部分数据来训练图像识别模型,并获得每一类别的权重向量,寻找对分类结果有决定性影响的特征。其中,图像识别模型为卷积动态配准网络(Dynamic Alignment Network,DAU),由于卷积动态配准网络在训练时就会将权重与输入的特征向量进行对齐,因此我们通过可视化网络权重即可得到输入的特征向量。
如上述步骤S15-S16所述,本实施例可使用训练好的图像识别模型对分类错误的第二目标图像进行预测,得到预测结果,预测结果包括分类错误的图像位置及分类错误的原因等信息,根据预测结果生成第二权重向量,将第二权重向量与第二目标图像进行相乘后,得到质量增强的训练图像,从而抑制第二目标图像中存在的固有噪声,得到质量增强的第二目标图像。
而对于分类正确的第一目标图像,则直接使用镜像、缩放、旋转等方法扩增,使得扩增后的数据总数为原来的2倍,并将扩增后的第一目标图像添加至所述训练图像中,以得到质量较高的训练图像。
本申请所提供的一种图像增强处理方法,获取数据集,利用预设的数据增强算法对数据集的图像进行扩增,得到预设数量的目标图像;利用预先训练好的数字识别模型对目标图像进行分类,得到目标图像的类别,并从目标图像中筛选出分类正确的第一目标图像及分类错误的第二目标图像;获取每种类别的第一目标图像的第一权重向量及特征向量,根据第一权重向量及特征向量,利用第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;利用训练好的图像识别模型对第二目标图像进行预测,得到预测结果,根据预测结果生成第二权重向量,将第二权重向量与第二目标图像进行相乘后,得到质量增强的训练图像,从而基于分类正确的第一目标图像训练得到训练好的图像识别模型,利用训练好的图像识别模型对分类错误的第二目标图像进行预测,基于预测结果调整分类错误的第二目标图像,以提高第二目标图像的分类质量;此外,通过将第二权重向量与第二目标图像进行相乘,可以抑制第二目标图像中存在的固有噪声,并消除对分类具有消极贡献的分量,减少因书写习惯和风格的不同而带来的分类误差,得到质量增强的训练图像;同时本申请通过人工智能的方式自动化增强图像质量,提高图像增强处理的效率。
在一实施例中,所述获取每种类别的所述第一目标图像的第一权重向量及特征向量,可具体包括:
根据所述第一目标图像的类别从预先构建的对照表中查询对应的权重向量,得到第一权重向量;其中,所述对照表记录了每种类别的图像对应的权重向量;
获取所述第一目标图像的特征信息,将所述特征信息转换为向量形式,得到所述第一目标图像的特征向量。
在本实施例中,可预先构建一个对照表,用于记录每种类别的图像对应的权重向量,如数字为1的权重向量对应为a1,数字为2的第一权重向量对应为a2,以此类推。然后根据第一目标图像的类别从预先构建的对照表中查询对应的权重向量,得到第一权重向量。
此外,本实施例可获取第一目标图像的特征信息,特征信息包括手写数字的外形、与标准数字的差异等等,将特征信息转换为向量形式,得到第一目标图像的特征向量,如对每一种特征信息按照预设规则赋予一定的数值作为特征值,多种特征信息的特征值组合起来得到第一目标图像的特征向量。
在一实施例中,所述获取所述第一目标图像的特征信息,将所述特征信息转换为向量形式,得到所述第一目标图像的特征向量,可具体包括:
当确定所述第一目标图像的数量为多张时,获取每张所述第一目标图像的所有特征信息;
计算每个所述特征信息在多张所述第一目标图像出现的频率;
从所有所述特征信息中筛选出频率最高的特征信息,得到目标特征信息;
将所述目标特征信息转换为向量形式,得到多张所述第一目标图像的特征向量。
本实施例通过寻找多张第一目标图像中最为频繁的特征向量来对结果进行解释。具体的,手写数字虽然会因为个人书写习惯不同而存在差异,但数字的形态是具有规范化的标准的,即人们不会将数字Ⅱ错认为Ⅴ。因此,本实施例将进一步探索不同类别数据之间的潜在一致性,即希望找到在多张第一目标图像中出现最为频繁的特征向量,并将其作为分类的依据。为此,本实施例可使用卷积动态配准网络(Dynamic Alignment Network,DAU)来实现不同类别的特征匹配。该网络的基本单元由一个线性操作和一个非线性的范数缩放模块组成,希望网络的输出在对应类别上最大化,类似于低阶矩阵近似问题,实现网络输出最大化的过程等价于寻找输入的特征向量。
因此,可将多张第一目标图像输入卷积动态配准网络中,在该卷积动态配准网络中,可获取每张第一目标图像的所有特征信息,计算每个特征信息在多张第一目标图像出现的频率,从所有特征信息中筛选出频率最高的特征信息,得到目标特征信息,将目标特征信息转换为向量形式,得到多张第一目标图像的特征向量。
在一实施例中,所述根据所述预测结果生成第二权重向量,可具体包括:
根据所述预测结果确定所述第二目标图像分类错误的错误信息,得到所述第二目标图像的参考错误信息;
根据所述参考错误信息对所述第二目标图像进行校准,得到校准信息;
将所述校准信息转换为词向量形式,得到所述第二权重向量。
本实施例根据预测结果确定第二目标图像分类错误的错误信息,得到第二目标图像的参考错误信息,如将数字1按照数字2进行分类,则将第二目标图像与数字2相似的信息作为参考错误信息,根据参考错误信息对第二目标图像进行校准,得到校准信息,将校准信息转换为词向量形式,得到第二权重向量,如将第二目标图像与数字2相似的信息进行调整,使其与数字1接近,得到校准信息,利用校准信息对第二目标图像进行调整,以提高第二目标图像的质量。
在一实施例中,所述利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型,可具体包括:
利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练结果;
根据所述训练结果,利用交叉熵损失函数计算所述图像识别模型训练后的损失值;
判断所述损失值是否低于预设损失值;
当判定所述损失值低于预设损失值时,得到训练好的图像识别模型。
在本实施例中,在对图像识别模型每次训练后,可利用预设的损失函数计算每次训练完成后的图像识别模型的损失值,并在损失值满足预设阈值或小于预设损失值时,即满足要求,则表明图像识别模型达到训练要求,完成所述图像识别模型的训练,以提高图像识别模型的识别效果。其中,损失函数用来评价图像识别模型的预测值和真实值不一样的程度,损失函数越好,通常图像识别模型的性能越好。
在一实施例中,所述判断所述损失值是否低于预设损失值之后,还可包括:
当判定所述损失值不低于预设损失值时,根据所述损失值调整所述图像识别模型的参数;
利用所述第一目标图像对调整参数后的所述图像识别模型进行再次训练,直至所述损失值低于预设损失值时停止训练,得到训练好的图像识别模型。
在本实施例中,当图像识别模型的损失值不小于预设损失值时,则可根据损失值在图像识别模型的神经网络结构中进行前向传递,调整图像识别模型的相关参数,基于重新设置的相关参数对调整后的图像识别模型进行重新训练,直至图像识别模型的损失值小于预设损失值为止,至此图像识别模型训练结束,得到训练结果满足要求的图像识别模型,进而得到训练好的图像识别模型。
在一实施例中,所述利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像,可具体包括:
对所述数据集的图像进行旋转、平移、缩放或翻转中的至少一项数据增强处理方式,得到预设数量的目标图像。
在本实施例中,数据增强处理方式可以是对数据集的图像进行旋转、平移、缩放或翻转中的一种,也可以是多种数据增强处理方式进行组合后,对数据集的图像进行数据扩增,得到预设数量的目标图像,例如,可首先对图像按照预设角度进行转动,然后对转动后的目标进行翻转,得到一张目标图像。
在一实施例中,当图像中的目标物的尺寸比例大于预设尺寸比例时,此时的数据增强处理方式一般为不对图像进行大规模调整的操作方式,一般仅对图像进行微调,如对所述图像按照小于预设缩放比例的缩放比例进行缩小、随机水平翻转、随机竖直翻转、随机调整图片亮度与对比度、按照小于预设角度的角度进行旋转或随机调整所述目标物的颜色中的任意至少一种策略。其中,该目标物可以是行人、人脸等等。
参照图2,本申请实施例中还提供一种图像增强处理装置,包括:
获取模块11,用于获取数据集;其中,所述数据集中包括多张手写数字的图像;
扩增模块12,用于利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像;
分类模块13,用于利用预先训练好的数字识别模型对所述目标图像进行分类,得到所述目标图像的类别,并从所述目标图像中筛选出分类正确的第一目标图像及分类错误的第二目标图像;
训练模块14,用于获取每种类别的所述第一目标图像的第一权重向量及特征向量,根据所述第一权重向量及特征向量,利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;
预测模块15,用于利用训练好的图像识别模型对所述第二目标图像进行预测,得到预测结果;
生成模块16,用于根据所述预测结果生成第二权重向量,将所述第二权重向量与所述第二目标图像进行相乘后,得到质量增强的训练图像。
在本实施例中,通过使用数据增强可以提高模型的泛化能力,减少过拟合,但现有的数据增强方法大多是通过简单的旋转、平移等来改变对目标的空间位置、大小等进行调整。然而我们所获得的数据集中,来自不同区域的人书写风格是不同的,同时还会存在连体、背景噪声等情况,这给模型的识别增加了难度,因此本申请可通过一定的技术方法来对数据进行微调和修饰可以提高图像的质量,以提高模型的分类精度。
具体的,数据集中包括多张手写数字的图像,如手写的罗马数字,手写罗马数字虽然只有10个种类,但大多数应用场景下对识别的精度还是相当高的,因为它经常被应用于金融、财务等方面。
在手写罗马数字的数据集中,每个数据集的图像的总数大概都在200张左右,因此通过人工方法对数据质量进行评价和修改将是费时费力的,也无法实现自动化线上应用。因此本实施例需要预设的数据增强算法对数据集的图像进行扩增,得到预设数量的目标图像。
数据增强方法可包括旋转、平移、镜像、缩放等等,可以采用其中一种数据增强方法,也可以多种数据增强方法进行组合,对数据集扩增到2000张,以提供足够的训练样本,避免网络在训练过程中出现过拟合。
本实施例使用预先训练好的数字识别模型对数据增强处理后的目标图像进行分类,并可通过人工筛选或机器筛选的方式分别找出目标图像中分类正确的第一目标图像及分类错误的第二目标图像。
例如,手写罗马数字虽然有10个种类,因此可使用预先训练好的数字识别模型将目标图像按照这10个种类进行分类,并可通过人工筛选或机器筛选的方式分别找出目标图像中分类正确的第一目标图像及分类错误的第二目标图像。
每种类别的第一目标图像对应唯一的第一权重向量,如数字为1的第一权重向量对应为a1,数字为2的第一权重向量对应为a2,以此类推;第一目标图像的特征向量则基于其特征信息进行生成,本实施例可获取每种类别的第一目标图像的第一权重向量及特征向量,根据第一权重向量及特征向量,利用第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型。图像识别模型在训练后,可采用交叉熵损失函数计算训练后的图像识别模型的损失值,在损失值满足要求后,则得到训练好的图像识别模型。
其中,交叉熵用于度量两个概率分布间的差异性,交叉熵损失函数用来测量最终的性能预测概率与真实性能之间的误差。图像识别模型的交叉熵损失函数越小,适应度越小,则性能预测方法的预测效果越好。
对于分类正确的数据,我们认为它们之间具有较好的分布一致性,因此我们首先使用这部分数据来训练图像识别模型,并获得每一类别的权重向量,寻找对分类结果有决定性影响的特征。其中,图像识别模型为卷积动态配准网络(Dynamic Alignment Network,DAU),由于卷积动态配准网络在训练时就会将权重与输入的特征向量进行对齐,因此我们通过可视化网络权重即可得到输入的特征向量。
本实施例可使用训练好的图像识别模型对分类错误的第二目标图像进行预测,得到预测结果,预测结果包括分类错误的图像位置及分类错误的原因等信息,根据预测结果生成第二权重向量,将第二权重向量与第二目标图像进行相乘后,得到质量增强的训练图像,从而抑制第二目标图像中存在的固有噪声,得到质量增强的第二目标图像。
而对于分类正确的第一目标图像,则直接使用镜像、缩放、旋转等方法扩增,使得扩增后的数据总数为原来的2倍,并将扩增后的第一目标图像添加至所述训练图像中,以得到质量较高的训练图像。
如上所述,可以理解地,本申请中提出的所述图像增强处理装置的各组成部分可以实现如上所述图像增强处理方法任一项的功能,具体结构不再赘述。
参照图3,本申请实施例中还提供一种计算机设备,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括存储介质、内存储器。该存储介质存储有操作系统、计算机程序和数据库。该内存器为存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储所述图像增强处理方法的相关数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种图像增强处理方法。
上述处理器执行上述的图像增强处理方法,包括:
获取数据集;其中,所述数据集中包括多张手写数字的图像;
利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像;
利用预先训练好的数字识别模型对所述目标图像进行分类,得到所述目标图像的类别,并从所述目标图像中筛选出分类正确的第一目标图像及分类错误的第二目标图像;
获取每种类别的所述第一目标图像的第一权重向量及特征向量,根据所述第一权重向量及特征向量,利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;
利用训练好的图像识别模型对所述第二目标图像进行预测,得到预测结果;
根据所述预测结果生成第二权重向量,将所述第二权重向量与所述第二目标图像进行相乘后,得到质量增强的训练图像。
本申请一实施例还提供一种计算机可读存储介质,该计算机可读存储介质可以是非易失性的,也可以是易失性的,其上存储有计算机程序,计算机程序被处理器执行时实现一种图像增强处理方法,包括步骤:
获取数据集;其中,所述数据集中包括多张手写数字的图像;
利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像;
利用预先训练好的数字识别模型对所述目标图像进行分类,得到所述目标图像的类别,并从所述目标图像中筛选出分类正确的第一目标图像及分类错误的第二目标图像;
获取每种类别的所述第一目标图像的第一权重向量及特征向量,根据所述第一权重向量及特征向量,利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;
利用训练好的图像识别模型对所述第二目标图像进行预测,得到预测结果;
根据所述预测结果生成第二权重向量,将所述第二权重向量与所述第二目标图像进行相乘后,得到质量增强的训练图像。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
综上所述,本申请的最大有益效果在于:
本申请所提供的一种图像增强处理方法、装置、计算机设备及存储介质,获取数据集,利用预设的数据增强算法对数据集的图像进行扩增,得到预设数量的目标图像;利用预先训练好的数字识别模型对目标图像进行分类,得到目标图像的类别,并从目标图像中筛选出分类正确的第一目标图像及分类错误的第二目标图像;获取每种类别的第一目标图像的第一权重向量及特征向量,根据第一权重向量及特征向量,利用第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;利用训练好的图像识别模型对第二目标图像进行预测,得到预测结果,根据预测结果生成第二权重向量,将第二权重向量与第二目标图像进行相乘后,得到质量增强的训练图像,从而基于分类正确的第一目标图像训练得到训练好的图像识别模型,利用训练好的图像识别模型对分类错误的第二目标图像进行预测,基于预测结果调整分类错误的第二目标图像,以提高第二目标图像的分类质量;此外,通过将第二权重向量与第二目标图像进行相乘,可以抑制第二目标图像中存在的固有噪声,并消除对分类具有消极贡献的分量,减少因书写习惯和风格的不同而带来的分类误差,得到质量增强的训练图像;同时本申请通过人工智能的方式自动化增强图像质量,提高图像增强处理的效率。

Claims (20)

  1. 一种图像增强处理方法,其中,包括:
    获取数据集;其中,所述数据集中包括多张手写数字的图像;
    利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像;
    利用预先训练好的数字识别模型对所述目标图像进行分类,得到所述目标图像的类别,并从所述目标图像中筛选出分类正确的第一目标图像及分类错误的第二目标图像;
    获取每种类别的所述第一目标图像的第一权重向量及特征向量,根据所述第一权重向量及特征向量,利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;
    利用训练好的图像识别模型对所述第二目标图像进行预测,得到预测结果;
    根据所述预测结果生成第二权重向量,将所述第二权重向量与所述第二目标图像进行相乘后,得到质量增强的训练图像。
  2. 根据权利要求1所述的方法,其中,所述获取每种类别的所述第一目标图像的第一权重向量及特征向量,包括:
    根据所述第一目标图像的类别从预先构建的对照表中查询对应的权重向量,得到第一权重向量;其中,所述对照表记录了每种类别的图像对应的权重向量;
    获取所述第一目标图像的特征信息,将所述特征信息转换为向量形式,得到所述第一目标图像的特征向量。
  3. 根据权利要求2所述的方法,其中,所述获取所述第一目标图像的特征信息,将所述特征信息转换为向量形式,得到所述第一目标图像的特征向量,包括:
    当确定所述第一目标图像的数量为多张时,获取每张所述第一目标图像的所有特征信息;
    计算每个所述特征信息在多张所述第一目标图像出现的频率;
    从所有所述特征信息中筛选出频率最高的特征信息,得到目标特征信息;
    将所述目标特征信息转换为向量形式,得到多张所述第一目标图像的特征向量。
  4. 根据权利要求1所述的方法,其中,所述根据所述预测结果生成第二权重向量,包括:
    根据所述预测结果确定所述第二目标图像分类错误的错误信息,得到所述第二目标图像的参考错误信息;
    根据所述参考错误信息对所述第二目标图像进行校准,得到校准信息;
    将所述校准信息转换为词向量形式,得到所述第二权重向量。
  5. 根据权利要求1所述的方法,其中,所述利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型,包括:
    利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练结果;
    根据所述训练结果,利用交叉熵损失函数计算所述图像识别模型训练后的损失值;
    判断所述损失值是否低于预设损失值;
    当判定所述损失值低于预设损失值时,得到训练好的图像识别模型。
  6. 根据权利要求5所述的方法,其中,所述判断所述损失值是否低于预设损失值之后,还包括:
    当判定所述损失值不低于预设损失值时,根据所述损失值调整所述图像识别模型的参数;
    利用所述第一目标图像对调整参数后的所述图像识别模型进行再次训练,直至所述损失值低于预设损失值时停止训练,得到训练好的图像识别模型。
  7. 根据权利要求1所述的方法,其中,所述利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像,包括:
    对所述数据集的图像进行旋转、平移、缩放或翻转中的至少一项数据增强处理方式,得到预设数量的目标图像。
  8. 一种图像增强处理装置,其中,包括:
    获取模块,用于获取数据集;其中,所述数据集中包括多张手写数字的图像;
    扩增模块,用于利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像;
    分类模块,用于利用预先训练好的数字识别模型对所述目标图像进行分类,得到所述目标图像的类别,并从所述目标图像中筛选出分类正确的第一目标图像及分类错误的第二目标图像;
    训练模块,用于获取每种类别的所述第一目标图像的第一权重向量及特征向量,根据所述第一权重向量及特征向量,利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;
    预测模块,用于利用训练好的图像识别模型对所述第二目标图像进行预测,得到预测结果;
    生成模块,用于根据所述预测结果生成第二权重向量,将所述第二权重向量与所述第二目标图像进行相乘后,得到质量增强的训练图像。
  9. 一种计算机设备,其特征在于,包括:
    处理器;
    存储器;
    其中,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现一种图像增强处理方法,其中,所述图像增强处理方法包括以下步骤:
    获取数据集;其中,所述数据集中包括多张手写数字的图像;
    利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像;
    利用预先训练好的数字识别模型对所述目标图像进行分类,得到所述目标图像的类别,并从所述目标图像中筛选出分类正确的第一目标图像及分类错误的第二目标图像;
    获取每种类别的所述第一目标图像的第一权重向量及特征向量,根据所述第一权重向量及特征向量,利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;
    利用训练好的图像识别模型对所述第二目标图像进行预测,得到预测结果;
    根据所述预测结果生成第二权重向量,将所述第二权重向量与所述第二目标图像进行相乘后,得到质量增强的训练图像。
  10. 根据权利要求9所述的计算机设备,所述获取每种类别的所述第一目标图像的第一权重向量及特征向量,包括:
    根据所述第一目标图像的类别从预先构建的对照表中查询对应的权重向量,得到第一权重向量;其中,所述对照表记录了每种类别的图像对应的权重向量;
    获取所述第一目标图像的特征信息,将所述特征信息转换为向量形式,得到所述第一目标图像的特征向量。
  11. 根据权利要求10所述的计算机设备,所述获取所述第一目标图像的特征信息,将所述特征信息转换为向量形式,得到所述第一目标图像的特征向量,包括:
    当确定所述第一目标图像的数量为多张时,获取每张所述第一目标图像的所有特征信息;
    计算每个所述特征信息在多张所述第一目标图像出现的频率;
    从所有所述特征信息中筛选出频率最高的特征信息,得到目标特征信息;
    将所述目标特征信息转换为向量形式,得到多张所述第一目标图像的特征向量。
  12. 根据权利要求9所述的计算机设备,所述根据所述预测结果生成第二权重向量,包括:
    根据所述预测结果确定所述第二目标图像分类错误的错误信息,得到所述第二目标图像的参考错误信息;
    根据所述参考错误信息对所述第二目标图像进行校准,得到校准信息;
    将所述校准信息转换为词向量形式,得到所述第二权重向量。
  13. 根据权利要求9所述的计算机设备,所述利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型,包括:
    利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练结果;
    根据所述训练结果,利用交叉熵损失函数计算所述图像识别模型训练后的损失值;
    判断所述损失值是否低于预设损失值;
    当判定所述损失值低于预设损失值时,得到训练好的图像识别模型。
  14. 根据权利要求13所述的计算机设备,所述判断所述损失值是否低于预设损失值之后,还包括:
    当判定所述损失值不低于预设损失值时,根据所述损失值调整所述图像识别模型的参数;
    利用所述第一目标图像对调整参数后的所述图像识别模型进行再次训练,直至所述损失值低于预设损失值时停止训练,得到训练好的图像识别模型。
  15. 根据权利要求9所述的计算机设备,所述利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像,包括:
    对所述数据集的图像进行旋转、平移、缩放或翻转中的至少一项数据增强处理方式,得到预设数量的目标图像。
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现图像增强处理方法,其中,所述图像增强处理方法包括以下步骤:
    获取数据集;其中,所述数据集中包括多张手写数字的图像;
    利用预设的数据增强算法对所述数据集的图像进行扩增,得到预设数量的目标图像;
    利用预先训练好的数字识别模型对所述目标图像进行分类,得到所述目标图像的类别,并从所述目标图像中筛选出分类正确的第一目标图像及分类错误的第二目标图像;
    获取每种类别的所述第一目标图像的第一权重向量及特征向量,根据所述第一权重向量及特征向量,利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型;
    利用训练好的图像识别模型对所述第二目标图像进行预测,得到预测结果;
    根据所述预测结果生成第二权重向量,将所述第二权重向量与所述第二目标图像进行相乘后,得到质量增强的训练图像。
  17. 根据权利要求16所述的计算机可读存储介质,所述所述获取每种类别的所述第一目标图像的第一权重向量及特征向量,包括:
    根据所述第一目标图像的类别从预先构建的对照表中查询对应的权重向量,得到第一权重向量;其中,所述对照表记录了每种类别的图像对应的权重向量;
    获取所述第一目标图像的特征信息,将所述特征信息转换为向量形式,得到所述第一目标图像的特征向量。
  18. 根据权利要求17所述的计算机可读存储介质,所述获取所述第一目标图像的特征信息,将所述特征信息转换为向量形式,得到所述第一目标图像的特征向量,包括:
    当确定所述第一目标图像的数量为多张时,获取每张所述第一目标图像的所有特征信息;
    计算每个所述特征信息在多张所述第一目标图像出现的频率;
    从所有所述特征信息中筛选出频率最高的特征信息,得到目标特征信息;
    将所述目标特征信息转换为向量形式,得到多张所述第一目标图像的特征向量。
  19. 根据权利要求16所述的计算机可读存储介质,所述根据所述预测结果生成第二权重向量,包括:
    根据所述预测结果确定所述第二目标图像分类错误的错误信息,得到所述第二目标图像的参考错误信息;
    根据所述参考错误信息对所述第二目标图像进行校准,得到校准信息;
    将所述校准信息转换为词向量形式,得到所述第二权重向量。
  20. 根据权利要求16所述的计算机可读存储介质,所述利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练好的图像识别模型,包括:
    利用所述第一目标图像对预先构建的图像识别模型进行训练,得到训练结果;
    根据所述训练结果,利用交叉熵损失函数计算所述图像识别模型训练后的损失值;
    判断所述损失值是否低于预设损失值;
    当判定所述损失值低于预设损失值时,得到训练好的图像识别模型。
PCT/CN2022/090167 2022-02-21 2022-04-29 图像增强处理方法、装置、计算机设备及存储介质 WO2023155299A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210156905.2A CN114549928A (zh) 2022-02-21 2022-02-21 图像增强处理方法、装置、计算机设备及存储介质
CN202210156905.2 2022-02-21

Publications (1)

Publication Number Publication Date
WO2023155299A1 true WO2023155299A1 (zh) 2023-08-24

Family

ID=81675921

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/090167 WO2023155299A1 (zh) 2022-02-21 2022-04-29 图像增强处理方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN114549928A (zh)
WO (1) WO2023155299A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116994019A (zh) * 2022-09-30 2023-11-03 腾讯科技(深圳)有限公司 模型训练方法、相关设备、存储介质及计算机产品
CN115862022B (zh) * 2023-01-31 2023-07-14 深圳前海环融联易信息科技服务有限公司 图像矫正方法及其装置、设备、存储介质、产品

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110555431A (zh) * 2019-09-10 2019-12-10 杭州橙鹰数据技术有限公司 一种图像识别的方法和装置
CN111291841A (zh) * 2020-05-13 2020-06-16 腾讯科技(深圳)有限公司 图像识别模型训练方法、装置、计算机设备和存储介质
CN112396005A (zh) * 2020-11-23 2021-02-23 平安科技(深圳)有限公司 生物特征图像识别方法、装置、电子设备及可读存储介质
US20210241041A1 (en) * 2020-01-31 2021-08-05 Element Ai Inc. Method of and system for joint data augmentation and classification learning
CN113283446A (zh) * 2021-05-27 2021-08-20 平安科技(深圳)有限公司 图像中目标物识别方法、装置、电子设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110555431A (zh) * 2019-09-10 2019-12-10 杭州橙鹰数据技术有限公司 一种图像识别的方法和装置
US20210241041A1 (en) * 2020-01-31 2021-08-05 Element Ai Inc. Method of and system for joint data augmentation and classification learning
CN111291841A (zh) * 2020-05-13 2020-06-16 腾讯科技(深圳)有限公司 图像识别模型训练方法、装置、计算机设备和存储介质
CN112396005A (zh) * 2020-11-23 2021-02-23 平安科技(深圳)有限公司 生物特征图像识别方法、装置、电子设备及可读存储介质
CN113283446A (zh) * 2021-05-27 2021-08-20 平安科技(深圳)有限公司 图像中目标物识别方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN114549928A (zh) 2022-05-27

Similar Documents

Publication Publication Date Title
WO2021244079A1 (zh) 智能家居环境中图像目标检测方法
WO2021042828A1 (zh) 神经网络模型压缩的方法、装置、存储介质和芯片
WO2021121127A1 (zh) 样本类别识别方法、装置、计算机设备及存储介质
CN108764195B (zh) 手写模型训练方法、手写字识别方法、装置、设备及介质
US20240144665A1 (en) Dual deep learning architecture for machine-learning systems
WO2023155299A1 (zh) 图像增强处理方法、装置、计算机设备及存储介质
WO2019184124A1 (zh) 风控模型训练方法、风险识别方法、装置、设备及介质
WO2022042123A1 (zh) 图像识别模型生成方法、装置、计算机设备和存储介质
EP4163831A1 (en) Neural network distillation method and device
WO2020252917A1 (zh) 一种模糊人脸图像识别方法、装置、终端设备及介质
CN109948149B (zh) 一种文本分类方法及装置
WO2020253127A1 (zh) 脸部特征提取模型训练方法、脸部特征提取方法、装置、设备及存储介质
CN109086653B (zh) 手写模型训练方法、手写字识别方法、装置、设备及介质
EP3588380A1 (en) Information processing method and information processing apparatus
CN110866530A (zh) 一种字符图像识别方法、装置及电子设备
WO2023125654A1 (zh) 人脸识别模型的训练方法、装置、电子设备及存储介质
CN111553438A (zh) 一种基于卷积神经网络的图像识别方法
CN112446423A (zh) 一种基于迁移学习的快速混合高阶注意力域对抗网络的方法
WO2020168796A1 (zh) 一种基于高维空间采样的数据增强方法
CN110543566B (zh) 一种基于自注意力近邻关系编码的意图分类方法
CN109815923B (zh) 基于lbp特征与深度学习的金针菇菇头分选识别方法
CN108985442B (zh) 手写模型训练方法、手写字识别方法、装置、设备及介质
CN113128287A (zh) 训练跨域人脸表情识别模型、人脸表情识别的方法及系统
CN109754059A (zh) 翻拍图像识别方法、装置、计算机设备和存储介质
CN112132257A (zh) 基于金字塔池化及长期记忆结构的神经网络模型训练方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22926612

Country of ref document: EP

Kind code of ref document: A1