Background technique
As the continuous enhancing and the continuous of internet of multimedia technology are popularized, so that digital advertisement picture gradually starts
The characteristics of demand is very big, quality requirement is low, easy consumption is presented.
Since advertisement plays the development of very important effect, especially e-commerce in business, lead to advertisement
Demand constantly increases, and businessman may require that designer designs difference according to the difference of theme to adapt to the development of trend
The advertisement of style.Such as summer conception design teacher tends to design clean and tidy, natural stype advertisement.
Ad style is the bridge that the spirit between advertisement designer and consumer is linked up.Therefore, in order to cope with people couple
In the personalized affection need of digital advertisement picture, the demand that enterprise automates advertisement design is combined.Enterprise can
With according to consumer for ad style demand carry out mass, automatically generate specific style advertising pictures.In life
During at specific style advertisement, largely automated system can be helped preferably to set the assessment of the style of advertisement
Count out the advertisement of specific style.Therefore, quickly and effectively style identification is carried out to advertisement to have important practical significance.
Existing picture style recognizer, the style study either based on picking feature is still based on deep learning
Style calculates, and is extracted to global feature, is then trained with the good data of mark and is shown that style identifies mould
Type.These methods, the feature extracted for all pictures is all identical, however in the picture of different types, feature
The influence degree of style is different.Billboard is computer synthesising picture, he is generally by text, main body, the groups such as background
At.The position of different elements, collocation etc. can all impact style.Therefore it studies a kind of for ad style knowledge method for distinguishing
It has important practical significance.
The patent application of Publication No. CN201510922662.9 discloses a kind of picture style recognition methods and device.It is public
The patent application that the number of opening is CN201510922684.5 discloses style recognition methods and the device of a kind of commodity.The two patents
Apply for that disclosed technology contents are:It first obtains samples pictures and forms training set, then to pre-set multiple target convolutional Neural
Network carries out parameter initialization, and the picture in training set is trained to obtain picture style identification model, finally utilizes mould
Type identifies picture to be identified.These methods are all based on depth convolutional neural networks, computationally intensive, iteration time
It is long.Need the tape label data of much larger number that could train to obtain accurate style identification model, however this can spend largely
Cost.
Billboard picture is by by text, main body, background composition, different from common two-dimension picture, so above-mentioned side
Method and algorithm are not suitable for identifying billboard style, that is, identify billboard style using the above method,
Accuracy rate can be very low, is unable to satisfy the requirement in advertisement the Automation Design for the identification of quick and precisely style.
Summary of the invention
The object of the present invention is to provide a kind of recognition methods of billboard style, this method can accurately identify flat
Face ad style meets the requirement in advertisement the Automation Design for the identification of quick and precisely style.
For achieving the above object, the present invention provides following technical scheme:
A kind of recognition methods of billboard style, includes the following steps:
(1) genre labels of billboard picture and billboard picture are obtained;
(2) main body, text and the background of billboard picture are extracted using deep learning method, and are led respectively
Body, the color histogram of text and background, GIST descriptor, saliency map, binary element category feature and direction gradient are straight
Fang Tu, by the color histogram of acquisition, GIST descriptor, saliency map, binary element category feature, histograms of oriented gradients and
The genre labels of billboard picture constitute sample set as a sample, and sample set is divided into training set and test set;
(3) decision-tree model, non-linear largest interval model and linear model is respectively trained using training set;
(4) trained decision-tree model, non-linear largest interval model and linear mould are tested respectively using test set
Type, and three models are assessed according to test result, the model optimal using assessment result is identified as billboard style
Model;
(5) it for billboard to be identified, is obtained using the method for step (2) straight using the color of billboard to be identified
Fang Tu, GIST descriptor, saliency map, binary element category feature and histograms of oriented gradients, and by color histogram, GIST
Descriptor, saliency map, binary element category feature and histograms of oriented gradients are input in billboard style identification model,
It is computed the style probability for obtaining billboard picture to be identified.
Wherein, the step (1) includes:
(1-1) obtains billboard picture, and rejects to the non-ad elements in the billboard picture;
(1-2) treated that billboard picture is labeled to rejecting, and obtains the genre labels of billboard picture.
More specifically, the step (1-2) includes:
(1-2-1) building style describes word set, and style adjective concentration includes several antagonism of symbols and statement wind
The adjective of lattice;
(1-2-2) describes word set according to the style, using the method compared in pairs to rejecting treated billboard figure
Piece is labeled, and obtains the genre labels of billboard picture.
Wherein, in the step (1-2-2):Word set is described according to the style, is put down using Bradley-Terry model
The genre labels of face advertising pictures.
In step (2):
Using the main body of FCIS model identification billboard picture;
Using the text of CTPN model identification billboard picture;
Main body, text in removing billboard picture, remaining is the background of billboard picture.
The step (4) includes:
(4-1) is directed to trained decision-tree model, and the billboard picture in test set is input to trained determine
In plan tree-model, the identification style probability of billboard picture is obtained, according to the identification style probability and mark of billboard picture
The ROC curve of style probability building decision-tree model is signed, and calculates the area below the ROC curve for obtaining decision-tree model
AUC1;
(4-2) obtains the area below the ROC curve of non-linear largest interval model using the method in step (4-1)
AUC2;
(4-3) obtains the area AUC below the ROC curve of linear model using the method in step (4-1)3;
(4-4) chooses AUC1、AUC2And AUC3In the corresponding model of maximum AUC as billboard style identify mould
Type.
The device have the advantages that being:
The present invention is according to the characteristic of billboard, by billboard picture segmentation at main body, text and background three parts,
And extract the color histogram of every part, GIST descriptor, saliency map, binary element category feature and direction gradient histogram
Figure, as feature, is trained model and assesses, and obtains the billboard wind that can accurately identify billboard style
Lattice identification model can accurately identify billboard picture style using the billboard style identification model.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention more comprehensible, with reference to the accompanying drawings and embodiments to this
Invention is described in further detail.It should be appreciated that the specific embodiments described herein are only used to explain the present invention,
And the scope of protection of the present invention is not limited.
Fig. 1 is the flow chart of the recognition methods of billboard style provided by the invention.Fig. 2 is acquisition provided by the invention
The procedure chart of billboard style identification model.As shown in Figure 1 and Figure 2, the recognition methods of billboard style provided by the invention
Including:
S101 obtains the genre labels of billboard picture and billboard picture.
Billboard picture is various aspects (such as fashionable dress, makeups, food and drink, the amusement collected from major website (such as petal net)
Deng) advertising pictures.It can include some non-ad elements on those advertising pictures, those non-ad elements can be link letter
Breath, image credit information etc..To guarantee training sample reliability, need to carry out billboard picture to arrange and clear, specifically
The non-ad elements in the billboard picture of acquisition are rejected on ground.
After the non-ad elements for rejecting billboard picture, it is also necessary to mark the genre labels of billboard picture.
Detailed process is:
Firstly, existing document is studied in research, therefrom obtains several antagonism of symbols and state the adjective of style, composition
Style describes word set, style adjective concentrate comprising adjective romantic (Romantic), sweet (Pretty), clean and tidy (Clear),
Natural (Natural), arbitrarily (Casual), graceful (Elegant), leisure (Cool Casual), fashionable (Chic), luxury
(Gorgeous), dynamic (Dynamic), classic (Classic), magnificent (Dandy), modern (Modern) etc..
Then, word set is described according to style, using the method compared in pairs to reject treated billboard picture into
Rower note, obtains the genre labels of billboard picture.
Specifically, the genre labels of billboard picture can be obtained, using Bradley-Terry model to be had
The data set of scientific Dimension style.
S102 constructs training set and test set according to billboard picture.
It is made of due to billboard picture main body, text and background three parts, wherein main body is and advertiser
Inscribe identical content, advertisement is based on then the shoes in billboard picture are, in billboard picture about shoes
Text is text, and remaining content is background.
In order to obtain better billboard style identification model, billboard figure is extracted using deep learning method
Main body, text and the background of piece, specifically process be:
(a) using the main body of FCIS model identification billboard picture;
(b) using the text of CTPN model identification billboard picture;
(c) main body in removing billboard picture, text, remaining is the background of billboard picture, specifically,
Mask is established to main body and text, is rejected main body and text by Mask, remaining is background.
FCIS (Fully Convolutional Instance-aware Semantic Segmentation) model is
The Image Segmentation Model that model parameter has determined can rapidly and accurately split the main body in billboard picture.
CTPN (connectionist text proposal network) model is the text that model parameter has determined
Parted pattern can rapidly and accurately come out the text segmentation in billboard picture.
After obtaining main body, text and the background of billboard picture, proceed as follows:
For main body, extract the color histogram of main body, GIST descriptor, saliency map, binary element category feature and
Histograms of oriented gradients feature;
For text, extract the color histogram of text, GIST descriptor, saliency map, binary element category feature and
Histograms of oriented gradients feature;
For background, extract the color histogram of background, GIST descriptor, saliency map, binary element category feature and
Histograms of oriented gradients feature.
Color histogram is constructed based on CELAB color channel:The style of many images all show to color this
The strong depend-ence of dimension.For example the image of " romance " style likes partially red form and aspect mostly, the image of " clean and tidy " style is usual
The form and aspect of whole image are single and saturation degree is relatively low, and the image of " luxury " style is then with color ratio relatively exaggeration etc..Therefore present invention choosing
It selects from the channel LAB, by building color histogram as characteristic of division.This feature is 784 vectors tieed up by a length
Composition, is the pixels statistics histogram of each color channel of the image under CELAB color mode.Its specific method is:L is led to
Road is equally divided into 4 sections, and equally, A channel and channel B are respectively divided into 14 sections, then by picture under each color channel
The statistics of element value.It thus can achieve from color dimension and distinguish the purpose of different images style.
GIST descriptor:Classical GIST descriptor has obtained widely in scene classification and image similarity searching field
It uses, the feature in terms of available image construction, this feature are the vector that a length is 960 dimensions in a way.
Saliency map:The purpose of this feature is to identify image position that people are usually paid attention to from the angle of vision attention
It sets, it is important so as to soon predict position that people may notice that and its corresponding vision from an image
Degree.This has very big help for style follow-up study which type of feature affects image.This feature is by length
What the vector of 1024 dimensions was constituted.
Binary element category feature (Meta-class binary features):The content of image usually influences whether image
Style.Such as have the people moved in an advertisement, then the style of this advertisement may be very much " innervation " wind greatly
Lattice, and when having the contents such as forest-tree in an advertisement, style may be very much " nature " style greatly.And binary element category feature
Be one 15000 dimension binary vector, this vector be from existing public data focusing study to classifier obtained by
, that is to say, that this feature has the ability that can identify picture material.The vector be a length be 15232 dimensions to
Amount composition, wherein being integrated with the style and features of a large amount of low layer.This feature is weight coefficient maximum one in numerous style and features
A feature, it is, this feature plays conclusive effect for distinguishing the genre category of image.
Histograms of oriented gradients (Histogram of Oriented Gradient, HOG):This feature is widely used in image
In the task of identification, especially in pedestrian detection, it by calculate and statistical picture regional area gradient orientation histogram come
Constitutive characteristic can be used for extracting the correlated characteristics such as the texture of image.
Above-mentioned color histogram, GIST descriptor, saliency map, binary element category feature, histograms of oriented gradients covering
The color dimension of billboard picture, composition dimension, content dimension and texture dimension, can comprehensively be presented billboard
The feature of picture can obtain more accurately model using those feature training patterns.
The main body of billboard picture, three parts of text and background color histogram, GIST descriptor, significance
Figure, binary element category feature, histograms of oriented gradients and genre labels constitute a sample, and a large amount of sample forms sample
Collection, and most in sample set is as training set, it is remaining to be used as test set.
Decision-tree model, non-linear largest interval model and linear model is respectively trained using training set in S103.
There are many kinds of classifiers, more preferably billboard style identification model is obtained to train, to multiple points in this step
Class device is trained.Specifically, by the sample in training set be separately input to decision-tree model, non-linear largest interval model with
And in linear model, until model convergence, trained decision-tree model, non-linear largest interval model and linear mould are obtained
Type.
S104 tests trained decision-tree model, non-linear largest interval model and linear using test set respectively
Model, and three models are assessed according to test result, the model optimal using assessment result is known as billboard style
Other model.
For trained decision-tree model, non-linear largest interval model and linear model, assessed with
Select optimal model as billboard style identification model, specially:
Firstly, carrying out feature extraction to the test sample in test set using S102, the color histogram of test sample is obtained
Figure, GIST descriptor, saliency map, binary element category feature, histograms of oriented gradients.
Then, for trained decision-tree model, the billboard picture in test set is input to trained determine
In plan tree-model, the identification style probability of billboard picture is obtained, according to the identification style probability and mark of billboard picture
The ROC curve of style probability building decision-tree model is signed, and calculates the area below the ROC curve for obtaining decision-tree model
AUC1;
For non-linear largest interval model, the billboard picture in test set is input to training after feature extraction
In good decision-tree model, the identification style probability of billboard picture is obtained, it is general according to the identification style of billboard picture
Rate and label style probability construct the ROC curve of non-linear largest interval model, and calculate and obtain non-linear largest interval model
ROC curve below area AUC2;
Billboard picture in test set is input in trained decision-tree model by linear model, is obtained
The identification style probability of billboard picture constructs line according to the identification style probability of billboard picture and label style probability
Property model ROC curve, and calculate obtain linear model ROC curve below area AUC3。
Finally, choosing AUC1、AUC2And AUC3In the corresponding model of maximum AUC as billboard style identify mould
Type.
S105 identifies billboard picture to be identified using billboard style identification model, obtains to be identified
The identification style probability of billboard picture.
Specifically, it obtained using the method for S102 using the color histogram of billboard to be identified, GIST descriptor, shown
Work degree figure, binary element category feature and histograms of oriented gradients, and by color histogram, GIST descriptor, saliency map, two
System member category feature and histograms of oriented gradients are input in billboard style identification model, are computed and are obtained to be identified put down
The identification style probability of face advertising pictures.
Billboard picture style can be accurately identified using the above method, met in advertisement the Automation Design for fast
The requirement of fast accurate style identification.
Technical solution of the present invention and beneficial effect is described in detail in above-described specific embodiment, Ying Li
Solution is not intended to restrict the invention the foregoing is merely presently most preferred embodiment of the invention, all in principle model of the invention
Interior done any modification, supplementary, and equivalent replacement etc. are enclosed, should all be included in the protection scope of the present invention.