An advertisement image classification method based on a deep convolutional neural network model
Patent Information
- Application Number
- CN202510556850.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2045-04-29
AI Technical Summary
首先,人工标注过程耗时耗力,且容易受到主观因素的影响,导致标注结果的准确性和一致性难以保证
[0015]根据本发明的上述实施例至少具有以下有益效果:本发明实施例提供的一种基于深度卷积神经网络模型的广告图像分类方法及相关系统,可以提升广告图像分类的准确性和效率。通过深度卷积神经网络模型对广告图像进行特征提取和分类处理,能够自动学习到图像的深层特征,从而更好地表征广告图像的语义信息,使得分类结果更加准确可靠。同时,该方法利用迭代训练的方式不断优化网络权重和分类参数,可以进一步提高分类性能,能够适应不同类型的广告图像以及复杂的图像场景,具有较强的泛化能力。此外,基于该分类方法生成的广告内容识别图像,可以为后续的广告内容分析和应用提供更高质量的图像数据支持,有助于提升广告内容的识别效果和用户体验。
Smart Images

Figure CN120411642B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and artificial intelligence, and more specifically, to an advertising image classification method based on a deep convolutional neural network model. Background Technology
[0002] In today's digital age, the classification and recognition of advertising images play a crucial role in many fields, including advertising placement, content management, and user experience optimization. With the rapid development of the internet, massive amounts of advertising image data are constantly emerging. How to efficiently and accurately classify and recognize these advertising images has become a pressing problem 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 those based on color histograms and texture features. While these methods can achieve advertising image classification to some extent, they have many limitations. First, manual annotation is time-consuming and labor-intensive, and easily influenced by subjective factors, making it difficult to guarantee the accuracy and consistency of the annotation results. Second, traditional image feature extraction methods often only extract shallow features from images. For complex advertising images, these shallow features are insufficient to fully represent the semantic information of the image, thus limiting the accuracy of classification. Furthermore, as the diversity and complexity of advertising images continue to increase, traditional classification methods struggle to adapt to new advertising formats and content, leading to a gradual decline in classification effectiveness.
[0003] In the process of implementing the embodiments of the present invention, the inventors have discovered that the prior art has at least the following problems or defects: the existing advertising image classification methods cannot meet the needs of large-scale, 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 classification performance. Summary of the Invention
[0004] This 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 a first aspect of the present invention, an advertising image classification method based on a deep convolutional neural network model is provided, comprising: The feature extraction module included in the advertising image processing system is initialized to obtain feature extraction parameter information; Determine the initial number of iterations and the initial network weights, and based on these, perform the following training steps: The feature extraction module is controlled to collect advertising image samples based on the feature extraction parameter information and the initial network weight information; Based on the advertising image sample, generate a set of feature vectors corresponding to each classification node included in the advertising image processing system; For each preset category identifier, perform the following steps: Determine the feature space distribution set corresponding to the preset category identifier, wherein each preset category identifier corresponds to the feature generation module included in the advertising image processing system; Based on the set of feature vectors and the set of feature space distributions, determine the training feature vector set and the validation feature vector set; In response to the determination that the initial number of iterations meets the preset iteration conditions, classification parameter information is generated based on the determined sets of training feature vectors and the determined sets of validation feature vectors.
[0006] Furthermore, the training steps also include: In response to the determination that the initial iteration count does not meet the preset iteration condition, the initial iteration count and initial network weight information are updated, and the updated initial iteration count and the updated initial network weight information are used as the initial network weight information to continue the training steps.
[0007] Further, determining the training feature vector set and the validation feature vector set based on the feature vector set and the feature space distribution set includes: The feature vector set is partitioned to obtain a training feature subset and a validation feature subset; The feature space distribution set is partitioned to obtain a training space distribution subset and a validation space distribution subset; Initial classification parameter information is generated based on the training feature subset and the training spatial distribution subset; Based on the feature extraction parameter information, the initial classification parameter information, and the validation space distribution subset, a set of predicted feature vectors is generated; Based on the predicted feature vector set and the validation feature subset, a classification error rate is generated; In response to determining that the classification error rate meets a preset error condition, the training feature subset is determined as the training feature vector set, and the training spatial distribution subset is determined as the verification feature vector set.
[0008] Furthermore, the method also includes: In response to determining that the classification error rate does not meet the preset error condition, the initial network weight information is updated, and the updated initial network weight information is used as the initial network weight information to continue the training steps.
[0009] Further, determining the feature space distribution set corresponding to the preset category identifier includes: Control each classification node corresponding to the preset category identifier to extract feature information, and obtain a feature distribution information set; Based on the feature distribution information set, a feature space distribution set is generated.
[0010] Further, the step of generating classification parameter information based on the determined training feature vector sets and the determined validation feature vector sets includes: For each validation feature vector included in the determined validation feature vector sets, perform the following steps: Based on the verification feature vector, category similarity information is generated; In response to determining that the category similarity information meets the preset similarity conditions, the verification feature vector is determined as a valid feature vector, and the training feature vectors corresponding to the verification feature vector in each of the determined training feature vector sets are determined as associated feature vectors; Based on the determined effective feature vectors and the determined associated feature vectors, classification parameter information is generated.
[0011] Furthermore, the method also includes: Based on the generated classification parameter information, the final classification mapping relationship is generated.
[0012] In a second aspect of the present invention, a method for generating an image based on advertising content recognition is provided, comprising: The system controls the feature extraction module of the advertising image processing system to acquire the advertising input image according to the preset feature parameter information, and controls the various feature generation modules of the advertising image processing system to perform activation operations, wherein the preset feature parameter information is pre-generated according to the advertising image classification method described in the first aspect; The system controls each classification node in the advertising image processing system to extract feature information and obtain a feature distribution information set. Based on the feature distribution information set, generate a set of feature spatial distributions corresponding to each preset category identifier; For each preset category identifier, perform the following steps: The feature space distribution set corresponding to the preset category identifier in each feature space distribution set is determined as the target space distribution cluster; Based on the preset feature parameter information, the target spatial distribution cluster, and the preset classification mapping relationship corresponding to the preset category identifier, a feature prediction sequence is generated, wherein the preset classification mapping relationship is pre-generated according to the advertising image classification method described in the first aspect; Based on the generated feature prediction sequences, the advertising input image is subjected to feature fusion processing to obtain an advertising content recognition image.
[0013] In a third aspect of the invention, an advertising image processing system is provided, the advertising image processing system comprising: 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 thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in either the first aspect or the second aspect.
[0014] In a fourth aspect of the invention, a computer-readable medium is provided having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in either the first or second aspect.
[0015] The embodiments of the present invention have at least the following beneficial effects: The advertising 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 advertising image classification. By performing feature extraction and classification processing on advertising images through a deep convolutional neural network model, the deep features of the image can be automatically learned, thereby better representing the semantic information of the advertising image and making the classification results more accurate and reliable. At the same time, the method continuously optimizes the network weights and classification parameters through iterative training, which can further improve the classification performance, adapt to different types of advertising images and complex image scenes, and has strong generalization ability. In addition, the advertising content recognition images generated based on this classification method can provide higher quality image data support for subsequent advertising content analysis and applications, which helps to improve the recognition effect of advertising content and user experience.
[0016] This invention also provides an advertising image processing system, enabling the classification method to be easily implemented and deployed in practical applications. The system's feature extraction module, feature generation module, and classification nodes work collaboratively to efficiently complete tasks such as feature extraction, classification, and content recognition of advertising images, thereby improving the overall efficiency of advertising image processing. Attached Figure Description
[0017] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example and not limitation, wherein: Figure 1A flowchart illustrating an advertising image classification method based on a deep convolutional neural network model provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating an advertising content recognition image generation method according to an embodiment of the present invention. Figure 3 This is a schematic diagram of the structure of an advertising image processing system provided in an embodiment of the present invention. Detailed Implementation
[0018] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are provided merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make the invention more thorough and complete, and to fully convey the scope of the invention to those skilled in the art.
[0019] Those skilled in the art will recognize that embodiments of the present invention can be implemented as a system, apparatus, device, method, or computer program product. Therefore, the present invention can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0020] It should be noted that the number of any elements in the accompanying drawings is for illustrative purposes only and not as a limitation, and any naming is for distinction only and has no limiting meaning.
[0021] The following is for reference. Figure 1 , Figure 1 This is a flowchart illustrating an advertising image classification method based on a deep convolutional neural network model, provided as an embodiment of the present invention. Figure 1 As shown, an advertising image classification method based on a deep convolutional neural network model includes: S1 initializes the feature extraction module included in the advertising image processing system to obtain feature extraction parameter information; S2 determines the initial number of iterations and the initial network weights, and based on these, performs the following training steps: S3 controls the feature extraction module to collect advertising image samples based on the feature extraction parameter information and the initial network weight information; S4 generates a set of feature vectors corresponding to each classification node included in the advertising image processing system based on the advertising image sample; For each preset category identifier, S5 performs the following steps: S6 determines the feature space distribution set corresponding to the preset category identifier, wherein each preset category identifier corresponds to the feature generation module included in the advertising image processing system; S7 determines the training feature vector set and the verification feature vector set based on the feature vector set and the feature space distribution set; S8 responds to the determination that the initial iteration number meets the preset iteration conditions, and generates classification parameter information based on the determined training feature vector sets and the determined validation feature vector sets.
[0022] It should be noted that the initialization process mentioned in this embodiment of the invention, which involves initializing the feature extraction module of the advertising image processing system to obtain feature extraction parameter information, refers to performing necessary initialization operations on the feature extraction module before the advertising image classification method begins, to ensure that image features can be correctly extracted subsequently. The feature extraction module is an important component of the advertising image processing system, and its main function is to extract feature vectors that characterize the image content from the advertising 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 network weights, biases, and other parameters, thereby providing the 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. These parameters will guide the feature extraction module on how to extract features from the image, such as the size of the convolution kernel, stride, and the selection of the activation function.
[0023] Specifically, determining the initial number of iterations and initial network weights, and performing the following training steps based on these initial iterations and weights, involves using the initial number of iterations as the starting point for the training process of a deep convolutional neural network model. The number of iterations is a crucial parameter in deep learning training, determining the number of times the model learns from the training data. Initial network weights refer to the initial values of the weights of each layer in the neural network at the start of training. These initial values are typically determined through random initialization or other specific initialization methods. The initial number of iterations and initial network weights are the starting conditions for the training process, influencing both the model's training process and the final classification performance. During the training steps, the feature extraction module collects advertising image samples based on the feature extraction parameters and initial network weights. These advertising image samples refer to the advertising image dataset used to train the model; these samples typically contain advertising images of different categories and styles, allowing the model to learn the features of different advertising images. Generating feature vector sets corresponding to the various classification nodes included in the advertising image processing system involves converting the collected advertising image samples into feature vectors through the feature extraction module. These feature vector sets will be used for subsequent classification tasks. Each preset category identifier corresponds to a feature generation module included in the advertising image processing system. The preset category identifier refers to a predefined category label for the advertising image, such as car advertisements or electronic product advertisements. The feature generation module is a module in the system used to generate feature data. It generates a corresponding feature space distribution set based on the category identifier, which is used for subsequent classification parameter determination.
[0024] Preferably, when constructing a deep convolutional neural network model, structures such as convolutional layers, pooling layers, and fully connected layers can be used. Convolutional layers are used to extract local features of an image. The feature extraction process is controlled by setting parameters such as the size, stride, and number of convolutional kernels. For example, a 3×3 kernel size, a stride of 1, and a number of kernels of 64 can be set to extract local features such as edges and textures. Pooling layers are used to reduce the dimensionality of features while retaining important information. Common pooling methods include max pooling and average pooling. Appropriate pooling methods and pooling window sizes can be selected, such as 2×2 max pooling. Fully connected layers are used to integrate the extracted features and output the final classification result. During training, the training process can be optimized by setting hyperparameters such as the learning rate and batch size. For example, the learning rate can be set to 0.001, and the batch size can be set to 32. By adjusting these parameters, the model can better learn the features of advertising images and improve classification accuracy. For partitioning the feature vector set, random or proportional partitioning can be used to divide the feature vector set into training and validation subsets. For example, it can be partitioned with 80% used for training and 20% for validation. A similar method can be used to partition the feature space distribution set into training and validation subsets. When generating initial classification parameters, the initial classification parameters can be determined based on the training feature subset and the training space distribution subset, by calculating the similarity between feature vectors or using other statistical methods. For example, the cosine similarity between feature vectors can be calculated, and the initial classification parameters can be determined based on the similarity value.
[0025] In some embodiments, the training step further includes: In response to the determination that the initial iteration count does not meet the preset iteration condition, the initial iteration count and initial network weight information are updated, and the updated initial iteration count and the updated initial network weight information are used as the initial network weight information to continue the training steps.
[0026] It should be noted that the statement "In response to the determination that the initial iteration count does not meet the preset iteration condition, the initial iteration count and initial network weight information are updated, and the updated initial iteration count and updated initial network weight information are used as the initial network weight information, and the training steps continue" describes that when training a deep convolutional neural network model, if the current iteration count does not meet the preset iteration condition, the initial iteration count and initial network weight information need to be updated, and the training process continues. Here, the preset iteration condition refers to a pre-set training termination condition, such as reaching a certain number of iterations or the training error falling below a certain threshold. The update process refers to adjusting the initial iteration count and initial network weights according to certain rules or algorithms to enable the model to learn and optimize better.
[0027] Specifically, the initial iteration count refers to the starting point of the iteration count set at the beginning of training, usually a small positive integer, such as 1. As training progresses, the iteration count gradually increases until a preset iteration condition is reached. Initial network weights refer to the initial values of the weights in each layer of the neural network. These weights are typically determined through random initialization or other specific initialization methods, such as using a Gaussian distribution to randomly initialize weights. Preset iteration conditions can be a combination of multiple conditions, such as reaching 1000 iterations or a training error below 0.01. When the current iteration count does not meet these conditions, the initial iteration count and initial network weights need to be updated. Updating the initial iteration count can be simply done by incrementing it by 1, while updating the initial network weights typically involves adjusting the weights based on the gradients calculated during training, such as using a gradient descent algorithm. During training, each iteration calculates a loss value based on the training data, then calculates the gradient based on this loss value, and updates the network weights using the gradient descent algorithm to gradually reduce the loss value.
[0028] Preferably, the process of updating the initial network weights can employ the momentum gradient descent algorithm to accelerate convergence and avoid getting trapped in 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, which 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 by incorporating the influence of the momentum term. Furthermore, when updating the initial iteration count, besides simply adding 1, the increase in the iteration count can be dynamically adjusted based on performance metrics during training (such as accuracy on the validation set). For example, if the accuracy on the validation set does not significantly improve after several consecutive iterations, the rate of increase in the iteration count can be slowed down to avoid overfitting. During training, an early stopping mechanism can also be implemented, i.e., when the error on the validation set no longer decreases after a certain number of iterations, training is terminated early to prevent model overfitting.
[0029] In some embodiments, determining the training feature vector set and the validation feature vector set based on the feature vector set and the feature space distribution set includes: The feature vector set is partitioned to obtain a training feature subset and a validation feature subset; The feature space distribution set is partitioned to obtain a training space distribution subset and a validation space distribution subset; Initial classification parameter information is generated based on the training feature subset and the training spatial distribution subset; A set of predicted feature vectors is generated based on the feature extraction parameter information, the initial classification parameter information, and the validation space distribution subset. Based on the predicted feature vector set and the validation feature subset, a classification error rate is generated; In response to determining that the classification error rate meets a preset error condition, the training feature subset is determined as the training feature vector set, and the training spatial distribution subset is determined as the verification feature vector set.
[0030] It should be noted that the statement "determining the training feature vector set and the validation feature vector set based on the feature vector set and the feature space distribution set" describes the process in advertising image classification methods of using the feature vector set and the feature space distribution set to divide the training and validation sets. The feature vector set is a set of features extracted from advertising image samples, used to represent the image's feature information; the feature space distribution set is generated based on the feature vector set and used to describe the distribution of features in space. By dividing the training and validation feature vector sets, the model's performance can be effectively evaluated, overfitting can be avoided, and the model's generalization ability on unseen data can be ensured. This process is a crucial step in deep learning model training and is essential for improving 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 a feature representation of an advertising image, typically a multi-dimensional array whose dimensions depend 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 vectors can be the outputs after processing through convolutional and pooling layers. The feature space distribution set, on the other hand, describes the distribution of these feature vectors in the feature space. This can be generated, for example, by calculating statistical measures such as the mean and variance of the feature vectors. The process of dividing the feature space into training and validation subsets can be implemented in various ways, such as random partitioning or partitioning by category. For example, 70% of the feature vectors can be used as the training feature subset, and 30% as the validation feature subset. Simultaneously, the feature space distribution set is partitioned to generate training and validation space distribution subsets for subsequent classification parameter generation and error calculation.
[0032] Preferably, when dividing the training feature vector set and the validation feature vector set, a stratified sampling method can be used to ensure that the proportion of advertising images of each category in the training and validation sets is consistent with the proportion 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, this proportion should also be maintained during the division. This avoids model training bias caused by uneven category distribution. When generating initial classification parameter information, the initial classification parameters can be determined by calculating the similarity between feature vectors based on the training feature subset and the training spatial distribution subset. For example, cosine similarity or Euclidean distance can be used to measure the similarity between feature vectors. For calculating the classification error rate, the predicted feature vector set can be compared with the validation feature subset, and the proportion of samples with incorrect classification can be counted. If the classification error rate is lower than a preset error threshold, such as 5%, the current training feature subset and training spatial distribution subset can be determined as the final training feature vector set and 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, the initial network weight information is updated, and the updated initial network weight information is used as the initial network weight information to continue the training steps.
[0034] It should be noted that the statement "In response to determining that the classification error rate does not meet the preset error condition, the initial network weight information is updated, and the updated initial network weight information is used as the initial network weight information to continue the training step" describes the process in the advertising image classification method of updating the neural network weights and continuing training when the classification error rate does not reach the preset error condition. Here, the classification error rate refers to the model's classification error rate on the validation feature vector set, used to evaluate the model's performance. If the classification error rate is higher than the preset threshold, it indicates that the model's performance has not met expectations, and the network weights need to be adjusted to optimize model performance.
[0035] Specifically, the classification error rate (CRR) refers to the proportion of samples misclassified by the model on the validation set out of the total number of samples in the validation set. For example, if the validation set has 100 samples and the model misclassifies 10 samples, the CRR is 10%. The preset error condition refers to a pre-defined threshold for the CRR, such as 5%. When the actual CRR exceeds this threshold, it indicates that the model's performance needs further optimization. Initial network weight information refers to the initial values of the weights in each layer of the neural network. These weights are continuously updated during training to optimize model performance. Update processing refers to adjusting the weights based on the gradients calculated during training, typically using gradient descent or other optimization algorithms, such as the Adam optimizer. In each iteration, the CRR on the validation set is used to determine whether the weights need to be updated.
[0036] Preferably, the process of updating the initial network weight information can employ an optimization algorithm with an adaptive learning rate, such as the Adam optimizer. The Adam optimizer combines the advantages of momentum gradient descent and the RMSprop algorithm, adaptively adjusting the learning rate to accelerate convergence and improve model stability. During training, a loss value is calculated at each iteration, and then the gradient is calculated based on this loss value, updating the network weights using 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, which terminates training prematurely when the classification error rate on the validation set no longer decreases significantly after multiple iterations, thus preventing overfitting. Simultaneously, a learning rate decay mechanism can be implemented, gradually reducing the learning rate as training progresses to improve model accuracy.
[0038] In some embodiments, determining the feature space distribution set corresponding to the preset category identifier includes: Control each classification node corresponding to the preset category identifier to extract feature information, and obtain a feature distribution information set; Based on the feature distribution information set, a feature space distribution set is generated.
[0039] It should be noted that determining the feature space distribution set corresponding to the preset category identifier includes: controlling each classification node corresponding to the preset category identifier to extract feature information to obtain a feature distribution information set; and generating a feature space distribution set based on the feature distribution information set. This sentence describes the process of determining the feature space distribution set based on the preset category identifier. The preset category identifier refers to the predefined category label of the advertising image, such as car advertisements and electronic product advertisements. The feature space distribution set refers to the distribution of features of different categories of advertising images in the feature space. It can help the model better understand the feature patterns of each category, thereby improving the accuracy of classification.
[0040] Specifically, a predefined category identifier refers to a category label predefined in the advertising image classification task, used to identify different types of advertising images. For example, advertising images can be categorized into categories such as car advertisements, electronics advertisements, and clothing advertisements, each with a unique identifier. A classification node refers to a module in the advertising image processing system used to process feature information; each classification node is responsible for processing feature information for a specific category. For example, in a system containing multiple classification nodes, each node can focus on extracting feature information for a particular category. The feature distribution information set refers to the set of feature information extracted from the classification nodes; this feature information reflects the distribution of advertising images in the feature space. The process of generating the feature space distribution set involves integrating and analyzing the feature distribution information set to form a more comprehensive feature distribution description for subsequent classification parameter determination.
[0041] Preferably, the process of generating the feature space distribution set can be further refined. First, for each preset category identifier, feature information can be extracted using convolutional and pooling layers in a convolutional neural network (CNN). For example, multiple convolutional layers can be used to extract local features of an image, and then pooling layers can be used to reduce the dimensionality of the features. After extracting the feature information, the feature mean and covariance matrix for each category can be calculated to generate the feature space distribution set. For example, for the car advertising category, the mean and covariance matrix of all feature vectors belonging to that category can be calculated to obtain the feature space distribution of that category.
[0042] Furthermore, clustering algorithms, such as the K-means algorithm, can be introduced to perform cluster analysis on the feature distribution information set, further optimizing the generation process of the feature space distribution set. For example, the feature distribution information set can be divided into multiple cluster centers, each representing a feature pattern, thereby more accurately describing the feature space distribution.
[0043] In some embodiments, generating classification parameter information based on the determined training feature vector sets and the determined validation feature vector sets includes: For each validation feature vector included in the determined validation feature vector sets, perform the following steps: Based on the verification feature vector, category similarity information is generated; In response to determining that the category similarity information meets the preset similarity conditions, the verification feature vector is determined as a valid feature vector, and the training feature vectors corresponding to the verification feature vector in each of the determined training feature vector sets are determined as associated feature vectors; Based on the determined effective feature vectors and the determined associated feature vectors, classification parameter information is generated.
[0044] It should be noted that generating classification parameter information based on the determined training feature vector sets and validation feature vector sets includes: for each validation feature vector included in the determined validation feature vector sets, performing the following steps: generating category similarity information based on the validation feature vector; in response to determining that the category similarity information meets preset similarity conditions, determining the validation feature vector as a valid feature vector, and determining the training feature vectors corresponding to the validation feature vectors in the determined training feature vector sets as associated feature vectors; generating classification parameter information based on the determined valid feature vectors and determined associated feature vectors. This describes the process of generating classification parameter information using the training feature vector sets and validation feature vector sets. The core of this process lies in calculating the similarity between the validation feature vectors and training feature vectors to filter out valid feature vectors and associated feature vectors, thereby generating parameter information for classification. This method helps improve the accuracy and reliability of classification, ensuring that the model can better recognize and classify advertising images.
[0045] Specifically, the training feature vector set and the validation feature vector set are sets of feature vectors extracted from advertising image samples, used for model training and validation, respectively. Each feature vector is a multi-dimensional array representing the feature information of the advertising image. Category similarity information refers to the similarity between the validation feature vector and the training feature vector, typically obtained by calculating the distance or similarity metric between feature vectors, such as cosine similarity or Euclidean distance. The preset similarity condition refers to a pre-defined similarity threshold used to determine whether the validation feature vector is sufficiently similar 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 similar training feature vectors are marked as associated feature vectors. Finally, classification parameter information is generated based on these valid and associated feature vectors, which 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 validation feature vectors and training feature vectors. Cosine similarity is calculated by taking the ratio of the dot product of two vectors to the product of their magnitudes. Specifically, for each validation feature vector, its cosine similarity with all training feature vectors is calculated, and then valid feature vectors are selected based on a preset similarity threshold (e.g., 0.8).
[0047] Furthermore, when generating classification parameter information, a weighted averaging method can be used to calculate the classification parameters based on the similarity weights of effective feature vectors and associated feature vectors. For example, for each category, the weighted average feature vector of all effective feature vectors is calculated as the classification parameter for that category. This can better reflect the feature patterns of each category and improve classification accuracy. Simultaneously, regularization techniques, such as L2 regularization, can be introduced to prevent model overfitting and further optimize the classification parameter generation process.
[0048] In some embodiments, the method further includes: Based on the generated classification parameter information, the final classification mapping relationship is generated.
[0049] It's important to note that the statement "based on the generated classification parameters, the final classification mapping relationship is generated" describes how the advertising image classification method utilizes the generated classification parameters to construct the final classification mapping relationship. The classification parameters are obtained through the analysis and processing of feature vectors in the preceding steps and contain important feature information for each category. The final classification mapping relationship refers to the process of mapping the input advertising image features to specific category labels. It is the core output of the classification model, used to accurately classify new advertising images into the preset categories.
[0050] Specifically, classification parameter information refers to the set of parameters generated during training that describe the features of each category. These parameters can include the mean, covariance matrix, and weights of the feature vectors for each category. For example, for a car advertising category, the classification parameter information might include the average feature vector and the covariance matrix of the feature distribution for all trained feature vectors of that category. The final classification mapping relationship refers to a mapping function or model that maps the input feature vector to a predefined category label. This mapping relationship can be implemented in various ways, such as using a nearest neighbor classifier, support vector machine (SVM), or neural network. When constructing the final classification mapping relationship, a classifier is typically trained based on the classification parameter information, enabling the classifier to accurately predict the category of the input feature vector based on its features.
[0051] Preferably, a deep learning model, such as a convolutional neural network (CNN), can be used to generate the final classification mapping. The specific steps are as follows: First, a CNN model is trained using the classification parameter information generated in the previous steps as training data. The input parameters include a training feature vector set and the corresponding class labels. During training, the network weights are adjusted using the backpropagation algorithm to minimize the classification error. For example, the learning rate can be set to 0.001, and the training iterations can be 50 epochs. After the model training is complete, the model's performance is evaluated using a validation feature vector set to ensure good generalization ability. If the model achieves a classification accuracy of over 90% on the validation set, it can be considered to have high classification accuracy. Finally, the trained CNN model is used as the final classification mapping to classify new advertising images. Furthermore, data augmentation techniques, such as random cropping, rotation, and flipping, can be introduced to increase the diversity of training data and further improve the model's robustness and classification performance.
[0052] The 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 deep convolutional neural networks, it can adaptively learn the key features of different advertising categories. Simultaneously, by combining feature space distribution analysis and iterative training strategies, the generalization ability and robustness of the model can be enhanced. By dividing the training set and validation set and calculating the classification error rate, it can be ensured that the model continuously optimizes the weight parameters during training, thereby avoiding overfitting and improving classification performance.
[0053] Furthermore, this method can filter effective feature vectors based on feature similarity and generate classification parameters, thereby establishing a more accurate classification mapping relationship. Through feature fusion processing and predicted vector generation, the effect of advertisement content recognition can be further improved, ultimately outputting a high-quality advertisement content recognition image. This end-to-end processing flow can reduce the need for manual intervention, while improving the automation level and practical application value of advertisement image processing.
[0054] like Figure 2 As shown in some embodiments, an image generation method for recognizing advertising content includes: S1 controls the feature extraction module of the advertising image processing system to collect the advertising input image according to the preset feature parameter information, and controls the various feature generation modules of the advertising image processing system to perform activation operations, wherein the preset feature parameter information is pre-generated according to the advertising image classification method described in the first aspect; S2 controls the various classification nodes included in the advertising image processing system to extract feature information and obtain a feature distribution information set; S3 generates a set of feature spatial distributions corresponding to each preset category identifier based on the feature distribution information set; For each preset category identifier, S4 performs the following steps: S5 determines the feature space distribution set corresponding to the preset category identifier in each feature space distribution set as the target space distribution cluster; S6 generates a feature prediction sequence based on the preset feature parameter information, the target spatial distribution cluster, and the preset classification mapping relationship corresponding to the preset category identifier, wherein the preset classification mapping relationship is pre-generated according to the advertising image classification method described in the first aspect; S7 performs feature fusion processing on the advertising input image based on the generated feature prediction sequences to obtain an advertising content recognition image.
[0055] It should be noted that the advertising content recognition image generation method mentioned in this invention is implemented based on an advertising image processing system. This method utilizes pre-generated classification parameter information to process the advertising input image. Through steps such as feature extraction, feature generation, classification, and feature fusion, it ultimately generates an image that reflects the advertising content. 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 advertising image.
[0056] Specifically, the advertising image processing system is an integrated system comprising multiple functional modules for processing and analyzing advertising images. Among these, the feature extraction module is a core component, responsible for extracting feature vectors from the input advertising images. These feature vectors 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, extracting deep features of the image through convolutional layers, pooling layers, and fully connected layers. Preset feature parameter information refers to the parameters obtained through training in previous steps. These parameters guide the feature extraction module in how to extract features, such as the size of the convolutional kernel, stride, and activation function. Classification nodes are modules in the system used to process feature information. Each classification node corresponds to a preset category identifier and is responsible for extracting feature information for that category. The feature distribution information set is the set of feature information extracted from the classification nodes, reflecting the feature distribution of different categories of advertising images. The target space distribution cluster refers to the feature space distribution of a specific category 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 previous steps, used to map feature vectors to their corresponding categories. The feature prediction sequence is generated based on preset feature parameter information and target spatial distribution clusters, and is used to represent the feature prediction results 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 advertising content recognition image generation method can be further refined through the following steps. First, the feature extraction module can employ a deep convolutional neural network (CNN) architecture, such as ResNet or VGG, which can automatically learn deep features of images. After inputting the advertising image, the CNN extracts feature vectors through convolutional layers, pooling layers, and fully connected layers. For example, the kernel size can be set to 3×3, the stride to 1, and the number of convolutional layers to 50 (e.g., ResNet-50). Second, for each preset category identifier, the classification node can use a Softmax classifier to generate a 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 best matches the mapping relationship of the car advertising category, then the image is classified as a car advertising. Finally, in the feature fusion processing stage, a weighted average method can be used to merge multiple feature prediction sequences to generate the final advertising content recognition image. For example, weights are assigned to each feature prediction vector based on its confidence level (such as class probability), and then a weighted average feature vector is calculated as the feature representation of the final ad content recognition image.
[0058] like Figure 3As shown in some embodiments, an advertising image processing system 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 storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method described in either the first aspect or the second aspect.
[0059] Furthermore, the storage medium in the embodiments of this application stores program instructions capable of implementing all the above methods. These program instructions can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.
[0060] The above description is merely an explanation of some preferred embodiments of the present invention and the technical principles employed. Those skilled in the art should understand that the scope of the invention as described in the embodiments of the present invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions 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: The feature extraction module included in the advertising image processing system is initialized to obtain feature extraction parameter information; Determine the initial number of iterations and the initial network weights, and based on these, perform the following training steps: The feature extraction module is controlled to process the advertising image samples according to the feature extraction parameter information; Based on the advertising image sample, generate a set of feature vectors corresponding to each classification node included in the advertising image processing system; For each preset category identifier, perform the following steps: Determine the feature space distribution set corresponding to the preset category identifier, wherein each preset category identifier corresponds to the feature generation module included in the advertising image processing system; Based on the feature vector set and the feature space distribution set, a training feature vector set and a validation feature vector set are determined. This determination includes: The feature vector set is partitioned to obtain a training feature subset and a validation feature subset; The feature space distribution set is partitioned to obtain a training space distribution subset and a validation space distribution subset; Initial classification parameter information is generated based on the training feature subset and the training spatial distribution subset; A set of predicted feature vectors is generated based on the feature extraction parameter information, the initial classification parameter information, and the validation space distribution subset. Based on the predicted feature vector set and the validation feature subset, a classification error rate is generated; In response to determining that the classification error rate meets a preset error condition, the training feature subset is determined as a training feature vector set, and the training spatial distribution subset is determined as a verification feature vector set; In response to the condition that the initial number of iterations satisfies the preset iteration conditions, classification parameter information is generated based on the determined training feature vector sets and the determined validation feature vector sets. The step of generating classification parameter information based on the determined training feature vector sets and the determined validation feature vector sets includes: For each validation feature vector included in the determined validation feature vector sets, perform the following steps: Generate category similarity information based on the verification feature vector and the training feature vector; In response to determining that the category similarity information meets the preset similarity conditions, the verification feature vector is determined as a valid feature vector, and the training feature vectors corresponding to the verification feature vector in each of the determined training feature vector sets are determined as associated feature vectors; Based on the determined effective feature vectors and the determined associated feature vectors, classification parameter information is generated; Based on the generated classification parameter information, the final classification mapping relationship is generated.
2. The method according to claim 1, characterized in that, The training steps also include: In response to the determination that the initial iteration count does not meet the preset iteration condition, the initial iteration count and initial network weight information are updated, and the updated initial iteration count and the updated initial network weight information are used as the initial network weight information to continue the training steps.
3. The method according to claim 1, characterized in that, The method further includes: In response to determining that the classification error rate does not meet the preset error condition, the initial network weight information is updated, and the updated initial network weight information is used as the initial network weight information to continue the training steps.
4. The method according to claim 1, characterized in that, The step of determining the feature space distribution set corresponding to the preset category identifier includes: Control each classification node corresponding to the preset category identifier to extract feature information, and obtain a feature distribution information set; Based on the feature distribution information set, a feature space distribution set is generated.
5. A method for generating images based on advertising content recognition, applied to an advertising image processing system, characterized in that, include: The system controls the feature extraction module of the advertising image processing system to process the advertising input image according to the preset feature extraction parameter information, and controls the feature generation modules of the advertising image processing system to perform activation operations, wherein the preset feature extraction parameter information is pre-generated by the advertising image classification method according to any one of claims 1-4; The system controls each classification node in the advertising image processing system to extract feature information and obtain a feature distribution information set. Based on the feature distribution information set, generate a set of feature spatial distributions corresponding to each preset category identifier; For each preset category identifier, perform the following steps: The feature space distribution set corresponding to the preset category identifier in each feature space distribution set is determined as the target space distribution cluster; Based on the preset feature extraction parameter information, the target spatial distribution cluster, and the preset classification mapping relationship corresponding to the preset category identifier, a feature prediction sequence is generated, wherein the preset classification mapping relationship is pre-generated by the advertising image classification method according to any one of claims 1-4; Based on the generated feature prediction sequences, the advertising input image is subjected to feature fusion processing to obtain an advertising content recognition image.
6. An advertising image processing system, characterized in that, include: At least one feature generation module is provided for generating feature data; At least one classification node is used to process feature information; The feature extraction module is used to extract image features; One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-5.
7. 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 as described in any one of claims 1-5.
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