Image classification model training method and device, equipment and computer storage medium

By determining the model parameters based on the training feature convolution value and classification value in image classification model training, and deleting abnormal data iteratively, the problem of low accuracy of image classification model in the prior art is solved, and higher model generalization ability and image classification accuracy are achieved.

CN119540610APending Publication Date: 2025-02-28LIAONING MOBILE COMM +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411508672.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the existing image classification model training methods, the image classification model trained has low accuracy, mainly because the training data contains abnormal image samples, which causes the model to learn incorrect patterns.

Method used

By obtaining the training image data and the corresponding training feature classification values, the training image is processed using the image classification model to obtain the training feature convolution values, and the target model parameters are determined based on these feature values. Then, the updated model is used to determine the predicted feature classification value. If the difference between the predicted feature classification value and the training feature classification value is greater than the set threshold, delete the abnormal data and redetermine the model parameters until the error of all feature classification values ​​is less than the set threshold, and the target image classification model is obtained.

Benefits of technology

By iteratively removing training image data with large errors and repeating training, the generalization ability of the model is gradually improved, reducing the problem of low model recognition accuracy caused by abnormal image samples, and improving the accuracy of image classification models for image classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540610A_ABST
    Figure CN119540610A_ABST
Patent Text Reader

Abstract

The invention discloses an image classification model training method, device and equipment and a computer storage medium, and relates to the technical field of image recognition. The method comprises the following steps: acquiring a training image and a training feature classification value corresponding to the training image; processing the training image by using the image classification model to obtain a training feature convolution value; determining a target model parameter based on the training feature convolution value and the training feature classification value; determining a prediction feature classification value corresponding to the training feature convolution value by using an image classification model updated based on the target model parameter; and under the condition that the difference value between the predicted feature classification value and the training feature classification value is greater than a set threshold value, deleting the training image data and re-determining the target model parameter by using the residual training image data until the error of all the feature classification values is smaller than the set threshold value, thereby obtaining a target image classification model. According to the embodiment of the invention, the abnormal image data is iteratively reduced during training, and the image classification accuracy of the image classification model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image recognition technology, and in particular, relates to an image classification model training method, device, equipment and computer storage medium. Background Art

[0002] With the rapid development of computer vision, image recognition technology has been widely used in the fields of intelligent monitoring, medical image analysis and autonomous driving. Image recognition technology is a technology that uses computers to process, analyze and understand images to identify targets and objects in various different patterns.

[0003] In the existing image classification model training method, the training data is directly input into the model for training. However, the training data often contains abnormal data samples. When the training data contains abnormal image samples, the model will learn the wrong pattern, resulting in the abnormality of the trained image classification model and the low accuracy of the image classification model. Summary of the invention

[0004] The embodiments of the present application provide an image classification model training method, apparatus, device and computer storage medium to solve the problem of low accuracy of image classification models trained in existing image classification model training methods.

[0005] In a first aspect, an embodiment of the present application provides an image classification model training method, the method comprising:

[0006] Acquire training image data, wherein the training image data includes a training image and a training feature classification value corresponding to the training image;

[0007] Processing the training image using an image classification model to obtain a training feature convolution value;

[0008] Determining target model parameters based on the training feature convolution value and the training feature classification value;

[0009] Determining a predicted feature classification value corresponding to the training feature convolution value using an image classification model updated based on target model parameters;

[0010] When the difference between the predicted feature classification value and the training feature classification value is greater than a set threshold, the training image data is deleted and the target model parameters are re-determined using the remaining training image data until all feature classification value errors are less than the set threshold, thereby obtaining a target image classification model.

[0011] In a second aspect, an embodiment of the present application provides an image classification model training device, the device comprising:

[0012] An acquisition module, used to acquire training image data, wherein the training image data includes a training image and a training feature classification value corresponding to the training image;

[0013] A processing module, used to process the training image using an image classification model to obtain a training feature convolution value;

[0014] A determination module, configured to determine target model parameters based on the training feature convolution value and the training feature classification value;

[0015] The determination module is further used to determine the predicted feature classification value corresponding to the training feature convolution value using the image classification model updated based on the target model parameters;

[0016] The determination module is also used to delete the training image data and use the remaining training image data to re-determine the target model parameters when the difference between the predicted feature classification value and the training feature classification value is greater than a set threshold, until all feature classification value errors are less than the set threshold, thereby obtaining the target image classification model.

[0017] In a third aspect, an embodiment of the present application provides a terminal device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, an image classification model training method as in the first aspect is implemented.

[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, an image classification model training method as in the first aspect is implemented.

[0019] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes an image classification model training method as in the first aspect.

[0020] The embodiment of the present application provides an image classification model training method, device, equipment and computer storage medium. The method first obtains a training image and a training feature classification value corresponding to the training image; provides the model with necessary input and output for training, so that the model can learn the association between the training image and the training image feature classification value. The training image is processed by the image classification model to obtain the training feature convolution value, which can automatically capture specific local information in the training image. The target model parameters are determined based on the training feature convolution value and the training feature classification value, which can guide the model to learn the mapping from input to output and improve the accuracy and generalization ability of the model. The predicted feature classification value corresponding to the training feature convolution value is determined by using the image classification model updated based on the target model parameters. When the difference between the predicted feature classification value and the training feature classification value is greater than the set threshold, the training image data is deleted and the target model parameters are re-determined using the remaining training image data until all feature classification value errors are less than the set threshold, and the target image classification model is obtained; by calculating the error of the feature classification value, the performance of the model on the training set can be quantified, providing a quantitative indicator for further model tuning. Moreover, by iteratively removing training image data with large errors and repeating the training, the generalization ability of the model can be gradually improved, the problem of low model recognition accuracy caused by abnormal image samples is reduced, and the accuracy of image classification by the image classification model is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0022] Figure 1 It is a flowchart of the image classification model training method provided in the embodiment of the present application;

[0023] Figure 2 It is a flowchart of an implementation method of enhancing negative image training data provided in an embodiment of the present application;

[0024] Figure 3 It is a flowchart of an implementation method for determining a negative feature convolution value provided in an embodiment of the present application;

[0025] Figure 4 It is a flowchart of an implementation method for determining a training feature convolution value provided in an embodiment of the present application;

[0026] Figure 5 It is a structural schematic diagram of an image classification model training device provided in an embodiment of the present application;

[0027] Figure 6 It is a structural diagram of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0029] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0030] The image classification model training method in the prior art directly inputs the data to be trained into the model for training when training the model, and the training data often contains abnormal data samples. When the training data contains abnormal image samples, the model will learn the wrong pattern, resulting in abnormality of the trained image classification model and low accuracy of the image classification model. Some methods first identify the training images before inputting the data to be trained into the model for training, and determine the images in the training images that meet the preset conditions as abnormal images. However, when performing abnormal image recognition, abnormal recognition is usually performed on a certain limited class of images, and there will still be other types of abnormal images in the data to be trained, and they will be input into the image classification model for training, which reduces the recognition accuracy of the image classification model.

[0031] In order to solve the existing technology, the embodiment of the present application provides an image classification model training method, device, equipment and computer storage medium. The method first obtains the training image and the training feature classification value corresponding to the training image; provides the necessary input and output for the model to learn the association between the training image and the training image feature classification value. The training image is processed by the image classification model to obtain the training feature convolution value, which can automatically capture the specific local information in the training image. The target model parameters are determined based on the training feature convolution value and the training feature classification value, which can guide the model to learn the mapping from input to output and improve the accuracy and generalization ability of the model. The predicted feature classification value corresponding to the training feature convolution value is determined by using the image classification model updated based on the target model parameters. When the difference between the predicted feature classification value and the training feature classification value is greater than the set threshold, the training image data is deleted and the target model parameters are re-determined using the remaining training image data until all feature classification value errors are less than the set threshold, and the target image classification model is obtained; by calculating the error of the feature classification value, the performance of the model on the training set can be quantified, providing a quantitative indicator for further model tuning. Moreover, by iteratively removing training image data with large errors and repeating the training, the generalization ability of the model can be gradually improved, the problem of low model recognition accuracy caused by abnormal image samples is reduced, and the accuracy of image classification by the image classification model is improved.

[0032] The following first introduces the image classification model training method provided in the embodiment of the present application.

[0033] Figure 1 FIG. 1 is a flow chart of an image classification model training method provided by an embodiment of the present application. Figure 1 As shown, the method may include the following steps: S101 to S105.

[0034] S101, obtaining training image data, where the training image data includes a training image and a training feature classification value corresponding to the training image.

[0035] The training image is an original image used to train the image classification model, and the training feature classification value corresponding to the training image is a classification label value or a feature representation value corresponding to the training image.

[0036] In some embodiments, the training image data may be collected by a distributed image collector. For example, data may be crawled on a web page to obtain the training image data and the training image data may be labeled, or labeled training image data may be directly obtained from a related business system.

[0037] By obtaining training image data with known classification values, the model is provided with input so that the model can learn the association between the training images and the classification values ​​of the training features.

[0038] S102, using the image classification model to process the training image to obtain a training feature convolution value.

[0039] In some embodiments, the convolutional neural network in which the preset convolution kernel is located can be a visual geometry network (Visual Geometry Group, VGG), a deep convolutional neural network (Inception) or a residual network (Residual Network, ResNet).

[0040] By performing convolution operations on training images with preset convolution kernels, the feature information of the image can be extracted and training feature convolution values ​​can be generated to provide input for the image classification model to learn image features.

[0041] S103, determining target model parameters based on the training feature convolution value and the training feature classification value.

[0042] The target model parameter matrix corresponding to the training feature convolution value matrix and the training feature classification value matrix is ​​determined according to the relationship among the feature convolution value matrix, the feature classification value matrix and the model parameter matrix, wherein each element of the training feature convolution value matrix represents the training feature convolution value of the corresponding training image, each element of the feature classification value matrix represents the training feature classification value of the corresponding training image, and each element of the target model parameter matrix represents the corresponding target model parameter.

[0043] Through the relationship between the feature convolution value matrix, the feature classification value matrix and the model parameter matrix, the target model parameters can be accurately determined, thereby improving the classification accuracy of the model.

[0044] S104, using the image classification model updated based on the target model parameters, determining the predicted feature classification value corresponding to the training feature convolution value.

[0045] By using an image classification model that is updated based on the target model parameters, the accuracy and precision of the prediction can be improved, making the prediction results more reliable and accurate, better adaptable to new data sets, and improving the performance of the model on unknown data.

[0046] In some embodiments, the corresponding relationship between the feature convolution value and the feature classification value may be a linear relationship or a nonlinear relationship.

[0047] In some embodiments, when the feature convolution value and the feature classification value are in a linear relationship, the corresponding relationship between the model parameter, the feature convolution value and the feature classification value can be:

[0048]

[0049] in, is the feature classification value of the i-th training image, θ i is the i-th model parameter, is the p-th feature convolution value of the ith training image.

[0050] According to the classification value of the predicted features, the performance feedback of the model can be obtained in time, which can provide guidance for further improving the model and make the model more perfect.

[0051] S105, when the difference between the predicted feature classification value and the training feature classification value is greater than the set threshold, the training image data is deleted and the target model parameters are re-determined using the remaining training image data until all feature classification value errors are less than the set threshold, thereby obtaining the target image classification model.

[0052] The difference between the predicted feature classification value and the training feature classification value is used to represent the difference between the predicted feature classification value and the training feature classification value, and is used to measure the accuracy of the model prediction.

[0053] In some embodiments, the calculation formula for the feature classification value difference may be:

[0054]

[0055] Among them, λ i is the feature classification value difference of the i-th training image, is the predicted feature classification value of the i-th training image, y i is the classification value of the training feature of the i-th training image.

[0056] By calculating the difference between the predicted feature classification value and the training feature classification value, the classification performance of the model can be intuitively evaluated; the smaller the difference, the stronger the classification ability of the model and the higher the degree of fit to the training data.

[0057] First, the training image and the training feature classification value corresponding to the training image are obtained; the necessary input and output are provided for the model to learn the correlation between the training image and the training image feature classification value. The training image is processed by the image classification model to obtain the training feature convolution value, which can automatically capture the specific local information in the training image. The target model parameters are determined based on the training feature convolution value and the training feature classification value, which can guide the model to learn the mapping from input to output and improve the accuracy and generalization ability of the model. The predicted feature classification value corresponding to the training feature convolution value is determined by using the image classification model updated based on the target model parameters. When the difference between the predicted feature classification value and the training feature classification value is greater than the set threshold, the training image data is deleted and the target model parameters are re-determined using the remaining training image data until all feature classification value errors are less than the set threshold, and the target image classification model is obtained; by calculating the error of the feature classification value, the performance of the model on the training set can be quantified, providing a quantitative indicator for further model tuning. Moreover, by iteratively removing training image data with large errors and repeating the training, the generalization ability of the model can be gradually improved, the problem of low model recognition accuracy caused by abnormal image samples is reduced, and the accuracy of image classification by the image classification model is improved.

[0058] In some embodiments, processing the training image using the image classification model to obtain the training feature convolution value may include:

[0059] The training image and the training feature classification value corresponding to the training image are input into the image classification model, and the training image is convolved with the preset convolution kernel in the image classification model to obtain the training feature convolution value of the training image.

[0060] By performing convolution operations on training images with preset convolution kernels, feature extraction is automated, reducing manual intervention, and the image classification model can efficiently extract key features from images. In addition, the extracted features are objective and not affected by personal subjective judgment.

[0061] In some embodiments, determining the target model parameters based on the training feature convolution value and the training feature classification value may include:

[0062] The target model parameter matrix corresponding to the training feature convolution value matrix and the training feature classification value matrix is ​​determined according to the relationship among the feature convolution value matrix, the feature classification value matrix and the model parameter matrix; wherein each element of the training feature convolution value matrix represents the training feature convolution value of the corresponding training image, each element of the feature classification value matrix represents the training feature classification value of the corresponding training image, and each element of the target model parameter matrix represents the corresponding target model parameter.

[0063] By establishing a relationship between the training feature convolution value and the training feature classification value and the target model parameters, the model can be parameterized to ensure that the model learns effective feature representations on the training data.

[0064] In some embodiments, determining a predicted feature classification value corresponding to a training feature convolution value using an image classification model updated based on target model parameters may include:

[0065] The predicted feature classification values ​​corresponding to the target model parameters and the training feature convolution values ​​are determined according to the relationship between the model parameters, the feature convolution values ​​and the feature classification values.

[0066] By using the updated image classification model with the target model parameters, a more accurate and generalized model can be obtained, thereby improving the accuracy of the prediction of feature classification values. By predicting the feature classification values, images can be classified more accurately, improving the classification performance and accuracy of the model.

[0067] In some embodiments, the relationship between the feature convolution value matrix, the feature classification value matrix and the model parameter matrix may be:

[0068] θ=(E T E) -1 E T y

[0069] Among them, θ is the model parameter matrix, E is the feature convolution value matrix, and y is the feature classification value matrix.

[0070] The model parameter matrix can be expressed as:

[0071]

[0072] Among them, θ p is the pth model parameter.

[0073] The feature convolution value matrix can be expressed as:

[0074]

[0075] in, is the p-th feature convolution value of the c-th training image.

[0076] Through the relationship between the feature convolution value matrix, the feature classification value matrix and the model parameter matrix, the model can learn the complex mapping relationship from feature convolution values ​​to feature classification values, thereby improving the generalization ability of the model.

[0077] In some embodiments, Figure 2As shown, the training image data includes positive image training data and negative image training data. After deleting the training image data and before using the remaining training image data to redetermine the target model parameters, the method may further include: S201 to S205.

[0078] S201, when the number of negative training image data is less than a set threshold, obtaining negative image training data whose feature classification value error is less than the set threshold;

[0079] S202, determining a normalized matrix of training feature convolution values ​​of negative image training data based on the training feature convolution values ​​of negative image training data;

[0080] S203, determining a normalized matrix of a preset convolution kernel based on the preset convolution kernel;

[0081] S204, determining negative feature convolution values ​​according to the feature convolution value matrix, the preset convolution kernel, the normalized matrix of the training feature convolution values, and the normalized matrix of the preset convolution kernel;

[0082] S205, adding the negative feature convolution value to the remaining training image data to obtain updated remaining training image data.

[0083] By screening out negative image data with smaller feature classification errors, normalizing and convolving them, and adding the feature convolution values ​​of the negative image data to the remaining training image data, the quantity and diversity of negative image data are increased, thereby enhancing the generalization ability of the model and reducing the risk of overfitting of the model during training.

[0084] In some embodiments, when the preset convolution kernel is a 3*3 matrix, determining a normalized matrix of training feature convolution values ​​of negative image training data based on training feature convolution values ​​of negative image training data may include:

[0085] The corresponding feature convolution matrix is ​​determined based on the training feature convolution value of the negative image training data. The feature convolution matrix is ​​the pixel matrix of the area where the convolution value of the negative image and the kth preset convolution kernel is the largest, which can be expressed as:

[0086]

[0087] in, is the pixel value of the i-th row and j-th column of the pixel matrix with the maximum convolution value between the negative image and the k-th preset convolution kernel;

[0088] The feature convolution matrix is ​​normalized to obtain the normalized matrix T of the training feature convolution value of the negative image training data. k :

[0089]

[0090] Among them, t k is the standard deviation of the feature convolution value.

[0091] Normalize the preset convolution kernel to obtain the normalized matrix S of the preset convolution kernel k :

[0092]

[0093] in, is the weight of the i-th row and j-th column of the convolution kernel matrix corresponding to the k-th preset convolution kernel, s k is the standard deviation of the weights of the k-th preset convolution kernel.

[0094] In some embodiments, Figure 3 As shown, determining the negative feature convolution value according to the feature convolution value matrix, the preset convolution kernel, the normalized matrix of the training feature convolution value and the normalized matrix of the preset convolution kernel may include: S301 to S304.

[0095] S301, calculating a difference matrix between a normalized matrix of training feature convolution values ​​and a normalized matrix of a preset convolution kernel;

[0096] S302, determining a target feature convolution value matrix according to the difference matrix, a preset moving step size and a feature convolution value matrix;

[0097] S303, performing a convolution operation based on the target feature convolution value matrix and the corresponding convolution kernel to obtain a convolution value;

[0098] S304: When the convolution value exceeds the set threshold, select the characteristic convolution value corresponding to the target characteristic convolution value matrix corresponding to the convolution value as the negative characteristic convolution value.

[0099] The new convolution value is calculated by the normalized matrix of the training feature convolution value and the normalized matrix of the preset convolution kernel. When the convolution value exceeds the set threshold, it is selected as the negative feature convolution value, which helps to generate negative samples with obvious characteristics and improve the training effect and generalization ability of the model.

[0100] In some embodiments, determining a target feature convolution value matrix according to the difference matrix, a preset moving step size, and a feature convolution value matrix may include:

[0101] Multiply the difference matrix by the preset moving step to obtain the unit moving matrix;

[0102] The feature convolution value matrix is ​​added to the unit shift matrix, and the iteration is repeated for a preset number of times to obtain multiple target feature matrices.

[0103] In some embodiments, Figure 4 As shown, performing a convolution operation on a training image through a preset convolution kernel in an image classification model to obtain a training feature convolution value of the training image may include: S401 and S402.

[0104] S401, using a preset convolution kernel and a pixel matrix of a training image to perform element-by-element multiplication and adding the results to obtain a plurality of convolution values ​​corresponding to the preset convolution kernel;

[0105] S402, selecting the maximum value among the convolution values ​​as the training feature convolution value corresponding to the preset convolution kernel.

[0106] Through element-by-element multiplication and summation operations, the model can capture local features in the image and strengthen the representation of these features. Selecting the maximum convolution value as the feature representation helps to highlight the most significant features, reduce the burden of subsequent calculations, and improve the efficiency of model training.

[0107] In some embodiments, before using a preset convolution kernel to perform element-by-element multiplication with a pixel matrix of a training image and adding the results to obtain a plurality of convolution values ​​corresponding to the preset convolution kernel, the method may further include: converting the training image into a pixel matrix.

[0108] In some embodiments, when the number of pixels of the training image in the horizontal direction and the vertical direction is m and n respectively, the training image is converted into an m*n pixel matrix, and the pixel matrix can be expressed as:

[0109]

[0110] Among them, B is the pixel matrix of the training image, b nm is the pixel value of the pixel at the nth row and mth column.

[0111] When there are k preset convolution kernels and the preset convolution kernel is a 3*3 matrix, the kth convolution kernel can be expressed as:

[0112]

[0113] Among them, q k is the kth preset convolution kernel, is the weight of the i-th row and j-th column of the convolution kernel matrix corresponding to the k-th convolution kernel.

[0114] Convolve the training image pixel matrix B with the preset convolution kernel k. For any convolution value f ij , the calculation formula is:

[0115]

[0116] Among them, b nmis the pixel value of the pixel point in the nth row and mth column of the pixel matrix of the training image, is the weight of the i-th row and j-th column of the preset convolution kernel matrix corresponding to the k-th convolution kernel.

[0117] Get the convolution matrix F after the training image is convolved with the kth preset convolution kernel k , F k It is a matrix of (n-2)*(m-2) dimensions, expressed as:

[0118]

[0119] in, is the convolution value of the p-2th column and q-2th row.

[0120] In some embodiments, the maximum convolution value in the convolution matrix obtained by convolving the training image with each preset convolution kernel is selected as the characteristic convolution value e of the preset convolution kernel, and the 3*3 pixels in the training image corresponding to the preset convolution kernel k are called the characteristic convolution matrix G of the preset convolution kernel k. k .

[0121] The set of feature convolution values ​​of the i-th training image is expressed as:

[0122]

[0123] Among them, E i is the feature convolution value set of the i-th training image, It is the feature convolution value of the p-th preset convolution kernel of the ith training image.

[0124] In some embodiments, after obtaining the target image classification model, the method may further include:

[0125] Get the image to be classified;

[0126] The image to be classified is input into the target image classification model, and a convolution operation is performed on the image to be classified through a preset convolution kernel in the image classification model to obtain a classification feature convolution value of the image to be classified;

[0127] The image classification model is used to determine the target feature classification value based on the target model parameters and the classification feature convolution value according to the relationship between the model parameters, the feature convolution value and the feature classification value.

[0128] The image to be classified is classified according to the classification value of the target feature.

[0129] By inputting the image to be classified into the trained target image classification model, the classification accuracy of the target image classification model for the image to be classified is improved because the model deletes abnormal image data during training.

[0130] Figure 5 FIG. 5 shows a schematic diagram of the structure of an image classification model training device 500 provided in an embodiment of the present application. Figure 5 As shown, the device may include:

[0131] An acquisition module 501 is used to acquire training image data, where the training image data includes a training image and a training feature classification value corresponding to the training image;

[0132] A processing module 502 is used to process the training image using the image classification model to obtain a training feature convolution value;

[0133] A determination module 503, configured to determine target model parameters based on the training feature convolution value and the training feature classification value;

[0134] The determination module 503 is further used to determine the predicted feature classification value corresponding to the training feature convolution value using the image classification model updated based on the target model parameters;

[0135] Determination module 503 is also used to delete the training image data and use the remaining training image data to redetermine the target model parameters when the difference between the predicted feature classification value and the training feature classification value is greater than a set threshold, until all feature classification value errors are less than the set threshold, thereby obtaining the target image classification model.

[0136] In some embodiments, the processing module 502 is further used to input the training image and the training feature classification value corresponding to the training image into the image classification model, and perform a convolution operation on the training image through a preset convolution kernel in the image classification model to obtain the training feature convolution value of the training image.

[0137] In some embodiments, the determination module 503 is also used to determine the target model parameter matrix corresponding to the training feature convolution value matrix and the training feature classification value matrix according to the relationship between the feature convolution value matrix, the feature classification value matrix and the model parameter matrix; wherein each element of the training feature convolution value matrix represents the training feature convolution value of the corresponding training image, each element of the feature classification value matrix represents the training feature classification value of the corresponding training image, and each element of the target model parameter matrix represents the corresponding target model parameter.

[0138] In some embodiments, the determination module 503 is further used to determine the predicted feature classification value corresponding to the target model parameter and the training feature convolution value according to the relationship between the model parameter, the feature convolution value and the feature classification value.

[0139] In some embodiments, the image classification model training device 500 may further include:

[0140] The acquisition module 501 is further used to acquire negative image training data whose feature classification value error is less than a set threshold value when the number of negative training image data is less than a set threshold value;

[0141] The determination module 503 is further used to determine a normalized matrix of the training feature convolution values ​​of the negative image training data based on the training feature convolution values ​​of the negative image training data;

[0142] A determination module 503, configured to determine a normalized matrix of a preset convolution kernel based on the preset convolution kernel;

[0143] The determination module 503 is further used to determine the negative feature convolution value according to the feature convolution value matrix, the preset convolution kernel, the normalized matrix of the training feature convolution value and the normalized matrix of the preset convolution kernel;

[0144] The updating module is used to add the negative feature convolution value to the remaining training image data to obtain updated remaining training image data.

[0145] In some embodiments, the image classification model training device 500 may further include:

[0146] A calculation module, used to calculate a difference matrix between a normalized matrix of training feature convolution values ​​and a normalized matrix of a preset convolution kernel;

[0147] The determination module 503 is further used to determine the target feature convolution value matrix according to the difference matrix, the preset moving step size and the feature convolution value matrix;

[0148] The convolution module is also used to perform a convolution operation based on the target feature convolution value matrix and the corresponding convolution kernel to obtain a convolution value;

[0149] The selection module is used to select the characteristic convolution value corresponding to the target characteristic convolution value matrix corresponding to the convolution value as the negative characteristic convolution value when the convolution value exceeds the set threshold.

[0150] In some embodiments, the calculation module is further used to use a preset convolution kernel to perform element-by-element multiplication with a pixel matrix of a training image and add the results to obtain a plurality of convolution values ​​corresponding to the preset convolution kernel;

[0151] The selection module is also used to select the maximum value among the convolution values ​​as the training feature convolution value corresponding to the preset convolution kernel.

[0152] In some embodiments, the image classification model training device 500 may further include:

[0153] The acquisition module 501 is also used to acquire the image to be classified;

[0154] The convolution module is further used to input the image to be classified into the target image classification model, and perform a convolution operation on the image to be classified through a preset convolution kernel in the image classification model to obtain a classification feature convolution value of the image to be classified;

[0155] The determination module 503 is further used to use the image classification model to determine the target feature classification value based on the target model parameters and the classification feature convolution value according to the relationship between the model parameters, the feature convolution value and the feature classification value.

[0156] The classification module is used to classify the image to be classified according to the classification value of the target feature.

[0157] Figure 5 The various modules in the device shown can be implemented Figure 1 Each step in the above steps can achieve the corresponding technical effect, which will not be repeated here for the sake of brevity.

[0158] Figure 6 A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application is shown.

[0159] The terminal device may include a processor 601 and a memory 602 storing computer program instructions.

[0160] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0161] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In one example, the memory 602 may include a removable or non-removable (or fixed) medium, or the memory 602 is a non-volatile solid-state memory. The memory 602 may be inside or outside the integrated gateway disaster recovery device.

[0162] In one example, the memory 602 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the image classification model training method according to the present disclosure.

[0163] The processor 601 reads and executes the computer program instructions stored in the memory 602 to implement Figure 1 The image classification model training method in the illustrated embodiment.

[0164] In one example, the terminal device may further include a communication interface 603 and a bus 604. Figure 6 As shown, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 604 and communicate with each other.

[0165] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0166] Bus 604 includes hardware, software or both, and the components of terminal equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, front side bus (Front Side Bus, FSB), Hyper Transport (Hyper Transport, HT) interconnection, industry standard architecture (Industry Standard Architecture, ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 604 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0167] In addition, in combination with the image classification model training method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the image classification model training methods in the above embodiment is implemented.

[0168] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed, implements any one of the image classification model training methods in the above embodiments.

[0169] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0170] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or text segments used to perform the required tasks. The program or text segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link via a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (Read-Only Memory, ROM), flash memory, erasable read-only memory (Erasable ReadOnly Memory, EROM), floppy disks, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The text segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0171] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0172] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0173] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for training an image classification model, characterized in that: include: Acquire training image data, wherein the training image data includes a training image and a training feature classification value corresponding to the training image; Processing the training image using an image classification model to obtain a training feature convolution value; Determining target model parameters based on the training feature convolution value and the training feature classification value; Determining a predicted feature classification value corresponding to the training feature convolution value using an image classification model updated based on target model parameters; When the difference between the predicted feature classification value and the training feature classification value is greater than a set threshold, the training image data is deleted and the target model parameters are re-determined using the remaining training image data until all feature classification value errors are less than the set threshold, thereby obtaining a target image classification model.

2. The image classification model training method according to claim 1, characterized in that: The step of processing the training image using the image classification model to obtain a training feature convolution value includes: The training image and the training feature classification value corresponding to the training image are input into the image classification model, and a convolution operation is performed on the training image through a preset convolution kernel in the image classification model to obtain the training feature convolution value of the training image.

3. The image classification model training method according to claim 1, characterized in that: The determining of the target model parameters based on the training feature convolution value and the training feature classification value comprises: Determine the target model parameter matrix corresponding to the training feature convolution value matrix and the training feature classification value matrix according to the relationship among the feature convolution value matrix, the feature classification value matrix and the model parameter matrix; Among them, each element of the training feature convolution value matrix represents the training feature convolution value of the corresponding training image, each element of the feature classification value matrix represents the training feature classification value of the corresponding training image, and each element of the target model parameter matrix represents the corresponding target model parameter.

4. The image classification model training method according to claim 1, characterized in that: The method of determining the predicted feature classification value corresponding to the training feature convolution value by using the image classification model updated based on the target model parameters includes: The predicted feature classification values ​​corresponding to the target model parameters and the training feature convolution values ​​are determined according to the relationship between the model parameters, the feature convolution values ​​and the feature classification values.

5. The image classification model training method according to claim 3, characterized in that: The training image data includes positive image training data and negative image training data. After deleting the training image data and before using the remaining training image data to re-determine the target model parameters, the method further includes: When the number of negative training image data is less than a set threshold, obtaining negative image training data whose feature classification value error is less than the set threshold; Determine a normalized matrix of training feature convolution values ​​of negative image training data based on the training feature convolution values ​​of the negative image training data; Based on determining a normalized matrix of a preset convolution kernel according to the preset convolution kernel; Determining negative feature convolution values ​​according to the feature convolution value matrix, the preset convolution kernel, the normalized matrix of the training feature convolution values, and the normalized matrix of the preset convolution kernel; The negative feature convolution value is added to the remaining training image data to obtain updated remaining training image data.

6. The image classification model training method according to claim 5, characterized in that: The determining of negative feature convolution values ​​according to the feature convolution value matrix, the preset convolution kernel, the normalized matrix of the training feature convolution values, and the normalized matrix of the preset convolution kernel comprises: Calculating a difference matrix between a normalized matrix of the training feature convolution values ​​and a normalized matrix of a preset convolution kernel; Determine a target feature convolution value matrix according to the difference, a preset moving step size and a feature convolution value matrix; Perform convolution operation based on the target feature convolution value matrix and the corresponding convolution kernel to obtain the convolution value; When the convolution value exceeds a set threshold, a characteristic convolution value corresponding to a target characteristic convolution value matrix corresponding to the convolution value is selected as a negative characteristic convolution value.

7. The image classification model training method according to claim 2, characterized in that: The convolution operation is performed on the training image by using a preset convolution kernel in the image classification model to obtain a training feature convolution value of the training image, including: Use a preset convolution kernel to perform element-by-element multiplication with the pixel matrix of the training image and add the results to obtain a plurality of convolution values ​​corresponding to the preset convolution kernel; The maximum value among the convolution values ​​is selected as the training feature convolution value corresponding to the preset convolution kernel.

8. The image classification model training method according to claim 1, characterized in that: After obtaining the target image classification model, the method further includes: Get the image to be classified; Inputting the image to be classified into the target image classification model, performing a convolution operation on the image to be classified through a preset convolution kernel in the image classification model, and obtaining a classification feature convolution value of the image to be classified; Using an image classification model based on target model parameters and classification feature convolution values, determining a target feature classification value according to a relationship between the model parameters, feature convolution values, and feature classification values; The image to be classified is classified according to the target feature classification value.

9. An image classification model training device, characterized in that: The device comprises: An acquisition module, used to acquire training image data, wherein the training image data includes a training image and a training feature classification value corresponding to the training image; A processing module, used to process the training image using an image classification model to obtain a training feature convolution value; A determination module, configured to determine target model parameters based on the training feature convolution value and the training feature classification value; The determination module is further used to determine the predicted feature classification value corresponding to the training feature convolution value using the image classification model updated based on the target model parameters; The determination module is also used to delete the training image data and use the remaining training image data to re-determine the target model parameters when the difference between the predicted feature classification value and the training feature classification value is greater than a set threshold, until all feature classification value errors are less than the set threshold, thereby obtaining the target image classification model.

10. A terminal device, characterized in that: The device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the image classification model training method as described in any one of claims 1-8 is implemented.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the image classification model training method according to any one of claims 1 to 8 is implemented.

12. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the image classification model training method as described in any one of claims 1-8.