CN108805884A - A kind of mosaic area's detection method, device and equipment - Google Patents
A kind of mosaic area's detection method, device and equipment Download PDFInfo
- Publication number
- CN108805884A CN108805884A CN201810609003.3A CN201810609003A CN108805884A CN 108805884 A CN108805884 A CN 108805884A CN 201810609003 A CN201810609003 A CN 201810609003A CN 108805884 A CN108805884 A CN 108805884A
- Authority
- CN
- China
- Prior art keywords
- picture
- mosaic area
- pixel value
- block
- mosaic
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
Abstract
The application discloses a kind of mosaic area's detection method, device and equipment, this method:Picture to be detected is input to Image Segmentation Model;Wherein, described image parted pattern is obtained after being trained to neural network model using the picture for marking mosaic area as training sample;After carrying out image segmentation processing to the picture to be detected by described image parted pattern, the mosaic area of the picture to be detected is exported.The application realizes that mosaic area detects using neural network model, can largely improve the detection accuracy of mosaic area, while there is no the various problems in existing edge detection method.
Description
Technical field
This application involves data processing fields, and in particular to a kind of mosaic area's detection method, device and equipment.
Background technology
Aging due to capture apparatus and other defect problem, may cause the picture shot using above equipment,
There are mosaic areas for video etc., and are unclear for a user there are the image of mosaic area, so, Ke Yitong
Cross the mosaic area determined to the detection of mosaic area in image or video, so as to technical staff to image or video into
Row is repaired.
Existing mosaic area's detection method is the edge detection based on image, typically by original coloured image
Gray level image is converted to, by carrying out edge extracting to gray level image, is based ultimately upon the image progress mosaic for extracting edge
The determination in region.
Above-mentioned mosaic area's detection method based on edge detection, is only applicable to normal region and the side of mosaic area
There are the images of apparent pattern differentials for edge intensity, and for being unsatisfactory for the image of above-mentioned condition, this method can not be completed to horse
Match the detection in gram region.In addition, existing method is detected based on the premise that mosaic area is rectangle, for other
The mosaic area of shape can not accurately detect.Meanwhile for there is the edge shape pattern with mosaic area in image
When similar criss-cross character (such as China, Japan and Korea S.'s word), striped, grid-like scarf or floor tile, this method will appear obviously
Flase drop.
So there is an urgent need for a kind of methods that can accurately detect mosaic area at present.
Invention content
To solve the above problems, this application provides a kind of mosaic area's detection method, device and equipment, particular technique
Scheme is as follows:
In a first aspect, this application provides a kind of mosaic area's detection method, the method includes:By picture to be detected
It is input to Image Segmentation Model;Wherein, described image parted pattern is using marking the picture of mosaic area as training
Sample obtains after being trained to neural network model;
After carrying out image segmentation processing to the picture to be detected by described image parted pattern, the mapping to be checked is exported
The mosaic area of piece.
Optionally, it is described picture to be detected is input to Image Segmentation Model before, further include:
Generate the picture for marking mosaic area;
Using the picture as training sample, and training sample set is formed by several training samples;The wherein described instruction
Practice sample set for training neural network model.
Optionally, the generation marks the picture of mosaic area, including:
The picture for any not being included mosaic area is determined as picture I;
By the picture I reduce N1 times after, according to arest neighbors method be amplified to the picture I same sizes, obtain figure
Piece I1;
Image segmentation is carried out according to texture and color to the picture I or described pictures I1, obtains that there are several segmentation blocks
Picture S;Wherein, several segmentation blocks of the picture S include mosaic area's block and normal region block, the mosaic area
Pixel value in the block is 1, and the normal region pixel value in the block is 0;
According to the picture S, the picture I and the picture I1, picture IM is generated;Wherein, in the picture IM with institute
The pixel value for stating the corresponding position of mosaic area's block of picture S is identical as corresponding position pixel value in the picture I1, described
Corresponding position pixel value in the pixel value Yu the picture I of position corresponding with the normal region block of picture S in picture IM
It is identical;
Using the picture IM and the picture S as the picture for marking mosaic area;Wherein, the picture S is used for
Mark the mosaic area of the picture IM.
Optionally, before the generation picture IM, further include:
By the picture I reduce N2 times after, according to arest neighbors method be amplified to the picture I same sizes, obtain figure
Piece I2;
The picture I1 and the picture I2 are obtained into picture M according to the proportion weighted generated at random;
Correspondingly, described carry out image segmentation to the picture I or described pictures I1 according to texture and color, had
The picture S of several segmentation blocks, including:
Image segmentation is carried out according to texture and color to the picture I, the picture I1 or described pictures I2, is had
The picture S of several segmentation blocks;
Correspondingly, in the picture IM pixel value of position corresponding with mosaic area's block of picture S with it is described
Corresponding position pixel value is identical in picture I1, specially:
In the picture IM in the pixel value Yu the picture M of position corresponding with mosaic area's block of picture S
Corresponding position pixel value is identical.
Optionally, the neural network model includes full convolutional neural networks model or the convolutional neural networks mould with hole
Type.
Second aspect, present invention also provides a kind of mosaic area's detection device, described device includes:
Input module, for picture to be detected to be input to Image Segmentation Model;Wherein, described image parted pattern is profit
It uses the picture for marking mosaic area as training sample, is obtained after being trained to neural network model;
Output module, it is defeated after carrying out image segmentation processing to the picture to be detected by described image parted pattern
Go out the mosaic area of the picture to be detected.
Optionally, described device further includes:
Generation module, for generating the picture for marking mosaic area;
Training module is used for using the picture as training sample, and forms training sample by several training samples
Collection;The wherein described training sample set is for training neural network model.
Optionally, the generation module, including:
First determination sub-module, the picture for not including any mosaic area are determined as picture I;
First reduces amplification submodule, for will be amplified to according to arest neighbors method and institute after the picture I reduces N1 times
Picture I same sizes are stated, picture I1 is obtained;
Image segmentation submodule, for carrying out image segmentation according to texture and color to the picture I or described pictures I1,
Obtain the picture S with several segmentation blocks;Wherein, several segmentation blocks of the picture S include mosaic area's block and normal area
Domain block, mosaic area's pixel value in the block are 1, and the normal region pixel value in the block is 0;
First generates submodule, for according to the picture S, the picture I and the picture I1, generating picture IM;Its
In, it is corresponding with the picture I1 with the pixel value of the corresponding position of mosaic area's block of the picture S in the picture IM
Position pixel value is identical, the pixel value Yu the figure of position corresponding with the normal region block of picture S in the picture IM
Corresponding position pixel value is identical in piece I;
Second determination sub-module, for using the picture IM and the picture S as the picture for marking mosaic area;
Wherein, the picture S is used to mark the mosaic area of the picture IM.
Optionally, described device further includes:
Second reduces amplification submodule, for will be amplified to according to arest neighbors method and institute after the picture I reduces N2 times
Picture I same sizes are stated, picture I2 is obtained;
Submodule is weighted, for the picture I1 and the picture I2 to be obtained picture according to the proportion weighted generated at random
M;
Correspondingly, described image divides submodule, it is specifically used for:
Image segmentation is carried out according to texture and color to the picture I, the picture I1 or described pictures I2, is had
The picture S of several segmentation blocks;
Correspondingly, in the picture IM pixel value of position corresponding with mosaic area's block of picture S with it is described
Corresponding position pixel value is identical in picture I1, specially:It is corresponding with mosaic area's block of picture S in the picture IM
The pixel value of position is identical as corresponding position pixel value in the picture M.
The third aspect, present invention also provides a kind of mosaic area's detection device, the equipment includes memory and place
Device is managed,
Said program code is transferred to the processor by the memory for storing program code;
The processor is used to, according to the instruction in said program code, execute mosaic area described in any one of the above embodiments
Detection method.
This application provides a kind of mosaic area's detection methods, first, picture to be detected are input to image segmentation mould
Type;Wherein, described image parted pattern is using marking the picture of mosaic area as training sample, to neural network mould
What type obtained after being trained;After image segmentation processing being carried out by described image parted pattern to the picture to be detected, output
The mosaic area of the picture to be detected.The application realizes that mosaic area detects using neural network model, can be very big
The detection accuracy of mosaic area is improved in degree, while there is no the various problems in existing edge detection method.
Description of the drawings
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present application, for
For those of ordinary skill in the art, without having to pay creative labor, it can also be obtained according to these attached drawings
His attached drawing.
Fig. 1 is a kind of flow chart of mosaic area's detection method provided by the embodiments of the present application;
Fig. 2 is a kind of method flow diagram automatically generating training sample provided by the embodiments of the present application;
Fig. 3 provides a kind of structural schematic diagram with mosaic area's detection device for the embodiment of the present application;
Fig. 4 provides a kind of structural schematic diagram of mosaic area's detection device for the embodiment of the present application.
Specific implementation mode
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
The detection method of existing mosaic area is to find fixed pattern in edge by edge detection and realize
's.There is no the image of apparent pattern differentials for the edge strength of normal region and mosaic area, cannot complete to horse
Match the accurate detection in gram region;It is (such as Sino-Japan for there is criss-cross character similar with the edge shape pattern of mosaic area
Korean word), the picture of striped, grid-like scarf or floor tile etc., the accurate detection to mosaic area can not be completed;It is right
The accurate detection to mosaic area can not be completed in the picture of non-rectangle mosaic area.For above-mentioned various problems, originally
The mosaic area's detection method provided is provided, by the way that mosaic area's test problems are converted to image segmentation problem, is utilized
Depth learning technology is trained neural network model by a large amount of training samples to obtain Image Segmentation Model, utilizes image
Parted pattern is detected mosaic area, can solve the problems, such as it is above-mentioned indeterminable in the prior art, largely
Improve the accuracy of detection of mosaic area.
Specifically, this application provides a kind of mosaic area's detection methods, first, picture to be detected is input to image
Parted pattern;Wherein, described image parted pattern is using marking the picture of mosaic area as training sample, to nerve
What network model obtained after being trained;Image segmentation processing is carried out to the picture to be detected by described image parted pattern
Afterwards, the mosaic area of the picture to be detected is exported.The application realizes that mosaic area detects using neural network model, energy
Enough detection accuracies for largely improving mosaic area, while being asked there is no various in existing edge detection method
Topic.
The embodiment for introducing a kind of mosaic area's detection method provided by the present application in detail below is this Shen with reference to figure 1
Please a kind of flow chart of mosaic area's detection method that provides of embodiment, this method specifically includes:
S101:Picture to be detected is input to Image Segmentation Model;Wherein, described image parted pattern is to utilize to mark
The picture of mosaic area is obtained as training sample after being trained to neural network model.
Picture to be detected in the embodiment of the present application can be single picture, can also be a certain frame of mosaic video
Picture.Mosaic area's detection method provided by the embodiments of the present application can be used for being detected mosaic video, specifically answer
For carrying out mosaic area's detection to the problematic video of quality, in order to effectively be repaired to the video;In addition, may be used also
With applied to the detection etc. to the pornographic video Jing Guo mosaic processing.
In the embodiment of the present application, before the detection for carrying out mosaic area to picture, Image Segmentation Model is obtained first,
Later use Image Segmentation Model carries out picture to be detected the detection of mosaic area, and mosaic area's test problems are turned
Change image segmentation problem, the detection of the completion mosaic area of efficiently and accurately into.
Specifically, Image Segmentation Model is using marking the picture of mosaic area as training sample, to nerve net
What network model obtained after being trained.Wherein, marking the picture of mosaic area can be obtained by way of manually marking,
It is obviously less efficient by way of manually marking but since the magnitude of training sample is larger.
For this purpose, the embodiment of the present application provides a kind of i.e. training sample of picture for automatically generating and marking mosaic area
Method, after generation marks the picture of mosaic area, using these pictures as training sample, and by a large amount of training sample
Training sample set is formed, for in the training of neural network model.
It is a kind of method flow diagram automatically generating training sample provided by the embodiments of the present application, this method tool with reference to figure 2
Body includes:
S201:The picture for any not being included mosaic area is determined as picture I.
Before automatically generating training sample, a data set for including a large amount of pictures is obtained first, wherein ensure data
The picture of concentration does not include mosaic area.Place successively by S201-S205 is required to for each picture in data set
Reason, finally obtains the training sample set for being trained to neural network model.
S202:By the picture I reduce N1 times after, according to arest neighbors method be amplified to the picture I same sizes, obtain
To picture I1.
In S201 after choosing a pictures I in data set, picture I is reduced N1 times first, according still further to arest neighbors side
The picture I for reducing N1 times is amplified to original image size by method, finally obtains picture I1.It is above-mentioned that picture I is reduced after N1 times and put
Greatly to the processing of original image size, it is equivalent to the mosaic for N1 pixel to original picture I addition lattice point sizes.
S203:Image segmentation is carried out according to texture and color to the picture I or described pictures I1, obtains that there are several points
Cut the picture S of block;Wherein, several segmentation blocks of the picture S include mosaic area's block and normal region block, the mosaic
Region pixel value in the block is 1, and the normal region pixel value in the block is 0.
In the embodiment of the present application, to picture I or picture I1, after carrying out image segmentation according to texture and color, if obtaining
Dry segmentation block, wherein the number for dividing block is usually no more than 10 pieces, and the size for dividing block is usually inconsistent, in addition, according to line
The algorithm that reason and color carry out image segmentation can usually use SLIC algorithms.By it is therein be randomly assigned it is several (generally
2-6) segmentation block is labeled as mosaic area, and the pixel value for the pixel being labeled as in mosaic area is set as 1;
Other segmentation blocks for being not labeled as mosaic area are labeled as normal region, and by the picture of the pixel in normal region
Plain value is set as 0, finally obtains the picture S comprising above-mentioned mosaic area and normal region, size and picture I and picture I1
Size it is identical.Since the pixel value of the mosaic area of picture S is 1, the pixel value in other regions is 0, so passing through
Picture S can intuitively know mosaic area therein.
S204:According to the picture S, the picture I and the picture I1, picture IM is generated;Wherein, in the picture IM
It is identical as corresponding position pixel value in the picture I1 as the pixel value of the corresponding position of mosaic area's block of the picture S,
Corresponding position picture in the pixel value Yu the picture I of position corresponding with the normal region block of picture S in the picture IM
Element value is identical.
In the embodiment of the present application, since picture S includes mosaic area and normal region, so, first by picture IM
Two regions are divided into according to the region partitioning method of picture S, correspond to the mosaic area in picture S and normal region respectively.
Secondly, the pixel of the mosaic area in picture IM is set to the pixel value phase with the pixel of corresponding position in picture I1
Together;And the pixel of the normal region in picture IM is set as identical as the pixel of corresponding position in picture I, it finally obtains
Picture IM be the picture for including the mosaic area determined on picture S in S203.
S205:Using the picture IM and the picture S as the picture for marking mosaic area;Wherein, the picture S
Mosaic area for marking the picture IM.
Since picture S can be used for marking the mosaic area on picture IM, so, picture IM and picture S combine,
As a pair of training sample and true value for being trained to neural network model.
By above-mentioned processing mode, the embodiment of the present application can obtain the combination of a large amount of picture IM and picture S, for pair
Neural network model is trained, and by the parameter of continuous optimization neural network model, finally obtains trained nerve
Network model is used to detect the Image Segmentation Model of mosaic area.
In addition, the authenticity of the mosaic area in order to improve generation, the S203 of the embodiment of the present application can also be wrapped before
S2 and S3 are included, specifically:
S1:By the picture I reduce N1 times after, according to arest neighbors method be amplified to the picture I same sizes, obtain
Picture I1.
S2:By the picture I reduce N2 times after, according to arest neighbors method be amplified to the picture I same sizes, obtain
Picture I2.
S3:The picture I1 and the picture I2 are obtained into picture M according to the proportion weighted generated at random.
Wherein, after profit obtains picture I1 and picture I2 in a like fashion, figure is obtained according to the proportion weighted generated at random
Piece M obtains picture M specifically, the pixel of the corresponding position of picture I1 and picture I2 is weighted respectively.
Correspondingly, being also to carry out image segmentation according to texture and color to picture I, picture I1 or picture I2 in S203.
The pixel value of mosaic area in S204 in picture IM is identical as the pixel value of picture M corresponding positions.
It is worth noting that, more plurality of pictures can also be generated in the way of S1 and S2, although mosaic can be improved
The authenticity of Area generation, but since picture number is more, corresponding system treatment effeciency is lower, so, the application is implemented
Example can realize the generation of picture M after balanced system performance.
After the training sample set generated using above-mentioned steps is completed to the training of neural network model, it can also determine
Sample set is verified, it is further that trained neural network model is verified using verification sample set, it is more accurate to obtain
True Image Segmentation Model, wherein verification sample set can be by concentrating several training sample groups randomly selected from training sample
At.
After obtaining Image Segmentation Model, the detection of mosaic area can be carried out using the Image Segmentation Model, specifically
, picture to be detected is inputted into the Image Segmentation Model, so that the picture to be detected is further processed in S102.
It is worth noting that, picture to be detected can be single picture, can also be a certain frame figure of mosaic video
Piece, that is to say, that mosaic area's detection method provided by the embodiments of the present application can be used for being detected mosaic video,
It is applied particularly to carry out mosaic area's detection to the problematic video of quality, in order to effectively repair the video;Separately
Outside, the detection to the pornographic video Jing Guo mosaic processing can also be applied to.
S102:After carrying out image segmentation processing to the picture to be detected by described image parted pattern, waited for described in output
Detect the mosaic area of picture.
After picture to be detected is input to Image Segmentation Model, the picture to be detected is carried out by the Image Segmentation Model
Image segmentation is handled, and each pixel is the probability of mosaic area, i.e. mosaic probability on the final output picture to be detected
Figure, the mosaic area on picture to be detected can be intuitively known by the mosaic probability graph.It further can be according to
0.5 threshold value carries out binary conversion treatment to each pixel on the mosaic probability graph of output, so as to clearer to user
The mosaic area on picture to be detected is exported,.Furthermore it is also possible to export the mosaic area of picture to be detected otherwise
Domain does not limit herein, as long as user can know mosaic area by output parameter.
It is worth noting that, in order to ensure the accuracy of mosaic area's detection, the neural network in the embodiment of the present application
Model can be full convolutional neural networks model or the convolutional neural networks model etc. with hole.
In a kind of concrete implementation mode, may be used the newest proposition of Google based on the convolutional neural networks with hole
Deeplab-v3 systems carry out training image parted pattern, this model network on the basis of Resnet-101 can be used effectively
Divide task, such as road surface in extremely complex semantic image, sky, the identification of the area types such as meadow, therefore in sample size
Under the premise of enough, it can train to obtain accurate Image Segmentation Model.This method runs 30 on training sample set
It is terminated after epoch, the model that final training obtains is fixed to preserve can be used.On independent verification sample set, this algorithm
The IOU precision of obtained pixel is 94.8%.Actual comprising in the picture of mosaic, this method also achieves very accurate
Prediction result.
In mosaic area's detection method provided by the embodiments of the present application, first, picture to be detected is input to image point
Cut model;Wherein, described image parted pattern is using marking the picture of mosaic area as training sample, to nerve net
What network model obtained after being trained;After image segmentation processing being carried out by described image parted pattern to the picture to be detected,
Export the mosaic area of the picture to be detected.The embodiment of the present application realizes that mosaic area examines using neural network model
It surveys, can largely improve the detection accuracy of mosaic area, while there is no in existing edge detection method
Various problems.
Corresponding with above method embodiment, present invention also provides a kind of mosaic area's detection device, reference charts
3, it is a kind of structural schematic diagram of mosaic area's detection device provided by the embodiments of the present application, described device includes:
Input module 301, for picture to be detected to be input to Image Segmentation Model;Wherein, described image parted pattern
It is to be obtained after being trained to neural network model using the picture for marking mosaic area as training sample;
Output module 302, after carrying out image segmentation processing to the picture to be detected by described image parted pattern,
Export the mosaic area of the picture to be detected.
Described device further includes:
Generation module, for generating the picture for marking mosaic area;
Training module is used for using the picture as training sample, and forms training sample by several training samples
Collection;The wherein described training sample set is for training neural network model.
Specifically, the generation module, including:
First determination sub-module, the picture for not including any mosaic area are determined as picture I;
First reduces amplification submodule, for will be amplified to according to arest neighbors method and institute after the picture I reduces N1 times
Picture I same sizes are stated, picture I1 is obtained;
Image segmentation submodule, for carrying out image segmentation according to texture and color to the picture I or described pictures I1,
Obtain the picture S with several segmentation blocks;Wherein, several segmentation blocks of the picture S include mosaic area's block and normal area
Domain block, mosaic area's pixel value in the block are 1, and the normal region pixel value in the block is 0;
First generates submodule, for according to the picture S, the picture I and the picture I1, generating picture IM;Its
In, it is corresponding with the picture I1 with the pixel value of the corresponding position of mosaic area's block of the picture S in the picture IM
Position pixel value is identical, the pixel value Yu the figure of position corresponding with the normal region block of picture S in the picture IM
Corresponding position pixel value is identical in piece I;
Second determination sub-module, for using the picture IM and the picture S as the picture for marking mosaic area;
Wherein, the picture S is used to mark the mosaic area of the picture IM.
In addition, described device further includes:
Second reduces amplification submodule, for will be amplified to according to arest neighbors method and institute after the picture I reduces N2 times
Picture I same sizes are stated, picture I2 is obtained;
Submodule is weighted, for the picture I1 and the picture I2 to be obtained picture according to the proportion weighted generated at random
M;
Correspondingly, described image divides submodule, it is specifically used for:
Image segmentation is carried out according to texture and color to the picture I, the picture I1 or described pictures I2, is had
The picture S of several segmentation blocks;
Correspondingly, in the picture IM pixel value of position corresponding with mosaic area's block of picture S with it is described
Corresponding position pixel value is identical in picture I1, specially:It is corresponding with mosaic area's block of picture S in the picture IM
The pixel value of position is identical as corresponding position pixel value in the picture M.
The neural network model includes full convolutional neural networks model or the convolutional neural networks model with hole.
In mosaic area's detection device provided by the embodiments of the present application, first, picture to be detected is input to image point
Cut model;Wherein, described image parted pattern is using marking the picture of mosaic area as training sample, to nerve net
What network model obtained after being trained;After image segmentation processing being carried out by described image parted pattern to the picture to be detected,
Export the mosaic area of the picture to be detected.The embodiment of the present application realizes that mosaic area examines using neural network model
It surveys, can largely improve the detection accuracy of mosaic area, while there is no in existing edge detection method
Various problems.
Correspondingly, the embodiment of the present invention also provides a kind of mosaic area's detection device, it is shown in Figure 4, may include:
Processor 401, memory 402, input unit 403 and output device 404.Place in mosaic area's detection device
The quantity for managing device 401 can be one or more, in Fig. 4 by taking a processor as an example.In some embodiments of the invention, it handles
Device 401, memory 402, input unit 403 and output device 404 can be connected by bus or other means, wherein in Fig. 4 with
For being connected by bus.
Memory 402 can be used for storing software program and module, and processor 401 is stored in memory 402 by operation
Software program and module, to execute various function application and the data processing of mosaic area's detection device.Storage
Device 402 can include mainly storing program area and storage data field, wherein storing program area can storage program area, at least one
Application program etc. needed for function.In addition, memory 402 may include high-speed random access memory, can also include non-easy
The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.Input dress
Set 403 and can be used for receiving the numbers or character information of input, and generate with the user setting of mosaic area's detection device with
And the related signal input of function control.
Specifically in the present embodiment, processor 401 can be according to following instruction, by one or more application program
The corresponding executable file of process be loaded into memory 402, and be stored in memory 402 by processor 401 to run
Application program, to realize the various functions in above-mentioned mosaic area's detection method.
For device embodiments, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separating component
The unit of explanation may or may not be physically separated, and the component shown as unit can be or can also
It is not physical unit, you can be located at a place, or may be distributed over multiple network units.It can be according to actual
It needs that some or all of module therein is selected to achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not
In the case of making the creative labor, you can to understand and implement.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
A kind of mosaic area's detection method, device and the equipment provided above the embodiment of the present application has carried out in detail
It introduces, specific examples are used herein to illustrate the principle and implementation manner of the present application, the explanation of above example
It is merely used to help understand the present processes and its core concept;Meanwhile for those of ordinary skill in the art, according to this
The thought of application, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification is not answered
It is interpreted as the limitation to the application.
Claims (10)
1. a kind of mosaic area's detection method, which is characterized in that the method includes:
Picture to be detected is input to Image Segmentation Model;Wherein, described image parted pattern is to utilize to mark mosaic area
The picture in domain is obtained as training sample after being trained to neural network model;
After carrying out image segmentation processing to the picture to be detected by described image parted pattern, the picture to be detected is exported
Mosaic area.
2. mosaic area's detection method according to claim 1, which is characterized in that described to be input to picture to be detected
Before Image Segmentation Model, further include:
Generate the picture for marking mosaic area;
Using the picture as training sample, and training sample set is formed by several training samples;The wherein described trained sample
This collection is for training neural network model.
3. mosaic area's detection method according to claim 2, which is characterized in that the generation marks mosaic area
The picture in domain, including:
The picture for any not being included mosaic area is determined as picture I;
By the picture I reduce N1 times after, according to arest neighbors method be amplified to the picture I same sizes, obtain picture I1;
Image segmentation is carried out according to texture and color to the picture I or described pictures I1, obtains the figure with several segmentation blocks
Piece S;Wherein, several segmentation blocks of the picture S include mosaic area's block and normal region block, in mosaic area's block
Pixel value be 1, the normal region pixel value in the block be 0;
According to the picture S, the picture I and the picture I1, picture IM is generated;Wherein, in the picture IM with the figure
The pixel value of the corresponding position of mosaic area's block of piece S is identical as corresponding position pixel value in the picture I1, the picture
It is identical as corresponding position pixel value in the picture I as the pixel value of the corresponding position of normal region block of the picture S in IM;
Using the picture IM and the picture S as the picture for marking mosaic area;Wherein, the picture S is for marking
Go out the mosaic area of the picture IM.
4. mosaic area's detection method according to claim 3, which is characterized in that before the generation picture IM, also
Including:
By the picture I reduce N2 times after, according to arest neighbors method be amplified to the picture I same sizes, obtain picture I2;
The picture I1 and the picture I2 are obtained into picture M according to the proportion weighted generated at random;
Correspondingly, described carry out image segmentation to the picture I or described pictures I1 according to texture and color, obtain having several
Divide the picture S of block, including:
Image segmentation is carried out according to texture and color to the picture I, the picture I1 or described pictures I2, obtains having several
Divide the picture S of block;
Correspondingly, in the picture IM position corresponding with mosaic area's block of picture S pixel value Yu the picture
Corresponding position pixel value is identical in I1, specially:
It is corresponding with the picture M with the pixel value of the corresponding position of mosaic area's block of the picture S in the picture IM
Position pixel value is identical.
5. according to claim 1-4 any one of them mosaic area's detection methods, which is characterized in that the neural network mould
Type includes full convolutional neural networks model or the convolutional neural networks model with hole.
6. a kind of mosaic area's detection device, which is characterized in that described device includes:
Input module, for picture to be detected to be input to Image Segmentation Model;Wherein, described image parted pattern is to utilize mark
Remember that the picture for mosaic area as training sample, obtains after being trained to neural network model;
Output module exports institute after carrying out image segmentation processing to the picture to be detected by described image parted pattern
State the mosaic area of picture to be detected.
7. mosaic area's detection device according to claim 6, which is characterized in that described device further includes:
Generation module, for generating the picture for marking mosaic area;
Training module is used for using the picture as training sample, and forms training sample set by several training samples;Its
Described in training sample set for training neural network model.
8. mosaic area's detection device according to claim 7, which is characterized in that the generation module, including:
First determination sub-module, the picture for not including any mosaic area are determined as picture I;
First, which reduces amplification submodule, is amplified to and the figure after the picture I is reduced N1 times according to arest neighbors method
Piece I same sizes, obtain picture I1;
Image segmentation submodule is obtained for carrying out image segmentation according to texture and color to the picture I or described pictures I1
Picture S with several segmentation blocks;Wherein, several segmentation blocks of the picture S include mosaic area's block and normal region block,
Mosaic area's pixel value in the block is 1, and the normal region pixel value in the block is 0;
First generates submodule, for according to the picture S, the picture I and the picture I1, generating picture IM;Wherein, institute
State in picture IM corresponding position picture in the pixel value Yu the picture I1 of position corresponding with mosaic area's block of picture S
Element value it is identical, in the picture IM pixel value of position corresponding with the normal region block of picture S with it is right in the picture I
Answer position pixel value identical;
Second determination sub-module, for using the picture IM and the picture S as the picture for marking mosaic area;Its
In, the picture S is used to mark the mosaic area of the picture IM.
9. mosaic area's detection device according to claim 8, which is characterized in that described device further includes:
Second, which reduces amplification submodule, is amplified to and the figure after the picture I is reduced N2 times according to arest neighbors method
Piece I same sizes, obtain picture I2;
Submodule is weighted, for the picture I1 and the picture I2 to be obtained picture M according to the proportion weighted generated at random;
Correspondingly, described image divides submodule, it is specifically used for:
Image segmentation is carried out according to texture and color to the picture I, the picture I1 or described pictures I2, obtains having several
Divide the picture S of block;
Correspondingly, in the picture IM position corresponding with mosaic area's block of picture S pixel value Yu the picture
Corresponding position pixel value is identical in I1, specially:Position corresponding with mosaic area's block of picture S in the picture IM
Pixel value it is identical as corresponding position pixel value in the picture M.
10. a kind of mosaic area's detection device, which is characterized in that the equipment includes memory and processor,
Said program code is transferred to the processor by the memory for storing program code;
The processor is used for according to the instruction in said program code, and perform claim requires the Marseille described in any one of 1-5
Gram method for detecting area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810609003.3A CN108805884A (en) | 2018-06-13 | 2018-06-13 | A kind of mosaic area's detection method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810609003.3A CN108805884A (en) | 2018-06-13 | 2018-06-13 | A kind of mosaic area's detection method, device and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108805884A true CN108805884A (en) | 2018-11-13 |
Family
ID=64085824
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810609003.3A Pending CN108805884A (en) | 2018-06-13 | 2018-06-13 | A kind of mosaic area's detection method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108805884A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110288037A (en) * | 2019-06-28 | 2019-09-27 | 北京字节跳动网络技术有限公司 | Image processing method, device and electronic equipment |
CN110415175A (en) * | 2019-08-07 | 2019-11-05 | 杭州微帧信息科技有限公司 | A kind of method of quick removal flat site coding mosaic |
TWI697871B (en) * | 2019-04-01 | 2020-07-01 | 中華電信股份有限公司 | Inspection system for image containing mosaic and method thereof |
CN117893952A (en) * | 2024-03-15 | 2024-04-16 | 视睿(杭州)信息科技有限公司 | Video mosaic defect detection method based on deep learning |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2370931A1 (en) * | 2008-12-04 | 2011-10-05 | Nokia Corporation | Method, apparatus and computer program product for providing an orientation independent face detector |
CN103530895A (en) * | 2012-07-06 | 2014-01-22 | 北京大学 | Method and device for detecting mosaic |
CN104268828A (en) * | 2014-09-30 | 2015-01-07 | 可牛网络技术(北京)有限公司 | Image fuzzification processing method and device |
JP2015226112A (en) * | 2014-05-26 | 2015-12-14 | キヤノン株式会社 | Image processing system, image processing method, and program |
CN106447721A (en) * | 2016-09-12 | 2017-02-22 | 北京旷视科技有限公司 | Image shadow detection method and device |
CN106530227A (en) * | 2016-10-27 | 2017-03-22 | 北京小米移动软件有限公司 | Image restoration method and device |
CN106971399A (en) * | 2017-03-29 | 2017-07-21 | 北京数码视讯科技股份有限公司 | Image-mosaics detection method and device |
CN108010102A (en) * | 2017-12-19 | 2018-05-08 | 刘邵宏 | Mosaic image generation method, device, terminal device and storage medium |
-
2018
- 2018-06-13 CN CN201810609003.3A patent/CN108805884A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2370931A1 (en) * | 2008-12-04 | 2011-10-05 | Nokia Corporation | Method, apparatus and computer program product for providing an orientation independent face detector |
CN103530895A (en) * | 2012-07-06 | 2014-01-22 | 北京大学 | Method and device for detecting mosaic |
JP2015226112A (en) * | 2014-05-26 | 2015-12-14 | キヤノン株式会社 | Image processing system, image processing method, and program |
CN104268828A (en) * | 2014-09-30 | 2015-01-07 | 可牛网络技术(北京)有限公司 | Image fuzzification processing method and device |
CN106447721A (en) * | 2016-09-12 | 2017-02-22 | 北京旷视科技有限公司 | Image shadow detection method and device |
CN106530227A (en) * | 2016-10-27 | 2017-03-22 | 北京小米移动软件有限公司 | Image restoration method and device |
CN106971399A (en) * | 2017-03-29 | 2017-07-21 | 北京数码视讯科技股份有限公司 | Image-mosaics detection method and device |
CN108010102A (en) * | 2017-12-19 | 2018-05-08 | 刘邵宏 | Mosaic image generation method, device, terminal device and storage medium |
Non-Patent Citations (3)
Title |
---|
王红蕾,陈建中主编: "《系统工程理论与应用 7》", 30 November 2017 * |
翟玲等: "基于超像素与特征改进的 Grab cut 前景分割", 《研究与设计》 * |
英英: "基于MATLAB的图形图像处理系统的实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI697871B (en) * | 2019-04-01 | 2020-07-01 | 中華電信股份有限公司 | Inspection system for image containing mosaic and method thereof |
CN110288037A (en) * | 2019-06-28 | 2019-09-27 | 北京字节跳动网络技术有限公司 | Image processing method, device and electronic equipment |
CN110415175A (en) * | 2019-08-07 | 2019-11-05 | 杭州微帧信息科技有限公司 | A kind of method of quick removal flat site coding mosaic |
CN117893952A (en) * | 2024-03-15 | 2024-04-16 | 视睿(杭州)信息科技有限公司 | Video mosaic defect detection method based on deep learning |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106845408B (en) | Street garbage identification method under complex environment | |
CN108846835B (en) | Image change detection method based on depth separable convolutional network | |
CN108776772B (en) | Cross-time building change detection modeling method, detection device, method and storage medium | |
CN107944450B (en) | License plate recognition method and device | |
CN111257341B (en) | Underwater building crack detection method based on multi-scale features and stacked full convolution network | |
CN109871845B (en) | Certificate image extraction method and terminal equipment | |
CN110766002B (en) | Ship name character region detection method based on deep learning | |
CN108805884A (en) | A kind of mosaic area's detection method, device and equipment | |
US10726535B2 (en) | Automatically generating image datasets for use in image recognition and detection | |
CN110232379A (en) | A kind of vehicle attitude detection method and system | |
CN109410211A (en) | The dividing method and device of target object in a kind of image | |
CN112200884B (en) | Lane line generation method and device | |
CN111860496A (en) | License plate recognition method, device, equipment and computer readable storage medium | |
CN112052907A (en) | Target detection method and device based on image edge information and storage medium | |
CN113887649B (en) | Target detection method based on fusion of deep layer features and shallow layer features | |
CN111738272A (en) | Target feature extraction method and device and electronic equipment | |
CN111079744B (en) | Intelligent vehicle license plate identification method and device suitable for complex illumination environment | |
CN112434582A (en) | Lane line color identification method and system, electronic device and storage medium | |
CN113034432B (en) | Product defect detection method, system, device and storage medium | |
CN115222944A (en) | Tire damage detection method based on artificial intelligence and related equipment | |
CN112215229B (en) | License plate recognition method and device based on lightweight network end-to-end | |
CN113298102B (en) | Training method and device for target classification model | |
CN110992257B (en) | Remote sensing image sensitive information automatic shielding method and device based on deep learning | |
CN113469955A (en) | Photovoltaic module fault area image detection method and system | |
CA2997335C (en) | Automatically generating image datasets for use in image recognition and detection |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181113 |