Poster normalization detection method and device, electronic equipment and storage medium

By combining the feature extraction and text recognition of poster images and original images through a multi-gated hybrid expert model, the problem of low recognition efficiency in poster supervision is solved, efficient standardized detection of posters is achieved, the supervision process is simplified, and costs and manpower are saved. resource.

CN118799595APending Publication Date: 2024-10-18CHINA MOBILE GROUP ZHEJIANG +3
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311140494.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-05
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

When monitoring posters intelligently and automatically in the existing technology, the direct comparison effect between the poster target and the template image with a lot of text is poor, and the occlusion segmentation model needs to be pre-trained, resulting in low recognition and monitoring efficiency and many redundant processes.

Method used

A multi-gating hybrid expert model is used to input the poster image and the original image. Through the image integrity and similarity feature extraction branch, combined with the text recognition results, the poster is standardized to detect, simplify the task process, and improve the recognition accuracy and efficiency.

Benefits of technology

Through multi-task learning and the gate mechanism, the model learning efficiency is improved, the recognition process is simplified, intelligent poster supervision is realized, human resources and costs are saved, and recognition accuracy and efficiency are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799595A_ABST
    Figure CN118799595A_ABST
Patent Text Reader

Abstract

The invention provides a poster normalization detection method and device, electronic equipment and a storage medium. The method comprises the steps of obtaining a poster image to be detected, an original poster image and original poster characters; inputting the poster image and the original poster image into a multi-gating hybrid expert model to obtain an image integrity result and an image similarity result of the poster image output by the multi-gating hybrid expert model; performing text recognition on the poster image to obtain a text recognition result, and determining a text similarity result based on the text recognition result and the poster original characters; and based on the image integrity result, the image similarity result and the text similarity result, determining a normative detection result of the poster image, and simultaneously judging poster similarity, poster integrity and text similarity through a multi-task learning model without pre-training a shelter segmentation model. The task identification and integrity judgment process is simplified, and the operation efficiency of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a poster standardization detection method, device, electronic equipment and storage medium. Background Art

[0002] As an important method of publicity, posters are posted in many stores or public places to increase the influence of businesses or to popularize current policies, safety knowledge, etc. However, after being posted, posters are often illegally blocked or damaged, missed, or posted upside down due to human or environmental factors, resulting in missing information and failing to achieve the intended publicity effect. The existing supervision method is mainly manual inspection, which is inefficient and costly. Therefore, the method of intelligent and automated supervision through image acquisition by cameras and then using artificial intelligence and deep learning is gradually emerging.

[0003] However, in the prior art, 1) for posters with more text, the direct comparison effect between the target poster and the corresponding template image is poor, and the existing text information in the poster template cannot be reasonably and effectively utilized; 2) a pre-trained occlusion segmentation model is required, and the target poster and the template are repeatedly matched multiple times, which results in redundant processes and low recognition and monitoring efficiency. Summary of the invention

[0004] The present invention provides a poster standardization detection method, device, electronic equipment and storage medium, which are used to solve the defects of intelligent and automatic supervision of posters in the prior art.

[0005] The present invention provides a poster standardization detection method, comprising:

[0006] Obtain the poster image to be detected, as well as the original poster image and original poster text;

[0007] Inputting the poster image and the original poster image into a multi-gated hybrid expert model, and obtaining an image integrity result and an image similarity result of the poster image output by the multi-gated hybrid expert model;

[0008] Performing text recognition on the poster image to obtain a text recognition result, and determining a text similarity result based on the text recognition result and the original text of the poster;

[0009] Based on the image integrity result, the image similarity result and the text similarity result, a normativeness detection result of the poster image is determined.

[0010] According to a poster standardization detection method provided by the present invention, the training step of the multi-gated hybrid expert model includes:

[0011] Determine an initial multi-gated hybrid expert model, and obtain poster sample image pairs, image integrity labels and image similarity labels of the poster sample image pairs;

[0012] Inputting the poster sample image pair into the initial multi-gated hybrid expert model to obtain an image integrity prediction result and an image similarity prediction result output by the initial multi-gated hybrid expert model;

[0013] Based on the difference between the image integrity prediction result and the image integrity label, and the difference between the image similarity prediction result and the image similarity label, a total loss is determined, and based on the total loss, parameters of the initial multi-gated hybrid expert model are iterated to obtain the multi-gated hybrid expert model.

[0014] According to a poster standardization detection method provided by the present invention, the multi-gated hybrid expert model includes an image integrity feature extraction branch, an image similarity feature extraction branch and a shared feature extraction branch;

[0015] The shared feature extraction branch is used to extract shared features between the poster image and the original poster image;

[0016] The image integrity feature extraction branch is used to extract the image integrity feature between the poster image and the original poster image, and determine the image integrity result based on the image integrity feature and the shared feature;

[0017] The image similarity feature extraction branch is used to extract the image similarity features between the poster image and the original poster image, and determine the image similarity result based on the image similarity features and the shared features.

[0018] According to a poster standardization detection method provided by the present invention, the image integrity feature extraction branch is specifically used for:

[0019] Extracting an image integrity feature between the poster image and the original poster image, and fusing the image integrity feature and the shared feature based on an integrity gating threshold to determine the image integrity result, wherein the integrity gating threshold is determined based on the poster image and the original poster image;

[0020] The image similarity feature extraction branch is specifically used for:

[0021] The image similarity features between the poster image and the original poster image are extracted, and based on a similarity gating threshold, the image similarity features and the shared features are fused to determine the image similarity result, wherein the similarity gating threshold is determined based on the poster image and the original poster image.

[0022] According to a poster standardization detection method provided by the present invention, the image integrity feature extraction branch, the image similarity feature extraction branch and the shared feature extraction branch each include multiple expert models, and the multiple expert models are constructed based on any one of a convolutional neural network, a ResNet50 network and a feature pyramid network.

[0023] According to a poster standardization detection method provided by the present invention, the step of obtaining a poster image to be detected includes:

[0024] Get the original poster image to be detected;

[0025] Performing edge detection on the original poster image to be detected, and based on the edge positions obtained by detection, performing edge removal on the original poster image to be detected to obtain an edge-removed image;

[0026] Performing image transformation on the edge-removed image to obtain an image transformation poster image;

[0027] The image quality of the image-transformed poster image is enhanced to obtain the poster image to be detected.

[0028] According to a poster standardization detection method provided by the present invention, the image quality of the image-converted poster image is enhanced to obtain the poster image to be detected, including:

[0029] The image-transformed poster image is enhanced using a high-resolution generative adversarial network to obtain the poster image to be detected.

[0030] The present invention also provides a poster standardization detection device, comprising:

[0031] An acquisition unit, used for acquiring a poster image to be detected, as well as an original poster image and original poster text;

[0032] An input unit, used for inputting the poster image and the original poster image into a multi-gated hybrid expert model, and obtaining an image integrity result and an image similarity result of the poster image output by the multi-gated hybrid expert model;

[0033] A text recognition unit, used to perform text recognition on the poster image to obtain a text recognition result, and determine a text similarity result based on the text recognition result and the original text of the poster;

[0034] The unit for determining the normative detection result is used to determine the normative detection result of the poster image based on the image integrity result, the image similarity result and the text similarity result.

[0035] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any one of the above-mentioned poster standardization detection methods is implemented.

[0036] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the poster standardization detection method as described in any one of the above is implemented.

[0037] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above-mentioned poster standardization detection methods.

[0038] The poster standardization detection method, device, electronic device and storage medium provided by the present invention input the poster image and the original poster image into a multi-gated hybrid expert model, obtain the image integrity result and image similarity result of the poster image output by the multi-gated hybrid expert model, perform text recognition on the poster image to obtain the text recognition result, and determine the text similarity result based on the text recognition result and the original poster text, and finally, determine the standardization detection result of the poster image based on the image integrity result, the image similarity result and the text similarity result. On the one hand, multi-task learning is introduced into poster standardization detection, and the two tasks of poster similarity and poster integrity are combined. The learning and feature sharing of different tasks are carried out through a hybrid expert model and a gate mechanism to improve the learning efficiency of the model. In addition, poster text recognition is introduced into poster standardization detection, and the original text of the poster is effectively used to improve the recognition accuracy. The model parallelization is used to effectively control the time complexity of the model. On the other hand, there is no need to pre-train the occlusion segmentation model. Through the multi-task learning model, the poster similarity, poster integrity and text similarity are judged simultaneously, which simplifies the task identification and integrity judgment process, improves the operation efficiency of the model, and further realizes intelligent poster supervision. The automated and intelligent poster standardization detection effectively saves human resources and costs, and has extremely high commercial value. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 This is one of the flow charts of the poster standardization detection method provided by the present invention;

[0041] Figure 2This is the second flow chart of the poster standardization detection method provided by the present invention;

[0042] Figure 3 It is a structural schematic diagram of the multi-gated hybrid expert model provided by the present invention;

[0043] Figure 4 It is a structural schematic diagram of a poster standardization detection device provided by the present invention;

[0044] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] The present invention provides a poster standardization detection method. Figure 1 This is one of the flow charts of the poster standardization detection method provided by the present invention. Figure 2 This is the second flow chart of the poster standardization detection method provided by the present invention, such as Figure 1 , Figure 2 As shown, the method includes:

[0047] Step 110, obtaining the poster image to be detected, as well as the original poster image and the original poster text.

[0048] Specifically, a poster image to be tested can be obtained, and the poster image to be tested is the poster image that needs to be subsequently tested for normative purposes. The poster image to be tested can be pre-captured by an image acquisition device, or can be captured in real time, or can be downloaded or scanned from the Internet. The embodiment of the present invention does not make any specific limitations on this.

[0049] The original poster image is the poster template. It can be understood that the poster template conforms to the correct posting angle and has no obstructions.

[0050] The original text of the poster refers to the text in the original image of the poster. The original text of the poster can be directly input by the user, or can be obtained by acquiring an image through an image acquisition device such as a scanner, mobile phone, camera, tablet, etc., and performing OCR (Optical Character Recognition) on the image. The embodiment of the present invention does not make any specific limitation on this.

[0051] Step 120 , inputting the poster image and the original poster image into a multi-gated hybrid expert model, and obtaining an image integrity result and an image similarity result of the poster image output by the multi-gated hybrid expert model.

[0052] Specifically, after the poster image and the original poster image are obtained, the poster image and the original poster image may be input into a multi-gated hybrid expert model to obtain an image integrity result and an image similarity result of the poster image output by the multi-gated hybrid expert model.

[0053] In addition, before inputting the poster image and the original poster image into the multi-gated hybrid expert model, the poster image and the original poster image may be subjected to Min-Max normalization processing after Hadamard product, and then the normalized result may be input into the multi-gated hybrid expert model.

[0054] The normalization formula is as follows:

[0055] T=f(X⊙X c )

[0056] Among them, f(X⊙X c ) represents the Min-Max normalization function, Represents the original poster image, Represents a poster image.

[0057] The multi-gated hybrid expert model here is a deep learning technology that uses sparse gate control composed of an expert model and a gating model. The gating model is used to distribute tasks / training data among different expert models, allowing each model to focus on the task it is best at, thereby achieving the sparsity of the model.

[0058] The image integrity result here reflects the degree of integrity of the poster image relative to the original poster image, and the image similarity result here reflects the degree of similarity between the poster image and the original poster image.

[0059] Step 130 , performing text recognition on the poster image to obtain a text recognition result, and determining a text similarity result based on the text recognition result and the original text of the poster.

[0060] Specifically, text recognition can be performed on the poster image to obtain a text recognition result. Here, PGNet (Point Gathering Network) can be used for text recognition on the poster image, or a cascaded multi-layer convolutional neural network (CNN) can be used, or a deep neural network (DNN) can be used, etc. The embodiment of the present invention does not make any specific limitations on this.

[0061] Here, PGNet extracts the feature information of the image through the feature pyramid, and then learns the boundaries, center lines, directions and classification results of the text in the poster image through multi-task learning. After that, the text center line is classified and spliced ​​with the text direction and text classification results. The PG-CTC decoder performs text recognition from the feature granularity of higher-level points to obtain the final text recognition result. After obtaining the text recognition result, the text similarity result can be determined based on the text recognition result and the original text of the poster.

[0062] Here, the text similarity result determined based on the text recognition result and the original text of the poster may be calculated using methods such as cosine similarity and Pearson correlation coefficient, which is not specifically limited in the embodiment of the present invention.

[0063] Through text recognition, the detected text on the poster image (text recognition result) is compared with the original text on the poster to improve the accuracy and robustness of poster text recognition. It can also promptly detect problems such as asymmetry and flipping of the poster image.

[0064] Although the addition of a text recognition module to determine the normative detection results of poster images will increase the complexity of the model, the overall normative detection time of the model will not be affected. The overall advantages are as follows: 1) The multi-gated hybrid expert model and the text recognition model can run in parallel without interfering with each other; 2) PGNet is a one-stage model, and its text recognition speed is faster than that of the traditional two-stage model text recognition model; 3) It can recognize text of any shape, and can better recognize some artistic fonts in posters.

[0065] Step 140: Determine a normativeness detection result of the poster image based on the image integrity result, the image similarity result and the text similarity result.

[0066] Specifically, in order to judge whether the poster image is effectively posted, a comprehensive judgment is performed from multiple perspectives.

[0067] After obtaining the image integrity result, the image similarity result, and the text similarity result, the normative detection result of the poster image may be determined based on the image integrity result, the image similarity result, and the text similarity result.

[0068] For example, the normative detection result of the poster image can be determined based on the following formula:

[0069] r=y sim *y com *y sem

[0070] Among them, r represents the normative detection result of the poster image, y sim Represents the image similarity result, y com Represents the image integrity result, y sem Represents text similarity results.

[0071] It can be understood that the lower the normative detection result of the poster image r∈[0,1], the higher the possibility that the poster posting does not comply with the posting specifications; the higher the normative detection result of the poster image, the higher the possibility that the poster posting complies with the posting specifications.

[0072] The method provided by the embodiment of the present invention inputs the poster image and the original poster image into a multi-gated hybrid expert model, obtains the image integrity result and image similarity result of the poster image output by the multi-gated hybrid expert model, performs text recognition on the poster image to obtain the text recognition result, and determines the text similarity result based on the text recognition result and the original poster text. Finally, based on the image integrity result, the image similarity result and the text similarity result, the standardization detection result of the poster image is determined. On the one hand, multi-task learning is introduced into poster standardization detection, the two tasks of poster similarity and poster integrity are combined, and the learning and feature sharing of different tasks are carried out through a hybrid expert model and a gate mechanism to improve the learning efficiency of the model, and poster text recognition is introduced into poster standardization detection, the original poster text is effectively used to improve the recognition accuracy, and the model parallelization is used to effectively control the time complexity of the model; on the other hand, there is no need to pre-train the occlusion segmentation model, and the poster similarity, poster integrity and text similarity are judged at the same time through the multi-task learning model, which simplifies the task recognition and integrity judgment process, improves the operation efficiency of the model, and further realizes intelligent poster supervision.

[0073] Based on the above embodiment, the training steps of the multi-gated hybrid expert model include:

[0074] Step 210, determining an initial multi-gated hybrid expert model, and obtaining poster sample image pairs, image integrity labels and image similarity labels of the poster sample image pairs;

[0075] Step 220, inputting the poster sample image pair into the initial multi-gated hybrid expert model to obtain the image integrity prediction result and the image similarity prediction result output by the initial multi-gated hybrid expert model;

[0076] Step 230, determining a total loss based on the difference between the image integrity prediction result and the image integrity label, and the difference between the image similarity prediction result and the image similarity label, and performing parameter iteration on the initial multi-gated hybrid expert model based on the total loss to obtain the multi-gated hybrid expert model.

[0077] Specifically, in order to better improve the accuracy and reliability of image similarity results and image integrity results, it is necessary to train the multi-gated hybrid expert model through the following steps:

[0078] Poster sample image pairs, as well as image completeness labels and image similarity labels of the poster sample image pairs can be collected in advance, and an initial multi-gated mixture of experts model can also be built in advance.

[0079] Here, the poster sample image pair may include a positive sample image of the poster sample image and a negative sample image of the poster sample image. The poster sample image is each poster image in the poster template data set. A certain amount of noise or disturbance is added to the poster sample image to improve the robustness of the model. The obtained new image is the positive sample image of the poster sample image.

[0080] For the image similarity task, other poster images randomly sampled from the poster template dataset are negative sample images of the poster sample image.

[0081] For the image integrity task, the poster sample image is randomly cropped to obtain the negative sample of the poster sample image. Different negative samples can be obtained by controlling the cropped area ratio. The cropped area ratio is 10%, 20% and 30%, targeting different position areas, that is, each side and each corner of the rectangular poster. Each random cropping obtains 8 images, that is, each sample poster image generates 24 negative sample images of the poster sample image.

[0082] In the embodiment of the present invention, the training set, the test set, and the validation set may be divided in a ratio of 8:1:1.

[0083] After obtaining the initial multi-gated hybrid expert model, the pre-collected poster sample image pairs, as well as the image integrity labels and image similarity labels of the poster sample image pairs, can be used to train the initial multi-gated hybrid expert model:

[0084] Firstly, the poster sample image pairs are input into the initial multi-gated hybrid expert model to obtain the image integrity prediction results and image similarity prediction results output by the initial multi-gated hybrid expert model.

[0085] After obtaining the image integrity prediction result and the image similarity prediction result, the image integrity prediction result can be compared with the pre-collected image integrity labels, and the image similarity prediction result can be compared with the pre-collected image similarity labels, that is, the total loss is determined based on the degree of difference between the image integrity prediction result and the image integrity labels, and the degree of difference between the image similarity prediction result and the image similarity labels.

[0086] It can be understood that the greater the difference between the image integrity prediction result and the pre-collected image integrity labels, the greater the loss function value; the smaller the difference between the image integrity prediction result and the pre-collected image integrity labels, the smaller the loss function value.

[0087] It can be understood that the greater the difference between the image similarity prediction result and the pre-collected image similarity labels, the greater the loss function value; the smaller the difference between the image similarity prediction result and the pre-collected image similarity labels, the smaller the loss function value.

[0088] Among them, the image similarity prediction result y a The formula is as follows:

[0089] y a =sigmoid(ReLU(W a,2 ReLU(W a,1 [P a , P s ]+b a,1 )+b a,2 ))

[0090] Among them, sigmoid represents the sigmoid function, ReLU represents the ReLU function, P a represents the features output by the expert model in the image similarity feature extraction branch, P s represents the features output by the expert model in the shared feature extraction branch, W a,1 , W a,2 b a,1 , b a,2 Represents the feedforward neural network parameters of the expert model in the image similarity feature extraction branch.

[0091] Among them, the image integrity prediction result y b The formula is as follows:

[0092] y b =sigmoid(ReLU(W b,2 ReLU(W b,1 [P b , P s ]+b b,1 )+bb,2 ))

[0093] Among them, sigmoid represents the sigmoid function, ReLU represents the ReLU function, P b represents the features output by the expert model in the image integrity feature extraction branch, P s represents the features output by the expert model in the shared feature extraction branch, W b,1 , W b,2 b b,1 , b b,2 Represents the feed-forward neural network parameters of the expert model in the image completeness feature extraction branch.

[0094] Here, the formula for the total loss is as follows:

[0095]

[0096] in, Represents the total loss. When i = a, y i represents the image similarity prediction result, represents the image similarity label; when i = b, y i represents the image completeness prediction result, Represents an image integrity tag.

[0097] After the total loss is obtained, the parameters of the initial multi-gated hybrid expert model may be iterated based on the total loss, and the initial multi-gated hybrid expert model after the parameter iteration is completed may be determined as the multi-gated hybrid expert model.

[0098] Here, a cross entropy loss function (Cross Entropy Loss Function) may be used, a mean square error loss function (Mean Squared Error, MSE) may be used, and a stochastic gradient descent method may be used to update the parameters of the initial multi-gated hybrid expert model, which is not specifically limited in the embodiment of the present invention.

[0099] Based on the above embodiments, Figure 3 is a schematic diagram of the structure of the multi-gated hybrid expert model provided by the present invention, such as Figure 3 As shown, the multi-gated hybrid expert model includes an image integrity feature extraction branch, an image similarity feature extraction branch and a shared feature extraction branch;

[0100] The shared feature extraction branch is used to extract shared features between the poster image and the original poster image;

[0101] The image integrity feature extraction branch is used to extract the image integrity feature between the poster image and the original poster image, and determine the image integrity result based on the image integrity feature and the shared feature;

[0102] The image similarity feature extraction branch is used to extract the image similarity features between the poster image and the original poster image, and determine the image similarity result based on the image similarity features and the shared features.

[0103] Specifically, the multi-gated hybrid expert model may include an image integrity feature extraction branch, an image similarity feature extraction branch, and a shared feature extraction branch.

[0104] The shared feature extraction branch here is used to extract the shared features between the poster image and the original poster image. The shared features here reflect the common feature information between the poster image and the original poster image.

[0105] The image integrity feature extraction branch here is used to extract the image integrity features between the poster image and the original poster image, and determine the image integrity result based on the image integrity features and shared features. The image integrity features here reflect the feature information of the poster image relative to the original poster image at the integrity level.

[0106] Here, based on the image integrity features and the shared features, the image integrity result is determined, and the image integrity features and the shared features can be fused, and then the image integrity result is determined based on the fused features. The fusion of the image integrity features and the shared features can be splicing the image integrity features and the shared features, or can be weighting the image integrity features and the shared features using an attention mechanism and then splicing them, which is not specifically limited in the embodiments of the present invention.

[0107] The image similarity feature extraction branch here is used to extract the image similarity features between the poster image and the original poster image, and determine the image similarity result based on the image similarity features and shared features. The image similarity features here reflect the similarity feature information between the poster image and the original poster image.

[0108] Here, based on the image similarity features and the shared features, the image similarity results are determined, and the image similarity features and the shared features can be fused, and then the image similarity results are determined based on the fused features. The fusion of the image similarity features and the shared features can be splicing the image similarity features and the shared features, or can be splicing the image similarity features and the shared features after weighting them using an attention mechanism, which is not specifically limited in the embodiments of the present invention.

[0109] The first layer of the multi-gated hybrid expert model is mainly responsible for the extraction of image integrity features, image similarity features and shared features. The image integrity feature extraction branch, image similarity feature extraction branch and shared feature extraction branch each have three expert models, where Experts a , Experts b It mainly extracts features for tasks a and b, while Expertsshared is responsible for extracting features shared by the two tasks.

[0110] There are k experts in each of the three expert models It refers to the i-th expert model, which is used to extract image features. The expert model in the embodiment of the present invention can be implemented by a convolutional neural network, or by ResNet50, FPN (Feature Pyramid Networks), etc. The embodiment of the present invention does not make any specific limitation on this.

[0111] By Experts a That is, the characteristics of the image are obtained The selection can be made by combining the model's feature extraction effect and model complexity. Each expert model is responsible for different features of the image, and the number of expert models k can be adjusted according to the task. In addition, in order to calculate the importance of shared expert models for specific tasks, this model introduces a gating mechanism for calculation.

[0112] The gating mechanism in the embodiment of the present invention may be a feed forward neural network (FFN), which calculates the weight W∈R of each expert model. n , n is the number of expert models.

[0113]

[0114] W a =FFN a (T)

[0115] Among them, W a =[w a,a , w a,s ] means through Gate a The weight parameters of different expert models for task a are obtained. Similarly, through Gate b The weight parameters W of different expert models for task b are obtained b =[w b,s , w b,b ], the weight coefficient W of the shared expert model of tasks a and b obtained by Gates s =[w s,a, w s,s , w s,b ], the specific weighted calculation is as follows:

[0116] H a =w a,a C a +w a,s C s

[0117] H s =w s,a C a +w s,s C s +w s,b C b

[0118] H b =w b,b C b +w b,s C s

[0119] Among them, H a represents the fusion features of each expert model for task a, H s represents the fusion features of the shared expert model of tasks a and b, H b Represents the fusion features of each expert model for task b.

[0120] The second layer is mainly responsible for interactive learning of image features. The expert model of the second layer is composed of FFN, and the output is the feature P a , P s , P b Finally, the discriminant network Tower of the two tasks a , Tower b , and obtain the results of each task, namely, the image similarity prediction results and the image completeness prediction results.

[0121] Based on the above embodiment, the image integrity feature extraction branch is specifically used for:

[0122] Extracting an image integrity feature between the poster image and the original poster image, and fusing the image integrity feature and the shared feature based on an integrity gating threshold to determine the image integrity result, wherein the integrity gating threshold is determined based on the poster image and the original poster image;

[0123] The image similarity feature extraction branch is specifically used for:

[0124] The image similarity features between the poster image and the original poster image are extracted, and based on a similarity gating threshold, the image similarity features and the shared features are fused to determine the image similarity result, wherein the similarity gating threshold is determined based on the poster image and the original poster image.

[0125] Specifically, the multi-gated hybrid expert model is an integrated learning technology that is suitable for splitting a complex modeling task into subtasks for processing. Each expert model is responsible for processing a specific subtask, which can improve the task effect without increasing the amount of calculation. Through the gating mechanism, it can be confirmed which specific expert model should be trusted for each subtask to improve the accuracy.

[0126] The image integrity feature extraction branch here is specifically used for:

[0127] The image integrity features between the poster image and the original poster image are extracted, and based on the integrity gating threshold, the image integrity features and the shared features are fused to determine the image integrity result. Here, the integrity gating threshold is determined based on the poster image and the original poster image.

[0128] The image similarity feature extraction branch here is specifically used for:

[0129] The image similarity features between the poster image and the original poster image are extracted, and based on the similarity gating threshold, the image similarity features and the shared features are fused to determine the image similarity result. The similarity gating threshold here is determined based on the poster image and the original poster image.

[0130] Among them, the integrity gate threshold and the similarity gate threshold are derived from the gate model, which is part of the multi-gated hybrid expert model. It receives a single data element as input and then outputs an integrity gate threshold and a similarity gate threshold. The integrity gate threshold and the similarity gate threshold reflect the weights of the poster image integrity task and the poster image similarity task.

[0131] These weights represent the contribution of each expert model to processing the input data. For example, if the model has two experts, the output probabilities may be 0.7 and 0.3, which means that the first expert contributed 70% to processing this data and the second expert 30%.

[0132] Based on the above embodiment, the image integrity feature extraction branch, the image similarity feature extraction branch and the shared feature extraction branch each include multiple expert models, and the multiple expert models are constructed based on any one of a convolutional neural network, a ResNet50 network and a feature pyramid network.

[0133] Specifically, the image integrity feature extraction branch, the image similarity feature extraction branch and the shared feature extraction branch each include multiple expert models, and the multiple expert models here are constructed based on any one of a convolutional neural network, a ResNet50 network and a feature pyramid network.

[0134] Expert models are models that have been specially trained on a specific task and have a high level of expertise. These models usually perform well in a specific field or task and are recognized and trusted in the field.

[0135] The expert model can be a model trained by traditional machine learning methods or a deep learning model. The specific expert model depends on the nature and requirements of the task.

[0136] Here are some common expert models:

[0137] Decision Tree: A decision tree is a classification and regression model based on a tree structure. It can make conditional judgments based on the characteristics of the data and ultimately obtain prediction results.

[0138] Random Forest: Random Forest is an ensemble learning method that makes predictions based on multiple decision trees and obtains the final output by voting or averaging the prediction results.

[0139] Support Vector Machine (SVM): SVM is a classic binary classification model that divides data into different categories by finding the best hyperplane in the feature space.

[0140] Ensemble Model: Ensemble models improve prediction performance by combining multiple base models. Common ensemble methods include Bagging, Boosting, and Stacking.

[0141] Convolutional Neural Network (CNN): CNN is a deep learning model that is often used in image recognition and computer vision tasks. It extracts image features through convolutional layers and pooling layers.

[0142] Recurrent Neural Network (RNN): RNN is a deep learning model suitable for sequence data processing. It processes current input by memorizing previous information and is often used in tasks such as language models and time series analysis.

[0143] Transformer model: The Transformer model is a deep learning model based on the self-attention mechanism, which is used to handle sequence-to-sequence tasks such as machine translation and text generation.

[0144] In the related art, some poster images collected by stores have low pixels and some parts of the poster images are blurred, making it impossible to accurately match the poster image to be detected with the original poster image, or to judge the integrity of the poster image.

[0145] Based on the above embodiment, the step of obtaining the poster image to be detected in step 110 includes:

[0146] Step 111, obtaining the original poster image to be detected;

[0147] Step 112, performing edge detection on the original poster image to be detected, and based on the edge positions obtained by detection, performing edge removal on the original poster image to be detected to obtain an edge-removed image;

[0148] Step 113, performing image transformation on the edge-removed image to obtain an image-transformed poster image;

[0149] Step 114, enhancing the image quality of the image-transformed poster image to obtain the poster image to be detected.

[0150] Specifically, for the poster image to be detected captured by the camera, since issues such as pixels and angles affect the results of tasks such as similarity comparison, the embodiment of the present invention mainly performs preprocessing of the original poster image to be detected through four steps:

[0151] First, an original poster image to be detected is obtained, where the original poster image to be detected refers to a poster image before preprocessing.

[0152] In addition, before edge detection is performed on the original poster image to be detected, poster detection can be performed on the original poster image to be detected. Poster detection is to detect the original poster image to be detected through a target recognition algorithm. The embodiment of the present invention does not directly identify the target poster, but detects whether the original poster image to be detected captured by the camera contains a general poster. The specific recognition and comparison task is handed over to the subsequent similarity comparison model to process, thereby reducing repetitive recognition work.

[0153] Since the detected poster image may contain other content in the recognition area due to angle deviation, etc., edge detection can be performed on the original poster image to be detected, and based on the edge position obtained by detection, the edge of the original poster image to be detected can be removed to obtain an edge-removed image.

[0154] Here, the edge detection of the original poster image to be detected may be performed using a Canny algorithm or a HED (Holistically-Nested Edge Detection) algorithm, etc., which is not specifically limited in the embodiment of the present invention.

[0155] Considering that the poster image has an angle deviation or deformation caused by the viewing angle, the de-edged image is transformed to adjust the size and angle of the poster image to the same data as the original poster image, that is, to obtain an image-transformed poster image, which is convenient for subsequent image similarity and image integrity comparison. Here, the de-edged image can be transformed using an affine transformation or a perspective transformation, which is not specifically limited in the embodiment of the present invention.

[0156] Considering that the pixels of some poster images collected by stores are relatively low, the image quality of the image transformation poster image can be enhanced to obtain the poster image to be detected.

[0157] The method provided by the embodiment of the present invention obtains the original poster image to be detected, performs edge detection on the original poster image to be detected, removes the edges of the original poster image to be detected based on the edge positions obtained by detection to obtain an edge-removed image, then performs image transformation on the edge-removed image to obtain an image-transformed poster image, and finally, performs image quality enhancement on the image-transformed poster image to obtain the poster image to be detected, which not only improves the resolution of the poster image to be detected, but also facilitates subsequent image similarity and image integrity comparisons, thereby improving the accuracy and reliability of image similarity tasks and image integrity tasks.

[0158] Based on the above embodiment, step 114 includes:

[0159] The image-transformed poster image is enhanced using a high-resolution generative adversarial network to obtain the poster image to be detected.

[0160] Specifically, a Super Resolution Generative Adversarial Network (SRGAN) can be used to enhance the image quality of the image transformation poster image to obtain a poster image to be detected.

[0161] Thus, the low-resolution poster image is enhanced to obtain a high-resolution poster image to be detected, thereby improving the resolution of the poster image.

[0162] The poster standardization detection device provided by the present invention is described below. The poster standardization detection device described below and the poster standardization detection method described above can be referred to each other.

[0163] Based on any of the above embodiments, the present invention provides a poster standardization detection device, Figure 4 : is a schematic diagram of the structure of the poster standardization detection device provided by the present invention, such as Figure 4 As shown, the device comprises:

[0164] The acquisition unit 410 is used to acquire the poster image to be detected, as well as the original poster image and the original poster text;

[0165] An input unit 420, configured to input the poster image and the original poster image into a multi-gated hybrid expert model, and obtain an image integrity result and an image similarity result of the poster image output by the multi-gated hybrid expert model;

[0166] The text recognition unit 430 is used to perform text recognition on the poster image to obtain a text recognition result, and determine a text similarity result based on the text recognition result and the original text of the poster;

[0167] The unit 440 for determining the normativeness detection result is used to determine the normativeness detection result of the poster image based on the image integrity result, the image similarity result and the text similarity result.

[0168] The device provided by the embodiment of the present invention inputs the poster image and the original poster image into the multi-gated hybrid expert model, obtains the image integrity result and image similarity result of the poster image output by the multi-gated hybrid expert model, performs text recognition on the poster image to obtain the text recognition result, and determines the text similarity result based on the text recognition result and the original poster text. Finally, based on the image integrity result, the image similarity result and the text similarity result, the standardization detection result of the poster image is determined. On the one hand, multi-task learning is introduced into the poster standardization detection, the two tasks of poster similarity and poster integrity are combined, and the learning and feature sharing of different tasks are carried out through the hybrid expert model and the gate mechanism to improve the learning efficiency of the model, and the poster text recognition is introduced into the poster standardization detection, the original poster text is effectively used to improve the recognition accuracy, and the model parallelization is used to effectively control the time complexity of the model; on the other hand, there is no need to pre-train the occlusion segmentation model, and the poster similarity, poster integrity and text similarity are judged at the same time through the multi-task learning model, which simplifies the task recognition and integrity judgment process, improves the operation efficiency of the model, and further realizes intelligent poster supervision.

[0169] Based on any of the above embodiments, it further includes a training unit, wherein the training unit is specifically used for:

[0170] Determine an initial multi-gated hybrid expert model, and obtain poster sample image pairs, image integrity labels and image similarity labels of the poster sample image pairs;

[0171] Inputting the poster sample image pair into the initial multi-gated hybrid expert model to obtain an image integrity prediction result and an image similarity prediction result output by the initial multi-gated hybrid expert model;

[0172] Based on the difference between the image integrity prediction result and the image integrity label, and the difference between the image similarity prediction result and the image similarity label, a total loss is determined, and based on the total loss, parameters of the initial multi-gated hybrid expert model are iterated to obtain the multi-gated hybrid expert model.

[0173] Based on any of the above embodiments, the multi-gated hybrid expert model includes an image integrity feature extraction branch, an image similarity feature extraction branch and a shared feature extraction branch;

[0174] The shared feature extraction branch is used to extract shared features between the poster image and the original poster image;

[0175] The image integrity feature extraction branch is used to extract the image integrity feature between the poster image and the original poster image, and determine the image integrity result based on the image integrity feature and the shared feature;

[0176] The image similarity feature extraction branch is used to extract the image similarity features between the poster image and the original poster image, and determine the image similarity result based on the image similarity features and the shared features.

[0177] Based on any of the above embodiments, the image integrity feature extraction branch is specifically used for:

[0178] Extracting an image integrity feature between the poster image and the original poster image, and fusing the image integrity feature and the shared feature based on an integrity gating threshold to determine the image integrity result, wherein the integrity gating threshold is determined based on the poster image and the original poster image;

[0179] The image similarity feature extraction branch is specifically used for:

[0180] The image similarity features between the poster image and the original poster image are extracted, and based on a similarity gating threshold, the image similarity features and the shared features are fused to determine the image similarity result, wherein the similarity gating threshold is determined based on the poster image and the original poster image.

[0181] Based on any of the above embodiments, the image integrity feature extraction branch, the image similarity feature extraction branch and the shared feature extraction branch each include multiple expert models, and the multiple expert models are constructed based on any one of a convolutional neural network, a ResNet50 network and a feature pyramid network.

[0182] Based on any of the above embodiments, the acquiring unit 410 is specifically used for:

[0183] An original image acquisition unit is used to acquire an original poster image to be detected;

[0184] An edge detection unit is used to perform edge detection on the original poster image to be detected, and based on the edge position obtained by detection, remove the edge of the original poster image to be detected to obtain an edge-removed image;

[0185] An image transformation unit, used for performing image transformation on the edge-removed image to obtain an image transformation poster image;

[0186] The image quality enhancement unit is used to enhance the image quality of the image-transformed poster image to obtain the poster image to be detected.

[0187] Based on any of the above embodiments, the image quality enhancement unit is specifically used for:

[0188] The image-transformed poster image is enhanced using a high-resolution generative adversarial network to obtain the poster image to be detected.

[0189] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the poster standardization detection method, which includes: obtaining a poster image to be detected, as well as an original poster image and original poster text; inputting the poster image and the original poster image into a multi-gated hybrid expert model to obtain an image integrity result and an image similarity result of the poster image output by the multi-gated hybrid expert model; performing text recognition on the poster image to obtain a text recognition result, and determining a text similarity result based on the text recognition result and the original poster text; and determining a standardization detection result of the poster image based on the image integrity result, the image similarity result and the text similarity result.

[0190] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0191] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the poster standardization detection method provided by the above-mentioned methods, which method includes: obtaining a poster image to be detected, as well as an original poster image and original poster text; inputting the poster image and the original poster image into a multi-gated hybrid expert model to obtain an image integrity result and an image similarity result of the poster image output by the multi-gated hybrid expert model; performing text recognition on the poster image to obtain a text recognition result, and determining a text similarity result based on the text recognition result and the original poster text; and determining a standardization detection result of the poster image based on the image integrity result, the image similarity result and the text similarity result.

[0192] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the poster standardization detection method provided by the above-mentioned methods, the method comprising: obtaining a poster image to be detected, as well as an original poster image and original poster text; inputting the poster image and the original poster image into a multi-gated hybrid expert model to obtain an image integrity result and an image similarity result of the poster image output by the multi-gated hybrid expert model; performing text recognition on the poster image to obtain a text recognition result, and determining a text similarity result based on the text recognition result and the original poster text; and determining a standardization detection result of the poster image based on the image integrity result, the image similarity result and the text similarity result.

[0193] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0194] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0195] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A poster standardization detection method, characterized in that: include: Obtain the poster image to be detected, as well as the original poster image and original poster text; Inputting the poster image and the original poster image into a multi-gated hybrid expert model, and obtaining an image integrity result and an image similarity result of the poster image output by the multi-gated hybrid expert model; Performing text recognition on the poster image to obtain a text recognition result, and determining a text similarity result based on the text recognition result and the original text of the poster; Based on the image integrity result, the image similarity result and the text similarity result, a normativeness detection result of the poster image is determined.

2. The poster standardization detection method according to claim 1 is characterized in that: The training steps of the multi-gated hybrid expert model include: Determine an initial multi-gated hybrid expert model, and obtain poster sample image pairs, image integrity labels and image similarity labels of the poster sample image pairs; Inputting the poster sample image pair into the initial multi-gated hybrid expert model to obtain an image integrity prediction result and an image similarity prediction result output by the initial multi-gated hybrid expert model; Based on the difference between the image integrity prediction result and the image integrity label, and the difference between the image similarity prediction result and the image similarity label, a total loss is determined, and based on the total loss, parameters of the initial multi-gated hybrid expert model are iterated to obtain the multi-gated hybrid expert model.

3. The poster standardization detection method according to claim 1 is characterized in that: The multi-gated hybrid expert model includes an image integrity feature extraction branch, an image similarity feature extraction branch and a shared feature extraction branch; The shared feature extraction branch is used to extract shared features between the poster image and the original poster image; The image integrity feature extraction branch is used to extract the image integrity feature between the poster image and the original poster image, and determine the image integrity result based on the image integrity feature and the shared feature; The image similarity feature extraction branch is used to extract the image similarity features between the poster image and the original poster image, and determine the image similarity result based on the image similarity features and the shared features.

4. The poster standardization detection method according to claim 3 is characterized in that: The image integrity feature extraction branch is specifically used for: Extracting an image integrity feature between the poster image and the original poster image, and fusing the image integrity feature and the shared feature based on an integrity gating threshold to determine the image integrity result, wherein the integrity gating threshold is determined based on the poster image and the original poster image; The image similarity feature extraction branch is specifically used for: The image similarity features between the poster image and the original poster image are extracted, and based on a similarity gating threshold, the image similarity features and the shared features are fused to determine the image similarity result, wherein the similarity gating threshold is determined based on the poster image and the original poster image.

5. The poster standardization detection method according to claim 3 is characterized in that: The image integrity feature extraction branch, the image similarity feature extraction branch and the shared feature extraction branch each include multiple expert models, and the multiple expert models are constructed based on any one of a convolutional neural network, a ResNet50 network and a feature pyramid network.

6. The poster standardization detection method according to any one of claims 1 to 5, characterized in that: The step of obtaining a poster image to be detected includes: Get the original poster image to be detected; Performing edge detection on the original poster image to be detected, and based on the edge positions obtained by detection, performing edge removal on the original poster image to be detected to obtain an edge-removed image; Performing image transformation on the edge-removed image to obtain an image transformation poster image; The image quality of the image-transformed poster image is enhanced to obtain the poster image to be detected.

7. The poster standardization detection method according to claim 6 is characterized in that: The step of enhancing the image quality of the image-converted poster image to obtain the poster image to be detected includes: The image-transformed poster image is enhanced using a high-resolution generative adversarial network to obtain the poster image to be detected.

8. A poster standardization detection device, characterized in that: include: An acquisition unit, used for acquiring a poster image to be detected, as well as an original poster image and original poster text; An input unit, used for inputting the poster image and the original poster image into a multi-gated hybrid expert model, and obtaining an image integrity result and an image similarity result of the poster image output by the multi-gated hybrid expert model; A text recognition unit, used to perform text recognition on the poster image to obtain a text recognition result, and determine a text similarity result based on the text recognition result and the original text of the poster; The unit for determining the normative detection result is used to determine the normative detection result of the poster image based on the image integrity result, the image similarity result and the text similarity result.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the poster standardization detection method as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the poster standardization detection method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Signboard photo auditing method and device, electronic equipment and readable storage medium

    CN112257709A

  • Retail terminal poster identification and integrity judgment method and system and storage medium

    CN113469216A

  • Target detection method and device based on multi-gating hybrid expert model

    CN114120045A

  • Object circling model training method and device, equipment and storage medium

    CN114997311A