CN109255772A - License plate image generation method, device, equipment and medium based on Style Transfer - Google Patents

License plate image generation method, device, equipment and medium based on Style Transfer Download PDF

Info

Publication number
CN109255772A
CN109255772A CN201810978822.5A CN201810978822A CN109255772A CN 109255772 A CN109255772 A CN 109255772A CN 201810978822 A CN201810978822 A CN 201810978822A CN 109255772 A CN109255772 A CN 109255772A
Authority
CN
China
Prior art keywords
license plate
image
plate image
style
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810978822.5A
Other languages
Chinese (zh)
Other versions
CN109255772B (en
Inventor
雷晨雨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810978822.5A priority Critical patent/CN109255772B/en
Publication of CN109255772A publication Critical patent/CN109255772A/en
Application granted granted Critical
Publication of CN109255772B publication Critical patent/CN109255772B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • G06V10/23Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition based on positionally close patterns or neighbourhood relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/245Aligning, centring, orientation detection or correction of the image by locating a pattern; Special marks for positioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

The license plate image generation method based on Style Transfer that the invention discloses a kind of, device, computer equipment and storage medium, the described method includes: after receiving the instruction for generating license plate image, obtain the license plate type for including in the instruction, and according to the corresponding default license plate number structure of license plate type, generate random license plate number, in turn from selection character picture corresponding with the character for including in the license plate number in preset fontlib, according to character picture and license plate number, generate initial license plate image, and pretreatment and Style Transfer are carried out to the initial license plate image of generation, efficiently and rapidly generate the simulation license plate image close to true license plate image, improve the efficiency of license plate image acquisition, authenticity is higher, the demand of the high quality of license plate image is also ensured simultaneously.

Description

License plate image generation method, device, equipment and medium based on Style Transfer
Technical field
The present invention relates to technical field of image processing more particularly to a kind of license plate image generation sides based on Style Transfer Method, device, equipment and medium.
Background technique
With the rapid development of Chinese national economy, it is most fast that China becomes highway infrastructures construction speed in the world today Country and the fastest-rising country of transport need, people's vehicle guaranteeding organic quantity be sharply increased, the scale of motor vehicle is also increasingly Increase severely.The quantity of China's motor vehicle increases by 15% or more every year, with the rapid increase of China's vehicles number, thus causes Traffic problems are also increasingly severe, thus pass through the vehicle for the vehicle that camera shooting passes by according to camera in many places Board image, and license plate number is identified using license plate image recognizer, to be managed to vehicle.
Current license plate image recognizer, it is common to use machine learning algorithm, the training process in machine learning algorithm Need a large amount of license plate image sample.And true license plate image sample acquisition difficulty is big, by country, province, type of vehicle etc. because Element influences, and license plate image sample coverage rate is low, therefore how to obtain a large amount of " true " license plate images with training value is Problem.
Currently, most producer in the industry still uses camera to acquire license plate image pattern.This side manually acquired Formula acquisition cost high efficiency is low, the practicability is poor, while artificial acquisition also results in the unstable problem of picture quality.
Summary of the invention
The embodiment of the present invention provides a kind of license plate image generation method based on Style Transfer, to solve acquisition license plate image Sample low efficiency, the problem of the practicability is poor and unstable quality.
In a first aspect, the embodiment of the present invention provides a kind of license plate image generation method based on Style Transfer, comprising:
If receiving the instruction for generating license plate image, the license plate type for including in described instruction is obtained;
According to the corresponding license plate number structure of the license plate type, random license plate number is generated;
From character picture corresponding with the character for including in the license plate number is chosen in preset fontlib, according to institute Character picture and the license plate number are stated, initial license plate image is generated;
Image preprocessing is carried out to the initial license plate image, obtains simulation license plate image;
Using Style Transfer algorithm, Style Transfer is carried out to the simulation license plate image, obtains target license plate image.
Second aspect, the embodiment of the present invention provide a kind of license plate image generating means based on Style Transfer, comprising:
Type acquisition module, if obtaining the vehicle for including in described instruction for receiving the instruction for generating license plate image Board type;
Number generation module, for generating random license plate number according to the corresponding license plate number structure of the license plate type Code;
Image synthesis module, for corresponding with the character for including in the license plate number from being chosen in preset fontlib Character picture initial license plate image is generated according to the character picture and the license plate number;
Image pre-processing module obtains simulation license plate image for carrying out image preprocessing to the initial license plate image;
Style Transfer module carries out Style Transfer to the simulation license plate image, obtains for using Style Transfer algorithm Target license plate image.
The third aspect, the embodiment of the present invention provide a kind of computer equipment, including memory, processor and are stored in institute The computer program that can be run in memory and on the processor is stated, the processor executes real when the computer program The step of existing above-mentioned license plate image generation method based on Style Transfer.
Fourth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, the computer-readable storage medium Matter is stored with computer program, and the computer program realizes the above-mentioned license plate image based on Style Transfer when being executed by processor The step of generation method.
It license plate image generation method provided in an embodiment of the present invention based on Style Transfer, device, computer equipment and deposits Storage media obtains the license plate type for including in the instruction, and according to license plate type after receiving the instruction for generating license plate image Corresponding default license plate number structure, generates random license plate number, and then chooses and the license plate number from preset fontlib The corresponding character picture of character for including in code generates initial license plate image according to character picture and license plate number, and to life At initial license plate image carry out pretreatment and Style Transfer, efficiently and rapidly generate the simulation vehicle close to true license plate image Board image improves the efficiency of license plate image acquisition, and authenticity is higher, while also ensuring the need of the high quality of license plate image It asks.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is the application environment signal of the license plate image generation method provided in an embodiment of the present invention based on Style Transfer Figure;
Fig. 2 is the implementation flow chart of the license plate image generation method provided in an embodiment of the present invention based on Style Transfer;
Fig. 3 is the realization of step S50 in the license plate image generation method provided in an embodiment of the present invention based on Style Transfer Flow chart;
Fig. 4 is the realization of step S55 in the license plate image generation method provided in an embodiment of the present invention based on Style Transfer Flow chart;
Fig. 5 is the realization of step S40 in the license plate image generation method provided in an embodiment of the present invention based on Style Transfer Flow chart;
Fig. 6 is the realization of step S41 in the license plate image generation method provided in an embodiment of the present invention based on Style Transfer Flow chart;
Fig. 7 is the realization of step S43 in the license plate image generation method provided in an embodiment of the present invention based on Style Transfer Flow chart;
Fig. 8 is the schematic diagram of the license plate image generating means provided in an embodiment of the present invention based on Style Transfer;
Fig. 9 is the schematic diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
Referring to Fig. 1, Fig. 1 shows answering for the license plate image generation method provided in an embodiment of the present invention based on Style Transfer Use environment.The license plate image generation method based on Style Transfer is applied to be generated in scene in the license plate image of motor vehicle.The life It include server-side and client at scene, wherein be attached between server-side and client by network, user passes through transmission Generate specified type license plate image request arrive server-side, server-side generate random license plate number image and to image progress Pretreatment and Style Transfer, client specifically can be, but not limited to be various personal computers, laptop, smart phone, Tablet computer and portable wearable device, the clothes that server-side can specifically be formed with independent server or multiple servers Business device cluster is realized.
Referring to Fig. 2, Fig. 2 shows a kind of license plate image generation sides based on Style Transfer provided in an embodiment of the present invention Method is applied be illustrated for the server-side in Fig. 1 in this way, and details are as follows:
S10: if receiving the instruction for generating license plate image, the license plate type for including in acquisition instruction.
Specifically, user sends the instruction for generating license plate image to server-side by client, and server-side is receiving this After instruction, the license plate type that includes in acquisition instruction.
Wherein, license plate type includes but is not limited to: license plate background color and license plate number type etc., and license plate background color includes but unlimited In: blue, yellow, white, black and green etc., license plate number type includes but is not limited to: motor vehicles for civilian use license plate, new energy vehicle License plate, government department's vehicle license plate and new army's license plate etc..
For example, in a specific embodiment, server-side is got from the instruction for the generation license plate image that user sends License plate type are as follows: background color be blue motor vehicles for civilian use license plate.
S20: according to the corresponding license plate number structure of license plate type, random license plate number is generated.
Specifically, by step S10 it is found that license plate type includes license plate number type, different types of license plate number is corresponding There is different license plate number structures, in the background data base of server-side, it is corresponding to be previously stored with different license plate number structures License plate number generating mode, therefore, it is possible to obtain the license plate number knot according to the corresponding license plate number structure of license plate type The corresponding license plate number generating mode of structure then generates the corresponding random license plate number of the license plate type using the generating mode, The random license plate number of user demand type can be obtained.
For example, in a specific embodiment, the license plate type for including in instruction are as follows: background color is the motor vehicles for civilian use vehicle of blue Board then obtains the corresponding license plate number generating mode of motor vehicles for civilian use license plate, generates a random motor vehicles for civilian use license plate " Anhui A305Y6 ", in another specific embodiment, the license plate type for including in instruction is new army's license plate that background color is black, then obtains The corresponding license plate number generating mode of Qu Xin army license plate generates random new army's license plate " KU13256 ".
S30: from choosing the corresponding character picture of each character in license plate number in preset fontlib, and by character picture It is combined into initial license plate image.
Specifically, after obtaining license plate number, need to generate the corresponding license plate picture of the license plate number, due to license plate number The font of code is sytlized font, can not directly be exported by computer, thus, mode used in the embodiment of the present invention are as follows: in advance For each character in license plate number, one corresponding character picture is set, it is corresponding by obtaining each character in license plate number Character picture, and these character pictures are combined according to the sequence of character in license plate number, and using being wrapped in type of vehicle The background color contained generates initial license plate image as background colour.
It wherein, include a character in a character picture, and font is sytlized font used in license plate number.
Wherein, include in preset fontlib: the character picture of 0 to 9 this 10 Arabic numerals, 26 English capitalization words Female character picture and 34 Chinese provinces, municipality directly under the Central Government, area abbreviation Chinese character, amount to 70 preset character pictures.
For example, in a specific embodiment, the random license plate number of generation is " Anhui A305Y6 ", background color is blue, from In preset fontlib choose " Anhui ", " A ", " 3 ", " 0 ", " 5 ", " Y " and " 6 " this 7 character pictures, and according to " Anhui ", " A ", The sequence of " 3 ", " 0 ", " 5 ", " Y " and " 6 " is combined, and is finally that background color generates initial license plate image with blue.
It is worth noting that character picture is transparent image, i.e., without the image of background color.
S40: image preprocessing is carried out to the initial license plate image, obtains simulation license plate image.
Specifically, in a natural environment due to license plate, some erosion pollutions be will receive, so that pixel Distribution value can generate one A little variations, after obtaining initial license plate image, in order to enable the more close true license plate image of the image, needs to the image Image preprocessing is carried out, simulation license plate image is obtained, so that the simulation license plate image is more naturally, closer to true license plate figure Picture.
Wherein, image preprocessing includes but is not limited to: pixel value random perturbation, Gaussian Blur and sharpening etc..
S50: using Style Transfer algorithm, carries out Style Transfer to simulation license plate image, obtains target license plate image.
Specifically, it is obtained by Style Transfer algorithm by the Style Transfer of true license plate image to simulation license plate image There is the target license plate image of identical style with true license plate image.
Wherein, the style in the embodiment of the present invention refers to the texture train of thought of image, generally has very strong homogeney and rule Rule property.
Wherein, Style Transfer algorithm is the style and features and simulation vehicle that true license plate image is extracted by convolutional neural networks The content characteristic of board image, and they are merged to the style and simulation license plate image for obtaining one while having true license plate image Content new images, i.e. target license plate image.
It is worth noting that lower convolutional layer, style and features are more obvious, higher in convolutional neural networks Convolutional layer, content characteristic is more obvious, thus, when extracting style and features, can extract from low layer convolutional layer, i.e., without The style and features that all convolutional layers need to be extracted can be extracted when extracting content characteristic from high-rise convolutional layer, i.e., without mentioning The content characteristic of all convolutional layers is taken, this advantageously reduces calculation amount, improves the efficiency of style and features and Content Feature Extraction.
In the present embodiment, after receiving the instruction for generating license plate image, the license plate type for including in the instruction is obtained, and According to the corresponding default license plate number structure of license plate type, random license plate number is generated, and then select from preset fontlib Character picture corresponding with the character for including in the license plate number is taken, according to character picture and license plate number, generates initial vehicle Board image, and pretreatment and Style Transfer are carried out to the initial license plate image of generation, it efficiently and rapidly generates close to true vehicle The simulation license plate image of board image improves the efficiency of license plate image acquisition, and authenticity is higher, while also ensuring license plate image High quality demand.
On the basis of the corresponding embodiment of Fig. 2, below by a specific embodiment come to being mentioned in step S50 And use Style Transfer algorithm, to the simulation license plate image progress Style Transfer, obtain the specific reality of target license plate image Existing method is described in detail.
Referring to Fig. 3, Fig. 3 shows the specific implementation flow of step S50 provided in an embodiment of the present invention, details are as follows:
S51: preset true license plate image is obtained.
Specifically, it after generating simulation license plate image, needs to carry out Style Transfer to simulation license plate image, i.e., by true vehicle On the Style Transfer of board image to simulation license plate image, simulation license plate image is obtained closer to true license plate image, thus, first It needs to choose a true license plate image from preset true license plate image set, as the image for extracting style and features.
It is worth noting that true picture sample needed for default true picture sample set is not very big, it is to mould Quasi- license plate image carries out Style Transfer, and the purpose of Style Transfer and is moved to extract style and features from true license plate image It moves on on simulation license plate image, so that simulation license plate image has the style and features of true license plate image, i.e., closer to true vehicle Board image, thus the content in the content and simulation license plate image in true license plate image, do not need with uniformity.
S52: true license plate image and simulation license plate image are carried out respectively using convolutional neural networks VGG-NET model special Sign is extracted, and the initial pictures characteristic set of true license plate image each convolutional layer in VGG-NET model, and simulation vehicle are obtained The initial pictures characteristic set of board image each convolutional layer in VGG-NET model.
Specifically, true license plate image and simulation license plate image are extracted by convolutional neural networks VGG-NET model respectively Characteristics of image, obtain the initial pictures characteristic set of each convolutional layer of true license plate image, and the simulation each volume of license plate image The initial pictures characteristic set of lamination.
Wherein, VGG-NET (Visual Geometry Group NET) model is a kind of deep neural network model, Network structure includes: 5 convolutional layers, 5 pond layers and 3 full articulamentums, wherein 5 convolutional layers be respectively the first convolutional layer, Second convolutional layer, third convolutional layer, Volume Four lamination and the 5th convolutional layer.
S53: it from the initial pictures characteristic set of simulation license plate image, chooses in the characteristics of image conduct of the first default layer Hold feature.
Specifically, in the initial pictures characteristic set of simulation license plate image, the characteristics of image for choosing the first default layer is made For content characteristic.
Wherein, the first default layer is configured according to actual needs, due to the content characteristic of the reservation of higher convolutional layer More in detail, the first default layer is traditionally arranged to be high-rise convolutional layer.
It is to be appreciated that the first default layer can be a convolutional layer, it is also possible to multiple convolutional layers.
For example, in a specific embodiment, the first default layer is third convolutional layer, Volume Four lamination and the 5th convolution Layer, and then in the initial pictures characteristic set of above-mentioned simulation license plate image, choose third convolutional layer, Volume Four lamination and the 5th The simulation license plate image feature that convolutional layer extracts is as content characteristic.
S54: it from the initial pictures characteristic set of true license plate image, chooses in the characteristics of image progress of the second default layer Product operation, obtains style and features.
Specifically, in the initial pictures characteristic set of true license plate image, the characteristics of image of the first default layer is chosen, and Inner product operation is carried out to these images, using obtained result as style and features.
Wherein, the second default layer is configured according to actual needs, due to the content characteristic of the reservation of lower convolutional layer More in detail, the second default layer is traditionally arranged to be in low layer convolutional layer.
Wherein, inner product operation refers to three or three multiplication of progress between the characteristics of image for extracting the first default layer.
It is worth noting that style and features are a kind of general character throughout entire picture, and this general character is in low layer convolutional layer It is more obvious, by the way that the feature of these low layer convolutional layers is carried out inner product operation, to realize the extraction to this general character, obtain Style and features.
It is to be appreciated that the second default layer can be a convolutional layer, it is also possible to multiple convolutional layers.
For example, in a specific embodiment, the second default layer is the first convolutional layer and the second convolutional layer, and then above-mentioned In the initial pictures characteristic set of true license plate image, the true license plate image that the first convolutional layer and the second convolutional layer extract is chosen Feature is as style and features.
It should be noted that the successive of certainty does not execute sequence by step S53 and step S54, execution arranged side by side can be Relationship, herein with no restrictions.
S55: using DeepDream algorithm, carries out characteristics of image visualization processing to style and features and content characteristic, generates Target license plate image.
Specifically, by DeepDream algorithm, the style and features and content characteristic that extract are merged, and are generated Visual image obtains target license plate image.
Wherein, DeepDream algorithm is the intelligent algorithm for being used to classify and arrange image of Google open source, DeepDream algorithm mainly includes 10 to 30 artificial neurons to lamination, and each image is stored in input layer, then under One level communication, by carrying out " training " to artificial neural network, obtains what we wanted until eventually arriving at " output " layer Answer.Likewise, can choose a level and command net enhances any content monitored, thus network will be following Level in image identification that we are ordered it is more sensitive, image needed for showing us.
In the present embodiment, by obtaining preset true license plate image, and using convolutional neural networks VGG-NET model point It is other that feature extraction is carried out to true license plate image and simulation license plate image, it is every in VGG-NET model to obtain true license plate image The initial pictures characteristic set of a convolutional layer, and the initial graph of simulation license plate image each convolutional layer in VGG-NET model As characteristic set, in turn, from the initial pictures characteristic set of simulation license plate image, the characteristics of image for choosing the first default layer is made It is chosen in the characteristics of image progress of the second default layer from the initial pictures characteristic set of true license plate image for content characteristic Product operation obtains style and features, then uses DeepDream algorithm, and it is visual to carry out characteristics of image to style and features and content characteristic Change processing, generates target license plate image, so that the target license plate image generated has the style of true license plate image, enhances mesh The authenticity for marking license plate image, improves the quality of target license plate image.
On the basis of the corresponding embodiment of Fig. 3, below by a specific embodiment come to being mentioned in step S55 And use DeepDream algorithm, characteristics of image visualization processing is carried out to the style and features and the content characteristic, is generated The concrete methods of realizing of the target license plate image is described in detail.
Referring to Fig. 4, Fig. 4 shows the specific implementation flow of step S55 provided in an embodiment of the present invention, details are as follows:
S551: the white noise acoustic image of preset size identical as simulation license plate image is obtained as initial pictures, and will be first Beginning image, which is input in VGG-NET model, carries out feature extraction, obtains initial pictures each convolutional layer in VGG-NET model Characteristics of image.
Specifically, a white noise acoustic image with simulation license plate image with identical size is obtained, and by the white noise sound spectrogram Feature extraction is carried out as being input in VGG-NET model as initial pictures, to obtain initial pictures in VGG-NET model The characteristics of image of each convolutional layer.
Wherein, white noise acoustic image refers to that amplitude distribution Gaussian distributed, power spectral density obey equally distributed image, It is because white noise acoustic image can be reduced as far as possible to content characteristic and style spy that white noise acoustic image, which is chosen, as initial pictures The interference of sign.
It is worth noting that VGG-NET model used in this step is same with the VGG-NET model in step S52 Model, it is ensured that the parameters of network model are consistent in characteristic extraction procedure.
S552: the content characteristic weight α of initial pictures each convolutional layer in VGG-NET model is determined using following formula With style and features weight beta:
Ltotal(p, a, x)=α Lcontent(p,x)+βLstyle(a,x)
Wherein, Ltotal(p, a, x) is total losses function, Lcontent(p, x) is characteristics of image of the initial pictures at each layer Relative to the loss function of the content characteristic, Lstyle(a, x) be initial pictures in each layer of characteristics of image relative to style The loss function of feature, Lcontent(p, x) and Lstyle(a, x) is calculated by preset loss function calculation formula, and alpha+beta= 1, α and β is nonnegative number, and p representative simulation license plate image, a represents true license plate image, and x represents initial pictures.
Specifically, by the initial pictures extracted in step S551 each convolutional layer characteristics of image, with step S53 and Style and features, the content characteristic extracted in step S54, is calculated by above-mentioned formula, is obtained so that total losses function is minimum Content characteristic weight and style and features weight.
Wherein, loss function calculation formula includes but is not limited to: 0-1 loss function and absolute error loss function, log logarithm Loss function, quadratic loss function, figure penalties function and Hinge loss function etc..
Preferably, loss function calculation formula used in the embodiment of the present invention is log logarithm loss function.
S553: according to content characteristic, style and features, the content characteristic weight of each convolutional layer and each convolutional layer style Feature weight obtains the updated characteristics of image of initial pictures.
Specifically, in each convolutional layer, using content characteristic multiplied by content characteristic weight, using style and features multiplied by wind Lattice feature weight, then two calculated results are stitched together, the updated characteristics of image of initial pictures of this layer can be obtained.
S554: updated characteristics of image is input in VGG-NET model, and returns to step S552, until holding Row number reaches default the number of iterations, obtains target image characteristics.
Specifically, the updated characteristics of image of initial pictures is obtained in step S553 and then updates initial pictures Characteristics of image afterwards is input in the calculation formula in step S552, as the characteristics of image of initial pictures, is recalculated initial Image is in the content characteristic weight and style and features weight of each convolutional layer, and iteration executes, will until reaching preset number Updated characteristics of image for the last time, as target image characteristics.
It is worth noting that the growth of the number of iteration, style and features closer to true license plate image style and features, but The target license plates that are more and more, and being obtained required for the embodiment of the present invention that the content characteristic of simulation license plate image can gradually be lost The requirement of image is: close to the style of true license plate image, but cannot lost content feature too much, thus, the present invention is implemented The preferred the number of iterations of example is 300 times.In practice, the number of iterations can be configured according to the effect of image to be obtained, this Place is not specifically limited.
S555: according to target image characteristics, target license plate image is generated.
Specifically, the target image characteristics determined according to step S554, are reversely updated by VGG-NET model, obtain mesh The corresponding each pixel value of logo image feature is updated using the pixel value on the pixel value dialogue noise image, obtains mesh Mark license plate image.
In the present embodiment, by obtaining the white noise acoustic image of preset size identical as simulation license plate image as initial graph Picture, and initial pictures are input in VGG-NET model and carry out feature extraction, it is every in VGG-NET model to obtain initial pictures The characteristics of image of a convolutional layer, so calculate initial pictures in VGG-NET model the content characteristic weight of each convolutional layer and Style and features weight, and according to content characteristic, style and features, the content characteristic weight of each convolutional layer and each convolutional layer wind Lattice feature weight obtains the updated characteristics of image of initial pictures, updated characteristics of image is then input to VGG-NET mould In type, and the step of executing the content characteristic weight and style and features weight that calculate each convolutional layer is returned to, until executing number Reach default the number of iterations, obtain target image characteristics, according to target image characteristics, target license plate image is generated, so that target The style of the more close true license plate image of license plate image, and the content of itself is more remained, enhance target license plate figure The authenticity of picture improves the quality of target license plate image.
On the basis of the corresponding embodiment of Fig. 2, below by a specific embodiment come to being mentioned in step S40 And image preprocessing is carried out to the initial license plate image, the concrete methods of realizing for obtaining simulation license plate image carries out specifically It is bright.
Referring to Fig. 5, Fig. 5 shows the specific implementation flow of step S40 provided in an embodiment of the present invention, details are as follows:
S41: random perturbation is carried out to the pixel value of pixel in initial license plate image, obtains the of pixel value random distribution One license plate image.
Specifically, the true license plate image of actual photographed, since new and old purity is different, the pixel value on license plate surface can occur Some variations, the license plate image to make closer to true license plate image, need to initial license plate image carry out pixel value with Machine disturbance, and then obtain the first license plate image of pixel value random distribution.
Wherein, random perturbation refers to the pixel value for each point, carries out random variation pixel value according to predetermined manner.
For example, in a specific embodiment, predetermined manner are as follows: be the range of itself [- 20,20] according to range of disturbance Random perturbation is carried out, wherein the rgb pixel value of certain pixel is (6,12,230), is become after the random perturbation of the predetermined manner For (8,12,226).
It is worth noting that the range of every kind of pigment is [0,255] in pixel value, that is, maximum value is 255 after disturbing, minimum Value is 0.
S42: the first license plate image is subjected to corrosion expansion process, obtains the second license plate image.
Specifically, after the random perturbation that step S41 carries out pixel value, in fact it could happen that some pixel values and neighboring pixel It is worth the biggish pixel of deviation, by carrying out Image erosion expansion process to the first license plate image, so that the first license plate image is more For nature.
Wherein, the effect of corrosion is to eliminate object boundary point, makes shrinking of object, can eliminate the noise less than structural element Point;The effect of expansion is that all background dots contacted with object are merged into object, increases target, can replenish in target Cavity.Opening operation in image procossing is first to corrode the process expanded afterwards, can eliminate noise tiny on image, and smooth object Body boundary.The process of post-etching is first expanded when closed operation in image procossing, it can be and smooth with cavity tiny in filler body Object boundary.
Preferably, the embodiment of the present invention by the way of opening operation come so that image smoothing, i.e., after first carrying out etching operation Carry out expansive working.
S43: Fuzzy Processing is carried out to the second license plate image by Gaussian Blur algorithm, obtains simulation license plate image.
Specifically, the true license plate image of shooting has some heat due to being influenced by environmental factor and shooting factor Noise and shot noise etc. add white Gaussian noise using Gaussian Blur algorithm in the picture, obtain for the second license plate image License plate image is simulated, so that simulating license plate image closer to true license plate image.
Wherein, the Gauss in white Gaussian noise (White Gaussian Noise) refers to that probability distribution is Gaussian Profile, And white noise refers to that its second moment is uncorrelated, first moment is constant, and the successively correlation of signal in time.
In the present embodiment, random perturbation is carried out to the pixel value of pixel in initial license plate image, it is random to obtain pixel value First license plate image of distribution, and then the first license plate image is subjected to corrosion expansion process, the second license plate image is obtained, is then led to It crosses Gauss fuzzy algorithmic approach and Fuzzy Processing is carried out to the second license plate image, simulation license plate image is obtained, so that obtained fuzzy license plate Image improves the quality of simulation license plate image closer to true license plate image compared to initial license plate image.
On the basis of the corresponding embodiment of Fig. 5, below by a specific embodiment come to being mentioned in step S41 And in the initial license plate image pixel pixel value carry out random perturbation, obtain the first vehicle of pixel value random distribution The concrete methods of realizing of board image is described in detail.
Referring to Fig. 6, Fig. 6 shows the specific implementation flow of step S41 provided in an embodiment of the present invention, details are as follows:
S411: the pixel of predetermined number is randomly selected from preset true license plate image, as sampled point.
Specifically, to make initial license plate image as close as true license plate image, from the true license plate figure of shooting As in randomly select some pixels, as sampled point, so the subsequent pixel variation range according to these sampled points come pair The pixel value of pixel in initial license plate image carries out random perturbation.
For example, in a specific embodiment, the true license plate image that preset 50 background colors are blue is chosen, from every 10 pixels are obtained at random as sampled point in true license plate image, obtain 500 sampled points.
S412: the RGB color value of each sampled point is obtained, and is determined according to the distribution of RGB color value to pixel value Carry out the target amplitude of random perturbation.
Specifically, the RGB color value of each sampled point is obtained, and according to these RGB color values, determines the RGB of sampled point The distribution of color value carries out the target amplitude of random perturbation using this distribution as pixel value.
Wherein, RGB color is a kind of color standard of industry, is by the variation to three Color Channels of red, green, blue And their mutual superpositions, to obtain miscellaneous color, RGB is the face for representing three channels of red, green, blue Color, this standard almost include all colours that human eyesight can perceive, and are to use most wide one of color system at present, RGB color value, that is, RGB color value, it includes the value of the value of red channel, the value of green channel and blue channel.
It is worth noting that the range of disturbance of the value of the value of above-mentioned red channel, the value of green channel and blue channel can With identical, can also be different.
S413: the pixel in initial license plate image is randomly choosed as target pixel points, and in the range of target amplitude Interior, the random pixel value for changing target pixel points obtains the first license plate image of pixel value random distribution.
Specifically, it after determining the target amplitude for carrying out random perturbation to pixel value, is selected at random from initial license plate image Capture vegetarian refreshments carries out random perturbation to target pixel points, and then obtain as target pixel points, and within the scope of above-mentioned target amplitude To the first license plate image of pixel value random distribution.
Wherein, random perturbation, which refers to, makees random change to pixel value.
It is worth noting that choosing the pixel as target pixel points, the partial pixel point in license plate image can be, The alternatively all pixels point in initial license plate image, can be chosen according to the actual situation.
Preferably, the embodiment of the present invention randomly selects some pixel conducts in the pixel around license plate number character Target pixel points.
In the present embodiment, by randomly selecting the pixel of predetermined number from preset true license plate image, as adopting Sampling point, and obtain the RGB color value of each sampled point, and according to the distribution of RGB color value determine to pixel value carry out with The target amplitude of machine disturbance, and then the pixel in initial license plate image is randomly choosed as target pixel points, and in target width In the range of degree, the random pixel value for changing target pixel points obtains the first license plate image of pixel value random distribution, so that the The pixel value of one license plate image is conducive to the matter for improving simulation license plate image by random perturbation, more close true license plate image Amount.
On the basis of the corresponding embodiment of Fig. 5, below by a specific embodiment come to being mentioned in step S43 And by Gaussian Blur algorithm to the second license plate image carry out Fuzzy Processing, obtain simulation license plate image concrete methods of realizing It is described in detail.
Referring to Fig. 7, Fig. 7 shows the specific implementation flow of step S43 provided in an embodiment of the present invention, details are as follows:
S431: the pixel value of each pixel in the second license plate image is obtained.
Specifically, it is successively read the pixel value of each pixel in the second license plate image.
S432: it is directed to each pixel, the pixel value of each pixel is updated using following formula, obtains each pixel Provisional pixel value:
Wherein, f (x) is the provisional pixel value of each pixel, and x is the pixel value of each pixel, and μ is preset average Value, σ are preset standard variance, and π is pi,Be using natural constant e the bottom of as, withTo refer to The value of several exponential functions.
Specifically, for each pixel, by above-mentioned formula, its interim pixel obtain after Gaussian transformation is calculated Value.
Wherein, σ is preset standard variance, acquisition modes are as follows: according to presetting each pixel in true license plate image Pixel value, calculate the standard variance of pixel in preset true license plate image, and then using the standard variance as preset Standard variance σ.
Wherein, μ is preset average value, and acquisition methods are identical as preset standard variance σ, to avoid repeating, herein It repeats no more.
S433: it by the provisional pixel value of each pixel according to preset compress mode, zooms between 0 to 255, obtains The target pixel value of each pixel.
Specifically, after Gaussian transformation, the pixel value there is a situation where it is too large or too small, at this time, it may be necessary to right Pixel value is compressed, i.e., zooms to pixel value between 0 to 255, concrete mode are as follows: is obtained maximum pixel value, is calculated most Big pixel value and 255 ratio, as scaling, meanwhile, by you flirtatious pixel value of all pixels divided by the scaling, obtain To the target pixel value of each pixel.
It is worth noting that three channels of pixel value, each channel can obtain a maximum value and exist as pixel value The maximum value in this channel, and then carry out the calculating of the channel scaling.
For example, in a specific embodiment, the pixel value of a pixel is (116,52,296), the blue of the pixel The pixel value in channel is the max pixel value of all blue channels, thus using 296/255 value as the pantograph ratio of blue channel Example, meanwhile, by the pixel value of the blue channel of each pixel divided by 296/255 value, the pixel can be obtained in indigo plant The target pixel value of chrominance channel can similarly obtain the target pixel value of red channel and green channel.
S434: using the target pixel value of each pixel, being updated the second license plate image, obtains simulation license plate figure Picture.
Specifically, using the target pixel value being calculated in step S433, the pixel value in the second license plate image is replaced, And then obtain simulation license plate image.
In the present embodiment, the pixel value of each pixel in the second license plate image is obtained, and then use Gaussian Blur, to the The pixel value of each pixel is updated in two license plate images, obtains provisional pixel value, and by the interim picture of each pixel Element value zooms between 0 to 255 according to preset compress mode, obtains the target pixel value of each pixel, use each picture The target pixel value of vegetarian refreshments is updated the second license plate image, obtains simulation license plate image, so that simulation license plate image Closer to true license plate image, the stability of simulation license plate image quality ensure that.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
In one embodiment, a kind of license plate image generating means based on Style Transfer are provided, it should be based on Style Transfer License plate image generation method in license plate image generating means and above-described embodiment based on Style Transfer corresponds.Such as Fig. 8 institute Show, being somebody's turn to do the license plate image generating means based on Style Transfer includes type acquisition module 10, number generation module 20, image synthesis Module 30, image pre-processing module 40 and Style Transfer module 50.Detailed description are as follows for each functional module:
Type acquisition module 10, if for receiving the instruction for generating license plate image, the license plate for including in acquisition instruction Type;
Number generation module 20, for generating random license plate number according to the corresponding license plate number structure of license plate type;
Image synthesis module 30, for from choosing the corresponding character figure of each character in license plate number in preset fontlib Picture, and character picture is combined into initial license plate image;
Image pre-processing module 40 obtains simulation license plate image for carrying out image preprocessing to initial license plate image;
Style Transfer module 50 carries out Style Transfer to simulation license plate image, obtains mesh for using Style Transfer algorithm Mark license plate image.
Further, image pre-processing module 40 includes:
Random perturbation unit 41 carries out random perturbation for the pixel value to pixel in the initial license plate image, obtains To the first license plate image of pixel value random distribution;
Corrode expansion cell 42 and obtains the second license plate figure for first license plate image to be carried out corrosion expansion process Picture;
Gaussian Blur unit 43 is obtained for carrying out Fuzzy Processing to second license plate image by Gaussian Blur algorithm To simulation license plate image.
Further, random perturbation module 41 includes:
Sampling point obtains subelement 411, for randomly selecting the pixel of predetermined number from preset true license plate image, As sampled point;
Range determines subelement 412, for obtaining the RGB color value of each sampled point, and according to the distribution of RGB color value Range determines the target amplitude that random perturbation is carried out to pixel value;
Pixel perturbations subelement 413, for randomly choosing the pixel in initial license plate image as target pixel points, and In the range of target amplitude, the random pixel value for changing target pixel points obtains the first license plate figure of pixel value random distribution Picture.
Further, Gaussian Blur module 43 includes:
Pixel value obtains subelement 431, for obtaining the pixel value of each pixel in the second license plate image;
Pixel value updates subelement 432, and for being directed to each pixel, the picture of each pixel is updated using following formula Element value, obtains the provisional pixel value of each pixel:
Wherein, f (x) is the provisional pixel value of each pixel, and x is the pixel value of each pixel, and μ is preset average Value, σ are preset standard variance, and π is pi,Be using natural constant e the bottom of as, withTo refer to The value of several exponential functions;
Pixel value compresses subelement 433, for the provisional pixel value of each pixel according to preset compress mode, to contract It is put between 0 to 255, obtains the target pixel value of each pixel;
Image update subelement 434 carries out more the second license plate image for using the target pixel value of each pixel Newly, simulation license plate image is obtained.
Further, Style Transfer module 50 includes:
Image acquisition unit 51, for obtaining preset true license plate image;
Feature extraction unit 52, for using convolutional neural networks VGG-NET model respectively to true license plate image and mould Quasi- license plate image carries out feature extraction, and the initial pictures for obtaining true license plate image each convolutional layer in VGG-NET model are special Collection is closed, and the initial pictures characteristic set of simulation license plate image each convolutional layer in VGG-NET model;
Content characteristic determination unit 53, for it is pre- to choose first from the initial pictures characteristic set of simulation license plate image If the characteristics of image of layer is as content characteristic;
Style and features determination unit 54, for it is pre- to choose second from the initial pictures characteristic set of true license plate image If the characteristics of image of layer carries out inner product operation, style and features are obtained;
Image generation unit 55 carries out characteristics of image to style and features and content characteristic for using DeepDream algorithm Visualization processing generates target license plate image.
Further, image generation unit 55 includes:
Feature obtains subelement 551, and the white noise acoustic image for obtaining preset size identical as simulation license plate image is made For initial pictures, and initial pictures are input in VGG-NET model and carry out feature extraction, obtains initial pictures in VGG-NET The characteristics of image of each convolutional layer in model;
Weight determines subelement 552, for determining initial pictures each convolution in VGG-NET model using following formula The content characteristic weight α and style and features weight beta of layer:
Ltotal(p, a, x)=α Lcontent(p,x)+βLstyle(a,x)
Wherein, Ltotal(p, a, x) is total losses function, Lcontent(p, x) is characteristics of image of the initial pictures at each layer Relative to the loss function of the content characteristic, Lstyle(a, x) be initial pictures in each layer of characteristics of image relative to style The loss function of feature, Lcontent(p, x) and Lstyle(a, x) is calculated by preset loss function calculation formula, and alpha+beta= 1, α and β is nonnegative number, and p representative simulation license plate image, a represents true license plate image, and x represents initial pictures;
Feature updates subelement 553, for the content characteristic weight according to content characteristic, style and features, each convolutional layer With the style and features weight of each convolutional layer, the updated characteristics of image of initial pictures is obtained;
Loop iteration subelement 554 for updated characteristics of image to be input in VGG-NET model, and is returned and is held Exercise the content characteristic weight α and style and features that initial pictures each convolutional layer in VGG-NET model is determined with following formula The step of weight beta, reaches default the number of iterations until executing number, obtains target image characteristics;
Image determines subelement 555, for generating target license plate image according to target image characteristics.
Specific restriction about the license plate image generating means based on Style Transfer may refer to above to based on style The restriction of the license plate image generation method of migration, details are not described herein.The above-mentioned license plate image generating means based on Style Transfer In modules can be realized fully or partially through software, hardware and combinations thereof.Above-mentioned each module can be interior in the form of hardware It is embedded in or independently of the memory that in the processor in computer equipment, can also be stored in a software form in computer equipment In, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction Composition can be as shown in Figure 9.The computer equipment include by system bus connect processor, memory, network interface and Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The database of machine equipment is for storing preset license plate number structure and character repertoire.The network interface of the computer equipment be used for External terminal passes through network connection communication.To realize a kind of license plate image generation side when the computer program is executed by processor Method.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory And the computer program that can be run on a processor, processor realize that above-described embodiment is moved based on style when executing computer program The step of license plate image generation method of shifting, such as step S10 shown in Fig. 2 to step S50.Alternatively, processor executes calculating The function of each module/unit of the license plate image generating means in above-described embodiment based on Style Transfer, example are realized when machine program Module 10 as shown in Figure 8 to module 50 function.To avoid repeating, details are not described herein again.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated The license plate image generation method based on Style Transfer in above method embodiment is realized when machine program is executed by processor, alternatively, The license plate image generating means based on Style Transfer in above-mentioned apparatus embodiment are realized when the computer program is executed by processor In each module/unit function.To avoid repeating, details are not described herein again.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.It is non-volatile Property memory may include that read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electric erasable can be compiled Journey ROM (EEPROM) or flash memory.Volatile memory may include random access memory (RAM) or external caches Device.By way of illustration and not limitation, RAM is available in many forms, such as static state RAM (SRAM), dynamic ram (DRAM), synchronizes DRAM (SDRAM), double data rate sdram (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) directly RAM (RDRAM), direct memory bus dynamic ram (DRDRAM), And memory bus dynamic ram (RDRAM) etc..
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of license plate image generation method based on Style Transfer, which is characterized in that the license plate figure based on Style Transfer As generation method includes:
If receiving the instruction for generating license plate image, the license plate type for including in described instruction is obtained;
According to the corresponding license plate number structure of the license plate type, random license plate number is generated;
From character picture corresponding with the character for including in the license plate number is chosen in preset fontlib, according to the word Image and the license plate number are accorded with, initial license plate image is generated;
Image preprocessing is carried out to the initial license plate image, obtains simulation license plate image;
Using Style Transfer algorithm, Style Transfer is carried out to the simulation license plate image, obtains target license plate image.
2. the license plate image generation method based on Style Transfer as described in claim 1, which is characterized in that described to use style Migration algorithm carries out Style Transfer to the simulation license plate image, and obtaining target license plate image includes:
Obtain preset true license plate image;
The true license plate image and the simulation license plate image are carried out respectively using convolutional neural networks VGG-NET model special Sign is extracted, and the initial pictures characteristic set of the true license plate image each convolutional layer in the VGG-NET model is obtained, with And the initial pictures characteristic set of simulation license plate image each convolutional layer in the VGG-NET model;
From the initial pictures characteristic set of the simulation license plate image, the characteristics of image of the first default layer is chosen as content spy Sign;
From the initial pictures characteristic set of the true license plate image, the characteristics of image for choosing the second default layer carries out inner product fortune It calculates, obtains style and features;
Using DeepDream algorithm, characteristics of image visualization processing is carried out to the style and features and the content characteristic, is generated The target license plate image.
3. the license plate image generation method based on Style Transfer as claimed in claim 2, which is characterized in that the use DeepDream algorithm carries out characteristics of image visualization processing to the style and features and the content characteristic, generates the target License plate image includes:
The white noise acoustic image of preset size identical as the simulation license plate image is obtained as initial pictures, and will be described initial Image is input in the VGG-NET model and carries out feature extraction, and it is every in the VGG-NET model to obtain the initial pictures The characteristics of image of a convolutional layer;
The content characteristic weight α and wind of initial pictures each convolutional layer in the VGG-NET model are determined using following formula Lattice feature weight β:
Ltotal(p, a, x)=α Lcontent(p,x)+βLstyle(a,x)
Wherein, Ltotal(p, a, x) is total losses function, Lcontent(p, x) is characteristics of image of the initial pictures at each layer Relative to the loss function of the content characteristic, Lstyle(a, x) be the initial pictures each layer characteristics of image relative to The loss function of the style and features, Lcontent(p, x) and Lstyle(a, x) is calculated by preset loss function calculation formula It arrives, and alpha+beta=1, α and β are nonnegative number, p representative simulation license plate image, a represents true license plate image, and x represents initial pictures;
According to the content characteristic, the style and features, the content characteristic weight of each convolutional layer and each convolutional layer The style and features weight obtains the updated characteristics of image of the initial pictures;
The updated characteristics of image is input in the VGG-NET model, and returns and executes the following formula of the use Determine the step of initial pictures content characteristic weight α and style and features weight beta of each convolutional layer in the VGG-NET model Suddenly, reach default the number of iterations until executing number, obtain target image characteristics;
According to the target image characteristics, the target license plate image is generated.
4. the license plate image generation method as described in any one of claims 1 to 3 based on Style Transfer, which is characterized in that institute It states and image preprocessing is carried out to the initial license plate image, obtaining simulation license plate image includes:
Random perturbation is carried out to the pixel value of the pixel of the initial license plate image, obtains the first vehicle of pixel value random distribution Board image;
First license plate image is subjected to corrosion expansion process, obtains the second license plate image;
Gaussian Blur is carried out to second license plate image by Gaussian Blur algorithm, obtains simulation license plate image.
5. the license plate image generation method based on Style Transfer as claimed in claim 4, which is characterized in that described to described first The pixel value of the pixel of beginning license plate image carries out random perturbation, and the first license plate image for obtaining pixel value random distribution includes:
The pixel that predetermined number is randomly selected from preset true license plate image, as sampled point;
Obtain the RGB color value of each sampled point, and according to the distribution of the RGB color value determine to pixel value into The target amplitude of row random perturbation;
The pixel in the initial license plate image is randomly choosed as target pixel points, and in the range of the target amplitude It is interior, change the pixel value of the target pixel points at random, obtains first license plate image of pixel value random distribution.
6. the license plate image generation method based on Style Transfer as claimed in claim 4, which is characterized in that described to pass through Gauss Fuzzy algorithmic approach carries out Gaussian Blur to second license plate image, obtains simulation license plate image and includes:
Obtain the pixel value of each pixel in the second license plate image;
For each pixel, the pixel value of the pixel is updated using following formula, obtains provisional pixel value:
Wherein, f (x) is the provisional pixel value, and x is the pixel value of the pixel, and μ is preset average value, and σ is preset mark Quasi- variance, π are pi,Be using natural constant e the bottom of as, withFor the exponential function of index Value;
It by the provisional pixel value according to preset compress mode, zooms between 0 to 255, obtains target pixel value;
The target pixel value based on each pixel is updated second license plate image, obtains the simulation vehicle Board image.
7. a kind of license plate image generating means based on Style Transfer, which is characterized in that the license plate figure based on Style Transfer As generating means include:
Type acquisition module, if obtaining the license plate class for including in described instruction for receiving the instruction for generating license plate image Type;
Number generation module, for generating random license plate number according to the corresponding license plate number structure of the license plate type;
Image synthesis module, for from choosing corresponding with the character for including in license plate number word in preset fontlib It accords with image and initial license plate image is generated according to the character picture and the license plate number;
Image pre-processing module obtains simulation license plate image for carrying out image preprocessing to the initial license plate image;
Style Transfer module carries out Style Transfer to the simulation license plate image, obtains target for using Style Transfer algorithm License plate image.
8. the license plate image generating means based on Style Transfer as claimed in claim 7, which is characterized in that the Style Transfer Module includes:
Image acquisition unit, for obtaining preset true license plate image;
Feature extraction unit, for using convolutional neural networks VGG-NET model respectively to the true license plate image and described It simulates license plate image and carries out feature extraction, obtain the true license plate image each convolutional layer in the VGG-NET model The initial pictures of initial pictures characteristic set and simulation license plate image each convolutional layer in the VGG-NET model Characteristic set;
Content characteristic determination unit, for it is default to choose first from the initial pictures characteristic set of the simulation license plate image The characteristics of image of layer is as content characteristic;
Style and features determination unit, for it is default to choose second from the initial pictures characteristic set of the true license plate image The characteristics of image of layer carries out inner product operation, obtains style and features;
It is special to carry out image to the style and features and the content characteristic for using DeepDream algorithm for image generation unit Visualization processing is levied, the target license plate image is generated.
9. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to License plate image generation method described in 6 any one based on Style Transfer.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In realization is as described in any one of claim 1 to 6 based on the license plate of Style Transfer when the computer program is executed by processor The step of image generating method.
CN201810978822.5A 2018-08-27 2018-08-27 License plate image generation method, device, equipment and medium based on style migration Active CN109255772B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810978822.5A CN109255772B (en) 2018-08-27 2018-08-27 License plate image generation method, device, equipment and medium based on style migration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810978822.5A CN109255772B (en) 2018-08-27 2018-08-27 License plate image generation method, device, equipment and medium based on style migration

Publications (2)

Publication Number Publication Date
CN109255772A true CN109255772A (en) 2019-01-22
CN109255772B CN109255772B (en) 2024-05-03

Family

ID=65049611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810978822.5A Active CN109255772B (en) 2018-08-27 2018-08-27 License plate image generation method, device, equipment and medium based on style migration

Country Status (1)

Country Link
CN (1) CN109255772B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009028A (en) * 2019-03-28 2019-07-12 北京科技大学 A kind of micro-image data enhancement methods and device
CN110211119A (en) * 2019-06-04 2019-09-06 厦门美图之家科技有限公司 Image quality measure method, apparatus, electronic equipment and readable storage medium storing program for executing
CN110503716A (en) * 2019-08-12 2019-11-26 中国科学技术大学 A kind of automobile license plate generated data generation method
CN110782391A (en) * 2019-09-10 2020-02-11 腾讯科技(深圳)有限公司 Image processing method and device in driving simulation scene and storage medium
CN111626124A (en) * 2020-04-24 2020-09-04 平安国际智慧城市科技股份有限公司 OCR image sample generation method, OCR image sample generation device, OCR image sample printing body verification equipment and OCR image sample printing body verification medium
CN111784569A (en) * 2020-09-04 2020-10-16 平安国际智慧城市科技股份有限公司 Method, device, medium, and apparatus for generating paired license plate images and vehicle images
CN111986302A (en) * 2020-07-23 2020-11-24 北京石油化工学院 Image style migration method and device based on deep learning
WO2021027890A1 (en) * 2019-08-15 2021-02-18 杭州海康威视数字技术股份有限公司 License plate image generation method and device, and computer storage medium
CN112419186A (en) * 2020-11-20 2021-02-26 北京易华录信息技术股份有限公司 License plate image batch generation method and device and computer equipment
CN112464924A (en) * 2019-09-06 2021-03-09 华为技术有限公司 Method and device for constructing training set
CN112489165A (en) * 2020-11-06 2021-03-12 中科云谷科技有限公司 Method, device and storage medium for synthesizing characters
CN113469969A (en) * 2021-06-29 2021-10-01 深圳中科飞测科技股份有限公司 Image generation method, image generation device, detection device, and readable storage medium
CN113971627A (en) * 2020-07-23 2022-01-25 华为技术有限公司 License plate picture generation method and device
CN117236284A (en) * 2023-11-13 2023-12-15 江西师范大学 Font generation method and device based on style information and content information adaptation
CN111626124B (en) * 2020-04-24 2024-06-11 平安国际智慧城市科技股份有限公司 OCR image sample generation and printing experience verification method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100855450B1 (en) * 2007-06-04 2008-09-01 에스케이 텔레콤주식회사 Method for transferring motion style of movie object and apparatus applied to the same
CN104504744A (en) * 2014-12-31 2015-04-08 深圳市捷顺科技实业股份有限公司 License plate image composition simulating method and device
CN107180410A (en) * 2017-04-11 2017-09-19 中国农业大学 The stylized method for reconstructing and device of a kind of image
CN107689035A (en) * 2017-08-30 2018-02-13 广州华多网络科技有限公司 A kind of homography matrix based on convolutional neural networks determines method and device
US20180211157A1 (en) * 2017-01-25 2018-07-26 Boe Technology Group Co., Ltd. Image processing method and device
CN108446700A (en) * 2018-03-07 2018-08-24 浙江工业大学 A kind of car plate attack generation method based on to attack resistance

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100855450B1 (en) * 2007-06-04 2008-09-01 에스케이 텔레콤주식회사 Method for transferring motion style of movie object and apparatus applied to the same
CN104504744A (en) * 2014-12-31 2015-04-08 深圳市捷顺科技实业股份有限公司 License plate image composition simulating method and device
US20180211157A1 (en) * 2017-01-25 2018-07-26 Boe Technology Group Co., Ltd. Image processing method and device
CN107180410A (en) * 2017-04-11 2017-09-19 中国农业大学 The stylized method for reconstructing and device of a kind of image
CN107689035A (en) * 2017-08-30 2018-02-13 广州华多网络科技有限公司 A kind of homography matrix based on convolutional neural networks determines method and device
CN108446700A (en) * 2018-03-07 2018-08-24 浙江工业大学 A kind of car plate attack generation method based on to attack resistance

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
YIRU ZHAO ET AL.: "Stylized Adversarial AutoEncoder for Image Generation", PROCEEDINGS OF THE 2017 ACM ON MULTIMEDIA CONFERENCE, pages 244 - 251 *
黄建茂: "卷积神经网络的风格迁移算法在场景处理中的应用", 宜宾学院学报.HTTP://KNS.CNKI.NET/KCMS/DETAIL/51.1630.Z.20180517.1717.002.HTML, pages 1 - 7 *

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009028B (en) * 2019-03-28 2021-04-02 北京科技大学 Microscopic image data enhancement method and device
CN110009028A (en) * 2019-03-28 2019-07-12 北京科技大学 A kind of micro-image data enhancement methods and device
CN110211119A (en) * 2019-06-04 2019-09-06 厦门美图之家科技有限公司 Image quality measure method, apparatus, electronic equipment and readable storage medium storing program for executing
CN110211119B (en) * 2019-06-04 2021-06-04 厦门美图之家科技有限公司 Image quality evaluation method and device, electronic equipment and readable storage medium
CN110503716A (en) * 2019-08-12 2019-11-26 中国科学技术大学 A kind of automobile license plate generated data generation method
CN110503716B (en) * 2019-08-12 2022-09-30 中国科学技术大学 Method for generating motor vehicle license plate synthetic data
WO2021027890A1 (en) * 2019-08-15 2021-02-18 杭州海康威视数字技术股份有限公司 License plate image generation method and device, and computer storage medium
CN112396076A (en) * 2019-08-15 2021-02-23 杭州海康威视数字技术股份有限公司 License plate image generation method and device and computer storage medium
CN112464924A (en) * 2019-09-06 2021-03-09 华为技术有限公司 Method and device for constructing training set
CN110782391A (en) * 2019-09-10 2020-02-11 腾讯科技(深圳)有限公司 Image processing method and device in driving simulation scene and storage medium
CN111626124A (en) * 2020-04-24 2020-09-04 平安国际智慧城市科技股份有限公司 OCR image sample generation method, OCR image sample generation device, OCR image sample printing body verification equipment and OCR image sample printing body verification medium
CN111626124B (en) * 2020-04-24 2024-06-11 平安国际智慧城市科技股份有限公司 OCR image sample generation and printing experience verification method, device, equipment and medium
CN113971627A (en) * 2020-07-23 2022-01-25 华为技术有限公司 License plate picture generation method and device
CN111986302A (en) * 2020-07-23 2020-11-24 北京石油化工学院 Image style migration method and device based on deep learning
CN113971627B (en) * 2020-07-23 2023-07-18 华为技术有限公司 License plate picture generation method and device
CN111784569A (en) * 2020-09-04 2020-10-16 平安国际智慧城市科技股份有限公司 Method, device, medium, and apparatus for generating paired license plate images and vehicle images
CN112489165A (en) * 2020-11-06 2021-03-12 中科云谷科技有限公司 Method, device and storage medium for synthesizing characters
CN112489165B (en) * 2020-11-06 2024-02-06 中科云谷科技有限公司 Method, device and storage medium for synthesizing characters
CN112419186A (en) * 2020-11-20 2021-02-26 北京易华录信息技术股份有限公司 License plate image batch generation method and device and computer equipment
CN112419186B (en) * 2020-11-20 2024-03-26 北京易华录信息技术股份有限公司 Batch generation method and device for license plate images and computer equipment
CN113469969A (en) * 2021-06-29 2021-10-01 深圳中科飞测科技股份有限公司 Image generation method, image generation device, detection device, and readable storage medium
CN117236284A (en) * 2023-11-13 2023-12-15 江西师范大学 Font generation method and device based on style information and content information adaptation

Also Published As

Publication number Publication date
CN109255772B (en) 2024-05-03

Similar Documents

Publication Publication Date Title
CN109255772A (en) License plate image generation method, device, equipment and medium based on Style Transfer
CN109325989A (en) License plate image generation method, device, equipment and medium
CN108921822A (en) Image object method of counting based on convolutional neural networks
CN109035260A (en) A kind of sky areas dividing method, device and convolutional neural networks
CN108537115B (en) Image recognition method and device and electronic equipment
Kim et al. CityCraft: 3D virtual city creation from a single image
CN109033107A (en) Image search method and device, computer equipment and storage medium
CN108229519A (en) The method, apparatus and system of image classification
CN109147011A (en) License plate image generation method, device, computer equipment and storage medium
CN108304357A (en) A kind of Chinese word library automatic generation method based on font manifold
CN114092833B (en) Remote sensing image classification method and device, computer equipment and storage medium
CN109657582A (en) Recognition methods, device, computer equipment and the storage medium of face mood
CN107944459A (en) A kind of RGB D object identification methods
CN108898639A (en) A kind of Image Description Methods and system
CN107392213B (en) Face portrait synthesis method based on depth map model feature learning
CN110516541A (en) Text positioning method, device, computer readable storage medium and computer equipment
CN110348383A (en) A kind of road axis and two-wire extracting method based on convolutional neural networks recurrence
CN106355210B (en) Insulator Infrared Image feature representation method based on depth neuron response modes
CN109063720A (en) Handwritten word training sample acquisition methods, device, computer equipment and storage medium
Gao et al. Complementary, heterogeneous and adversarial networks for image-to-image translation
Xia et al. Urban remote sensing scene recognition based on lightweight convolution neural network
CN109345604A (en) Image processing method, computer equipment and storage medium
CN113361589A (en) Rare or endangered plant leaf identification method based on transfer learning and knowledge distillation
CN108764233A (en) A kind of scene character recognition method based on continuous convolution activation
CN112232269A (en) Twin network-based intelligent ship identity identification method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant