Advertisement image classification method based on deep convolutional neural network model
Through the advertising image classification method of the deep convolutional neural network model, the high precision and adaptability problems of advertising image classification in the prior art are solved, efficient and accurate advertising image classification and content recognition are achieved, and the overall process efficiency of the advertising image processing system is improved.
Patent Information
- Application Number
- CN202510556850.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-01
AI Technical Summary
The existing advertising image classification methods cannot meet the needs of large-scale and high-precision classification, are difficult to adapt to the rapid changes and diversity of advertising images, and are unable to make full use of deep learning technology to improve classification performance.
Advertising image classification method based on deep convolutional neural network model is adopted, and classification parameter information is generated through feature extraction module initialization, iterative training and feature vector set division, and iterative training is used to optimize network weights and classification parameters, combined with feature spatial distribution analysis, and adaptively learn the deep features of advertising images.
It improves the accuracy and efficiency of advertising image classification, can adapt to different types of advertising images and complex scenarios, has strong generalization ability, generates high-quality advertising content recognition images, and improves advertising content analysis and user experience.
Smart Images

Figure CN120411642A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of computer vision and artificial intelligence. More specifically, the present invention relates to an advertising image classification method based on a deep convolutional neural network model. Background Art
[0002] In today's digital age, the classification and recognition of advertising images play a crucial role in many fields such as advertising placement, content management, and user experience optimization. With the rapid development of the Internet, a vast amount of advertising image data has emerged continuously. How to classify and recognize these advertising images efficiently and accurately has become an urgent problem to be solved in the field of advertising image processing. Traditional advertising image classification methods mainly rely on manual annotation and simple image feature extraction techniques, such as methods based on color histograms, texture features, etc. Although these methods can achieve the classification of advertising images to a certain extent, there are many limitations. First of all, the manual annotation process is time-consuming and laborious, and is easily affected by subjective factors, resulting in difficulties in ensuring the accuracy and consistency of the annotation results. Secondly, traditional image feature extraction methods often can only extract shallow features of images. For complex advertising images, these shallow features are difficult to fully represent the semantic information of the images, thus limiting the classification accuracy. In addition, with the continuous increase in the diversity and complexity of advertising images, traditional classification methods are difficult to adapt to new advertising forms and content, resulting in a gradual decline in the classification effect.
[0003] In the process of implementing the embodiments of the present invention, the inventors found that there are at least the following problems or defects in the prior art: The existing advertising image classification methods cannot meet the requirements of large-scale and high-precision classification, and are difficult to adapt to the rapid changes and diversity of advertising images, and cannot make full use of advanced technologies such as deep learning to improve the classification performance. Summary of the Invention
[0004] The present invention provides an advertising image classification method, an advertising content recognition image generation method, an advertising image processing system, and a medium based on a deep convolutional neural network model.
[0005] In the first aspect of the present invention, there is provided an advertising image classification method based on a deep convolutional neural network model, including: Performing an initialization process on the feature extraction module included in the advertising image processing system to obtain feature extraction parameter information; Determining an initial number of iterations and initial network weight information, and performing the following training steps according to the initial number of iterations and the initial network weight information: Controlling the feature extraction module to collect advertising image samples according to the feature extraction parameter information and the initial network weight information; Generate a set of feature vectors corresponding to each classification node included in the advertisement image processing system according to the advertisement image sample; For each preset class identifier, perform the following steps: Determine a set of feature space distributions corresponding to the preset class identifier, where each preset class identifier corresponds to a feature generation module included in the advertisement image processing system; Determine a training feature vector set and a validation feature vector set according to the set of feature vectors and the set of feature space distributions; In response to determining that the initial number of iterations meets the preset iteration condition, generate classification parameter information according to the determined training feature vector sets and the determined validation feature vector sets.
[0006] Further, the training step further includes: In response to determining that the initial number of iterations does not meet the preset iteration condition, perform an update process on the initial number of iterations and the initial network weight information, and use the updated initial number of iterations as the initial number of iterations and the updated initial network weight information as the initial network weight information, and continue to execute the training step.
[0007] Further, the determining the training feature vector set and the validation feature vector set according to the set of feature vectors and the set of feature space distributions includes: Perform a partitioning process on the set of feature vectors to obtain a training feature subset and a validation feature subset; Perform a partitioning process on the set of feature space distributions to obtain a training space distribution subset and a validation space distribution subset; Generate initial classification parameter information according to the training feature subset and the training space distribution subset; Generate a set of predicted feature vectors according to the feature extraction parameter information, the initial classification parameter information, and the validation space distribution subset; Generate a classification error rate according to the set of predicted feature vectors and the validation feature subset; In response to determining that the classification error rate meets the preset error condition, determine the training feature subset as the training feature vector set and the training space distribution subset as the validation feature vector set.
[0008] Further, the method further includes: In response to determining that the classification error rate does not meet the preset error condition, perform an update process on the initial network weight information, and use the updated initial network weight information as the initial network weight information, and continue to execute the training step.
[0009] Further, the determining the set of feature space distributions corresponding to the preset category identifiers includes: Controlling each classification node corresponding to the preset category identifier to extract feature information to obtain a set of feature distribution information; Generating a set of feature space distributions according to the set of feature distribution information.
[0010] Further, the generating classification parameter information according to the determined sets of training feature vectors and the determined sets of verification feature vectors includes: Performing the following steps on each verification feature vector included in the determined sets of verification feature vectors: Generating category similarity information according to the verification feature vector; In response to determining that the category similarity information meets a preset similarity condition, determining the verification feature vector as a valid feature vector, and determining the training feature vector corresponding to the verification feature vector in the determined sets of training feature vectors as an associated feature vector; Generating classification parameter information according to the determined valid feature vectors and the determined associated feature vectors.
[0011] Further, the method further includes: Generating a final classification mapping relationship according to the generated classification parameter information.
[0012] In a second aspect of the present invention, an advertisement content recognition image generation method is provided, including: Controlling a feature extraction module included in the advertisement image processing system to collect an advertisement input image according to preset feature parameter information, and controlling each feature generation module included in the advertisement image processing system to perform an activation operation, where the preset feature parameter information is pre-generated according to the advertisement image classification method according to any one of the first aspects; Controlling each classification node included in the advertisement image processing system to extract feature information to obtain a set of feature distribution information; Generating sets of feature space distributions corresponding to each preset category identifier according to the set of feature distribution information; Performing the following steps for each preset category identifier: Determining the set of feature space distributions corresponding to the preset category identifier in the sets of feature space distributions as a target space distribution cluster; Generating a feature prediction sequence according to the preset feature parameter information, the target space distribution cluster, and a preset classification mapping relationship corresponding to the preset category identifier, where the preset classification mapping relationship is pre-generated according to the advertisement image classification method according to any one of the first aspects; According to each generated feature prediction sequence, perform feature fusion processing on the advertisement input image to obtain an advertisement content recognition image.
[0013] In a third aspect of the present invention, an advertisement image processing system is provided. The advertisement image processing system includes: at least one feature generation module for generating feature data; at least one classification node for processing feature information; a feature extraction module for extracting image features; one or more processors; and a storage device storing one or more programs, which when executed by the one or more processors cause the one or more processors to implement the method according to any one of the first aspect or the second aspect.
[0014] In a fourth aspect of the present invention, a computer-readable medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, it implements the method according to any one of the first aspect or the second aspect.
[0015] The above embodiments of the present invention have at least the following beneficial effects: The advertisement image classification method and related system based on a deep convolutional neural network model provided by the embodiments of the present invention can improve the accuracy and efficiency of advertisement image classification. By performing feature extraction and classification processing on advertisement images through a deep convolutional neural network model, it can automatically learn the deep features of the images, thus better representing the semantic information of the advertisement images and making the classification results more accurate and reliable. At the same time, this method uses an iterative training method to continuously optimize the network weights and classification parameters, which can further improve the classification performance, can adapt to different types of advertisement images and complex image scenes, and has strong generalization ability. In addition, the advertisement content recognition image generated based on this classification method can provide higher-quality image data support for subsequent advertisement content analysis and applications, which helps to improve the recognition effect of advertisement content and the user experience.
[0016] The embodiments of the present invention also provide an advertisement image processing system, enabling this classification method to be conveniently implemented and deployed in practical applications. Components such as the feature extraction module, feature generation module, and classification node in the system work together to efficiently complete tasks such as feature extraction, classification, and content recognition of advertisement images, which can improve the overall process efficiency of advertisement image processing. BRIEF DESCRIPTION OF THE DRAWINGS I
[0017] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features, and advantages of the exemplary embodiments of the present invention will become readily understandable. In the drawings, several embodiments of the present invention are shown in an exemplary rather than restrictive manner, wherein: Figure 1Schematic flowchart of an advertising image classification method based on a deep convolutional neural network model provided by an embodiment of the present invention; Figure 2 Schematic flowchart of an advertising content recognition image generation method provided by an embodiment of the present invention; Figure 3 Schematic structural diagram of an advertising image processing system provided by an embodiment of the present invention. Specific embodiments
[0018] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are given only to enable those skilled in the art to better understand and then implement the present invention, and do not limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to be able to fully convey the scope of the present invention to those skilled in the art.
[0019] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, equipment, method, or computer program product. Therefore, the present invention can be specifically implemented in the following forms: completely hardware, completely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0020] It should be noted that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.
[0021] The following reference Figure 1 , Figure 1 Schematic flowchart of an advertising image classification method based on a deep convolutional neural network model provided by an embodiment of the present invention. As Figure 1 shown, an advertising image classification method based on a deep convolutional neural network model includes: S1 Initialize the feature extraction module included in the advertising image processing system to obtain feature extraction parameter information; S2 Determine the initial number of iterations and the initial network weight information, and perform the following training steps according to the initial number of iterations and the initial network weight information: S3 Control the feature extraction module to collect advertising image samples according to the feature extraction parameter information and the initial network weight information; S4 Generate a set of feature vectors corresponding to each classification node included in the advertising image processing system according to the advertising image samples; S5 For each preset category identifier, perform the following steps: S6 determines a set of characteristic space distributions corresponding to the preset category identifiers, where each preset category identifier corresponds to a feature generation module included in the advertisement image processing system; S7 determines a training feature vector set and a verification feature vector set according to the feature vector set and the set of characteristic space distributions; S8, in response to determining that the initial number of iterations meets a preset iteration condition, generates classification parameter information according to the determined training feature vector sets and the determined verification feature vector sets.
[0022] It should be noted that the initialization process of the feature extraction module included in the advertisement image processing system mentioned in the embodiments of the present invention to obtain feature extraction parameter information refers to performing necessary initialization operations on the feature extraction module in the system before the advertisement image classification method starts to ensure that image features can be correctly extracted subsequently. The feature extraction module is an important part of the advertisement image processing system, and its main function is to extract feature vectors that can characterize the content of the advertisement image from the advertisement image. These feature vectors will serve as the basic input data for subsequent classification tasks. The initialization process is to set the initial state of the feature extraction module, including but not limited to initializing parameters such as the weights and biases of the network, so as to provide basic conditions for the normal operation of the feature extraction module. Feature extraction parameter information refers to the set of parameters determined during the initialization process, and these parameters will guide how the feature extraction module extracts features from the image, such as parameters such as the size of the convolution kernel, the stride, and the selection of the activation function.
[0023] Specifically, determine the initial number of iterations and the initial network weight information, and perform the following training steps according to the initial number of iterations and the initial network weight information. The initial number of iterations refers to the starting point of the number of iterations preset in the training process when training a deep convolutional neural network model. The number of iterations is an important parameter in the deep learning training process, which determines the number of times the model learns on the training data. The initial network weight information refers to the initial values of the weights of each layer in the neural network at the beginning of training. These initial values are usually determined by random initialization or other specific initialization methods. The initial number of iterations and the initial network weight information are the starting conditions of the training process, which will affect the training process of the model and the final classification effect. When performing the training steps, the feature extraction module collects advertising image samples according to the feature extraction parameter information and the initial network weight information. Here, the advertising image samples refer to the advertising image data set used to train the model. These image samples usually contain advertising images of different categories and styles, and are used to let the model learn the features of different advertising images. Generating a set of feature vectors corresponding to each classification node included in the advertising image processing system means converting the collected advertising image samples into the form of feature vectors through the feature extraction module. These sets of feature vectors will be used for subsequent classification tasks. Each preset category identifier corresponds to the feature generation module included in the advertising image processing system. The preset category identifier refers to the category labels of the advertising images predefined in advance, such as car advertisements, electronic product advertisements, etc. The feature generation module is a module in the system used to generate feature data. It generates a corresponding set of feature space distributions according to the category identifier for subsequent determination of classification parameters.
[0024] Preferably, when constructing a deep convolutional neural network model, structures such as convolutional layers, pooling layers, and fully connected layers can be adopted. The convolutional layer is used to extract local features of the image, and the process of feature extraction is controlled by setting parameters such as the size, stride, and number of convolutional kernels. For example, the convolutional kernel size can be set to 3×3, the stride to 1, and the number to 64, so as to extract local features such as the edges and textures of the image. The pooling layer is used to reduce the dimensionality of the features while retaining important information. Common pooling methods include max pooling and average pooling, and appropriate pooling methods and pooling window sizes can be selected, such as 2×2 max pooling. The fully connected layer is used to integrate the extracted features and output the final classification result. During the training process, hyperparameters such as the learning rate and batch size can be set to optimize the training process. For example, the learning rate can be set to 0.001 and the batch size to 32. By adjusting these parameters, the model can better learn the features of the advertising images and improve the classification accuracy. For the partitioning process of the feature vector set, it can be randomly partitioned or partitioned according to a ratio, and the feature vector set is partitioned into a training feature subset and a validation feature subset. For example, it can be partitioned according to a ratio of 80% for training and 20% for validation. For the partitioning process of the feature space distribution set, a similar method can also be adopted, and the feature space distribution set is partitioned into a training space distribution subset and a validation space distribution subset. When generating the initial classification parameter information, the initial classification parameters can be determined by calculating the similarity between feature vectors or other statistical methods based on the training feature subset and the training space distribution subset. For example, the cosine similarity between feature vectors can be calculated, and the initial classification parameters are determined according to the similarity values.
[0025] In some embodiments, the training step further includes: In response to determining that the initial iteration count does not meet the preset iteration condition, update the initial iteration count and the initial network weight information, and use the updated initial iteration count as the initial iteration count and the updated initial network weight information as the initial network weight information, and continue to execute the training step.
[0026] It should be noted that in response to determining that the initial number of iterations does not meet the preset iteration condition, the initial number of iterations and the initial network weight information are updated, and the updated initial number of iterations is used as the initial number of iterations, and the updated initial network weight information is used as the initial network weight information, and the training step is continued. This sentence describes that when training a deep convolutional neural network model, when the current number of iterations does not reach the preset iteration condition, the initial number of iterations and the initial network weight information need to be updated, and the training process is continued. The preset iteration condition here refers to the preset training termination condition, such as reaching a certain number of iterations or the training error being lower than a certain threshold. The update process refers to adjusting the initial number of iterations and the initial network weight according to certain rules or algorithms so that the model can learn and optimize better.
[0027] Specifically, the initial number of iterations refers to the starting point of the number of iterations set at the beginning of training, usually a small positive integer, such as 1. As the training process progresses, the number of iterations gradually increases until the preset iteration condition is reached. The initial network weight information refers to the initial values of the weights of each layer in the neural network, and these weights are usually determined by random initialization or other specific initialization methods, such as initializing the weights using a Gaussian distribution. The preset iteration condition can be a combination of multiple conditions, such as the number of iterations reaching 1000 times or the training error being lower than 0.01, etc. When the current number of iterations does not meet these conditions, the initial number of iterations and the initial network weight information need to be updated. Updating the initial number of iterations can simply increment it by 1, while updating the initial network weight information usually involves adjusting the weights according to the gradients calculated during the training process, such as using the gradient descent algorithm. During the training process, a loss value is calculated for each iteration based on the training data, and then the gradient is calculated based on this loss value, and the network weights are updated through the gradient descent algorithm to gradually reduce the loss value.
[0028] Preferably, the process of updating the initial network weight information can adopt the momentum gradient descent algorithm to accelerate convergence and avoid falling into local minima. In the momentum gradient descent algorithm, in addition to considering the current gradient, a momentum term is introduced. This momentum term is the accumulation of previous gradients and helps maintain a certain inertia in the gradient direction, thereby accelerating the convergence speed. For example, the momentum coefficient can be set to 0.9 and the learning rate to 0.001. Each time the weights are updated, adjustments are made not only based on the current gradient but also with the influence of the momentum term. Additionally, when updating the initial number of iterations, instead of simply incrementing by 1, the increase amplitude of the number of iterations can be dynamically adjusted according to performance metrics during the training process (such as the accuracy on the validation set). For example, if the accuracy on the validation set does not improve significantly after several consecutive iterations, the increase speed of the number of iterations can be slowed down to avoid overfitting. During the training process, an early stopping mechanism can also be set, that is, when the error on the validation set no longer decreases after a certain number of iterations, the training is terminated early to prevent the model from overfitting.
[0029] In some embodiments, determining the training feature vector set and the validation feature vector set according to the feature vector set and the feature space distribution set includes: Performing a partitioning process on the feature vector set to obtain a training feature subset and a validation feature subset; Performing a partitioning process on the feature space distribution set to obtain a training space distribution subset and a validation space distribution subset; Generating initial classification parameter information according to the training feature subset and the training space distribution subset; Generating a predicted feature vector set according to the feature extraction parameter information, the initial classification parameter information, and the validation space distribution subset; Generating a classification error rate according to the predicted feature vector set and the validation feature subset; In response to determining that the classification error rate satisfies a preset error condition, determining the training feature subset as the training feature vector set and determining the training space distribution subset as the validation feature vector set.
[0030] It should be noted that determining the training feature vector set and the validation feature vector set according to the feature vector set and the feature space distribution set describes the process of how to divide the training set and the validation set by using the feature vector set and the feature space distribution set in the advertising image classification method. The feature vector set is a set of features extracted from advertising image samples, which is used to characterize the feature information of the images; the feature space distribution set is generated based on the feature vector set and is used to describe the distribution of features in space. By dividing the training feature vector set and the validation feature vector set, the performance of the model can be effectively evaluated, overfitting can be avoided, and the model can be ensured to have good generalization ability on unseen data. This process is an important link in the training of deep learning models and is crucial for improving the classification accuracy and model stability.
[0031] Specifically, the feature vector set refers to a series of feature vectors extracted from advertising image samples. Each feature vector represents the feature representation of an advertising image and is usually a multi-dimensional array, whose dimension depends on the design of the feature extraction module. For example, if a convolutional neural network (CNN) is used as the feature extraction module, the feature vector can be the output after passing through the convolutional layer and the pooling layer. The feature space distribution set describes the distribution of these feature vectors in the feature space. For example, it can be generated by calculating statistics such as the mean and variance of the feature vectors. The process of dividing the training feature subset and the validation feature subset can be achieved by various methods, such as random division, division by category, etc. For example, 70% of the feature vectors can be used as the training feature subset, and 30% as the validation feature subset. At the same time, the feature space distribution set is divided to generate a training space distribution subset and a validation space distribution subset for subsequent classification parameter generation and error calculation.
[0032] Preferably, when dividing the training feature vector set and the validation feature vector set, the method of stratified sampling can be adopted to ensure that the proportion of various types of advertising images in the training set and the validation set is the same as that in the original dataset. For example, if car advertising images account for 30% and electronic product advertising images account for 70% in the original dataset, then this proportion is also maintained during division. This can avoid model training bias caused by uneven class distribution. When generating the initial classification parameter information, the initial classification parameters can be determined by calculating the similarity between feature vectors according to the training feature subset and the training space distribution subset. For example, cosine similarity or Euclidean distance can be used to measure the similarity between feature vectors. For the calculation of the classification error rate, the predicted feature vector set can be compared with the validation feature subset, and the proportion of misclassified samples is statistically calculated. If the classification error rate is lower than a preset error threshold, such as 5%, then the current training feature subset and the training space distribution subset can be determined as the final training feature vector set and the validation feature vector set.
[0033] In some embodiments, the method further includes: In response to determining that the classification error rate does not meet the preset error condition, performing an update process on the initial network weight information, and using the updated initial network weight information as the initial network weight information, and continuing to execute the training step.
[0034] It should be noted that the sentence "In response to determining that the classification error rate does not meet the preset error condition, performing an update process on the initial network weight information, and using the updated initial network weight information as the initial network weight information, and continuing to execute the training step" describes the process of how to update the weights of a neural network and continue training when the classification error rate does not reach the preset error condition in the advertising image classification method. Here, the classification error rate refers to the classification error rate of the model on the validation feature vector set, which is used to evaluate the performance of the model. If the classification error rate is higher than the preset threshold, it indicates that the performance of the model does not meet the expectation, and the network weights need to be adjusted to optimize the model performance.
[0035] Specifically, the classification error rate refers to the ratio of the number of misclassified samples of the model on the validation set to the total number of samples in the validation set. For example, if there are 100 samples in the validation set and the model misclassifies 10 samples, then the classification error rate is 10%. The preset error condition refers to the preset classification error rate threshold, which can be set to 5% for example. When the actual classification error rate is higher than this threshold, it indicates that the performance of the model needs to be further optimized. The initial network weight information refers to the initial values of the weights of each layer in the neural network, and these weights will be continuously updated during the training process to optimize the model performance. The update process refers to adjusting the weights according to the gradients calculated during the training process, usually using the gradient descent algorithm or other optimization algorithms, such as the Adam optimizer. In each iteration, it is judged whether to update the weights according to the classification error rate on the validation set.
[0036] Preferably, the process of updating the initial network weight information can adopt an optimization algorithm with an adaptive learning rate, such as the Adam optimizer. The Adam optimizer combines the advantages of the momentum gradient descent and the RMSprop algorithm, and can adaptively adjust the learning rate, thereby accelerating the convergence speed and improving the stability of the model. During the training process, a loss value is calculated in each iteration, and then the gradient is calculated according to this loss value, and the network weights are updated through the Adam optimizer. For example, the learning rate of the Adam optimizer can be set to 0.001, β1 to 0.9, and β2 to 0.999.
[0037] Furthermore, an early stopping mechanism can be introduced. That is, when the classification error rate on the validation set no longer decreases significantly after several consecutive iterations, the training is terminated early to prevent the model from overfitting. At the same time, a learning rate decay mechanism can be set to gradually reduce the learning rate as the training process progresses to improve the accuracy of the model.
[0038] In some embodiments, determining the set of feature space distributions corresponding to the preset class identifier includes: Controlling each classification node corresponding to the preset class identifier to extract feature information to obtain a set of feature distribution information; Generating a set of feature space distributions based on the set of feature distribution information.
[0039] It should be noted that the description "determining the set of feature space distributions corresponding to the preset class identifier includes: controlling each classification node corresponding to the preset class identifier to extract feature information to obtain a set of feature distribution information; generating a set of feature space distributions based on the set of feature distribution information" describes the process of determining the set of feature space distributions according to the preset class identifier. The preset class identifier refers to the pre-defined class labels of advertising images, such as car advertisements, electronic product advertisements, etc. The set of feature space distributions refers to the distribution of features of different types of advertising images in the feature space, which can help the model better understand the feature patterns of each class and thus improve the accuracy of classification.
[0040] Specifically, the preset class identifier refers to the pre-defined class labels in the advertising image classification task, which are used to identify different types of advertising images. For example, advertising images can be classified into categories such as car advertisements, electronic product advertisements, clothing advertisements, etc., and each category has a unique identifier. The classification node refers to the module in the advertising image processing system that processes feature information, and each classification node is responsible for processing the feature information of a specific category. For example, in a system with multiple classification nodes, each node can focus on extracting the feature information of a certain category. The set of feature distribution information refers to the set of feature information extracted from the classification nodes, and these feature information reflect the distribution of advertising images in the feature space. The process of generating the set of feature space distributions is to integrate and analyze the set of feature distribution information to form a more comprehensive description of the feature distribution for subsequent determination of classification parameters.
[0041] Preferably, the process of generating the set of feature space distributions can be further refined. First, for each preset class identifier, feature information can be extracted through the convolutional layer and pooling layer in a convolutional neural network (CNN). For example, multiple convolutional layers can be used to extract local features of an image, and then the pooling layer can be used to reduce the dimension of the features. After extracting the feature information, the feature mean and covariance matrix of each class can be calculated to generate the set of feature space distributions. For example, for the category of car advertisements, the mean and covariance matrix of all feature vectors belonging to this category can be calculated to obtain the feature space distribution of this category.
[0042] Furthermore, a clustering algorithm, such as the K-means algorithm, can be introduced to perform clustering analysis on the set of feature distribution information, further optimizing the generation process of the set of feature space distributions. For example, the set of feature distribution information can be divided into multiple cluster centers, and each cluster center represents a feature pattern, thereby more accurately describing the feature space distribution.
[0043] In some embodiments, generating classification parameter information according to the determined respective training feature vector sets and the determined respective validation feature vector sets includes: For each validation feature vector included in the determined respective validation feature vector sets, perform the following steps: Generate category similarity information according to the validation feature vector; In response to determining that the category similarity information satisfies a preset similarity condition, determine the validation feature vector as a valid feature vector, and determine the training feature vector corresponding to the validation feature vector in the determined respective training feature vector sets as an associated feature vector; Generate classification parameter information according to the determined respective valid feature vectors and the determined respective associated feature vectors.
[0044] It should be noted that according to the determined training feature vector sets and the determined validation feature vector sets, classification parameter information is generated, including: for each validation feature vector included in the determined validation feature vector sets, the following steps are performed: generating category similarity information according to the validation feature vector; in response to determining that the category similarity information meets a preset similarity condition, determining the validation feature vector as a valid feature vector, and determining the training feature vector corresponding to the validation feature vector in the determined training feature vector sets as an associated feature vector; generating classification parameter information according to the determined valid feature vectors and the determined associated feature vectors. This sentence describes the process of generating classification parameter information by using training feature vector sets and validation feature vector sets. The core of this process lies in screening out valid feature vectors and associated feature vectors through the similarity calculation between validation feature vectors and training feature vectors, so as to generate parameter information for classification. This method helps to improve the accuracy and reliability of classification, ensuring that the model can better identify and classify advertising images.
[0045] Specifically, the training feature vector sets and the validation feature vector sets are sets of feature vectors extracted from advertising image samples, which are used for the training and validation of the model respectively. Each feature vector is a multi-dimensional array representing the feature information of the advertising image. The category similarity information refers to the similarity between the validation feature vector and the training feature vector, which is usually obtained by calculating the distance or similarity index between feature vectors, such as cosine similarity or Euclidean distance. The preset similarity condition refers to a preset similarity threshold used to determine whether the validation feature vector is similar enough to the training feature vector. If the category similarity of the validation feature vector meets this condition, it is marked as a valid feature vector, and the training feature vector similar to it is marked as an associated feature vector. Finally, classification parameter information is generated based on these valid feature vectors and associated feature vectors, and this parameter information will be used for subsequent classification tasks.
[0046] Preferably, the process of generating category similarity information can be further refined. For example, cosine similarity can be used to measure the similarity between the validation feature vector and the training feature vector. The calculation method of cosine similarity is achieved by calculating the ratio of the dot product of two vectors to the product of their magnitudes. Specifically, for each validation feature vector, calculate its cosine similarity with all training feature vectors, and then screen out valid feature vectors according to a preset similarity threshold (such as 0.8).
[0047] Further, when generating the classification parameter information, a weighted average method can be adopted to calculate the classification parameters according to the similarity weights of the effective feature vectors and the associated feature vectors. For example, for each category, calculate the weighted average feature vector of all effective feature vectors as the classification parameter for that category. This can better reflect the feature patterns of each category and improve the accuracy of classification. At the same time, regularization techniques such as L2 regularization can be introduced to prevent the model from overfitting and further optimize the generation process of the classification parameters.
[0048] In some embodiments, the method further includes: Generating a final classification mapping relationship according to the generated classification parameter information.
[0049] It should be noted that the sentence "Generating a final classification mapping relationship according to the generated classification parameter information" describes how to construct the final classification mapping relationship in the advertising image classification method by using the generated classification parameter information. The classification parameter information is obtained through the analysis and processing of the feature vectors in the previous steps and contains the important feature information of each category. The final classification mapping relationship refers to the process of mapping the input advertising image features to specific category labels, which is the core output of the classification model and is used to accurately classify new advertising images into the preset categories.
[0050] Specifically, the classification parameter information refers to the set of parameters generated during the training process for describing the features of each category. These parameters may include information such as the mean, covariance matrix, and weights of the feature vectors of each category. For example, for a car advertisement category, the classification parameter information may include the average feature vector of all training feature vectors of that category and the covariance matrix of the feature distribution. The final classification mapping relationship refers to a mapping function or model that maps the input feature vectors to the preset category labels. This mapping relationship can be implemented in various ways, such as using a nearest neighbor classifier, a support vector machine (SVM), or a neural network. When constructing the final classification mapping relationship, a classifier is usually trained according to the classification parameter information so that the classifier can accurately predict the category to which the input feature vector belongs based on its features.
[0051] Preferably, when generating the final classification mapping relationship, a deep learning model such as a convolutional neural network (CNN) can be adopted. The specific steps are as follows: First, use the classification parameter information generated in the previous steps as training data to train a CNN model. The input parameters include the training feature vector set and the corresponding class labels. During the training process, the network weights are adjusted through the backpropagation algorithm to minimize the classification error. For example, the learning rate can be set to 0.001, and the number of training iterations can be 50 epochs. After the model training is completed, use the validation feature vector set to evaluate the performance of the model to ensure that the model has good generalization ability. If the classification accuracy of the model on the validation set reaches more than 90%, it can be considered that the model has a high classification accuracy. Finally, use the trained CNN model as the final classification mapping relationship to classify new advertising images. In addition, data augmentation techniques such as random cropping, rotation, and flipping can be introduced to increase the diversity of training data and further improve the robustness and classification performance of the model.
[0052] The above various embodiments of the present invention have the following beneficial effects: The present invention can improve the accuracy and efficiency of advertising image classification. Through the feature extraction and dynamic optimization mechanism of the deep convolutional neural network, it can adaptively learn the key features of different advertising categories. At the same time, by combining the feature space distribution analysis and iterative training strategy, the generalization ability and robustness of the model can be enhanced. By dividing the training set and the validation set and calculating the classification error rate, it can be ensured that the weight parameters of the model are continuously optimized during the training process, thereby avoiding the overfitting problem and improving the classification performance.
[0053] In addition, this method can screen effective feature vectors based on feature similarity and generate classification parameters, thereby establishing a more accurate classification mapping relationship. Through feature fusion processing and prediction vector generation, the effect of advertising content recognition can be further improved, and finally, high-quality advertising content recognition images can be output. This end-to-end processing flow can reduce the need for manual intervention and improve the automation level and practical application value of advertising image processing.
[0054] As Figure 2 shown, a method for generating an advertising content recognition image according to some embodiments, the method includes: S1 Control the feature extraction module included in the advertising image processing system to collect an advertising input image according to preset feature parameter information, and control each feature generation module included in the advertising image processing system to perform an activation operation, where the preset feature parameter information is pre-generated according to the advertising image classification method according to one of the first aspects; S2 Control each classification node included in the advertising image processing system to extract feature information to obtain a feature distribution information set; S3 generates respective feature space distribution sets corresponding to each preset category identifier according to the feature distribution information set; S4 For each preset category identifier, perform the following steps: S5 determines the feature space distribution set corresponding to the preset category identifier in the respective feature space distribution sets as the target space distribution cluster; S6 generates a feature prediction sequence according to the preset feature parameter information, the target space distribution cluster, and the preset classification mapping relationship corresponding to the preset category identifier, where the preset classification mapping relationship is pre-generated according to the advertisement image classification method described in one of the first aspects; S7 performs feature fusion processing on the advertisement input image according to the generated respective feature prediction sequences to obtain an advertisement content recognition image.
[0055] It should be noted that an advertisement content recognition image generation method mentioned in the present invention is implemented based on an advertisement image processing system. This method uses pre-generated classification parameter information to process an advertisement input image, and finally generates an image that can reflect the advertisement content through steps such as feature extraction, feature generation, classification, and feature fusion. This process not only involves feature extraction and classification of the input image, but also emphasizes how to fuse these features into the final recognition image, thereby providing support for further processing and analysis of the advertisement image.
[0056] Specifically, the advertisement image processing system is an integrated system that includes multiple functional modules for processing and analyzing advertisement images. Among them, the feature extraction module is one of the core components of the system and is responsible for extracting feature vectors from the input advertisement images. These feature vectors can represent the semantic information of the images. For example, a deep convolutional neural network (such as ResNet or VGG) can be used as the feature extraction module to extract the deep features of the image through convolutional layers, pooling layers, and fully connected layers. The preset feature parameter information refers to the parameters obtained through training in the previous steps, and these parameters are used to guide how the feature extraction module extracts features, such as the size of the convolutional kernel, the stride, the activation function, etc. The classification node is a module in the system for processing feature information. Each classification node corresponds to a preset category identifier and is responsible for extracting the feature information of that category. The feature distribution information set is a set of feature information extracted from the classification nodes, reflecting the feature distribution of different category advertisement images. The target space distribution cluster refers to the specific category's feature space distribution extracted from the feature distribution information set for each preset category identifier. The preset classification mapping relationship is a mapping relationship established based on the classification parameter information generated in the previous steps and is used to map the feature vectors to the corresponding categories. The feature prediction sequence is generated based on the preset feature parameter information and the target space distribution cluster and is used to represent the feature prediction result of the input advertisement image. Feature fusion processing refers to the process of merging multiple feature prediction sequences to generate the final advertisement content recognition image.
[0057] Preferably, the method for generating the advertisement content recognition image can be further refined through the following steps. First, the feature extraction module can adopt a deep convolutional neural network (CNN) architecture, such as ResNet or VGG, which can automatically learn the deep features of the image. After inputting the advertisement image, the CNN extracts feature vectors through convolutional layers, pooling layers, and fully connected layers. For example, the convolutional kernel size can be set to 3×3, the stride to 1, and the number of convolutional layers to 50 layers (such as ResNet-50). Second, for each preset category identifier, the classification node can use a Softmax classifier to generate the category probability distribution, thereby determining the probability that the input image belongs to each category. Then, according to the preset classification mapping relationship, the feature vectors in the feature prediction sequence are mapped to the corresponding categories. For example, if the feature prediction vector of the input image has the best match with the mapping relationship of the car advertisement category, then the image is classified as a car advertisement. Finally, in the feature fusion processing stage, a weighted average method can be used to merge multiple feature prediction sequences to generate the final advertisement content recognition image. For example, weights are assigned to each feature prediction vector according to its confidence level (such as the category probability), and then the weighted average feature vector is calculated and used as the feature representation of the final advertisement content recognition image.
[0058] As Figure 3As shown, an advertisement image processing system according to some embodiments includes: At least one feature generation module 301 for generating feature data; at least one classification node 302 for processing feature information; a feature extraction module 303 for extracting image features; one or more processors 304; and a storage device 305 having stored thereon one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method according to any one of the first aspect or the second aspect.
[0059] Furthermore, the storage medium according to the embodiments of the present application stores program instructions capable of implementing all the above methods. Among them, the program instructions can be stored in the above storage medium in the form of a software product, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods according to the embodiments of the present application. The aforementioned storage medium includes: various media capable of storing program codes such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, or a terminal device such as a computer, a server, a mobile phone, or a tablet.
[0060] The above description is only some preferred embodiments of the present invention and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present invention is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, a technical solution formed by mutually replacing the above features with technical features having similar functions (but not limited to) disclosed in the embodiments of the present invention.
Claims
1. An advertising image classification method based on a deep convolutional neural network model, applied to an advertising image processing system, characterized in that, The method includes: Performing an initialization process on the feature extraction module included in the advertisement image processing system to obtain feature extraction parameter information; Determining an initial number of iterations and initial network weight information, and performing the following training steps according to the initial number of iterations and the initial network weight information: Controlling the feature extraction module to collect advertisement image samples according to the feature extraction parameter information and the initial network weight information; Generating a set of feature vectors corresponding to each classification node included in the advertisement image processing system according to the advertisement image samples; For each preset category identifier, performing the following steps: Determining a set of feature space distributions corresponding to the preset category identifier, where each preset category identifier corresponds to a feature generation module included in the advertisement image processing system; Determining a training feature vector set and a verification feature vector set according to the set of feature vectors and the set of feature space distributions; In response to determining that the initial number of iterations meets a preset iteration condition, generating classification parameter information according to the determined training feature vector sets and the determined verification feature vector sets.
2. The method according to claim 1, wherein The training steps further include: In response to determining that the initial number of iterations does not meet the preset iteration condition, performing an update process on the initial number of iterations and the initial network weight information, and using the updated initial number of iterations as the initial number of iterations and the updated initial network weight information as the initial network weight information, and continuing to perform the training steps.
3. The method according to claim 1, wherein The determining the training feature vector set and the verification feature vector set according to the set of feature vectors and the set of feature space distributions includes: Performing a partitioning process on the set of feature vectors to obtain a training feature subset and a verification feature subset; Performing a partitioning process on the set of feature space distributions to obtain a training space distribution subset and a verification space distribution subset; Generating initial classification parameter information according to the training feature subset and the training space distribution subset; Generating a set of predicted feature vectors according to the feature extraction parameter information, the initial classification parameter information, and the verification space distribution subset; Generating a classification error rate according to the set of predicted feature vectors and the verification feature subset; In response to determining that the classification error rate meets a preset error condition, determining the training feature subset as the training feature vector set and determining the training space distribution subset as the verification feature vector set.
4. The method according to claim 3, wherein The method further includes: In response to determining that the classification error rate does not meet the preset error condition, performing an update process on the initial network weight information, and using the updated initial network weight information as the initial network weight information, and continuing to perform the training steps.
5. The method according to claim 1, wherein The determining the set of feature space distributions corresponding to the preset category identifier includes: Controlling each classification node corresponding to the preset category identifier to extract feature information to obtain a set of feature distribution information; Generating a set of feature space distributions according to the set of feature distribution information.
6. The method according to claim 1, characterized in that, The generating the classification parameter information according to the determined training feature vector sets and the determined verification feature vector sets includes: For each verification feature vector included in the determined verification feature vector sets, performing the following steps: Generate category similarity information according to the verification feature vector; In response to determining that the category similarity information meets a preset similarity condition, determine the verification feature vector as a valid feature vector, and determine the training feature vectors corresponding to the verification feature vector in each determined training feature vector set as associated feature vectors; Generate classification parameter information according to the determined valid feature vectors and the determined associated feature vectors.
7. The method according to claim 1, wherein The method further includes: Generate a final classification mapping relationship according to the generated classification parameter information.
8. An advertising content recognition image generation method, applied to an advertising image processing system, characterized in that Including: Control the feature extraction module included in the advertisement image processing system to collect an advertisement input image according to preset feature parameter information, and control each feature generation module included in the advertisement image processing system to perform an activation operation, where the preset feature parameter information is pre-generated according to the advertisement image classification method according to any one of claims 1-7; Control each classification node included in the advertisement image processing system to extract feature information to obtain a set of feature distribution information; Generate each feature space distribution set corresponding to each preset category identifier according to the set of feature distribution information; For each preset category identifier, perform the following steps: Determine the feature space distribution set corresponding to the preset category identifier in each of the feature space distribution sets as a target space distribution cluster; Generate a feature prediction sequence according to the preset feature parameter information, the target space distribution cluster, and the preset classification mapping relationship corresponding to the preset category identifier, where the preset classification mapping relationship is pre-generated according to the advertisement image classification method according to any one of claims 1-7; Perform feature fusion processing on the advertisement input image according to the generated feature prediction sequences to obtain an advertisement content recognition image.
9. An advertisement image processing system, characterized in that, Including: At least one feature generation module for generating feature data; At least one classification node for processing feature information; A feature extraction module for extracting image features; One or more processors; A storage device having stored thereon one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-7 or 8.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1-7 or 8.
Citation Information
Patent Citations
Classification of images as advertisement images or non-advertisement images
CN102138151A
Advertisement image classification method based on deep convolutional neural network model
CN110334233A
Image classification implementation method and device, equipment and medium
CN113627555A
Construction method of dynamic intelligent container commodity identification model
CN115984653A
Long-tail visual identification method and device based on feature aggregation loss and electronic equipment
CN117611857A