CN110647948A - Image splicing detection method and system based on neural network - Google Patents

Image splicing detection method and system based on neural network Download PDF

Info

Publication number
CN110647948A
CN110647948A CN201910947973.9A CN201910947973A CN110647948A CN 110647948 A CN110647948 A CN 110647948A CN 201910947973 A CN201910947973 A CN 201910947973A CN 110647948 A CN110647948 A CN 110647948A
Authority
CN
China
Prior art keywords
neural network
picture
image
network model
equal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910947973.9A
Other languages
Chinese (zh)
Other versions
CN110647948B (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.)
Nanjing University
Original Assignee
Nanjing University
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 Nanjing University filed Critical Nanjing University
Priority to CN201910947973.9A priority Critical patent/CN110647948B/en
Publication of CN110647948A publication Critical patent/CN110647948A/en
Application granted granted Critical
Publication of CN110647948B publication Critical patent/CN110647948B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a picture splicing detection method and a system based on a neural network, which comprises the following steps: firstly, acquiring a picture, identifying the picture of a detected body through a first neural network model, and removing background interference; secondly, normalizing the picture of the detected body, and performing cross line equal-part cutting on the picture; then, respectively carrying out scratch identification on each equal part of images through a second neural network model to obtain a pixel ratio; and finally, counting the sum of the stitching proportions of all the equal parts of images, comparing the sum with a set threshold value, judging the images to be stitched if the sum is higher than the threshold value, and otherwise, judging the images to be non-stitched. Compared with the prior art, the detection method has higher accuracy.

Description

Image splicing detection method and system based on neural network
Technical Field
The invention relates to a picture splicing detection method and system based on a neural network, which are used for identifying splicers, scratches and flatness and judging whether a false picture is pasted on a real face.
Background
The phenomenon that a new combination body is created by splicing pictures at present is very common. For example, when a certain card is formed by cutting and combining a plurality of pictures, splicing traces appear at this time, and for example, during detection of a human face living body, the obtained human face picture may have the phenomenon that the human face living body covers a part of the human face living body at the positions of eyes and the like, so that detection is interfered, and the phenomenon of some interference detection, such as a traffic signal lamp, artificially pastes some things on the traffic signal lamp, so that detection of intelligent equipment is interfered. The traditional picture splicing detection mode is based on opencv line extraction or a connected region. This approach has randomness and large errors. The prior art cannot accurately identify surface traces based on the traditional method.
Disclosure of Invention
The purpose of the invention is as follows: aiming at the problems and the defects in the prior art, the invention provides a method and a system for detecting the picture splicing of a neural network.
The technical scheme is as follows: a picture splicing detection method based on a neural network comprises the following steps: firstly, acquiring a picture, identifying the picture of a detected body through a first neural network model, and removing background interference; secondly, normalizing the picture of the detected body, and performing cross line equal-part cutting on the picture; then, respectively carrying out scratch identification on each equal part of images through a second neural network model to obtain a pixel ratio; and finally, counting the sum of the stitching proportions of all the equal parts of images, comparing the sum with a set threshold value, judging the images to be stitched if the sum is higher than the threshold value, and otherwise, judging the images to be non-stitched.
The set threshold is 0.000381%.
The value range of the set threshold is 0.00038% -0.00039%.
And the cross line equal-part cutting is to perform cross line equal-part cutting on the identified normalized picture by using opencv or other language libraries.
The cross line equal-part cutting is to perform cross line multiple-part cutting on the normalized picture by using opencv or other language libraries, wherein the specific number of parts is determined according to the picture object, and 9 equal-part cutting is performed on the detection of the face picture.
The first neural network model is an edge recognition neural network model, in the training stage of the edge recognition neural network model, a picture of the detected body is recognized for the mark picture sample, the edge mark of the edge recognition neural network model is to copy a full black picture with the same size as the original mark picture sample, and the edge of the detected body is represented by a white line with the width of 1 px.
And in the training process, the mark of the mark recognition neural network model is to copy a totally black picture with the same size as the original detected picture, and then the mark part is represented by a white line with the width of 1 px.
The normalization is to normalize the detected body picture into a 512x512 pixel picture.
The first neural network model and the second neural network model both adopt hed neural network algorithms.
The pictures are bank card pictures, identity card pictures or face pictures.
The detected body is a bank card, an identity card or other certificates.
A picture splicing detection system based on a neural network comprises an image acquisition device, a first neural network model module, an image processing module, a second neural network model module, a calculation module and a display module;
the image acquisition device is used for acquiring pictures and splicing detection;
the first neural network model module is used for identifying the picture of the detected body;
the image processing module is used for normalizing the image of the detected body and performing cross line equal-part cutting on the normalized image;
the second neural network model module is used for respectively carrying out scratch identification on each equal part of image;
the calculation module calculates the scratch ratio of each equal-part image, simultaneously counts the sum of the scratch ratios of all equal-part images, compares the sum with a stored set threshold value, judges that the images are spliced if the sum of the scratch ratios is higher than the threshold value, and judges that the images are not spliced if the sum of the scratch ratios is not higher than the threshold value;
and the display module is used for outputting whether the detected body picture is a splicing image or not and splicing scratch proportion or not.
The first neural network model module and the second neural network model module are both neural network model modules adopting hed neural network algorithm.
The image processing module normalizes the picture of the detected body into a picture of 512x512 pixels.
Detailed Description
The present invention is further illustrated by the following examples, which are intended to be purely exemplary and are not intended to limit the scope of the invention, as various equivalent modifications of the invention will occur to those skilled in the art upon reading the present disclosure and fall within the scope of the appended claims.
The image splicing detection method based on the neural network obtains the image, identifies the image of the detected body through an edge identification neural network model of an adopted hed neural network algorithm, and eliminates background interference; secondly, normalizing the picture, and utilizing opencv or other language libraries to cut the picture into four equal parts of cross lines; then, after normalization, carrying out scratch recognition on each equal part of images through a stitch recognition neural network model adopting hed neural network algorithm to obtain pixel ratio; and finally, counting the sum of the stitching proportions of all the equal parts of images, comparing the sum with a set threshold value 0.000381%, if the sum is higher than the threshold value, judging the images to be stitched, and otherwise, judging the images to be non-stitched.
The value range of the set threshold is 0.00038% -0.00039%.
The cross line equal-part cutting is to cut multiple cross line equal parts of the identified detected body picture by using opencv or other language libraries, wherein the specific number of the cross line equal-part cutting is determined according to picture objects, and 9 equal-part cutting is carried out on the detection of the face picture.
In the training stage of the edge recognition neural network model, a picture of the detected body is recognized for the mark-splicing picture sample, the edge mark of the edge recognition neural network model is to copy a completely black picture with the same size as the original picture sample, and the edge of the detected body is represented by a white line with the width of 1 px.
In the training process, the mark of the mark recognition neural network model is to copy a totally black picture with the same size as the original detected body picture, and then the mark part is represented by a white line with the width of 1 px.
The collected pictures can be bank card pictures, identity card pictures or face pictures.
The detected body can be a bank card, an identity card or other certificates.
The image splicing detection system based on the neural network comprises an image acquisition device, an edge recognition neural network model module adopting hed neural network algorithm, an image processing module, a splicing mark recognition neural network model module adopting hed neural network algorithm, a calculation module and a display module;
the image acquisition device is used for acquiring pictures and splicing detection;
the edge recognition neural network model module is used for recognizing the picture of the detected body;
the image processing module is used for normalizing the pictures of the detected body into pictures with 512x512 pixels and cutting the normalized pictures into four equal parts of cross lines;
the mark splicing recognition neural network model module is used for respectively carrying out mark recognition on each equal part of image;
the calculation module is used for calculating the scratch ratio of each equal part image, counting the sum of the scratch ratios of all equal part images at the same time, comparing the sum with a stored set threshold value 0.000381%, and judging the equal part images to be spliced images if the sum of the scratch ratios is higher than the threshold value, or judging the equal part images to be non-spliced images if the sum of the scratch ratios is not higher than the threshold value;
and the display module is used for outputting whether the detected body picture is a splicing image or not and the splicing scratch ratio.
The using steps of the system are as follows: 1. and shooting the area to be identified by using equipment integrated with a neural network training model through an image acquisition device to obtain a picture.
2. The acquired picture is transmitted to a background first, and a background-removed picture is obtained after the acquired picture is extracted by an object edge recognition neural network model module.
3. The graph was divided equally into several parts.
4. And each image passes through the mark recognition neural network model module and outputs a black and white image with the same size as the original image.
5. And the calculating module counts the proportion of white pixels of the picture in the whole picture.
6. Comparing the ratio to a threshold of 0.000381%, a small ratio is considered to be no mark, and a large ratio is considered to be a mark. And the display module outputs the result.

Claims (10)

1. A picture splicing detection method based on a neural network is characterized by comprising the following steps: the method comprises the following steps: firstly, acquiring a picture, identifying the picture of a detected body through a first neural network model, and removing a background of the detected body; secondly, normalizing the picture of the detected body, and performing cross line equal-part cutting on the picture; then, respectively carrying out scratch identification on each equal part of images through a second neural network model to obtain a pixel ratio; and finally, counting the sum of the stitching proportions of all the equal parts of images, comparing the sum with a set threshold value, judging the images to be stitched if the sum is higher than the threshold value, and otherwise, judging the images to be non-stitched.
2. The image stitching detection method based on the neural network as claimed in claim 1, wherein: the set threshold is 0.000381%.
3. The image stitching detection method based on the neural network as claimed in claim 1, wherein: the value range of the set threshold is 0.00038% -0.00039%.
4. The image stitching detection method based on the neural network as claimed in claim 1, wherein: and the cross line equal-part cutting is to perform cross line equal-part cutting on the identified normalized picture by using opencv or other language libraries.
5. The image stitching detection method based on the neural network as claimed in claim 1, wherein: the cross line equal-part cutting is to perform cross line multiple-part cutting on the normalized picture by using opencv or other language libraries, wherein the specific number of parts is determined according to the picture object, and 9 equal-part cutting is performed on the detection of the face picture.
6. The image stitching detection method based on the neural network as claimed in claim 1, wherein: the normalization is to normalize the detected body picture into a 512x512 pixel picture.
7. The image stitching detection method based on the neural network as claimed in claim 1, wherein: the first neural network model and the second neural network model both adopt hed neural network algorithms.
8. The image stitching detection method based on the neural network as claimed in claim 1, wherein: the pictures are bank card pictures, identity card pictures or face pictures; the detected body is a bank card, an identity card or other certificates.
9. The utility model provides a picture concatenation detecting system based on neural network which characterized in that: the device comprises an image acquisition device, a first neural network model module, an image processing module, a second neural network model module, a calculation module and a display module;
the image acquisition device is used for acquiring pictures and splicing detection;
the first neural network model module is used for identifying the picture of the detected body;
the image processing module is used for normalizing the image of the detected body and performing cross line equal-part cutting on the normalized image;
the second neural network model module is used for respectively carrying out scratch identification on each equal part of image;
the calculation module calculates the scratch ratio of each equal-part image, simultaneously counts the sum of the scratch ratios of all equal-part images, compares the sum with a stored set threshold value, judges that the images are spliced if the sum of the scratch ratios is higher than the threshold value, and judges that the images are not spliced if the sum of the scratch ratios is not higher than the threshold value;
the display module is used for outputting whether the detected body picture is a splicing image or not and the splicing scratch ratio;
the first neural network model module and the second neural network model module are both neural network model modules adopting hed neural network algorithm.
10. The neural network-based picture stitching detection system of claim 9, wherein: the image processing module normalizes the picture of the detected body into a picture of 512x512 pixels.
CN201910947973.9A 2019-10-08 2019-10-08 Picture stitching detection method and system based on neural network Active CN110647948B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910947973.9A CN110647948B (en) 2019-10-08 2019-10-08 Picture stitching detection method and system based on neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910947973.9A CN110647948B (en) 2019-10-08 2019-10-08 Picture stitching detection method and system based on neural network

Publications (2)

Publication Number Publication Date
CN110647948A true CN110647948A (en) 2020-01-03
CN110647948B CN110647948B (en) 2023-04-21

Family

ID=69012308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910947973.9A Active CN110647948B (en) 2019-10-08 2019-10-08 Picture stitching detection method and system based on neural network

Country Status (1)

Country Link
CN (1) CN110647948B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103824055A (en) * 2014-02-17 2014-05-28 北京旷视科技有限公司 Cascaded neural network-based face recognition method
US20170213156A1 (en) * 2016-01-27 2017-07-27 Bonsai AI, Inc. Artificial intelligence engine having multiple independent processes on a cloud based platform configured to scale
CN108986090A (en) * 2018-07-11 2018-12-11 天津工业大学 A kind of depth convolutional neural networks method applied to the detection of cabinet surface scratch

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103824055A (en) * 2014-02-17 2014-05-28 北京旷视科技有限公司 Cascaded neural network-based face recognition method
US20170213156A1 (en) * 2016-01-27 2017-07-27 Bonsai AI, Inc. Artificial intelligence engine having multiple independent processes on a cloud based platform configured to scale
CN108986090A (en) * 2018-07-11 2018-12-11 天津工业大学 A kind of depth convolutional neural networks method applied to the detection of cabinet surface scratch

Also Published As

Publication number Publication date
CN110647948B (en) 2023-04-21

Similar Documents

Publication Publication Date Title
CN108009531B (en) Multi-strategy anti-fraud face recognition method
RU2601185C2 (en) Method, system and computer data medium for face detection
Christlein et al. A study on features for the detection of copy-move forgeries
CN104597057B (en) A kind of column Diode facets defect detecting device based on machine vision
CN105913093A (en) Template matching method for character recognizing and processing
CN108982512A (en) A kind of circuit board detecting system and method based on machine vision
US9767383B2 (en) Method and apparatus for detecting incorrect associations between keypoints of a first image and keypoints of a second image
CN111259891B (en) Method, device, equipment and medium for identifying identity card in natural scene
CN109740572A (en) A kind of human face in-vivo detection method based on partial color textural characteristics
CN109190617B (en) Image rectangle detection method and device and storage medium
CN106529556B (en) A kind of vision detection system of meter lamp
CN106651802B (en) Machine vision scolding tin position finding and detection method
WenJuan et al. A real-time lip localization and tacking for lip reading
CN111695373B (en) Zebra stripes positioning method, system, medium and equipment
CN105893957A (en) Method for recognizing and tracking ships on lake surface on the basis of vision
CN103607558A (en) Video monitoring system, target matching method and apparatus thereof
CN107145820B (en) Binocular positioning method based on HOG characteristics and FAST algorithm
CN113533372A (en) Paper defect detection method, system, device and computer storage medium
CN110647948B (en) Picture stitching detection method and system based on neural network
CN104408430B (en) License plate positioning method and device
CN111935480B (en) Detection method for image acquisition device and related device
CN115240245A (en) Face living body detection method, face living body detection device and electronic equipment
Le et al. Pedestrian lane detection in unstructured environments for assistive navigation
CN110674817B (en) License plate anti-counterfeiting method and device based on binocular camera
CN107424141A (en) A kind of face-image method for evaluating quality based on probability block

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