Advertisement picture generation method, device and storage medium

The target image in the main image of the product on the e-commerce website is extracted through the target detection network model and the mask image is synthesized. This solves the problem of a single form of advertising images in the existing technology, realizes the diverse generation of advertising images, and improves the quality of the product. Click-through rate and conversion rate.

CN110827373BActive Publication Date: 2024-09-20BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN201810916001.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-08-13
Publication Date
2024-09-20
Estimated Expiration
2038-08-13

AI Technical Summary

Technical Problem

Existing e-commerce website advertising image generation technology relies on manually maintained template libraries, resulting in a single form of advertising images that cannot meet the diverse needs of each page update, reducing the click-through rate and conversion rate of products.

Method used

Use a target detection network model (such as the convolutional neural network model of the Faster RCNN algorithm) to extract the target image from the input detection image, generate an advertising display image, and generate an advertising image through mask image synthesis to ensure that the advertising image matches the appearance of the advertising template match.

Benefits of technology

It realizes the diversified generation of advertising images, improves the click-through rate and conversion rate of products, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110827373B
    Figure CN110827373B
Patent Text Reader

Abstract

The present disclosure provides a method, device and storage medium for generating an advertising image, and relates to the field of Internet technology, wherein the method comprises: using a target detection network model to determine the category information and location information of a target in an input detection image, and generating an advertising display image according to the target image; processing the advertising display image according to an advertising template, obtaining the main color features of the detection image, and generating a mask image based on the main color features and a preset mask style; synthesizing the advertising display image and the mask image to generate an advertising image. The method, device and storage medium disclosed in the present disclosure can realize the generation of advertising images based on the main image of the product, achieve the effect of advertising diversity, greatly improve the click-through rate and conversion rate of the product, and enhance the user experience; improve the user's perception and enhance competitiveness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet technology, and in particular to an advertisement picture generation method, device and storage medium. Background Art

[0002] E-commerce websites have a large number of product advertisements that need to be played externally every day. Advertising pictures of products can be played on the web pages of e-commerce websites, which can not only directly attract the attention of users, but also have a high product click-through rate and conversion rate. Usually, advertising pictures are designed by art designers. Based on a limited template library, the main picture of the product is pasted to a specific template, thereby realizing the automatic generation of advertising pictures. For example, the focus banner of the homepage is the most important advertising position. The number of templates for generating banner ads based on templates depends entirely on the size of the template library. Maintaining a massive template library requires a lot of manpower and financial resources. The changes in advertising pictures will be within a few fixed modes, or will not change. Therefore, the form of advertising pictures cannot meet the replacement of each person every time the page is updated, and the effect of thousands of faces cannot be fully achieved, which reduces the overall product click-through rate and conversion rate. Therefore, a new technical solution for generating advertising pictures is needed. Summary of the invention

[0003] In view of this, a technical problem to be solved by the present disclosure is to provide a method, device and storage medium for generating an advertisement image.

[0004] According to one aspect of the present disclosure, there is provided a method for generating an advertising image, comprising: determining the category information and position information of a target in an input detection image by using a target detection network model; extracting a target image from the detection image based on a preset target selection rule and according to the category information and the position information, and generating an advertising display image according to the target image; processing the advertising display image according to an advertising template so that the appearance of the advertising display image matches the appearance of the advertising template; obtaining the main color features of the detection image, and generating a mask image based on the main color features and a preset mask style; and synthesizing the advertising display image with the mask image to generate an advertising image.

[0005] Optionally, the target detection network model is a convolutional neural network model based on the Faster RCNN algorithm; the method also includes: obtaining a sample image containing the target; obtaining the position information, image, and classification information of the target in the sample image; constructing a convolutional neural network model based on the Faster RCNN algorithm, and performing detection training on the convolutional neural network model based on the sample image and the position information, image, and classification information of the target to obtain the target detection network model.

[0006] Optionally, determining the category information and location information of the target in the input detection image includes: using the convolutional neural network of the target detection network model to extract convolutional features of the detection image from the detection image; using the RPN network of the target detection network model to extract candidate areas where the target exists from the detection image; for the candidate areas, using the ROIpooling layer of the target detection network model to extract feature vectors from the convolutional feature map of the detection image, sending the feature vector of each candidate area to a classifier for classification, judging the type of the target, and determining the coordinates of the rectangular area containing the target.

[0007] Optionally, the convolutional neural network includes ResNet; wherein, the ResNet includes: ResNet-50, and ResNet-50 includes a convolutional layer conv4_x.

[0008] Optionally, generating the advertising display image according to the target image includes: splicing multiple target images into the advertising display image; processing the advertising display image according to the advertising template includes: determining the stretching direction and the final appearance of the advertising display image based on the appearance characteristics of the advertising template; performing image interpolation processing in the stretching direction using a bilinear interpolation algorithm to adjust the appearance of the advertising display image to the final appearance.

[0009] Optionally, median filtering is performed on the pixels in the stretched advertisement display image to obtain the blurred advertisement display image.

[0010] Optionally, obtaining the main color feature of the detection image includes: converting the RGB color space of the pixel points of the detection image into the HSV color space; calculating the saturation value corresponding to the pixel points in the detection image, wherein if it is determined that the saturation value is less than or equal to the saturation threshold, retaining this pixel point; counting the number of pixel points with the same saturation value, obtaining the saturation value with the most pixels, and determining the pixel point color feature corresponding to this saturation value as the main color feature.

[0011] Optionally, the synthesizing process of the advertisement display image and the mask image includes: placing the mask image on the blurred advertisement display image and adding graphic elements; wherein the graphic elements include: a search box, a message box, a signal sign, and text.

[0012] According to another aspect of the present disclosure, there is provided an advertising picture generating device, comprising: an image target detection module, for determining the category information and position information of the target in an input detection image by using a target detection network model; a display image generating module, for extracting the target image from the detection image based on a preset target selection rule and according to the category information and the position information, and generating an advertising display image according to the target image; an image shape processing module, for processing the advertising display image according to an advertising template so that the shape of the advertising display image matches the shape of the advertising template; a mask image generating module, for obtaining the main color features of the detection image, and generating a mask image based on the main color features and a preset mask style; and an image synthesis processing module, for synthesizing the advertising display image with the mask image to generate an advertising picture.

[0013] Optionally, the target detection network model is a convolutional neural network model based on the Faster RCNN algorithm; it also includes: a detection model generation module, used to obtain a sample image containing the target; obtain the position information, image, and classification information of the target in the sample image; construct a convolutional neural network model based on the Faster RCNN algorithm, and perform detection training on the convolutional neural network model based on the sample image and the position information, image, and classification information of the target to obtain the target detection network model.

[0014] Optionally, the image target detection module is used to extract convolution features of the detection image from the detection image using the convolutional neural network of the target detection network model; extract candidate areas where the target exists from the detection image using the RPN network of the target detection network model; for the candidate areas, extract feature vectors from the convolutional feature map of the detection image using the ROIpooling layer of the target detection network model, send the feature vector of each candidate area to a classifier for classification, judge the type of the target, and determine the coordinates of the rectangular area containing the target.

[0015] Optionally, the convolutional neural network includes ResNet; wherein, the ResNet includes: ResNet-50, and ResNet-50 includes a convolutional layer conv4_x.

[0016] Optionally, the display image generation module is used to stitch multiple target images into the advertising display image; the image shape processing module is used to determine the stretching direction and final shape of the advertising display image based on the shape characteristics of the advertising template; and a bilinear interpolation algorithm is used to perform image interpolation processing in the stretching direction to adjust the shape of the advertising display image to the final shape.

[0017] Optionally, the image shape processing module is used to perform median filtering on the pixels in the stretched advertisement display image to obtain the blurred advertisement display image.

[0018] Optionally, the mask image generation module is used to convert the RGB color space of the pixel points of the detection image into the HSV color space; calculate the saturation value corresponding to the pixel point in the detection image, wherein if it is determined that the saturation value is less than or equal to the saturation threshold, the pixel point is retained; count the number of pixel points with the same saturation value, obtain the saturation value with the most pixels, and determine the pixel point color feature corresponding to this saturation value as the main color feature.

[0019] Optionally, the image synthesis processing module is used to place the mask image on the blurred advertisement display image and add graphic elements; wherein the graphic elements include: a search box, a message box, a signal sign, and text.

[0020] According to another aspect of the present disclosure, there is provided an advertising picture generating device, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the above method based on instructions stored in the memory.

[0021] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the instructions are executed by a processor to perform the above method.

[0022] The advertising image generation method, device and storage medium disclosed in the present invention extract a target image from a main image of a product based on deep learning technology, generate an advertising display image according to the target image, generate a mask image, synthesize the advertising display image and the mask image, and generate an advertisement; advertising image generation can be achieved based on the main image of the product, achieving the effect of advertising diversity, greatly improving the click-through rate and conversion rate of the product, and enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1 A schematic diagram of a flow chart of an embodiment of a method for generating an advertisement image according to the present disclosure;

[0025] Figure 2A schematic diagram of a process of training a target detection network model in one embodiment of the method for generating an advertisement image according to the present disclosure;

[0026] Figure 3 This is a schematic diagram of the Faster-RCNN algorithm structure;

[0027] Figure 4 A schematic diagram of a process of determining a target in an embodiment of the method for generating an advertisement image according to the present disclosure;

[0028] Figure 5 Schematic diagram of the ResNet (Residual Network) hierarchical structure.

[0029] Figure 6 This is a schematic diagram of a process of stretching the image in one embodiment of the method for generating an advertisement image according to the present disclosure;

[0030] Figure 7 A schematic diagram of stretching the image

[0031] Figure 8 This is a schematic diagram of a process of determining a theme color in one embodiment of the method for generating an advertisement image according to the present disclosure;

[0032] Fig. 9 A schematic diagram of synthesis with a mask image;

[0033] Fig.10 A schematic diagram of the generated advertising image;

[0034] Fig.11 It is a module schematic diagram of an embodiment of an advertisement picture generating device according to the present disclosure;

[0035] Fig.12 It is a module diagram of another embodiment of the advertising picture generating device according to the present disclosure;

[0036] Fig.13 This is a module diagram of another embodiment of the advertising picture generating device according to the present disclosure. DETAILED DESCRIPTION

[0037] The present disclosure is described more fully below with reference to the accompanying drawings, in which exemplary embodiments of the present disclosure are described. The technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure. The technical solutions of the present disclosure are described in many aspects below in conjunction with various figures and embodiments.

[0038] Figure 1 FIG. 1 is a flow chart of an embodiment of a method for generating an advertisement image according to the present disclosure. Figure 1 As shown:

[0039] Step 101, using the target detection network model to determine the category information and location information of the target in the input detection image.

[0040] The target detection network model can be a variety of neural network-based models. The input detection image can be the main image data of the product, such as the product image in the web page, etc. The target can be the product in the image, and the product in the image can be a bag, shoes, clothes, watches, etc.

[0041] Step 102 : extracting a target image from the detection image based on a preset target selection rule and according to the category information and the position information, and generating an advertisement display image according to the target image.

[0042] For example, there may be multiple target selection rules, such as setting the selected categories to be bags, shoes and other commodities, etc. The images of the commodities such as bags and shoes are extracted from the detection images, and the advertisement display images are generated according to the images of the commodities such as bags and shoes.

[0043] Step 103: Process the advertisement display image according to the advertisement template so that the appearance of the advertisement display image matches the appearance of the advertisement template.

[0044] Step 104, obtaining the main body color features of the detection image, and generating a mask image based on the main body color features and a preset mask style.

[0045] Step 105 , synthesizing the advertisement display image and the mask image to generate an advertisement picture, which may be a banner advertisement picture or the like.

[0046] In one embodiment, the target detection network model may be a convolutional neural network model based on the Faster RCNN (Faster Region Convolutional Neural Networks) algorithm. The target detection network model can accurately detect the location of e-commerce products that appear in the main product image, such as bags, shoes, clothes, watches, etc. that may appear in the main product image. The target detection network model uses the Faster-RCNN algorithm.

[0047] Figure 2 FIG. 1 is a flow chart of training a target detection network model in an embodiment of the method for generating an advertisement image according to the present disclosure. Figure 2 As shown:

[0048] Step 201, obtain a sample image containing a target. For example, the sample image may be a main image of a product of an e-commerce company.

[0049] Step 202, obtain the location information, image, and classification information of the target in the sample image. For example, obtain the location information, image, and classification information of bags, shoes, clothes, watches, etc. in the main product image, perform manual annotation, and use them as training data sets.

[0050] Step 203, construct a convolutional neural network model based on the Faster RCNN algorithm, perform detection training on the convolutional neural network model based on the sample image and the location information, image, and classification information of the target, and obtain a target detection network model.

[0051] For the target detection network model, the stochastic gradient descent method can be used to update the model parameters and complete the model training. Use the test data set to test the trained Faster-RCNN model to obtain its accuracy. According to the accuracy, it is determined whether to add data and change the training parameters to continue training the model. For the Faster-RCNN model, the specific steps of the algorithm are as follows: Figure 3 shown.

[0052] Figure 4 FIG. 1 is a flow chart of determining a target in an embodiment of the method for generating an advertisement image according to the present disclosure, such as Figure 4 As shown:

[0053] Step 301: Use the convolutional neural network of the target detection network model to extract convolution features of the detection image from the detection image.

[0054] Step 302: Use the RPN (Region Proposal Network) network of the target detection network model to extract candidate regions where targets exist from the detection image. The RPN network is a fully connected network, and an existing RPN network can be used.

[0055] Step 303, for the candidate regions, the ROIpooling (Region of Interest Pooling) layer of the target detection network model is used to extract feature vectors from the convolutional feature map of the detection image, and the feature vectors of each candidate region are sent to the classifier for classification, the type of the target is determined, and the coordinates of the rectangular region containing the target are determined.

[0056] In one embodiment, the convolutional neural network of the target detection network model extracts high-dimensional abstract features of the input image, and learns the object pre-selection box based on the features. The pre-selection box generated can then be input into a classifier for classification processing. Faster-RCNN learns the object pre-selection box through the object features extracted by the convolutional neural network, which greatly improves the speed and accuracy of generating the pre-selection box.

[0057] The feature extraction implemented by the conv layer of the target detection network model is composed of multiple layers of convolutional neural networks. The deeper the network, the more abstract the feature expression that can be extracted. Convolutional neural networks include ResNet, and the modified ResNet model can be used as the feature expression of the original input image. Figure 5 As shown in the figure, ResNet-50 is used as the feature extraction module of Faster-RCNN. It performs multi-layer feature extraction from shallow to deep on the processed image, which can extract multiple features of the image from concrete to abstract, and improve the accuracy. ResNet includes: ResNet-50, ResNet-50 includes convolutional layer conv4_x, and conv4_x output is used as follows Figure 3 The feature map in .

[0058] Figure 6 FIG. 1 is a flow chart of stretching an image in one embodiment of the method for generating an advertisement image according to the present disclosure. Figure 6 As shown:

[0059] Step 401: splice multiple target images into an advertisement display image.

[0060] Step 402: Determine the stretching direction and final appearance of the advertisement display image based on the appearance characteristics of the advertisement template.

[0061] Step 403, a bilinear interpolation algorithm is used to perform image interpolation processing in the stretching direction, and the shape of the advertising display image is adjusted to the final shape. Bilinear interpolation is also called bilinear interpolation, which performs linear interpolation once in two directions. The image can be stretched using the existing bilinear interpolation. The pixels in the stretched advertising display image are subjected to median filtering processing to obtain a blurred advertising display image.

[0062] Image stretching is to stretch the ad display image to the size of the ad template. The background outside the object area in the ad display image is stretched, rather than the entire ad display image. The stretched image needs to have the background blurred. Figure 7 As shown, the target detection network model detects that the image contains two product images, and the bounding boxes of the two product images (area A and area B) are merged to form a large area C. The area outside area C can be considered as the background of the advertising display image.

[0063] Get the ad template, place the ad display image in the lower left corner of the ad template, and stretch the top and right background areas of the ad display image to the size of the ad template. Figure 7 The black short line area on the top and right of the image is stretched, and the stretched area is shown as the black long line. The bilinear interpolation algorithm is used to interpolate the image in the stretching direction and stretch it to the size of the advertisement template. The stretched part will appear blurred, and the median filter is used to blur the image and slow down the stretching effect. The window size of the median filter can be 5, etc.

[0064] In one embodiment, the mask is a background decoration that can be matched with the product to produce a better visual effect. The style of the mask is set, and the mask style can be a trapezoid, etc. The mask adopts an adaptive generation method, selects the main color according to the input image, and then synthesizes it with the output of the image stretching module to generate an advertising image.

[0065] Figure 8 FIG. 1 is a flow chart of determining a theme color in an embodiment of the method for generating an advertisement image according to the present disclosure. Figure 8 As shown:

[0066] Step 501: convert the RGB color space of the pixels of the detection image into the HSV color space.

[0067] Step 502, calculating the saturation value corresponding to the pixel point in the detection image, wherein if it is determined that the saturation value is less than or equal to the saturation threshold, the pixel point is retained.

[0068] Step 503, counting the number of pixels with the same saturation value, obtaining the pixel with the most saturation values, and determining the pixel color feature corresponding to the saturation value as the main color feature.

[0069] Convert the RGB of each pixel of the main image to HSV, and calculate the saturation Y for each pixel. There are many calculation methods that can be used. For example, the calculation formula is:

[0070] Y=min(abs(r*2104+g*4130+b*802+4096+131072)>>13,235), where min is the minimum value and abs is the absolute value; r, j, b are the color values ​​of the red, green and blue channels, 2104, 4130, 802 are color setting values, and 4096 and 131072 are setting values.

[0071] Determine whether the value of y is greater than 0.9. If it is greater than 0.9, ignore it (consider it a highlight color). If it is less than 0.9, count the number of pixels with the same saturation value. For example, if the saturation value with the most pixels is 0.7, the color feature of the pixel corresponding to the saturation value 0.7 is determined as the main color feature.

[0072] Generate a mask of a specific style based on the subject color, and synthesize the advertisement display image with the mask image, such as Fig. 9 As shown. Place the mask image on the blurred advertising display image and add graphic elements, including search boxes, message boxes, signal signs, text, etc., to output the final advertising image. Fig.10 A banner advertisement generated according to the method disclosed herein.

[0073] In one embodiment, Fig.11 As shown, the present disclosure provides an advertising picture generating device 110, comprising: an image target detection module 111, a display image generating module 112, an image shape processing module 113, a mask image generating module 114 and an image synthesis processing module 115. The image target detection module 111 uses a target detection network model to determine the category information and position information of the target in the input detection image. The display image generating module 112 extracts the target image from the detection image based on the preset target selection rule and the category information and the position information, and generates an advertising display image based on the target image.

[0074] The image shape processing module 113 processes the advertisement display image according to the advertisement template so that the shape of the advertisement display image matches the shape of the advertisement template. The mask image generation module 114 obtains the main color features of the detection image and generates a mask image based on the main color features and a preset mask style. The image synthesis processing module 115 synthesizes the advertisement display image and the mask image to generate an advertisement picture.

[0075] like Fig.12 As shown, the advertising image generating device 110 includes: a detection model generating module 116. The target detection network model is a convolutional neural network model based on the Faster RCNN algorithm. The detection model generating module 116 obtains a sample image containing a target, and obtains the position information, image, and classification information of the target in the sample image. The detection model generating module 116 constructs a convolutional neural network model based on the Faster RCNN algorithm, performs detection training on the convolutional neural network model based on the sample image and the position information, image, and classification information of the target, and obtains the target detection network model.

[0076] In one embodiment, the image target detection module 111 uses the convolutional neural network of the target detection network model to extract the convolutional features of the detection image from the detection image. The image target detection module 111 uses the RPN network of the target detection network model to extract candidate areas where targets exist from the detection image. For the candidate areas, the image target detection module 111 uses the ROIpooling layer of the target detection network model to extract feature vectors from the convolutional feature map of the detection image, sends the feature vectors of each candidate area to the classifier for classification, determines the type of the target, and determines the coordinates of the rectangular area containing the target. The convolutional neural network includes ResNet, and ResNet includes: ResNet-50, and ResNet-50 includes the convolutional layer conv4_x.

[0077] The display image generation module 112 splices multiple target images into an advertisement display image. The image shape processing module 113 determines the stretching direction and final shape of the advertisement display image based on the shape features of the advertisement template. The image shape processing module 113 uses a bilinear interpolation algorithm to perform image interpolation processing in the stretching direction to adjust the shape of the advertisement display image to the final shape. The image shape processing module 113 performs median filtering on the pixels in the stretched advertisement display image to obtain a blurred advertisement display image.

[0078] In one embodiment, the mask image generation module 114 converts the RGB color space of the pixel points of the detection image into the HSV color space. The mask image generation module 114 calculates the saturation value corresponding to the pixel point in the detection image, wherein if it is determined that the saturation value is less than or equal to the saturation threshold, the pixel point is retained. The mask image generation module 114 counts the number of pixels with the same saturation value, obtains the saturation value with the most pixels, and determines the color feature of the pixel point corresponding to this saturation value as the main color feature. The image synthesis processing module 115 places the mask image on the blurred advertising display image and adds graphic elements; wherein the graphic elements include: search box, message box, signal sign, copy, etc.

[0079] Fig.13 FIG. 1 is a module diagram of another embodiment of the advertising image generating device according to the present disclosure. Fig.13 As shown, the device may include a memory 131, a processor 132, a communication interface 133 and a bus 134. The memory 131 is used to store instructions, the processor 132 is coupled to the memory 131, and the processor 132 is configured to execute the above-mentioned advertisement image generation method based on the instructions stored in the memory 131.

[0080] The memory 131 may be a high-speed RAM memory, a non-volatile memory, etc. The memory 131 may also be a memory array. The memory 131 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules. The processor 132 may be a central processing unit CPU, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the advertising image generation method disclosed in the present invention.

[0081] In one embodiment, the present disclosure provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the method for generating an advertisement image in any of the above embodiments.

[0082] The advertising image generation method, device and storage medium in the above-mentioned embodiments extract the target image from the main image of the product based on deep learning technology, generate an advertising display image according to the target image, generate a mask image, synthesize the advertising display image and the mask image, and generate an advertisement; based on the main image of the product, the homepage focus advertising image can be generated, and the effect of advertising with different faces for different people can be achieved, which greatly improves the click-through rate and conversion rate of the product, increases revenue, and enhances the user experience.

[0083] The method and system of the present disclosure may be implemented in many ways. For example, the method and system of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0084] The description of the present disclosure is given for the purpose of illustration and description, and is not intended to be exhaustive or to limit the present disclosure to the disclosed form. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present disclosure, and to enable those of ordinary skill in the art to understand the present disclosure and thereby design various embodiments with various modifications suitable for specific uses.

Claims

1. A method for generating an advertising image, comprising: Using the target detection network model to determine the category information and location information of the target in the input detection image; Extracting a target image from the detection image based on a preset target selection rule and according to the category information and the location information, and generating an advertisement display image according to the target image; Processing the advertisement display image according to the advertisement template so that the appearance of the advertisement display image matches the appearance of the advertisement template; Obtaining a main body color feature of the detection image, and generating a mask image based on the main body color feature and a preset mask style; The RGB color space of the pixel points of the detection image is converted to the HSV color space; the saturation value corresponding to the pixel point in the detection image is calculated, and if it is determined that the saturation value is less than or equal to the saturation threshold, the pixel point is retained; the number of pixel points with the same saturation value is counted to obtain the saturation value with the most pixel points, and the color feature of the pixel point corresponding to the saturation value is determined as the main color feature; Combining the advertisement display image with the mask image to generate an advertisement picture; The mask image is placed on the blurred advertisement display image and graphic elements are added, wherein the graphic elements include: a search box, a message box, a signal sign, and text.

2. The method according to claim 1, wherein the target detection network model is a convolutional neural network model based on the Faster RCNN algorithm; the method further comprises: obtaining a sample image containing the target; Obtaining location information, image, and classification information of the target in the sample image; A convolutional neural network model based on the Faster RCNN algorithm is constructed, and detection training is performed on the convolutional neural network model based on the sample image and the location information, image, and classification information of the target to obtain the target detection network model.

3. The method according to claim 2, wherein determining the category information and location information of the target in the input detection image comprises: Extracting convolution features of the detection image from the detection image using the convolutional neural network of the target detection network model; Extracting a candidate area where the target exists from a detection image using the RPN network of the target detection network model; For the candidate area, the ROIpooling layer of the target detection network model is used to extract feature vectors from the convolutional feature map of the detection image, and the feature vectors of each candidate area are sent to the classifier for classification to determine the type of the target and determine the coordinates of the rectangular area containing the target.

4. The method of claim 3, wherein: The convolutional neural network includes ResNet; wherein the ResNet includes: ResNet-50, and ResNet-50 includes a convolutional layer conv4_x.

5. The method according to claim 3, wherein generating an advertisement display image according to the target image comprises: splicing a plurality of the target images into the advertisement display image; The processing of the advertisement display image according to the advertisement template comprises: Determining the stretching direction and final shape of the advertisement display image based on the shape characteristics of the advertisement template; A bilinear interpolation algorithm is used to perform image interpolation processing in the stretching direction to adjust the appearance of the advertisement display image to the final appearance.

6. The method of claim 5, further comprising: A median filter process is performed on the pixels in the stretched advertisement display image to obtain the blurred advertisement display image.

7. An advertising picture generating device, comprising: An image object detection module is used to determine the category information and location information of the object in the input detection image using the object detection network model; A display image generation module, configured to extract a target image from the detection image based on a preset target selection rule and according to the category information and the position information, and generate an advertisement display image according to the target image; An image shape processing module, used to process the advertisement display image according to the advertisement template so that the shape of the advertisement display image matches the shape of the advertisement template; A mask image generation module, used for obtaining the main color features of the detection image, and generating a mask image based on the main color features and a preset mask style; The mask image generation module is used to convert the RGB color space of the pixel points of the detection image into the HSV color space; calculate the saturation value corresponding to the pixel points in the detection image, wherein if it is determined that the saturation value is less than or equal to the saturation threshold, the pixel point is retained; count the number of pixel points with the same saturation value, obtain the saturation value with the most pixels, and determine the pixel point color feature corresponding to the saturation value as the main color feature; An image synthesis processing module, used for synthesizing the advertisement display image and the mask image to generate an advertisement picture; The image synthesis processing module is used to place the mask image on the blurred advertisement display image and add graphic elements, wherein the graphic elements include: a search box, a message box, a signal sign, and text.

8. The device according to claim 7, wherein the target detection network model is a convolutional neural network model based on the Faster RCNN algorithm; and further comprising: A detection model generation module, used to obtain a sample image containing the target; Obtain the location information, image, and classification information of the target in the sample image; construct a convolutional neural network model based on the Faster RCNN algorithm, and perform detection training on the convolutional neural network model based on the sample image and the location information, image, and classification information of the target to obtain the target detection network model.

9. The device of claim 8, wherein: The image target detection module is used to extract convolution features of the detection image from the detection image using the convolution neural network of the target detection network model; extract candidate areas where the target exists from the detection image using the RPN network of the target detection network model; for the candidate areas, extract feature vectors from the convolution feature map of the detection image using the ROIpooling layer of the target detection network model, send the feature vector of each candidate area to the classifier for classification, judge the type of the target, and determine the coordinates of the rectangular area containing the target.

10. The device as claimed in claim 9, wherein: The convolutional neural network includes ResNet; wherein the ResNet includes: ResNet-50, and ResNet-50 includes a convolutional layer conv4_x.

11. The device of claim 9, wherein: The display image generation module is used to splice the multiple target images into the advertisement display image; The image shape processing module is used to determine the stretching direction and final shape of the advertising display image based on the shape characteristics of the advertising template; use a bilinear interpolation algorithm to perform image interpolation processing in the stretching direction to adjust the shape of the advertising display image to the final shape.

12. The device of claim 11, wherein: The image shape processing module is used to perform median filtering on the pixels in the stretched advertisement display image to obtain the blurred advertisement display image.

13. An advertising picture generating device, comprising: Memory; and a processor coupled to the memory, wherein the processor is configured to execute the method according to any one of claims 1 to 6 based on instructions stored in the memory.

14. A computer-readable storage medium storing computer instructions, wherein the instructions are executed by a processor to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Advertisement method and system

    CN101339549A

  • Smart advertisement generating system

    CN101558421A

  • Search result display method and device

    CN104484362A

  • Image recommendation method and image recommendation apparatus

    CN106202362A

  • Generating method and generating device for advertisement in webpage

    CN106485534A