CN111144425B - Method and device for detecting shot screen picture, electronic equipment and storage medium - Google Patents

Method and device for detecting shot screen picture, electronic equipment and storage medium Download PDF

Info

Publication number
CN111144425B
CN111144425B CN201911376496.1A CN201911376496A CN111144425B CN 111144425 B CN111144425 B CN 111144425B CN 201911376496 A CN201911376496 A CN 201911376496A CN 111144425 B CN111144425 B CN 111144425B
Authority
CN
China
Prior art keywords
picture
target
target picture
probability
sample
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.)
Active
Application number
CN201911376496.1A
Other languages
Chinese (zh)
Other versions
CN111144425A (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.)
Wuba Co Ltd
Original Assignee
Wuba 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 Wuba Co Ltd filed Critical Wuba Co Ltd
Priority to CN201911376496.1A priority Critical patent/CN111144425B/en
Publication of CN111144425A publication Critical patent/CN111144425A/en
Application granted granted Critical
Publication of CN111144425B publication Critical patent/CN111144425B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Multimedia (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a method, a device, electronic equipment and a storage medium for detecting a shot picture, wherein the method comprises the steps of firstly obtaining a target picture corresponding to a target area from a picture to be detected, then extracting edge features from the target picture to obtain an edge feature extraction result, predicting the probability that the target picture contains mole pattern features by utilizing a pre-trained probability prediction model, finally combining the probability that the target picture contains the mole pattern features with the edge feature extraction result, and comprehensively analyzing whether the target picture is the shot picture. The method has the advantages of stable characteristics, high classification precision and high robustness in the application of the picture auditing scene, especially the real estate certificate picture auditing scene, and can effectively save auditing cost.

Description

Method and device for detecting shot screen picture, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and apparatus for detecting a shot screen, an electronic device, and a storage medium.
Background
With the development of networks and information technologies, in the application field related to data auditing, a user uploads data to be audited to the network, and then the data to be audited is audited on line through an intelligent detection technology, so that manual auditing is replaced.
In most application scenes, based on the requirements of auditors, the to-be-audited picture uploaded by the user should be a picture obtained by shooting a real object by using a camera device. Therefore, before identifying the content of the picture to be checked, detecting whether the picture to be checked is a shot picture obtained by shooting the lighted electronic picture by the user through the camera device becomes a necessary checking link. If the picture to be checked is the shot picture, the follow-up picture identification process is not required to be executed. For example, a platform for publishing house source information such as 58 is the same city, and it is required to detect whether the house property certificate picture uploaded by the user is a shot picture.
In the prior art, whether the picture is a shot picture or not is judged by extracting the corner features of the image. However, the method has lower recognition accuracy for pictures with various isocenter and rich features such as house property evidence pictures.
Disclosure of Invention
The application provides a method, a device, electronic equipment and a storage medium for detecting a shot picture, which are used for solving the problem that in the prior art, whether the picture is the shot picture or not is judged by extracting corner features of an image, and the precision is lower.
In a first aspect, the present application provides a method for detecting a taken screen picture, the method comprising:
Acquiring a target picture from a picture to be detected, wherein the target picture is a picture corresponding to a target area in the picture to be detected;
extracting edge features from the target picture to obtain an edge feature extraction result;
predicting the probability that the target picture contains mole pattern characteristics by using a pre-trained probability prediction model;
and judging whether the target picture is a shot picture or not according to the edge feature extraction result and the probability that the target picture contains the moire feature.
Further, the obtaining the target picture from the picture to be detected includes:
processing the picture to be detected by using a pre-trained coordinate extraction model, and determining position coordinate information of the target region in the picture to be detected;
and performing perspective transformation processing on the picture to be detected according to the position coordinate information to obtain a target picture corresponding to the target region.
Further, the extracting the edge feature from the target picture to obtain an edge feature extraction result includes:
filtering the target picture to eliminate noise information in the target picture;
sharpening the filtered target picture;
And extracting edge characteristic points from the sharpened target picture to obtain an edge binary image corresponding to the target picture, wherein the edge binary image comprises a plurality of statistical blocks with the same size, and the edge characteristic points are distributed in one or a plurality of the statistical blocks.
Further, the predicting, using a pre-trained probabilistic predictive model, a probability that the target picture includes moire features, comprising:
cutting the target picture into at least one sub-picture;
performing size normalization processing and pixel value normalization processing on the at least one sub-picture to obtain at least one input picture;
inputting the at least one input picture into the probability prediction model one by one, and outputting the probability that the input picture contains mole pattern characteristics;
and determining the probability that the target picture contains the moire feature according to the probability that each input picture contains the moire feature.
Further, the determining whether the target picture is a shot picture according to the edge feature extraction result and the probability that the target picture contains moire features includes:
judging whether the edge feature extraction result meets a first preset condition or not, or judging whether the probability that the target picture contains mole pattern features meets a first preset threshold value or not;
And if the edge feature extraction result meets a first preset condition or the probability that the target picture contains the mole pattern feature meets a first preset threshold, judging that the target picture is a shot picture.
Further, the determining whether the target picture is a shot picture according to the edge feature extraction result and the probability that the target picture contains moire features includes:
judging whether the edge feature extraction result meets a second preset condition and the probability that the target picture contains mole pattern features meets a second preset threshold;
and if the edge feature extraction result meets a second preset condition and the probability that the target picture contains the moire feature meets a second preset threshold, judging that the target picture is a shot picture. Further, the method trains the probabilistic predictive model according to the following steps:
acquiring a training sample set, wherein the training sample set comprises a sample picture and a category label corresponding to the sample picture, and the category label is a first category label representing that the sample picture contains mole pattern features or a second category label representing that the sample picture does not contain mole pattern features;
Training a convolutional neural network model by using the training sample set;
and stopping training when the convolutional neural network model meets a preset condition, and obtaining the probability prediction model.
Further, the acquiring a sample training set includes:
acquiring at least one original picture, wherein at least part of the area of the original picture contains moire features;
clipping the original picture into at least one sample picture;
classifying the sample pictures according to whether the sample pictures contain mole patterns;
performing size normalization processing and pixel value normalization processing on the sample picture;
sample pictures containing mole patterns are marked as a first category and added to a sample training set, and sample pictures not containing mole patterns are marked as a second category and added to the sample training set.
In a second aspect, the present application further provides an apparatus for detecting a taken picture, the apparatus comprising:
the acquisition module is used for acquiring a target picture from the picture to be detected, wherein the target picture is a picture corresponding to a target area in the picture to be detected;
the edge feature extraction module is used for extracting edge features from the target picture to obtain an edge feature extraction result;
The probability prediction module is used for predicting the probability that the target picture contains the moire characteristics by using a pre-trained probability prediction model;
and the determining module is used for determining whether the target picture is a shot picture or not according to the edge feature extraction result and the probability that the target picture contains the moire feature.
Further, the acquisition module includes:
the position determining unit is used for processing the picture to be detected by utilizing a pre-trained coordinate extraction model and determining position coordinate information of the target area in the picture to be detected;
and the perspective transformation unit is used for performing perspective transformation processing on the picture to be detected according to the position coordinate information to obtain a target picture corresponding to the target region.
Further, the edge feature extraction module includes:
the filtering unit is used for carrying out filtering processing on the target picture so as to eliminate noise information in the target picture;
the sharpening unit is used for carrying out sharpening processing on the filtered target picture;
the extraction unit is used for extracting edge characteristic points from the sharpened target picture to obtain an marginalized binary image corresponding to the target picture, wherein the marginalized binary image comprises a plurality of statistical blocks with the same size, and the edge characteristic points are distributed in one or a plurality of the statistical blocks.
Further, the probability prediction module includes:
the clipping unit is used for clipping the target picture into at least one sub-picture;
the preprocessing unit is used for carrying out size normalization processing and pixel value normalization processing on the at least one sub-picture to obtain at least one input picture;
the prediction unit is used for inputting the at least one input picture into the probability prediction model one by one and outputting the probability that the input picture contains the mole pattern characteristics;
and the determining unit is used for determining the probability that the target picture contains the moire feature according to the probability that each input picture contains the moire feature.
Further, the determining module includes:
the first judging unit is used for judging whether the edge feature extraction result meets a first preset condition or not;
the second judging unit is used for judging whether the probability that the target picture contains the mole pattern features meets a first preset threshold value or not;
and the determining unit is used for determining that the target picture is a shot picture if the edge feature extraction result meets a first preset condition or the probability that the target picture contains the moire feature meets a first preset threshold value.
Further, the determining module includes:
a third judging unit, configured to judge whether the edge feature extraction result meets a second preset condition;
the fourth judging unit is used for judging that the probability that the target picture contains the moire characteristic meets a second preset threshold value;
the determining unit is further configured to determine that the target picture is a shot picture if the edge feature extraction result meets a second preset condition and the probability that the target picture contains moire features meets a second preset threshold.
Further, the apparatus further comprises: the training module is used for training the probability prediction model; the training module comprises:
the sample acquisition unit is used for acquiring a training sample set, wherein the training sample set comprises a sample picture and a category label corresponding to the sample picture, and the category label is a first category label representing that the sample picture contains mole pattern characteristics or a second category label representing that the sample picture does not contain mole pattern characteristics;
the training unit is used for training the convolutional neural network model by using the training sample set;
and the test unit is used for stopping training when the convolutional neural network model meets preset conditions to obtain the probability prediction model.
Further, the sample acquiring unit is specifically configured to:
acquiring at least one original picture, wherein at least part of the area of the original picture contains moire features;
clipping the original picture into at least one sample picture;
classifying the sample pictures according to whether the sample pictures contain mole patterns;
performing size normalization processing and pixel value normalization processing on the sample picture;
sample pictures containing mole patterns are marked as a first category and added to a sample training set, and sample pictures not containing mole patterns are marked as a second category and added to the sample training set.
In a third aspect, the present application further provides an electronic device, including:
a memory for storing program instructions;
a processor for invoking and executing program instructions in said memory to implement the method of any of the first aspects.
In a fourth aspect, the present application also provides a storage medium, wherein a computer program is stored in the storage medium, which, when executed by at least one processor of an apparatus according to any one of the second aspects, performs the method according to any one of the first aspects.
According to the technical scheme, the method, the device, the electronic equipment and the storage medium for detecting the shot picture are provided, firstly, a target picture corresponding to a target area is obtained from a picture to be detected, then, on one hand, edge characteristics are extracted from the target picture to obtain an edge characteristic extraction result, on the other hand, a probability that the target picture contains mole pattern characteristics is predicted by using a pre-trained probability prediction model, and finally, the probability that the target picture contains the mole pattern characteristics is combined with the probability that the edge characteristic extraction result, and whether the target picture is the shot picture is comprehensively analyzed. The method has the advantages of stable characteristics, high classification precision and high robustness in the application of the picture auditing scene, especially the real estate certificate picture auditing scene, and can effectively save auditing cost.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are needed in the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic representation of a moire pattern as exemplified herein;
FIG. 2 is a flowchart of a method of detecting a taken picture according to an exemplary embodiment of the present application;
FIG. 3 is a schematic diagram of a picture to be detected according to an exemplary embodiment of the present application;
FIG. 4 is a flowchart of a method of detecting a taken picture according to another exemplary embodiment of the present application;
FIG. 5 is a block diagram of an apparatus for detecting a taken picture according to an exemplary embodiment of the present application;
fig. 6 is a schematic hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
In order to better understand the technical solutions in the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
To facilitate an understanding of the aspects of the present application, the concepts of convolutional neural networks and moire will be briefly described below.
In machine learning, a convolutional neural network is a deep feed-forward artificial neural network whose artificial neurons can respond to surrounding units and can perform large-scale image processing. In general, the basic structure of CNNs includes two layers, one of which is a feature extraction layer, with the input of each neuron connected to a local receptive field of the previous layer and extracting the local features. Once the local feature is extracted, the positional relationship between the other features is also determined; and the second is a feature mapping layer, each calculation layer of the network consists of a plurality of feature maps, each feature map is a plane, and the weights of all neurons on the plane are equal. The feature mapping structure adopts a sigmoid function with small influence function kernel as an activation function of the convolution network, so that the feature mapping has displacement invariance. In addition, the number of network free parameters is reduced because the neurons on one mapping surface share weights. Each convolutional layer in the convolutional neural network is followed by a computational layer for local averaging and secondary extraction, which reduces feature resolution.
CNNs are used primarily to identify displacement, scaling, and other forms of two-dimensional graphics that do not scale, and this part of the functionality is primarily implemented by the pooling layer. Since the feature detection layer of the CNN learns through the training data, explicit feature extraction is avoided when the CNN is used, and the CNN is implicitly learned from the training data; furthermore, because the weights of the neurons on the same feature mapping plane are the same, the network can learn in parallel, which is also a great advantage of convolutional networks with respect to networks in which the neurons are connected to each other. The convolutional neural network is in a special structure of local weight sharing, so that the layout of the convolutional neural network is closer to that of an actual biological neural network, the weight sharing reduces the complexity of the network, and particularly the characteristic that images of multidimensional input vectors can be directly input into the network is avoided, so that the complexity of data reconstruction in the characteristics extraction and classification processes is avoided.
The convolutional neural network comprises a one-dimensional convolutional neural network, a two-dimensional convolutional neural network and a three-dimensional convolutional neural network, wherein the two-dimensional convolutional neural network is commonly applied to the identification of image type texts.
As shown in fig. 1, moire is a high-frequency disturbance stripe which occurs in a photosensitive element in a digital camera, a scanner, or the like, and is a high-frequency irregularity stripe which causes a picture to appear in color, and since a taken picture is a picture obtained by taking an electronic picture that is lighted by an imaging device, at least a part of a region of the taken picture has moire.
In a picture auditing scene, in order to detect whether a picture is a shot picture, the prior art judges whether the picture is the shot picture by extracting corner features of the image, and for pictures with various isocenter and rich features such as house property pictures, the corner features on the pictures are easy to be confused with molar line features, so that the detection precision of the method on the shot picture is lower.
In order to improve the accuracy of detecting the shot screen picture, the embodiment of the application provides a method for detecting the shot screen picture, and the method has the advantages of stable characteristics, high classification accuracy and high robustness in the application of a picture auditing scene, particularly a real estate certificate picture auditing scene, and can also effectively save auditing cost.
Fig. 2 is a flowchart of a method for detecting a taken picture according to an exemplary embodiment of the present application, where, as shown in fig. 2, the method may include:
step 100, obtaining a target picture from a picture to be detected, wherein the target picture is a picture corresponding to a target area in the picture to be detected.
Taking a house property evidence picture auditing scene as an example, the picture to be detected is a non-screen shooting picture obtained by shooting a house property evidence by a user through a shooting device, or is a screen shooting picture obtained by shooting a house property evidence displayed on an electronic screen by the user through the shooting device.
The picture to be detected contains a target area, such as the real estate certificate image area in the above example. According to the difference of the shooting distances, as shown in fig. 3, the image to be detected may further include a redundant area that is not the target area. In order to remove the redundant area possibly included in the picture to be detected, a target picture corresponding to the target area is obtained from the picture to be detected through step 100.
When the method is specifically implemented, firstly, a pre-trained coordinate extraction model is utilized to process the picture to be detected, and position coordinate information of the target area in the picture to be detected is determined; the coordinate extraction model may be an artificial neural network model such as a convolutional neural network model. And training the initialized artificial neural network model by using a large number of marked training samples, so as to obtain a coordinate extraction model for extracting the position coordinate information of the target area in the picture to be detected.
And then performing perspective transformation processing on the picture to be detected according to the position coordinate information to obtain a target picture containing the target region.
And 200, extracting edge features from the target picture to obtain an edge feature extraction result.
According to the embodiment, by utilizing the characteristic that the shot picture has mole lines and the edge features are rich, the edge features are extracted from the target picture through the step 200, so that whether the target picture is the shot picture or not is judged according to the edge feature extraction result.
In order to facilitate the extraction of edge features, filtering processing can be performed on the target picture firstly so as to eliminate noise information in the target picture; sharpening the filtered target picture; and finally, extracting edge characteristic points from the sharpened target picture to obtain an edge binary image corresponding to the target picture. In addition, in order to facilitate statistics of distribution of edge feature points in the marginalized binary image, the marginalized binary image may be uniformly divided into a plurality of statistical blocks, and the number of edge feature points in each statistical block may be counted respectively, which is used as an edge feature extraction result of the target image.
Step 200 can be known, in the present application, by using the feature that the shot image has mole lines and the edge features are rich, the edge features are extracted from the target image, so as to determine whether the target image is the shot image according to the edge feature extraction result.
Step 300, predicting the probability that the target picture contains moire features by using a pre-trained probability prediction model.
According to the embodiment, whether the target picture is the shot picture is determined by utilizing the characteristic that the shot picture has the moire characteristic and predicting the probability that the target picture contains the moire characteristic through a pre-trained probability prediction model.
As a possible implementation, the probabilistic predictive model may be trained according to the steps shown in fig. 4:
step 310, a training sample set is obtained, wherein the training sample set comprises a sample picture and a category label corresponding to the sample picture, and the category label is a first category label representing that the sample picture contains moire features or a second category label representing that the sample picture does not contain moire features.
The training sample set is composed of a certain number of sample pictures, each sample picture corresponds to a category label, the category label is used for representing the category to which the sample picture belongs, the category to which the sample picture belongs can be a first category or a second category, the picture of the first category is a picture containing moire features, and the picture of the second category is a picture not containing moire features.
In the specific implementation, at least one original picture is firstly obtained, at least part of the area of the original picture contains the moire feature, and in particular, as part of the area in the shot picture contains the moire feature and part of the area does not contain the moire feature, the shot picture can be obtained as the original picture. Then, the original picture is randomly cut into at least one sample picture, and part or all of the obtained sample pictures have mole pattern characteristics, while the rest sample pictures do not have mole pattern characteristics. And classifying the sample pictures according to whether the sample pictures contain mole patterns, marking the sample pictures containing the mole patterns as a first category and adding the first category into a sample training set, and marking the sample pictures not containing the mole patterns as a second category and adding the second category into the sample training set.
In addition, in order to reduce the calculation amount, after classifying the sample picture according to whether the sample picture contains moire, the method further comprises: and carrying out size normalization processing and pixel value normalization processing on the sample pictures so as to enable the sizes of each sample picture to be consistent, wherein the pixel values are distributed between (0 and 1). Correspondingly, the sample pictures subjected to the size normalization processing and the pixel value normalization processing are added into a sample training set.
And step 320, training the convolutional neural network model by using the training sample set.
The training input includes sample picture data and category label data corresponding to the sample picture. Sample picture data and corresponding category label data in the training sample set are input into a convolutional neural network model for processing, and the convolutional neural network model outputs a prediction result of the sample picture category. The convolution neural network model processes the input data according to a convolution algorithm.
The convolutional neural network model relates to model parameters, and the training purpose is to lead the prediction result output by the convolutional neural network model to be infinitely close to the class label corresponding to the sample picture by optimizing the model parameters. In the specific implementation, the actual output result of the convolutional neural network model and the corresponding type label data can be substituted into a preset loss function to calculate a loss value, and further the iteration update direction and the update amount of the convolutional neural network model can be determined according to the loss value, so that the update parameters of the model are continuously optimized. The loss function may be based on the type and task of the neural network model, which belongs to the prior art and is not described herein.
At the beginning of training, the model parameters of the convolutional neural network model are initialized model parameters.
And 330, stopping training when the convolutional neural network model meets a preset condition, and obtaining the probability prediction model.
In this embodiment, when the convolutional neural network model meets a preset condition, training is stopped, and a probability prediction model is obtained. For example, a convolutional neural network model is tested by using a preset test sample set, the accuracy of the model is calculated, and when the accuracy meets a preset threshold, training is stopped to obtain a probability prediction model.
After training to obtain the probability prediction model, the probability prediction model can be applied to predicting the probability that the target picture contains the moire feature.
In specific implementation, firstly, randomly cutting a target picture into at least one sub-picture, and then carrying out size normalization processing and pixel value normalization processing on the at least one sub-picture to obtain at least one input picture. The size of the input picture can be processed to be consistent with the size of the sample picture through size normalization processing, pixel values of the input picture are distributed in a (0, 1) range through pixel value normalization, and the calculated amount is reduced.
It will be appreciated that if the picture to be detected is a shot picture, at least one of the input pictures cut from the target picture will be a picture containing moire features, and if the picture to be detected is not a shot picture, each of the input pictures cut from the target picture will be a picture not containing moire features.
For this purpose, in step 300, the at least one input picture is input into the probability prediction model one by one, the probability that the input picture contains moire features is output, and the probability that the target picture contains moire features is determined according to the probability that each input picture contains moire features.
The method for determining the probability that the target picture includes the moire feature according to the probability that each input picture includes the moire feature is not limited in this application. For example, the average value of the probabilities of each input picture including the moire feature may be set as the probability of the target picture including the moire feature, or the highest value of the probabilities corresponding to the plurality of input pictures may be set as the probability of the target picture including the moire feature.
In summary, step 300 includes a training stage and a prediction stage, in the training stage, a training sample set is first obtained, where the training sample set includes a sample picture and a class label corresponding to the sample picture, and the class label is a first class label that characterizes the sample picture as including moire features or a second class label that characterizes the sample picture as not including moire features; then training the convolutional neural network model by using a training sample set to obtain a probability prediction model; in the prediction stage, firstly, obtaining a picture to be detected, and processing the picture to be detected into at least one input picture; and then, processing the input picture by using a probability prediction model, and outputting the probability that the input picture contains the mole pattern features. Step 300 is to train to obtain a probability prediction model based on the deep learning principle by utilizing the characteristic that the shot picture contains mole patterns, and apply the probability prediction model to detect whether the picture is a shot picture according to whether the picture contains mole pattern features.
And 400, judging whether the target picture is a shot picture or not according to the feature extraction result and the probability that the target picture contains the moire features.
In one possible implementation, it is determined whether the edge feature extraction result satisfies a first preset condition. For example, for each statistical block, determining whether the number of edge feature points distributed in the statistical block is higher than the number specified in the first preset condition, and then determining whether the number of statistical blocks with the number of edge feature points higher than the first preset number meets the number specified in the first preset condition, if the number of statistical blocks with the number of edge feature points higher than the first preset number meets the number specified in the first preset condition, it indicates that the edge feature of the target picture is rich, and includes moire features, that is, the target picture is a shot picture.
In another possible implementation manner, whether the probability that the target picture contains the moire feature meets a first preset threshold value is judged; if so, determining that the target picture contains the moire feature, and thus is a taken screen picture.
In another possible implementation manner, whether the edge feature extraction result meets a second preset condition and the probability that the target picture contains the moire feature meets a second preset threshold is judged; and if the edge feature extraction result meets a second preset condition and the probability that the target picture contains the moire feature meets a second preset threshold, judging that the target picture is a shot picture. The method for determining whether the edge feature extraction result meets the second preset condition is similar to the method for determining whether the edge feature extraction result meets the first preset condition, and will not be repeated here.
Accordingly, if the edge feature extraction result does not meet the first preset condition, and the probability that the target picture contains the moire feature does not meet the first preset threshold, and the edge feature extraction result does not meet the second preset condition, and the probability that the target picture contains the moire feature does not meet the second preset threshold, it is determined that the target picture does not contain the moire feature, and therefore is not a taken picture.
As can be seen from the above embodiments, the present application provides a method for detecting a shot image, which includes firstly obtaining a target image corresponding to a target region from an image to be detected, then, on one hand, extracting edge features from the target image to obtain an edge feature extraction result, on the other hand, predicting a probability that the target image includes moire features by using a pre-trained probability prediction model, and finally, comprehensively analyzing whether the target image is a shot image by combining the probability that the target image includes moire features with the result of edge feature extraction. The method has the advantages of stable characteristics, high classification precision and high robustness in the application of the picture auditing scene, especially the real estate certificate picture auditing scene, and can effectively save auditing cost.
According to the method for detecting a shot picture provided in the above embodiment, the embodiment of the present application further provides a device for detecting a shot picture, as shown in fig. 5, the device may include:
The obtaining module 510 is configured to obtain a target picture from a picture to be detected, where the target picture is a picture corresponding to a target area in the picture to be detected;
the edge feature extraction module 520 is configured to extract edge features from the target picture, and obtain an edge feature extraction result;
a probability prediction module 530, configured to predict a probability that the target picture contains moire features using a pre-trained probability prediction model;
the determining module 540 is configured to determine whether the target picture is a shot picture according to the edge feature extraction result and the probability that the target picture contains moire features.
Further, the acquisition module includes: the position determining unit is used for processing the picture to be detected by utilizing a pre-trained coordinate extraction model and determining position coordinate information of the target area in the picture to be detected; and the perspective transformation unit is used for performing perspective transformation processing on the picture to be detected according to the position coordinate information to obtain a target picture corresponding to the target region.
Further, the edge feature extraction module includes: the filtering unit is used for carrying out filtering processing on the target picture so as to eliminate noise information in the target picture; the sharpening unit is used for carrying out sharpening processing on the filtered target picture; the extraction unit is used for extracting edge characteristic points from the sharpened target picture to obtain an marginalized binary image corresponding to the target picture, wherein the marginalized binary image comprises a plurality of statistical blocks with the same size, and the edge characteristic points are distributed in one or a plurality of the statistical blocks.
Further, the probability prediction module includes: the clipping unit is used for clipping the target picture into at least one sub-picture; the preprocessing unit is used for carrying out size normalization processing and pixel value normalization processing on the at least one sub-picture to obtain at least one input picture; the prediction unit is used for inputting the at least one input picture into the probability prediction model one by one and outputting the probability that the input picture contains the mole pattern characteristics; and the determining unit is used for determining the probability that the target picture contains the moire feature according to the probability that each input picture contains the moire feature.
Further, the determining module includes: the first judging unit is used for judging whether the edge feature extraction result meets a first preset condition or not; the second judging unit is used for judging whether the probability that the target picture contains the mole pattern features meets a first preset threshold value or not; and the determining unit is used for determining that the target picture is a shot picture if the edge feature extraction result meets a first preset condition or the probability that the target picture contains the moire feature meets a first preset threshold value.
Further, the determining module includes: a third judging unit, configured to judge whether the edge feature extraction result meets a second preset condition; the fourth judging unit is used for judging that the probability that the target picture contains the moire characteristic meets a second preset threshold value; the determining unit is further configured to determine that the target picture is a shot picture if the edge feature extraction result meets a second preset condition and the probability that the target picture contains moire features meets a second preset threshold.
Further, the apparatus further comprises: the training module is used for training the probability prediction model; the training module comprises: the sample acquisition unit is used for acquiring a training sample set, wherein the training sample set comprises a sample picture and a category label corresponding to the sample picture, and the category label is a first category label representing that the sample picture contains mole pattern characteristics or a second category label representing that the sample picture does not contain mole pattern characteristics; the training unit is used for training the convolutional neural network model by using the training sample set; and the test unit is used for stopping training when the convolutional neural network model meets preset conditions to obtain the probability prediction model.
Further, the sample acquiring unit is specifically configured to: acquiring at least one original picture, wherein at least part of the area of the original picture contains moire features; clipping the original picture into at least one sample picture; classifying the sample pictures according to whether the sample pictures contain mole patterns; performing size normalization processing and pixel value normalization processing on the sample picture; sample pictures containing mole patterns are marked as a first category and added to a sample training set, and sample pictures not containing mole patterns are marked as a second category and added to the sample training set.
Fig. 6 is a schematic hardware structure of an electronic device according to an embodiment of the present application. As shown in fig. 6, the electronic device may include: a memory 601 for storing program instructions; and the processor 602 is configured to invoke and execute the program instructions in the memory, so as to implement the method for detecting a shot picture.
In this embodiment, the processor and the memory may be connected by a bus or other means. The processor may be a general-purpose processor, such as a central processing unit, a digital signal processor, an application specific integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention. The memory may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk.
In a specific implementation, the present invention further provides a computer storage medium, where the computer storage medium may store a computer program, where when the computer program is executed by at least one processor of an apparatus for detecting a shot picture, the apparatus for detecting a shot picture performs part or all of the steps in each embodiment of the method for detecting a shot picture. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (random access memory, RAM), or the like.
It will be apparent to those skilled in the art that the techniques of embodiments of the present invention may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in essence or what contributes to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present invention.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the apparatus, electronic device and storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments where relevant.
The embodiments of the present invention described above do not limit the scope of the present invention.

Claims (14)

1. A method of detecting a taken picture, the method comprising:
acquiring a target picture from a picture to be detected, wherein the target picture is a picture corresponding to a target area in the picture to be detected;
extracting edge features from the target picture to obtain an edge feature extraction result;
predicting the probability that the target picture contains mole pattern characteristics by using a pre-trained probability prediction model;
judging whether the target picture is a shot picture or not according to the edge feature extraction result and the probability that the target picture contains mole line features;
when the edge feature extraction result indicates that the number of the statistical blocks with the number of the edge feature points being higher than the first preset number meets the number specified in the first preset condition or the probability that the target picture contains the moire feature meets a first preset threshold value, the target picture is a shot picture;
When the edge feature extraction result indicates that the number of the statistical blocks with the number of the edge feature points being higher than the first preset number meets the number specified in the second preset condition and the probability that the target picture contains the moire feature meets a second preset threshold value, the target picture is a shot picture;
and the statistical block is used for carrying out uniform segmentation determination on the marginalized binary image corresponding to the target picture.
2. The method of claim 1, the obtaining a target picture from the pictures to be detected, comprising:
processing the picture to be detected by using a pre-trained coordinate extraction model, and determining position coordinate information of the target region in the picture to be detected;
and performing perspective transformation processing on the picture to be detected according to the position coordinate information to obtain a target picture corresponding to the target region.
3. The method according to claim 1, wherein the extracting edge features from the target picture to obtain an edge feature extraction result includes:
filtering the target picture to eliminate noise information in the target picture;
sharpening the filtered target picture;
And extracting edge characteristic points from the sharpened target picture to obtain an edge binary image corresponding to the target picture, wherein the edge binary image comprises a plurality of statistical blocks with the same size, and the edge characteristic points are distributed in one or a plurality of the statistical blocks.
4. The method of claim 1, wherein predicting the probability that the target picture contains moire features using a pre-trained probabilistic predictive model comprises:
cutting the target picture into at least one sub-picture;
performing size normalization processing and pixel value normalization processing on the at least one sub-picture to obtain at least one input picture;
inputting the at least one input picture into the probability prediction model one by one, and outputting the probability that the input picture contains mole pattern characteristics;
and determining the probability that the target picture contains the moire feature according to the probability that each input picture contains the moire feature.
5. The method of claim 1, wherein the method trains the probabilistic predictive model as follows:
acquiring a training sample set, wherein the training sample set comprises a sample picture and a category label corresponding to the sample picture, and the category label is a first category label representing that the sample picture contains mole pattern features or a second category label representing that the sample picture does not contain mole pattern features;
Training a convolutional neural network model by using the training sample set;
and stopping training when the convolutional neural network model meets a preset condition, and obtaining the probability prediction model.
6. The method of claim 5, wherein the acquiring a training sample set comprises:
acquiring at least one original picture, wherein at least part of the area of the original picture contains moire features;
clipping the original picture into at least one sample picture;
classifying the sample pictures according to whether the sample pictures contain mole patterns;
performing size normalization processing and pixel value normalization processing on the sample picture;
sample pictures containing mole patterns are labeled as a first category and added to a training sample set, and sample pictures not containing mole patterns are labeled as a second category and added to the training sample set.
7. An apparatus for detecting a taken picture, the apparatus comprising:
the acquisition module is used for acquiring a target picture from the picture to be detected, wherein the target picture is a picture corresponding to a target area in the picture to be detected;
the edge feature extraction module is used for extracting edge features from the target picture to obtain an edge feature extraction result;
The probability prediction module is used for predicting the probability that the target picture contains the moire characteristics by using a pre-trained probability prediction model;
the determining module is used for determining whether the target picture is a shot picture or not according to the edge feature extraction result and the probability that the target picture contains mole line features;
when the edge feature extraction result indicates that the number of the statistical blocks with the number of the edge feature points being higher than the first preset number meets the number specified in the first preset condition or the probability that the target picture contains the moire feature meets a first preset threshold value, the target picture is a shot picture;
when the edge feature extraction result indicates that the number of the statistical blocks with the number of the edge feature points being higher than the first preset number meets the number specified in the second preset condition and the probability that the target picture contains the moire feature meets a second preset threshold value, the target picture is a shot picture;
and the statistical block is used for carrying out uniform segmentation determination on the marginalized binary image corresponding to the target picture.
8. The apparatus of claim 7, the acquisition module comprising:
the position determining unit is used for processing the picture to be detected by utilizing a pre-trained coordinate extraction model and determining position coordinate information of the target area in the picture to be detected;
And the perspective transformation unit is used for performing perspective transformation processing on the picture to be detected according to the position coordinate information to obtain a target picture corresponding to the target region.
9. The apparatus of claim 7, wherein the edge feature extraction module comprises:
the filtering unit is used for carrying out filtering processing on the target picture so as to eliminate noise information in the target picture;
the sharpening unit is used for carrying out sharpening processing on the filtered target picture;
the extraction unit is used for extracting edge characteristic points from the sharpened target picture to obtain an marginalized binary image corresponding to the target picture, wherein the marginalized binary image comprises a plurality of statistical blocks with the same size, and the edge characteristic points are distributed in one or a plurality of the statistical blocks.
10. The apparatus of claim 7, wherein the probability prediction module comprises:
the clipping unit is used for clipping the target picture into at least one sub-picture;
the preprocessing unit is used for carrying out size normalization processing and pixel value normalization processing on the at least one sub-picture to obtain at least one input picture;
The prediction unit is used for inputting the at least one input picture into the probability prediction model one by one and outputting the probability that the input picture contains the mole pattern characteristics;
and the determining unit is used for determining the probability that the target picture contains the moire feature according to the probability that each input picture contains the moire feature.
11. The apparatus of claim 7, wherein the apparatus further comprises: the training module is used for training the probability prediction model; the training module comprises:
the sample acquisition unit is used for acquiring a training sample set, wherein the training sample set comprises a sample picture and a category label corresponding to the sample picture, and the category label is a first category label representing that the sample picture contains mole pattern characteristics or a second category label representing that the sample picture does not contain mole pattern characteristics;
the training unit is used for training the convolutional neural network model by using the training sample set;
and the test unit is used for stopping training when the convolutional neural network model meets preset conditions to obtain the probability prediction model.
12. The apparatus according to claim 11, wherein the sample acquisition unit is specifically configured to:
Acquiring at least one original picture, wherein at least part of the area of the original picture contains moire features;
clipping the original picture into at least one sample picture;
classifying the sample pictures according to whether the sample pictures contain mole patterns;
performing size normalization processing and pixel value normalization processing on the sample picture;
sample pictures containing mole patterns are labeled as a first category and added to a training sample set, and sample pictures not containing mole patterns are labeled as a second category and added to the training sample set.
13. An electronic device, comprising:
a memory for storing program instructions;
a processor for invoking and executing program instructions in said memory to perform the method of any of claims 1-6.
14. A storage medium having stored therein a computer program which, when executed by at least one processor of an apparatus according to any of claims 7-12, performs the method according to any of claims 1-6.
CN201911376496.1A 2019-12-27 2019-12-27 Method and device for detecting shot screen picture, electronic equipment and storage medium Active CN111144425B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911376496.1A CN111144425B (en) 2019-12-27 2019-12-27 Method and device for detecting shot screen picture, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911376496.1A CN111144425B (en) 2019-12-27 2019-12-27 Method and device for detecting shot screen picture, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111144425A CN111144425A (en) 2020-05-12
CN111144425B true CN111144425B (en) 2024-02-23

Family

ID=70520995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911376496.1A Active CN111144425B (en) 2019-12-27 2019-12-27 Method and device for detecting shot screen picture, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111144425B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112233614B (en) * 2020-11-03 2021-09-17 卡莱特云科技股份有限公司 Image moire eliminating method and device and LED display screen correction method
CN113362300B (en) * 2021-06-03 2022-09-09 豪威科技(武汉)有限公司 Training, detecting and focusing method and shooting device
CN113743459B (en) * 2021-07-29 2024-04-02 深圳云天励飞技术股份有限公司 Target detection method, target detection device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106936964A (en) * 2016-12-14 2017-07-07 浙江大学 A kind of mobile phone screen angular-point detection method based on Hough transformation template matches
CN107704857A (en) * 2017-09-25 2018-02-16 北京邮电大学 A kind of lightweight licence plate recognition method and device end to end
CN108734057A (en) * 2017-04-18 2018-11-02 北京旷视科技有限公司 The method, apparatus and computer storage media of In vivo detection
CN108921823A (en) * 2018-06-08 2018-11-30 Oppo广东移动通信有限公司 Image processing method, device, computer readable storage medium and electronic equipment
CN109670430A (en) * 2018-12-11 2019-04-23 浙江大学 A kind of face vivo identification method of the multiple Classifiers Combination based on deep learning
CN109858381A (en) * 2019-01-04 2019-06-07 深圳壹账通智能科技有限公司 Biopsy method, device, computer equipment and storage medium
CN110059700A (en) * 2019-03-18 2019-07-26 深圳神目信息技术有限公司 The recognition methods of image moire fringes, device, computer equipment and storage medium
CN110348511A (en) * 2019-07-08 2019-10-18 创新奇智(青岛)科技有限公司 A kind of picture reproduction detection method, system and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106936964A (en) * 2016-12-14 2017-07-07 浙江大学 A kind of mobile phone screen angular-point detection method based on Hough transformation template matches
CN108734057A (en) * 2017-04-18 2018-11-02 北京旷视科技有限公司 The method, apparatus and computer storage media of In vivo detection
CN107704857A (en) * 2017-09-25 2018-02-16 北京邮电大学 A kind of lightweight licence plate recognition method and device end to end
CN108921823A (en) * 2018-06-08 2018-11-30 Oppo广东移动通信有限公司 Image processing method, device, computer readable storage medium and electronic equipment
CN109670430A (en) * 2018-12-11 2019-04-23 浙江大学 A kind of face vivo identification method of the multiple Classifiers Combination based on deep learning
CN109858381A (en) * 2019-01-04 2019-06-07 深圳壹账通智能科技有限公司 Biopsy method, device, computer equipment and storage medium
CN110059700A (en) * 2019-03-18 2019-07-26 深圳神目信息技术有限公司 The recognition methods of image moire fringes, device, computer equipment and storage medium
CN110348511A (en) * 2019-07-08 2019-10-18 创新奇智(青岛)科技有限公司 A kind of picture reproduction detection method, system and electronic equipment

Also Published As

Publication number Publication date
CN111144425A (en) 2020-05-12

Similar Documents

Publication Publication Date Title
CN111161349B (en) Object posture estimation method, device and equipment
CN111144425B (en) Method and device for detecting shot screen picture, electronic equipment and storage medium
US20200134382A1 (en) Neural network training utilizing specialized loss functions
CN111797829A (en) License plate detection method and device, electronic equipment and storage medium
CN110782413B (en) Image processing method, device, equipment and storage medium
CN116012291A (en) Industrial part image defect detection method and system, electronic equipment and storage medium
CN114820465A (en) Point cloud detection model training method and device, electronic equipment and storage medium
Mukherjee et al. Enhancement of image resolution by binarization
CN113870254B (en) Target object detection method and device, electronic equipment and storage medium
CN111179270A (en) Image co-segmentation method and device based on attention mechanism
CN114462469B (en) Training method of target detection model, target detection method and related device
CN113516146A (en) Data classification method, computer and readable storage medium
CN110610123A (en) Multi-target vehicle detection method and device, electronic equipment and storage medium
CN115797314B (en) Method, system, equipment and storage medium for detecting surface defects of parts
CN116129224A (en) Training method, classifying method and device for detection model and electronic equipment
CN111814852A (en) Image detection method, image detection device, electronic equipment and computer-readable storage medium
CN117011274A (en) Automatic glass bottle detection system and method thereof
US11164035B2 (en) Neural-network-based optical character recognition using specialized confidence functions
CN114821823A (en) Image processing, training of human face anti-counterfeiting model and living body detection method and device
CN112861743B (en) Palm vein image anti-counterfeiting method, device and equipment
CN112287905A (en) Vehicle damage identification method, device, equipment and storage medium
Tiwari et al. A blind blur detection scheme using statistical features of phase congruency and gradient magnitude
CN116258873A (en) Position information determining method, training method and device of object recognition model
CN106846366B (en) TLD video moving object tracking method using GPU hardware
CN110751163A (en) Target positioning method and device, computer readable storage medium and electronic equipment

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