WO2021017610A1 - 证件真伪验证方法、装置、计算机设备及存储介质 - Google Patents
证件真伪验证方法、装置、计算机设备及存储介质 Download PDFInfo
- Publication number
- WO2021017610A1 WO2021017610A1 PCT/CN2020/093413 CN2020093413W WO2021017610A1 WO 2021017610 A1 WO2021017610 A1 WO 2021017610A1 CN 2020093413 W CN2020093413 W CN 2020093413W WO 2021017610 A1 WO2021017610 A1 WO 2021017610A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- color
- character
- detection
- preset
- information
- Prior art date
Links
Classifications
-
- 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
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/018—Certifying business or products
- G06Q30/0185—Product, service or business identity fraud
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/56—Extraction of image or video features relating to colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/62—Text, e.g. of license plates, overlay texts or captions on TV images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
Definitions
- This application relates to the field of artificial intelligence, in particular to a method, device, computer equipment and storage medium for authenticating a certificate.
- ID cards play a very important role in application scenarios such as banks, customs, airports, railway stations, etc. More and more occasions have also raised the issue of the efficiency and accuracy of ID verification Higher requirements.
- the face photos read in the image and the photos printed on the surface of the ID card are compared for similarity to determine the authenticity of the ID card.
- Most of the verification process requires manual visual inspection to compare one by one, so the reliability of the entire verification process It is closely related to the staff’s experience and subjective recognition ability, but because each person’s subjective recognition ability is different and the focus is also different, the comparison process not only lacks scientific basis, but is also susceptible to various factors. Therefore, This method of manually verifying the authenticity of the ID card is not only inefficient, but also the accuracy cannot be guaranteed.
- the main purpose of this application is to provide a method, device, computer equipment and storage medium for authenticating a certificate, aiming to solve the problems of low efficiency and low accuracy in the prior art of manually verifying the authenticity of an ID card.
- This application proposes a method for authenticating a certificate, including:
- the image information of the target document at different continuous shooting angles, and perform feature detection on the image information at each shooting angle to obtain multiple continuous feature information, where the feature detection includes the color change of the optically color-changing ink area in the image information Ink value detection, characteristic information includes color-changing ink value;
- This application also proposes a certificate authenticity verification device, including:
- the feature detection module is used to obtain the image information of the target document under different continuous shooting angles, and perform feature detection on the image information under each shooting angle to obtain multiple continuous feature information.
- the feature detection includes Detect the value of the color-changing ink in the optically-changing ink area, and the characteristic information includes the value of the color-changing ink;
- the calculation module is used to calculate the difference between two adjacent color-changing ink values and take the absolute value to obtain the absolute value of multiple color-changing inks;
- the first judgment module is used for judging whether there is a first color-changing ink absolute value greater than the preset absolute value of the color-changing ink among the plurality of color-changing ink absolute values;
- the output module is configured to output the information that the target certificate is true when there is a first absolute value of the color-changing ink that is greater than the absolute value of the preset color-changing ink among the plurality of absolute values of the color-changing ink.
- This application also proposes a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the aforementioned certificate authenticity verification method when the processor executes the computer program.
- This application also proposes a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned certificate authenticity verification method are realized.
- the document authenticity verification method proposed in this application can obtain multiple color-changing ink values by acquiring the image information of the target document at different continuous shooting angles, and detecting the color-changing ink value of the optically color-changing ink area in each image information. Furthermore, by calculating the difference between the values of two adjacent color-changing inks and taking the absolute value, multiple absolute values of the color-changing inks that can characterize the authenticity of the ID card can be obtained, and then whether the absolute values of the multiple color-changing inks exist The judgment result of the absolute value of the first color-changing ink, which is greater than the absolute value of the preset color-changing ink, is used to verify the authenticity of the target document, so there is no need to rely on manual authentication, and the authenticity of the identity document can also be verified, which greatly improves The efficiency and accuracy of authenticity verification of documents.
- Figure 1 is a schematic flow chart of a method for authenticating a certificate in an implementation of this application
- Figure 2 is a schematic diagram of the structure of a certificate authenticity verification device in an implementation of this application.
- Fig. 3 is a schematic diagram of the structure of a computer device in an implementation of the present application.
- an embodiment of the present application proposes a method for verifying the authenticity of a certificate, which can be applied to a terminal device with a camera function (such as a smart robot with a camera function, etc.).
- the method for authenticating a certificate includes:
- S12 Calculate the difference between two adjacent color-changing ink values and take the absolute value to obtain multiple absolute values of the color-changing ink
- S14 is executed to output the information that the target certificate is true.
- the above-mentioned target document is an identity document with optical color ink anti-counterfeiting features that need to be verified for authenticity, such as the second-generation resident ID card of mainland China, Hong Kong permanent resident ID card, etc., among which, for genuine Chinese
- the second-generation perennial resident ID card is about 7.5mm from the left edge on the upper left corner of the front of the ID card, and about 9.5mm from the upper edge, there is a Great Wall pattern about 22mm ⁇ 14mm printed with optically color-changing ink. As the viewing angle changes, the Great Wall pattern will dynamically show different colors, such as changing from yellow to green or from green to yellow; for a real Hong Kong permanent identity card, it is on the left side of the chip on the front of the ID card.
- the position has a triangular pattern printed with optically color-changing ink.
- the triangular pattern dynamically presents different colors, such as changing from gold to green or from green to gold.
- the terminal device can continuously photograph the front of the target document from different shooting angles to obtain multiple consecutive document images corresponding to different angles, and then by tailoring the document images,
- the first area image containing the anti-counterfeiting features of optically color-changing ink is cut out from each document image, and then the cut out first area image can be converted from RGB color space to HSV color space through image processing libraries such as opencv, and each of the first area images can be obtained.
- the HSV value corresponding to a region image, and then the H value (H value is an integer) in the HSV value is extracted as the above-mentioned color-changing ink value, so as to realize the detection of the color-changing ink value of the image information at each shooting angle.
- the ink area containing the anti-counterfeiting feature of the optically color-changing ink will dynamically show different colors, for example, for the real second-generation resident status of mainland China It will change from yellow to green or from green to yellow. For example, for a real Hong Kong permanent identity card, it will change from gold to green or green to gold, and different colors will have different correspondences.
- the HSV value corresponding to yellow is (60, 100, 100) (that is, the H value corresponding to yellow is 60), and the HSV value corresponding to gold is (51, 100, 100) (that is, the H value corresponding to gold is 51 ), the HSV value corresponding to green is (120, 100, 50) (that is, the H value corresponding to green is 120), so there will be a certain difference between the values of two adjacent color-changing inks, and this difference can be achieved by a It is characterized by a numerical interval, which can be obtained through a large number of experiments in advance.
- the absolute value of the preset color-changing ink can be 5, 6, 7, etc., as long as it can meet the requirements of use However, there are no specific restrictions on this.
- the absolute value of the first color-changing ink is greater than the absolute value of the preset color-changing ink among the plurality of absolute values of the color-changing ink, it indicates that the target ID is a real ID card, and the information that the target ID is true can be output at this time. Prompt the user, otherwise, it indicates that the target certificate is a fake ID card, and at this time, it can output the information that the target certificate is fake to prompt the user.
- the document authenticity verification method obtains the image information of the target document at different continuous shooting angles, and detects the color-changing ink value of the optically color-changing ink area in each image information, and can continuously obtain multiple color-changing inks.
- a number of color-changing ink absolute values that can characterize the authenticity of the ID card can be obtained, and then the absolute value of multiple color-changing inks can be obtained Whether there is a judgment result of the absolute value of the first color-changing ink that is greater than the absolute value of the preset color-changing ink, to verify the authenticity of the target document, so there is no need to rely on manual authentication, and the authenticity of the ID can be verified, thereby greatly Improved the efficiency and accuracy of document authentication.
- the method before the step of acquiring the image information of the target document at different continuous shooting angles, and performing feature detection on the image information at each shooting angle, before the step of obtaining multiple continuous feature information, the method further includes:
- S101 Receive a selection instruction input by a user, and determine the document type of the target document according to the selection instruction;
- S102 According to the certificate type, determine the preset color-changing ink absolute value corresponding to the certificate type from the preset corresponding relationship between the certificate type and the absolute value of the color-changing ink.
- the authenticity verification of different types of target certificates can be achieved through terminal devices.
- the user can determine the document type of the target document by manual selection.
- the user can be provided with document type options on the specific application interface of the terminal device.
- the document type options can be venue China, Hong Kong, etc.
- the document type of the target document can be selected by clicking and other methods.
- the terminal device When the user clicks on the option, it will trigger the terminal device to generate a corresponding selection instruction, and then the terminal device can determine the document type of the target document according to the selection instruction For example, if the user clicks on the certificate type option of "Hong Kong, China", it indicates that the authenticity of the Hong Kong permanent resident ID card needs to be verified; among them, the correspondence between the above certificate type and the absolute value of the color-changing ink can be in the form of a table It is stored in advance on the terminal device, and the corresponding relationship between the document type and the absolute value of the color-changing ink is pre-stored with the absolute value of the color-changing ink corresponding to each target document type (generally, different document types represent the critical point of ID card authenticity).
- the absolute value of the color-changing ink will also be different), such as the absolute value of the color-changing ink corresponding to the second-generation resident ID card in venue China, the absolute value of the color-changing ink corresponding to the Hong Kong permanent resident ID card, etc., so when determining After obtaining the document type of the target document, the terminal device can determine the absolute value of the preset color-changing ink corresponding to the document type of the target document by searching for the corresponding relationship between the preset document type and the absolute value of the color-changing ink, so that the preset can be used later
- the absolute value of the color-changing ink is used to judge the authenticity of the ID card.
- users can also set the default certificate type by themselves. For example, for some usage scenarios that are mainly used to verify the authenticity of the second-generation resident ID card in 65% China , The user can set the default certificate type as venue China to avoid frequent manual selection operations.
- the feature detection further includes character detection using a preset character recognition neural network model
- the feature information also includes character detection results, the above-mentioned acquiring image information of the target document under different continuous shooting angles, and After the step of performing feature detection on image information at various shooting angles, and obtaining multiple continuous feature information, it further includes:
- S11a Determine the document type of the target document according to the multiple character detection results
- the preset character recognition neural network model is used to detect the specific content in the image information at each shooting angle.
- the character area (such as the optical character area) performs character detection, and then can automatically determine the document type of the target document based on the result of the character detection, thereby avoiding the trouble of manual operation and further improving the efficiency of document authenticity verification.
- a genuine Chinese second-generation resident ID card under the photo on the right side of the front of the ID card, there is a "China CHINA" anti-counterfeiting of about 17.5mm ⁇ 4.0mm produced by microlens and micro-graphic composite film technology.
- the anti-counterfeiting characteristics words will be dynamically presented; and for a genuine Hong Kong permanent resident ID card, there is an oblong anti-counterfeiting feature on the underside of the chip on the front of the ID card-multiple
- the laser image as the viewing angle changes, the multiple laser images will dynamically show the words H and K.
- the terminal device can continuously photograph the front of the target document from different shooting angles, obtain multiple consecutive document images corresponding to different angles, and then perform targeted cropping on the document images.
- the character detection in the network model can obtain the character detection results corresponding to each second area image, so as to realize the character detection of the image information under various shooting angles.
- the character detection results include multiple types.
- the target certificate Take the Hong Kong permanent resident ID card as an example.
- the target document is a Hong Kong permanent resident identity card (that is, the document type is Hong Kong, China)
- the optical character area in the image information that is, containing multiple Laser image area
- four types of character detection results can be obtained: only H characters, only K characters, none of H and K characters, and both H and K characters; further, in one way , You can determine whether the document type of the target document is Hong Kong, China by judging whether there are character detection results containing H and K characters in the multiple character detection results obtained.
- the terminal device passes Search for the correspondence between the preset ID type and the absolute value of the color-changing ink, and determine the absolute value of the preset color-changing ink corresponding to the ID type of the target ID, so that the absolute value of the preset color-changing ink can be used to determine the authenticity of the ID card.
- the preset The character recognition neural network model performs character detection on other character areas in the image information. For example, for a Hong Kong permanent resident ID card, the "Hong Kong permanent resident ID card" is printed on the upper edge area of its front. The area performs character detection. When the character detection result contains a character detection result that can represent the word "Hong Kong", it can be determined that the type of the target document is Hong Kong, China.
- the combination of the above-mentioned manual selection of the document type and the above-mentioned method of automatically determining the document type based on the character detection result can be used to clarify the document type of the target document.
- Operational errors for example, when the application scenario changes, such as when the application scenario is changed from mainland China to Hong Kong, and the default certificate type is not adjusted adaptively
- a prompt message indicating the inconsistency of the certificate type can be issued to remind the user to perform related inspection operations.
- the feature detection further includes using a preset character recognition neural network model to perform character detection on the optical character area in the image information, and the feature information also includes character detection results, and the output target document is true. Before the steps, it also includes:
- S140a Determine whether there is a first character detection result that meets a preset character condition among the multiple character detection results
- the target document is a Hong Kong permanent resident ID card as an example.
- the area that is, the area containing multiple laser images
- the area for character detection can obtain 4 types of character detection results: containing only H characters, only K characters, none of H and K characters, and all containing H and K characters; further,
- the detection result in another way, can also be judged by judging whether there is at least one character detection result containing only H characters and at least one character detection result containing only K characters among the obtained multiple character detection results.
- the terminal device can determine that there is a first character detection result that meets the preset character condition among the multiple character detection results, and then can output the information that the target certificate is true, that is , Only if there is a character detection result containing H and K characters in multiple character detection results or at least one character detection result containing only H characters and at least one character detection result containing only K characters in multiple character detection results , And when there is at least one first color-changing ink absolute value greater than the preset absolute value of the color-changing ink among the multiple color-changing
- acquiring the image information of the target document at different continuous shooting angles, and performing feature detection on the image information at each shooting angle, and before the step of obtaining multiple continuous feature information further includes:
- S10a Acquire multiple real ID images with different inclination angles and carrying character mark information
- S10b Input multiple real document images into the character recognition neural network model for character detection, and output multiple character information
- S10c Compare each character information with corresponding character mark information one by one to verify whether the detection accuracy of the character recognition neural network model reaches the preset accuracy;
- S10d is executed to iterate the parameters in the character recognition neural network model repeatedly until the detection accuracy of the character recognition neural network model reaches the preset accuracy.
- the above real ID image can be from the user's input, or it can be from the local, there is no specific restriction on this;
- the above character mark information is the standard typeface Character features (such as the character features of the standard typeface categories "H” and "K", the standard typeface categories are " ⁇ ", “ ⁇ ", “C”, “H”, “I”, “N”, “A” It can be manually marked in the corresponding real ID image in advance, so that it can be used to calculate the accuracy of the training result. For example, suppose that the real ID image comes from real Hong Kong permanent residents The image information of the ID card is collected, then the character marking information of each real ID image can be manually marked in advance.
- the character marking information can be used (1, 0) to represent the character "H", (0, 1) to represent the character " K", (0,0) represents no character, (1,1) represents the character "HK", it should be noted that the above-mentioned true ID image can be an image of an area containing anti-counterfeiting features in the ID image, or it can be an identity There are no specific restrictions on the regional image containing specific characters in the credential image. For ease of understanding, this embodiment takes as an example the real credential image is the regional image containing the anti-counterfeit feature words in the ID document image.
- a classifier trained by a convolutional neural network can be used as the above-mentioned character recognition neural network model, of course, other types of neural network trained classifiers can also be used as the above-mentioned character recognition neural network model, as long as it can meet the requirements of use That is, there is no specific restriction on this; specifically, when the character recognition neural network model receives the input real document image, the character recognition neural network model can output the corresponding character information by performing character detection on it, for example, when the output When the character information contains (1, 0), it means that in the process of character detection, it is detected that a certain authentic document image contains only the "H" character.
- the above preset accuracy can be determined according to actual usage requirements, for example, it can be 80%, 85%, 90%, etc. There is no specific restriction on this; for example, assuming that there are 5 real document images, Set the accuracy to 85%, and the character mark information corresponding to each real document image are (1, 0), (1, 1), (0, 1), (1, 0) and (0, 0), and the output
- the character information corresponding to each real ID image is (1,0), (1,1), (0,1), (0,0), and (0,0)
- each character information is corresponding to
- the character mark information of the four characters can be compared one by one, and a comparison result with four character information matching can be obtained.
- the detection accuracy of the character recognition neural network model can be calculated to be 80%, and the character can be judged
- the detection accuracy of the recognition neural network model does not reach the preset accuracy.
- the prediction error between the output character information and the standard character mark information can be calculated by means of a loss function, and random gradient descent is used The method continuously reduces the prediction error to a minimum, so that a character recognition neural network model with better network parameters can be trained.
- multiple real document images with different tilt angles and carrying character mark information are acquired, and the multiple real document images are input into a preset character recognition neural network model for character detection, and multiple output Character information, and then compare the output character information and the corresponding character mark information one by one to verify whether the detection accuracy of the character recognition neural network model reaches the preset accuracy.
- the detection accuracy of the character recognition neural network model does not reach the preset accuracy
- iterate repeatedly the parameters of the character neural network model network parameters such as weights
- the detection accuracy of the character recognition neural network model reaches the preset accuracy, so that a character recognition neural network with better network parameters can be trained Model, which helps to further improve the reliability of the authenticity of the certificate.
- the feature detection further includes using a preset color recognition neural network model to perform color detection on the optically discolored ink area in the image information, and the feature information also includes the color detection result, and the output target document is true.
- the information step it also includes:
- S140A Determine whether there is a first color detection result that meets a preset color condition among the multiple color detection results
- the target document is a Hong Kong permanent resident ID card as an example.
- a real Hong Kong permanent resident ID card there is a optical discoloration on the left side of the chip on the front of the ID card.
- the triangle pattern printed by ink will dynamically show different colors as the viewing angle changes, such as changing from gold to green or from green to gold. Therefore, in the specific implementation, you can take different pictures.
- the front side of the target document is continuously photographed, and multiple continuous document images corresponding to different angles are obtained.
- the anti-counterfeiting features of optical color ink can be cut out from each document image
- the first region image, and then the cropped first region image can be input into the preset color recognition neural network model for color detection, and the color detection results corresponding to each first region image can be obtained, so as to realize the detection of each shooting angle Color detection of the image information, and then determine whether there is a yellow detection result and a green detection result in the multiple color detection results; if there is no yellow detection result in the multiple color detection results or there is no detection result If the color of the detection result is green, the terminal device can output information that the target document is false.
- the terminal device can determine that there is a first color detection result that meets the preset color condition among the multiple color detection results, and then can output the information that the target document is true, that is, only if there is at least one color in the multiple color detection results
- the terminal device will output the target certificate True information, in this way, the accuracy of the authenticity verification of the ID document can be further improved, and the authenticity verification of the ID document can be more reliable.
- the aforementioned preset color recognition neural network model can be a pre-trained convolutional neural network model with color recognition function, or a pre-trained BP with color recognition function.
- the neural network model can also be other types of color classifiers, as long as it can meet the needs of use, and there are no specific restrictions on this.
- the target document as a Hong Kong permanent resident ID card as an example, it can be trained in advance based on the convolutional neural network
- a color recognition neural network model that can recognize gold and green (equivalent to a color binary classifier that can classify gold and green).
- the training process is similar to the training process of the character recognition neural network model described above. Those skilled in the art can Understand, this will not be repeated here.
- the color-changing ink value detection, character detection, and color detection can also be performed on the image information at each shooting angle at the same time, and only when the color-changing ink value detection, character detection and color detection all pass (ie, There is at least one first color-changing ink absolute value that is greater than the preset color-changing ink absolute value among the plurality of color-changing ink absolute values, and there is a first character detection result that meets the preset character condition among the plurality of character detection results, and multiple color detections The first color detection result that meets the preset color conditions is present in the result), the terminal device will output the information that the target certificate is true. In this way, the accuracy of the authenticity of the certificate can be further improved, and the authenticity of the ID can be verified more reliable.
- the image information is a video stream
- the image information of the target document at different continuous shooting angles is obtained, and the feature detection is performed on the image information at each shooting angle to obtain multiple continuous feature information
- the steps include:
- S112 Perform feature detection on the video stream frame by frame or at intervals of a preset number of frames to obtain multiple continuous feature information.
- the terminal device can continuously shoot the front of the target document from different shooting angles for a specified time (such as shooting 2 seconds, 3 seconds, 4 seconds, etc.), so as to obtain a video stream with a certain length of time.
- a specified time such as shooting 2 seconds, 3 seconds, 4 seconds, etc.
- Perform feature detection where the preset number of frames can be determined according to actual usage, such as 1 frame, 2 frames, 3 frames, etc. There are no specific restrictions on this, and the usage requirements are met.
- the interval preset frames are used Feature detection is performed on the video stream in a number of ways, which will not affect the accuracy of detection, but also improve the efficiency of detection; specifically, after the video stream is obtained, the video frame (ie a frame of image in the video stream) Targeted cropping can cut out the above-mentioned first area image containing the anti-counterfeiting feature of the optically variable ink and the above-mentioned anti-counterfeiting feature from each video frame (such as the first frame, the third frame, the fifth frame, the seventh frame, etc.) The second area image with the characteristic words.
- the cropped first area image can be converted from RGB color space to HSV color space through a picture processing library such as opencv, and the corresponding image of each first area can be obtained HSV value, and then extract the H value in the HSV value to be the above-mentioned color-changing ink value, so as to realize the detection of the color-changing ink value of the target document; and for the second area image, it can be input into the above-mentioned character recognition neural network model Perform character detection, so as to obtain the character detection results corresponding to each second area image, so as to realize the character detection of the target document. Therefore, in some embodiments, the video stream is changed color by a preset number of frames every interval.
- a corresponding color-changing ink value and character detection result can be obtained.
- the preset number of frames is 3
- the time length and the number of frames of the video stream are 5 seconds and 30 frames/second, respectively
- the color-changing ink value detection and character detection are performed on the video stream at intervals of a preset number of frames.
- 50 continuous color-changing ink values and 50 continuous character detection results can be obtained.
- the authenticity of the ID card is verified by using the dynamic method of video stream (ie video stream), and the authenticity of the ID card is verified by using the static method of image information (document image). Compared with the technical means of, because the continuity and stability of information acquisition will be higher, it is helpful to improve the reliability of the authenticity of the certificate.
- the steps of continuously shooting the front of the target document from different shooting angles to obtain a video stream include:
- S1111 Focusing on the target document, and acquiring a first shape parameter of the focused target document, where the first shape parameter includes the first length parameters of two opposite edges of the target document;
- S1112 Calculate the deviation value between the two first length parameters, and determine whether the deviation value is less than a first preset threshold
- S1113 is executed to start to continuously photograph the front of the target document from different shooting angles, and the second shape parameter of the target document is acquired in real time during the shooting.
- the second shape parameter includes The second length parameter of the two opposite parallel edges of the target document;
- S1115 is executed to stop shooting the target certificate and obtain a video stream.
- the camera is used to focus on the front of the target document, and then the edges of the target document are detected by edge detection technology, and 4 first lengths corresponding to the 4 edges of the target document can be obtained. Parameters (that is, the length of the 4 edges).
- the length difference between the two opposite sides (ie, the deviation value) is further calculated, and it is judged whether the length difference is less than the first prediction.
- Set a threshold If the length difference is less than the first preset threshold, it means that the lengths of the two opposite sides are close to the same.
- the focused target document appears as a rectangle, and the camera is aligned with the front of the target document (this time is equivalent to the camera is facing The front of the target document).
- the shape of the detected target ID will change with the shooting angle.
- the specific performance is changed from a rectangle to a trapezoid with a short upper side and a long lower side.
- the edge detection technology can detect the 4 second length parameters corresponding to the 4 edges when the target document appears as a trapezoid in real time
- the length ratio between the two relatively parallel edges is further calculated. Ratio), and determine whether the length ratio is less than the second preset threshold, where the second preset threshold can be obtained through experiments in advance, for example, it can be 0.73, 0.72, 0.71, etc., as long as it can meet the requirements of use. This is not specifically limited; if the length ratio is less than the second preset threshold, it means that the target document has been in the required trapezoidal shape, and the camera has collected enough "materials" for authenticity verification of the document.
- the ink area containing the anti-counterfeiting feature of the optically color-changing ink will dynamically show different colors, and the area containing the anti-counterfeiting feature will dynamically show the words, so for verification
- the authenticity of the target document requires simulating human actions to "observe" the target document from different angles.
- the difference in shooting angle will not only affect the accuracy of verification, but the starting and ending shooting angles are ultimately determined
- the length of the video stream will ultimately affect the efficiency of verification. Therefore, it is necessary to determine the start and end angles of the shooting to ensure the accuracy and efficiency of verification at the same time.
- the edge detection of the target document through edge detection technology not only realizes the automatic control of the camera shooting angle, but does not require manual operation to change the camera shooting angle. And finally a more appropriate termination angle can be obtained, which can ensure the accuracy and efficiency of the verification.
- the step of judging whether there is a first color-changing ink absolute value greater than a preset absolute value of the color-changing ink among the plurality of color-changing ink absolute values includes:
- S131 Select the absolute value of the color-changing ink with the largest value from the absolute values of the plurality of color-changing inks;
- S132 Determine whether the absolute value of the color-changing ink with the largest value is greater than the preset absolute value of the color-changing ink
- S133 is executed to determine that there is a first absolute value of the color-changing ink that is greater than the preset absolute value of the color-changing ink among the plurality of color-changing ink absolute values.
- the target certificate can be determined to be true based on this, so only the absolute value of the multiple color-changing inks
- the absolute value of the color-changing ink with the largest value is selected from the value, and then by judging whether the absolute value of the color-changing ink with the largest value is greater than the preset absolute value of the color-changing ink, it can be determined whether the target document is true, without having to add multiple color-changing inks one by one
- the value is compared with the absolute value of the preset color-changing ink, which helps to shorten the calculation process and improve the efficiency of verification.
- the embodiment of the present application also proposes a certificate authenticity verification device, which can be applied to a terminal device with a camera function, and the certificate authenticity verification device includes:
- the feature detection module 11 is used to obtain the image information of the target document at different continuous shooting angles, and perform feature detection on the image information at each shooting angle to obtain multiple continuous feature information, wherein the feature detection includes To detect the value of the color-changing ink in the optically color-changing ink area, the characteristic information includes the value of the color-changing ink;
- the calculation module 12 is used to calculate the difference between two adjacent color-changing ink values and take the absolute value to obtain the absolute value of multiple color-changing inks;
- the first judging module 13 is configured to judge whether there is a first color-changing ink absolute value greater than the preset absolute value of the color-changing ink among the plurality of color-changing ink absolute values;
- the output module 14 is configured to output information that the target certificate is true when there is a first absolute value of the color-changing ink that is greater than the absolute value of the preset color-changing ink among the plurality of absolute values of the color-changing ink.
- the above-mentioned certificate authenticity verification device further includes:
- the receiving module is used to receive the selection instruction input by the user, and according to the selection instruction, determine the document type of the target document;
- the first determining module is configured to determine the preset color-changing ink absolute value corresponding to the certificate type from the preset corresponding relationship between the certificate type and the color-changing ink absolute value according to the certificate type.
- the feature detection further includes character detection using a preset character recognition neural network model
- the feature information further includes character detection results
- the above-mentioned certificate authenticity verification device further includes:
- the second determination module is used to determine the document type of the target document according to the multiple character detection results
- the third determining module is used to determine the preset color-changing ink absolute value corresponding to the certificate type from the preset correspondence relationship between the certificate type and the color-changing ink absolute value according to the certificate type.
- the feature detection further includes using a preset character recognition neural network model to perform character detection on the optical character area in the image information
- the above-mentioned certificate authenticity verification device further includes:
- the second judgment module is used to judge whether there is a first character detection result that meets the preset character condition among the multiple character detection results.
- the aforementioned output module 14 is also configured to output information that the target certificate is true when there is a first character detection result that meets the preset character condition among the multiple character detection results.
- the feature detection further includes using a preset color recognition neural network model to perform color detection on the optically color-changing ink area in the image information, and the feature information further includes the color detection result.
- the above-mentioned certificate authenticity verification device also include:
- the third judgment module is used to judge whether there is a first color detection result that meets the preset color condition among the multiple color detection results.
- the aforementioned output module 14 is further configured to output information that the target certificate is true when there is a first color detection result that meets the preset color condition among the multiple character detection results.
- the above-mentioned certificate authenticity verification device further includes:
- Character detection module input multiple real document images into the character recognition neural network model for character detection, and output multiple character information;
- the comparison module is used to compare each character information with the corresponding character mark information one by one to verify whether the detection accuracy of the character recognition neural network model reaches the preset accuracy;
- the iterative module is used to repeatedly iterate the parameters in the character recognition neural network model when the detection accuracy of the character recognition neural network model does not reach the preset accuracy, until the detection accuracy of the character recognition neural network model reaches the preset accuracy.
- the above-mentioned feature detection module 11 when the image information is a video stream, the above-mentioned feature detection module 11 includes:
- the shooting unit is used to continuously shoot the front of the target document from different shooting angles to obtain a video stream;
- the feature detection unit is used to perform feature detection on the video stream frame by frame or at intervals of a preset number of frames to obtain multiple continuous feature information;
- the aforementioned photographing unit includes:
- the focusing subunit is used to focus the target document and obtain the first shape parameter of the focused target document, where the first shape parameter includes the first length parameters of two opposite edges of the target document;
- the first calculation subunit is used to calculate the deviation value between the two first length parameters and determine whether the deviation value is less than the first preset threshold
- the photographing subunit is used to start photographing the front of the target document continuously from different photographing angles when the deviation value is less than the first preset threshold, and obtain the second shape parameter of the target document in real time during the photographing process.
- the shape parameter includes the second length parameter of the two opposite parallel edges of the target document;
- the second calculation subunit is used to calculate the ratio between the two second length parameters and determine whether the ratio is less than a second preset threshold
- the stop subunit is used to stop shooting the target certificate to obtain a video stream when the ratio is less than the second preset threshold.
- the above-mentioned first judgment module 13 includes:
- the selection unit is used to select the absolute value of the color-changing ink with the largest value from the absolute value of the color-changing ink
- a judging unit for judging whether the absolute value of the color-changing ink with the largest value is greater than the preset absolute value of the color-changing ink
- the determining unit is used for determining that there is a first color changing ink absolute value greater than the preset color changing ink absolute value among the plurality of color changing ink absolute values when the absolute value of the color changing ink with the largest value is greater than the preset color changing ink absolute value.
- an embodiment of the present application also provides a computer device.
- the computer device may be a server, and its internal structure may be as shown in FIG. 3.
- the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the computer designed processor is used to provide calculation and control capabilities.
- the memory of the computer device includes a non-volatile storage medium and an internal memory.
- the non-volatile storage medium stores an operating system, a computer program, and a database.
- the memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
- the database of the computer equipment is used to store the authentication method and program of the certificate.
- the network interface of the computer device is used to communicate with an external terminal through a network connection.
- the embodiment of the present application also proposes a computer-readable storage medium.
- the computer-readable storage medium may be non-volatile or volatile.
- a computer program is stored thereon.
- the computer program is executed by a processor to realize any of the above.
- the certificate authenticity verification method in the embodiment is not limited to:
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Multimedia (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- Marketing (AREA)
- General Business, Economics & Management (AREA)
- Finance (AREA)
- Economics (AREA)
- Development Economics (AREA)
- Health & Medical Sciences (AREA)
- Accounting & Taxation (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Strategic Management (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (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)
- Entrepreneurship & Innovation (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
一种证件真伪验证方法、装置、计算机设备及存储介质,其中,证件真伪验证方法包括:获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的影像信息进行特征检测,获得多个连续的特征信息,其中,特征检测包括对影像信息中的光学变色油墨区域进行变色油墨值检测,特征信息包括变色油墨值(S11);计算两两相邻的变色油墨值之间的差值并取绝对值,获得多个变色油墨绝对值(S12);判断多个变色油墨绝对值中是否存在大于预设变色油墨绝对值的第一变色油墨绝对值(S13);若是,则输出目标证件为真的信息(S14)。该证件真伪验证方法可解决现有技术中通过人工验证身份证真伪,存在效率低和准确性低的问题。
Description
本申请要求于2019年7月30日提交中国专利局、申请号为201910696321.2,发明名称为“证件真伪验证方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及到人工智能领域,特别是涉及到一种证件真伪验证方法、装置、计算机设备及存储介质。
身份证作为法定的证明公民个人身份的证件,在银行、海关、机场、火车站等应用场景中扮演着十分重要的角色,越来越多的场合对于身份证验证的高效性和准确性也提出了更高的要求。
发明人发现,现有技术中,为了验证身份证的真伪,一般都需要相关工作人员对从芯片中读取的信息和从身份资料信息库中导出的信息进行一致性比较,或者利用从芯片中读取的人脸照片以及身份证表面印刷的照片进行相似性比对,以确定身份证的真伪,该验证过程大都需要人工通过目测去一一进行比对,因此整个验证过程的可靠性与工作人员的经验和主观识别能力密切相关,但由于每个人的主观识别能力都有差异,侧重点也不同,因此在比对过程中不仅缺乏科学依据,而且容易受到各种因素的影响,因此,这种人工验证身份证真伪的方式,不仅效率低,而且准确性也无法得到保证。
本申请的主要目的为提供一种证件真伪验证方法、装置、计算机设备及存储介质,旨在解决现有技术中通过人工验证身份证真伪,存在效率低和准确性低的问题。
本申请提出一种证件真伪验证方法,包括:
获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的影像信息进行特征检测,获得多个连续的特征信息,其中,特征检测包括对影像信息中的光学变色油墨区域进行变色油墨值检测,特征信息包括变色油墨值;
计算两两相邻的变色油墨值之间的差值并取绝对值,获得多个变色油墨绝对值;
判断多个变色油墨绝对值中是否存在大于预设变色油墨绝对值的第一变色油墨绝对值;
若多个变色油墨绝对值中存在大于预设变色油墨绝对值的第一变色油墨绝对值,则输出目标证件为真的信息。
本申请还提出一种证件真伪验证装置,包括:
特征检测模块,用于获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的影像信息进行特征检测,获得多个连续的特征信息,其中,特征检测包括对影像信息中的光学变色油墨区域进行变色油墨值检测,特征信息包括变色油墨值;
计算模块,用于计算两两相邻的变色油墨值之间的差值并取绝对值,获得多个变色油墨绝对值;
第一判断模块,用于判断多个变色油墨绝对值中是否存在大于预设变色油墨绝对值的第一变色油墨绝对值;
输出模块,用于当多个变色油墨绝对值中存在大于预设变色油墨绝对值的第一变色油墨绝对值时,输出目标证件为真的信息。
本申请还提出一种计算机设备,包括存储器和处理器,存储器存储有计算机程序,处理器执行计算机程序时实现前述的证件真伪验证方法的步骤。
本申请还提出一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现前述的证件真伪验证方法的步骤。
本申请提出的证件真伪验证方法,通过获取目标证件在不同连续拍摄角度下的影像信息,并对各个影像信息中的光学变色油墨区域进行变色油墨值检测,可连续获得多个变色油墨值,进而通过计算两两相邻的变色油墨值之间的差值并取绝对值,可获得多个可表征身份证真伪性的变色油墨绝对值,进而可通过多个变色油墨绝对值中是否存在大于预设变色油墨绝对值的第一变色油墨绝对值的判断结果,来验证出目标证件的真伪,因而无需依赖人工进行鉴别,亦可实现对身份证件的真伪验证,从而大大地提高了证件真伪验证的效率和准确性。
图1是本申请一实施中证件真伪验证方法的流程示意图;
图2是本申请一实施中证件真伪验证装置的结构示意图;
图3是本申请一实施中计算机设备的结构示意图。
参照图1,本申请实施例提出一种证件真伪验证方法,可应用于具有摄像功能的终端设备上(如具有摄像功能的智能机器人等),该证件真伪验证方法包括:
S11,获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的影像信息进行特征检测,获得多个连续的特征信息,其中,特征检测包括变色油墨值检测,特征信息包括变色油墨值;
S12,计算两两相邻的变色油墨值之间的差值并取绝对值,获得多个变色油墨绝对值;
S13,判断多个变色油墨绝对值中是否存在大于预设变色油墨绝对值的第一变色油墨绝对值;
若多个变色油墨绝对值中存在大于预设变色油墨绝对值的第一变色油墨绝对值,则执行S14,输出目标证件为真的信息。
在上述S11中,上述目标证件为当前需要进行真伪验证的具有光学变色油墨防伪特征的身份证件,如中国大陆第二代居民身份证、香港永久性居民身份证等,其中,对于真的中国大陆第二代居民身份证,在身份证正面左上角距左侧边缘约为7.5mm,距上边缘约为9.5mm的位置具有一用光学变色油墨印刷的大小约为22mm×14mm的长城图案,随着观察角度的改变,该长城图案会动态呈现出不同的颜色,如由黄色渐变为绿色或者由绿色渐变为黄色;而对于真的香港永久性居民身份证,在身份证正面的晶片左侧位置具有一用光学变色油墨印制的三角形图案,随着观察角度的改变,该三角形图案会动态呈现出不同的颜色,如由金色渐变为绿色或者由绿色渐变为金色。在本步骤中,具体地,终端设备可从不同的拍摄角度对目标证件的正面连续进行拍摄,获得多张连续的对应不同角度的证件图像,然后通过对证件图像进行针对性的裁剪,可从每一张证件图像中裁剪出含有光学变色油墨防伪特征的第一区域图像,进而可通过opencv等图片处理库将裁剪出的第一区域图像由RGB颜色空间转换为HSV颜色空间,可获得各个第一区域图像对应的HSV值,然后提取HSV值中的H值(H值为一个整数)即为上述的变色油墨值,从而实现对各个拍摄角度下的影像信息的变色油墨值检测。
在上述S12中,获得多个变色油墨值后,通过计算两两相邻的变色油墨值之间的差值并取绝对值,可获得多个变色油墨绝对值,例如,获得的变色油墨值的数量为10个,则通过计算可获得9个变色油墨绝对值。
在上述S13中,具体地,由于对于真的目标证件,随着观察角度的改变,含有光学变色油墨防伪特征的油墨区域会动态呈现出不同的颜色,例如对于真的中国大陆第二代居民身份证,会由黄色渐变为绿色或者由绿色渐变为黄色,又例如,对于真的香港永久性居民身份证,会由金色渐变为绿色或者由绿色渐变为金色,而且不同的颜色会对应有不同的HSV值,例如黄色对应的HSV值为(60,100,100)(即黄色对应的H值为60),金色对应的HSV值为(51,100,100)(即金色对应的H值为51),绿色对应的HSV值为(120,100,50)(即绿色对应的H值为120),因此两两相邻的变色油墨值之间会存在一定的差异,而这种差异可通过一个数值区间来表征,该数值区间可事先通过大量实验来获得,因此,获得多个变色油墨绝对值后,可通过判断多个变色油墨绝对值中是否存在大于预设变色油墨绝对值的变色油墨绝对值,来验证目标证件的真伪,具体地,可通过将获得的多个变色油墨绝对值逐一与预设变色油墨绝对值进行比较,来判断出多个变色油墨绝对值中是否存在至少一个大于预设变色油墨绝对值的第一变色油墨绝对值,其中,预设变色油墨绝对值可事先通过实验获得,例如预设变色油墨绝对值可以是5、6、7等,只要能满足使用要求即可,对此不作具体的限制。
在上述S14中,若多个变色油墨绝对值中存在大于预设变色油墨绝对值的第一变色油墨绝对值,则表明目标证件是真的身份证,此时可输出目标证件为真的信息来提示用户,否则,表明目标证件是假的身份证,此时可输出目标证件为假的信息来提示用户。
在本实施例中,该证件真伪验证方法通过获取目标证件在不同连续拍摄角度下的影像信息,并对各个影像信息中的光学变色油墨区域进行变色油墨值检测,可连续获得多个变色油墨值,进而通过计算两两相邻的变色油墨值之间的差值并取绝对值,可获得多个可表征身份证真伪性的变色油墨绝对值,进而可通过多个变色油墨绝对值中是否存在大于预设变色油墨绝对值的第一变色油墨绝对值的判断结果,来验证出目标证件的真伪,因而无需依赖人工进行鉴别,亦可实现对身份证件的真伪验证,从而大大地提高了证件真伪验证的效率和准确性。
在一个可选的实施例中,上述获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的影像信息进行特征检测,获得多个连续的特征信息的步骤之前,还包括:
S101,接收用户输入的选择指令,并根据选择指令,确定目标证件的证件类型;
S102,根据证件类型,从预设的证件类型-变色油墨绝对值对应关系中,确定出与证件类型相对应的预设变色油墨绝对值。
在本实施例中,为了满足业务需求的多样性,可通过终端设备实现对不同类型的目标证件的真伪验证。具体地,用户可通过手动选择的方式确定目标证件的证件类型,例如可在终端设备特定的应用界面上为用户提供证件类型的选项,例如证件类型的选项可以是中国大陆、中国香港等,用户可通过点击等方式选择目标证件的证件类型,当用户在针对选项进行点击等操作时,会触发终端设备产生一个对应的选择指令,进而终端设备可根据该选择指令,确定出目标证件的证件类型,例如,用户点击了“中国香港”的证件类型选项,则表明当前需要验证的是香港永久性居民身份证的真伪性;其中,上述证件类型-变色油墨绝对值对应关系可以以表格的形式事先存储于终端设备上,在该证件类型-变色油墨绝对值对应关系中预先存储有各个目标证件类型相对应的变色油墨绝对值(一般地,不同的证件类型,表征身份证真伪临界点的变色油墨绝对值也会有所不同),例如与中国大陆第二代居民身份证相对应的变色油墨绝对值、与香港永久性居民身份证相对应的变色油墨绝对值等等,因此,当确定出目标证件的证件类型后,终端设备通过查找预设的证件类型-变色油墨绝对值对应关系,可确定出与目标证件的证件类型相对应的预设变色油墨绝对值,以便后续利用该预设变色油墨绝对值进行身份证真伪的判断。在本实施例中,需要说明的是,在一些特定的使用场景中,用户还可自行设置默认的证件类型,例如,对于一些主要为验证中国大陆第二代居民身份证的真伪的使用场景,则用户可自行设置默认的证件类型为中国大陆,以避免频繁的手动选定操作。
在另一个可选的实施例中,特征检测还包括利用预设的字符识别神经网络模型进行字符检测,特征信息还包括字符检测结果,上述获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的影像信息进行特征检测,获得多个连续的特征信息的步骤之后,还包括:
S11a,根据多个字符检测结果,确定目标证件的证件类型;
S11b,根据证件类型,从预设的证件类型-变色油墨绝对值对应关系中,确定出与证件类型相对应的预设变色油墨绝对值。
在本实施例中,可在对各个拍摄角度下的影像信息中的光学变色油墨区域进行变色油墨值检测的同时,利用预设的字符识别神经网络模型对各个拍摄角度下的影像信息中含有特定字符的区域(如光学字符区域)进行字符检测,进而可根据字符检测的结果,自动确定出目标证件的证件类型,从而可避免手动操作的麻烦,进一步提高证件真伪验证的效率。举例而言,对于真的中国大陆第二代居民身份证,在身份证正面右侧照片下有一用微透镜微图形组合薄膜技术生产的大小约为17.5mm×4.0mm的“中国CHINA”的防伪特征字样, 随着观察角度的改变,该防伪特征字样会动态呈现;而对于真的香港永久性居民身份证,在身份证正面的晶片下侧位置具有一个呈长圆形的防伪特征——多重激光影像,随着观察角度的改变,该多重激光影像会动态呈现H、K字样。具体地,在一些实施例中,终端设备可从不同的拍摄角度对目标证件的正面连续进行拍摄,获得多张连续的对应不同角度的证件图像,然后通过对证件图像进行针对性的裁剪,可从每一张证件图像中裁剪出含有防伪特征字样的第二区域图像(如含有多重激光影像的第二区域图像),进而可通过将裁剪出的第二区域图像输入至预设的字符识别神经网络模型中进行字符检测,可获得各个第二区域图像对应的字符检测结果,从而实现对各个拍摄角度下的影像信息的字符检测,其中,字符检测结果包括多种,为方便说明,以目标证件为香港永久性居民身份证为例进行说明,假设目标证件为香港永久性居民身份证(即证件类型为中国香港),则通过对各个拍摄角度下的影像信息中的光学字符区域(即含有多重激光影像的区域)进行字符检测,可获得4种字符检测结果:只含有H字符、只含有K字符、均不含H、K字符以及均含有H、K字符;进一步地,在一种方式中,可通过判断所获得的多个字符检测结果中是否存在均含有H、K字符的字符检测结果,来确定目标证件的证件类型是否为中国香港,在另一种方式中,还可通过判断所获得的多个字符检测结果中是否至少存在一个只含有H字符的字符检测结果和至少存在一个只含有K字符的字符检测结果,来确定目标证件的证件类型是否为中国香港,若多个字符检测结果中存在均含有H、K字符的字符检测结果或者多个字符检测结果中至少存在一个只含有H字符的字符检测结果和至少存在一个只含有K字符的字符检测结果,则终端设备可据此确定出目标证件的证件类型为中国香港;同理,根据多个字符检测结果,还可确定目标证件的证件类型是否为中国大陆等,因此,当确定出目标证件的证件类型后,终端设备通过查找预设的证件类型-变色油墨绝对值对应关系,可确定出与目标证件的证件类型相对应的预设变色油墨绝对值,以便后续利用该预设变色油墨绝对值进行身份证真伪的判断,此处需要说明的是,在本实施例中,除了可利用预设的字符识别神经网络模型对影像信息中的光学字符区域进行字符检测外,在其它一些实施例中,还可利用预设的字符识别神经网络模型对影像信息中的其它字符区域进行字符检测,例如,对于香港永久性居民身份证,在其正面的上边缘区域印刷有“香港永久性居民身份证”,因此可对该区域进行字符检测,当字符检测结果中含有可表征“香港”二字的字符检测结果时,则可据此确定目标证件的类型为中国香港。
另外,值得说明的是,在其它一些实施例中,还可采用上述手动选择证件类型和上述根据字符检测结果,自动确定证件类型相结合的方式来明确目标证件的证件类型,如此,可避免手动操作失误(例如,当应用场景发生改变时,如应用场景由中国大陆地区变为香港地区时,未将默认设置的证件类型进行适应性的调整)而影响证件真伪验证的准确度,而当检测到手动选择的证件类型(或者默认设置的证件类型)与自动检测到的证件类型不一致时,可发出证件类型不一致的提示信息,以提醒用户进行相关检查操作。
在一个可选的实施例中,特征检测还包括利用预设的字符识别神经网络模型对影像信息中的光学字符区域进行字符检测,特征信息还包括字符检测结果,上述输出目标证件为真的信息的步骤之前,还包括:
S140a,判断多个字符检测结果中是否存在符合预设字符条件的第一字符检测结果;
若多个字符检测结果中存在符合预设字符条件的第一字符检测结果,则执行上述S14,输出目标证件为真的信息。
在本实施例中,为方便说明,以目标证件为香港永久性居民身份证为例进行说明,假设目标证件为香港永久性居民身份证,则通过对各个拍摄角度下的影像信息中的光学字符区域(即含有多重激光影像的区域)进行字符检测,可获得4种字符检测结果:只含有H字符、只含有K字符、均不含H、K字符以及均含有H、K字符;进一步地,在一种方式中,可通过判断所获得的多个字符检测结果中是否存在均含有H、K字符的字符检测结果,来判断多个字符检测结果中是否存在符合预设字符条件的第一字符检测结果,在另一种方式中,还可通过判断所获得的多个字符检测结果中是否至少存在一个只含有H字符的字符检测结果和至少存在一个只含有K字符的字符检测结果,来判断多个字符检测结果中是否存在符合预设字符条件的第一字符检测结果;若所获得的多个字符检测结果中只含有H字符的字符检测结果或者只含有K字符的字符检测结果,则终端设备可据此输出目标证件为假的信息;而若多个字符检测结果中存在均含有H、K字符的字符检测结果,或者多个字符检测结果中至少存在一个只含有H字符的字符检测结果和至少存在一个只含有K字符的字符检测结果,则终端设备可据此判定多个字符检测结果中存在符合预设字符条件的第一字符检测结果,进而可输出目标证件为真的信息,即,只有当多个字符检测结果中存在均含有H、K字符的字符检测结果或者多个字符检测结果中至少存在一个只含有H字符的字符检测结果和至少存在一个只含有K字符的字符检测结果,且多个变色油墨绝对值中存在至少一个大于预设变色油墨绝对值的第一变色油墨绝对值时,终端设备才会输出目标证件为真的信息,这样,可进一步提高证件真伪验证的准确性,使得身份证件的真伪验证可更加可靠。
在一个可选的实施例中,获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的影像信息进行特征检测,获得多个连续的特征信息的步骤之前,还包括:
S10a,获取倾斜角度各不相同且携带字符标记信息的多张真证件图像;
S10b,将多张真证件图像输入到字符识别神经网络模型中进行字符检测,输出多个字符信息;
S10c,将各个字符信息分别与对应的字符标记信息一一进行比对,以验证字符识别神经网络模型的检测精度是否达到预设精度;
若字符识别神经网络模型的检测精度未达到预设精度,则执行S10d,反复迭代字符识别神经网络模型中的参数,直至字符识别神经网络模型的检测精度达到预设精度为止。
在上述S10a中,具体地,由于对于真的身份证件,在不同的角度含有防伪特征字样的区域会动态呈现字样,故可获取多张(如5张、10张、20张、50张等)不同倾斜角度的同一真身份证件图像作为训练数据,其中,上述真证件图像可来源于用户所输入的,也可以来源于本地的,对此不作具体的限制;上述字符标记信息为标准字样类别的字符特征(如标准字样类别为“H”和“K”的字符特征、标准字样类别为“中”、“国”、“C”、“H”、“I”、“N”、“A”的字符特征等),其可事先通过人工的方式标记于对应的真证件图像中,以便后续用于计算训练结果的准确率,举例而言,假设真证件图像来源于对真的香港永久性居民身份证的图像信息采集,那么可事先通过人工的方式标记每一张真证件图像的字符标记信息,例如字符标记信息可用(1,0)代表字符“H”,(0,1)代表字符“K”,(0,0)代表无字符,(1,1)代表字符“HK”,需要说明的是,上述真证件图像可以是身份证件图像中含有防伪特征字样的区域图像,也可以是身份证件图像中含有特定字符的区域图像,对此不作具体的限制,为方便理解,本实施例是以真证件图像是身份证件图像中含有防伪特征字样的区域图像为例进行相关说明。
在上述S10b中,可以采用卷积神经网络训练的分类器作为上述字符识别神经网络模型,当然,也可以采用其它类型的神经网络训练的分类器作为上述字符识别神经网络模型,只要能满足使用需求即可,对此不作具体的限制;具体地,当字符识别神经网络模型接收到输入的真证件图像时,字符识别神经网络模型通过对其进行字符检测,可输出对应的字符信息,例如当输出的字符信息中含有(1,0)时,则代表在字符检测的过程中,检测到某一张真证件图像中只含有“H”字符。
在上述S10c中,上述预设精度可根据实际使用需求而定,例如可以是80%、85%、90%等,对此不作具体的限制;举例而言,假设具有5张真证件图像,预设精度为85%,每张真证件图像对应的字符标记信息分别为(1,0)、(1,1)、(0,1)、(1,0)和(0,0),所输出的各张真证件图像对应的字符信息分别为(1,0)、(1,1)、(0,1)、(0,0)和(0,0),那么将各个字符信息分别与对应的字符标记信息一一进行比对,可得到有四个字符信息相匹配的比对结果,进而根据该比对结果可计算出字符识别神经网络模型的检测精度为80%,进而可判断出字符识别神经网络模型的检测精度未达到预设精度。
在上述S10d中,具体地,当字符识别神经网络模型的检测精度未达到预设精度时,可通过损失函数的方式计算输出的字符信息与标准的字符标记信息的预测误差,并采用随机梯度下降法不断将预测误差降低到最小,从而可训练出具有较优网络参数的字符识别神经网络模型。
在本实施例中,通过获取倾斜角度各不相同且携带字符标记信息的多张真证件图像,并将多张真证件图像输入到预设的字符识别神经网络模型中进行字符检测,输出多个字符信息,进而将输出的字符信息和对应的字符标记信息进行一一比对,可验证字符识别神经网络模型的检测精度是否达到预设精度,当字符识别神经网络模型的检测精度未达到预设精度时,反复迭代字符神经网络模型中的参数(如权值等网络参数),直至字符识别神经网络模型的检测精度达到预设精度为止,从而可训练得到具有较优网络参数的字符识别神经网络模型,从而有利于进一步提高证件真伪验证的可靠性。
在一个可选的实施例中,特征检测还包括利用预设的颜色识别神经网络模型对影像信息中的光学变色油墨区域进行颜色检测,特征信息还包括颜色检测结果,上述输出目标证件为真的信息的步骤之前,还包括:
S140A,判断多个颜色检测结果中是否存在符合预设颜色条件的第一颜色检测结果;
若多个字符检测结果中存在符合预设颜色条件的第一颜色检测结果,则执行上述S14,输出目标证件为真的信息。
在本实施例中,为方便说明,以目标证件为香港永久性居民身份证为例进行说明,由于对于真的香港永久性居民身份证,在身份证正面的晶片左侧位置具有一用光学变色油墨印制的三角形图案,随着观察角度的改变,该三角形图案会动态呈现出不同的颜色,如由金色渐变为绿色或者由绿色渐变为金色,因此,在具体实施时,可从不同的拍摄角度对目标证件的正面连续进行拍摄,获得多张连续的对应不同角度的证件图像,然后通过对证件图像进行针对性的裁剪,可从每一张证件图像中裁剪出含有光学变色油墨防伪特征的第一区域图像,进而可通过将裁剪出的第一区域图像输入至预设的颜色识别神经网络模型中进行颜色检测,获得各个第一区域图像对应的颜色检测结果,从而实现对各个拍摄角度下的影像信息的颜色检测,进而再判断多个颜色检测结果中是否存在颜色为黄色的检测结果和颜色为绿色的检测结果;若多个颜色检测结果中不存在颜色为黄色的检测结果或者不存在颜色为绿色的检测结果,则终端设备可据此输出目标证件为假的信息,而若多个颜色检测结果中至少存在一个颜色为黄色的检测结果,同时至少存在一个颜色为绿色的检测结果,则终端设备可据此判定多个颜色检测结果中存在符合预设颜色条件的第一颜色检测结果,进而可输出目标证件为真的信息,即,只有当多个颜色检测结果中至少存在一个颜色为黄色的检测结果和至少存在一个颜色为绿色的检测结果,且多个变色油墨绝对值中存在至少一个大于预设变色油墨绝对值的第一变色油墨绝对值时,终端设备才会输出目标证件为真的信息,这样,可进一步提高证件真伪验证的准确性,使得身份证件的真伪验证可更加可靠。在本实施例中,需要说明的是,上述预设的颜色识别神经网络模型可以是预先训练好的具有颜色识别功能的卷积神经网络模型,也可以是预先训练好的具有颜色识别功能的BP神经网络模型,也可以是其它类型的颜色分类器,只要能满足使用需求即可,对此不作具体的限制,以目标证件为香港永久性居民身份证为例,可基于卷积神经网络事先训练一个可识别金色和绿色的颜色识别神经网络模型(相当于一个可将金色和绿色进行分类的颜色二分类器),其训练过程与上述字符识别神经网络模型的训练过程类似,本领域技术人员可以理解,对此不再赘述。
另外,在其它一些实施例中,还可对各个拍摄角度下的影像信息同时进行变色油墨值检测、字符检测和颜色检测,只有当变色油墨值检测、字符检测和颜色检测均通过时(即,多个变色油墨绝对值中存在至少一个大于预设变色油墨绝对值的第一变色油墨绝对值,且多个字符检测结果中存在符合预设字符条件的第一字符检测结果,且多个颜色检测结果中存在符合预设颜色条件的第一颜色检测结果),终端设备才会输出目标证件为真的信息,这样,可进一步提高证件真伪验证的准确性,使得身份证件的真伪验证可更加可靠。
在一个可选的实施例中,当影像信息为视频流时,获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的影像信息进行特征检测,获得多个连续的特征信息的步骤,包括:
S111,从不同拍摄角度连续对目标证件的正面进行拍摄,获得视频流;
S112,对视频流逐帧或间隔预设帧数进行特征检测,获得多个连续的特征信息。
在本实施例中,终端设备可从不同的拍摄角度对目标证件的正面连续拍摄指定时间(如拍摄2秒、3秒、4秒等),从而可获得具有一定时间长度的视频流,获得视频流后,则可采用逐帧(即一帧一帧地)的方式对视频流进行特征检测(如同时进行变色油墨值检测和字符检测),也可采用间隔预设帧数的方式对视频流进行特征检测,其中,预设帧数可根据实际使用情况而定,如1帧、2帧、3帧等,对此不作具体的限制,满足使用要求即可,优选地,采用间隔预设帧数的方式对视频流进行特征检测,这样既不会影响检测的准确性,又可提高检测的效率;具体地,获得视频流后,通过对视频帧(即视频流中的一帧图像)进行针对性的裁剪,可从每一个视频帧(如第1帧、第3帧、第5帧、第7帧等)中分别裁剪出上述含有光学变色油墨防伪特征的第一区域图像和上述含有防伪特征字样的第二区域图像,其中,对于第一区域图像,可通过opencv等图片处理库将裁剪出的第一区域图像由RGB颜色空间转换为HSV颜色空间,可获得各个第一区域图像对应的HSV值,然后提取HSV值中的H值即为上述的变色油墨值,从而实现对目标证件的变色油墨值检测;而对于第二区域图像,可通过将其输入至上述字符识别神经网络模型中进行字符检测,从而可获得各个第二区域图像对应的字符检测结果,从而实现对目标证件的字符检测,因此,在一些实施例中,通过每间隔一个预设帧数对视频流进行变色油墨值检测和字符检测,可获得对应的一个变色油墨值和字符检测结果,例如,假设预设帧数为3帧,视频流的时间长度和帧数分别为5秒和30帧/秒,则通过采用间隔预设帧数的方式对视频流进行变色油墨值检测和字符检测,理论上可获得50个连续的变色油墨值和50个连续的字符检测结果。在本实施例中,通过采用视频流(即视频流)这种动态的方式来进行身份证的真伪验证,与采用图像信息(证件图像)这种静态的方式来进行身份证的真伪验证的技术手段相比,由于信息获取的连续性和稳定性会更高,因此有利于提高证件真伪验证的可靠性。
在一个可选的实施例中,从不同拍摄角度连续对目标证件的正面进行拍摄,获得视频流的步骤,包括:
S1111,对目标证件进行对焦,并获取对焦后的目标证件的第一形状参数,第一形状参数包括目标证件的两个相对边缘的第一长度参数;
S1112,计算两个第一长度参数之间的偏差值,并判断偏差值是否小于第一预设阈值;
若偏差值小于第一预设阈值,则执行S1113,开始从不同的拍摄角度连续对目标证件的正面进行拍摄,并在拍摄的过程中实时获取目标证件的第二形状参数,第二形状参数包括目标证件的两个相对平行边缘的第二长度参数;
S1114,计算两个第二长度参数之间的比值,并判断比值是否小于第二预设阈值
若比值小于第二预设阈值,则执行S1115,停止对目标证件进行拍摄,获得视频流。
在上述S1111中,具体地,在开始时,利用摄像头对目标证件的正面进行对焦,然后通过边缘检测技术对目标证件的边缘进行检测,可获得分别对应目标证件4条边缘的4个第一长度参数(即4条边缘的长度)。
在上述S1112中,获得对应目标证件4条边的4个第一长度参数后,则进一步计算其中两条对边之间的长度差(即偏差值),并判断该长度差是否小于第一预设阈值,若该长度差小于第一预设阈值,则说明两条对边的长度接近相等,对焦后的目标证件呈现为矩形,摄像头已对准目标证件的正面(此时相当于摄像头正对目标证件的正面)。
在上述S1113中,在拍摄的过程中,所检测到的目标证件的形状会随着拍摄角度的变化而发生变化,具体表现为由矩形变为上边短、下边长的梯形,在拍摄的过程中通过边缘检测技术可实时检测出目标证件呈现为梯形时对应4条边缘的4个第二长度参数
在上述S1114中,获得目标证件呈现为梯形时4条边的4个第二长度参数后,则进一步计算其中两条相对平行边缘之间的长度比(即梯形的上边长与下边长之间的比值),并判断该长度比是否小于第二预设阈值,其中,该第二预设阈值可事先通过实验来获得,例如可以是0.73、0.72、0.71等,只要能满足使用要求即可,对此不作具体的限制;若该长度比小于第二预设阈值,则说明目标证件已呈现为所需的梯形形状,摄像头已采集到足够的用于进行证件真伪验证的“素材”。
在上述S1115中,当检测到两条相对平行边缘之间的长度比小于第二预设阈值时,说明摄像头已采集到足够的用于进行证件真伪验证的“素材”,无需再对目标证件进行拍摄,因此此时可控制摄像头停止对目标证件进行拍摄,获得上述视频流。
在本实施例中,由于对于真的目标证件,随着角度的改变,含有光学变色油墨防伪特征的油墨区域会动态呈现出不同的颜色、含有防伪特征字样的区域会动态呈现字样,因此为了验证目标证件的真伪,需要模拟人的动作从不同的角度对目标证件进行“观察”,其中,拍摄角度的不同不仅会对验证的准确率造成影响,而且起始拍摄角度和终止拍摄角度最终决定了视频流的长度,从而最终还会影响到验证的效率,因此有必要对拍摄的起始角度和终止角度进行确定,以同时保证验证的准确率和效率,而在本实例中,通过选取正对目标证件的角度作为拍摄的起始角度,可简化操作,而且,通过边缘检测技术对目标证件进行边缘检测,不仅实现了摄像头拍摄角度的自动化控制,而无需人为操作来改变摄像头的拍摄角度,而且最终可获得一个较为合适的终止角度,从而可保证验证的准确率和效率。
在一个可选的实施例中,判断多个变色油墨绝对值中是否存在大于预设变色油墨绝对值的第一变色油墨绝对值的步骤,包括:
S131,从多个变色油墨绝对值中挑选出数值最大的变色油墨绝对值;
S132,判断数值最大的变色油墨绝对值是否大于预设变色油墨绝对值;
若数值最大的变色油墨绝对值大于预设变色油墨绝对值,则执行S133,判定多个变色油墨绝对值中存在大于预设变色油墨绝对值的第一变色油墨绝对值。
在本实施例中,由于多个变色油墨绝对值中只要存在有一个大于预设变色油墨绝对值的变色油墨绝对值,即可据此确定目标证件为真,因此只需从多个变色油墨绝对值中挑选出数值最大的变色油墨绝对值,进而通过判断该数值最大的变色油墨绝对值是否大于预设变色油墨绝对值,即可确定目标证件是否为真,而无需将逐一将多个变色油墨值与预设变色油墨绝对值进行大小的比较,从而有利于缩短运算的过程,提高验证的效率。
参照图2,本申请实施例还提出一种证件真伪验证装置,可应用于具有摄像功能的终端设备上,该证件真伪验证装置包括:
特征检测模块11,用于获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的影像信息进行特征检测,获得多个连续的特征信息,其中,特征检测包括对影像信息中的光学变色油墨区域进行变色油墨值检测,特征信息包括变色油墨值;
计算模块12,用于计算两两相邻的变色油墨值之间的差值并取绝对值,获得多个变色油墨绝对值;
第一判断模块13,用于判断多个变色油墨绝对值中是否存在大于预设变色油墨绝对值的第一变色油墨绝对值;
输出模块14,用于当多个变色油墨绝对值中存在大于预设变色油墨绝对值的第一变色油墨绝对值时,输出目标证件为真的信息。
在一个可选的实施例中,上述证件真伪验证装置,还包括:
接收模块,用于接收用户输入的选择指令,并根据选择指令,确定目标证件的证件类型;
第一确定模块,用于根据证件类型,从预设的证件类型-变色油墨绝对值对应关系中,确定出与证件类型相对应的预设变色油墨绝对值。
在一个可选的实施例中,特征检测还包括利用预设的字符识别神经网络模型进行字符检测,特征信息还包括字符检测结果,上述证件真伪验证装置还包括:
第二确定模块,用于根据多个字符检测结果,确定目标证件的证件类型;
第三确定模块,用于根据证件类型,从预设的证件类型-变色油墨绝对值对应关系中,确定出与证件类型相对应的预设变色油墨绝对值。
在一个可选的实施例中,特征检测还包括利用预设的字符识别神经网络模型对影像信息中的光学字符区域进行字符检测,上述证件真伪验证装置还包括:
第二判断模块,用于判断多个字符检测结果中是否存在符合预设字符条件的第一字符检测结果。
上述输出模块14,还用于当多个字符检测结果中存在符合预设字符条件的第一字符检测结果时,输出目标证件为真的信息。
在一个可选的实施例中,特征检测还包括利用预设的颜色识别神经网络模型对影像信息中的光学变色油墨区域进行颜色检测,特征信息还包括颜色检测结果,上述证件真伪验证装置还包括:
第三判断模块,用于判断多个颜色检测结果中是否存在符合预设颜色条件的第一颜色检测结果。
上述输出模块14,还用于当多个字符检测结果中存在符合预设颜色条件的第一颜色检测结果时,输出目标证件为真的信息。
在一个可选的实施例中,上述证件真伪验证装置,还包括:
获取模块,获取倾斜角度各不相同且携带字符标记信息的多张真证件图像;
字符检测模块,将多张真证件图像输入到字符识别神经网络模型中进行字符检测,输出多个字符信息;
比对模块,用于将各个字符信息分别与对应的字符标记信息一一进行比对,以验证字符识别神经网络模型的检测精度是否达到预设精度;
迭代模块,用于当字符识别神经网络模型的检测精度未达到预设精度时,反复迭代字符识别神经网络模型中的参数,直至字符识别神经网络模型的检测精度达到预设精度为止。
在一个可选的实施例中,当影像信息为视频流时,上述特征检测模块11,包括:
拍摄单元,用于从不同拍摄角度连续对目标证件的正面进行拍摄,获得视频流;
特征检测单元,用于对视频流逐帧或间隔预设帧数进行特征检测,获得多个连续的特征信息;
在一个可选的实施例中,上述拍摄单元,包括:
对焦子单元,用于对目标证件进行对焦,并获取对焦后的目标证件的第一形状参数,第一形状参数包括目标证件的两个相对边缘的第一长度参数;
第一计算子单元,用于计算两个第一长度参数之间的偏差值,并判断偏差值是否小于第一预设阈值;
拍摄子单元,用于当偏差值小于第一预设阈值时,开始从不同的拍摄角度连续对目标证件的正面进行拍摄,并在拍摄的过程中实时获取目标证件的第二形状参数,第二形状参数包括目标证件的两个相对平行边缘的第二长度参数;
第二计算子单元,用于计算两个第二长度参数之间的比值,并判断比值是否小于第二预设阈值;
停止子单元,用于当比值小于第二预设阈值时,停止对目标证件进行拍摄,获得视频流。
在一个可选的实施例中,上述第一判断模块13,包括:
挑选单元,用于从多个变色油墨绝对值中挑选出数值最大的变色油墨绝对值;
判断单元,用于判断数值最大的变色油墨绝对值是否大于预设变色油墨绝对值;
判定单元,用于当数值最大的变色油墨绝对值大于预设变色油墨绝对值时,判定多个变色油墨绝对值中存在大于预设变色油墨绝对值的第一变色油墨绝对值。
关于上述实施例中证件真伪验证装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处不再赘述。
参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过***总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作***、计算机程序和数据库。该内存器为非易失性存储介质中的操作***和计算机程序的运行提供环境。该计算机设备的数据库用于存储证件真伪验证方法程序等。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时实现上述任一实施例中的证件真伪验证方法。
本申请实施例还提出一种计算机可读存储介质,计算机可读存储介质可以是非易失性,也可以是易失性,其上存储有计算机程序,计算机程序被处理器执行时实现上述任一实施例中的证件真伪验证方法。
Claims (20)
- 一种证件真伪验证方法,其中,包括:获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的所述影像信息进行特征检测,获得多个连续的特征信息,其中,所述特征检测包括对所述影像信息中的光学变色油墨区域进行变色油墨值检测,所述特征信息包括变色油墨值;计算两两相邻的所述变色油墨值之间的差值并取绝对值,获得多个变色油墨绝对值;判断多个所述变色油墨绝对值中是否存在大于预设变色油墨绝对值的第一变色油墨绝对值;若多个所述变色油墨绝对值中存在大于预设变色油墨绝对值的第一变色油墨绝对值,则输出所述目标证件为真的信息。
- 根据权利要求1所述的证件真伪验证方法,其中,所述特征检测还包括利用预设的字符识别神经网络模型进行字符检测,所述特征信息还包括字符检测结果,所述获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的所述影像信息进行特征检测,获得多个连续的特征信息的步骤之后,还包括:根据多个所述字符检测结果,确定所述目标证件的证件类型;根据所述证件类型,从预设的证件类型-变色油墨绝对值对应关系中,确定出与所述证件类型相对应的所述预设变色油墨绝对值。
- 根据权利要求1所述的证件真伪验证方法,其中,所述特征检测还包括利用预设的字符识别神经网络模型对所述影像信息中的光学字符区域进行字符检测,所述特征信息还包括字符检测结果,所述输出所述目标证件为真的信息的步骤之前,还包括:判断多个所述字符检测结果中是否存在符合预设字符条件的第一字符检测结果;若多个所述字符检测结果中存在符合预设字符条件的第一字符检测结果,则执行所述输出所述目标证件为真的信息的步骤。
- 根据权利要求1所述的证件真伪验证方法,其中,所述特征检测还包括利用预设的颜色识别神经网络模型对所述影像信息中的光学变色油墨区域进行颜色检测,所述特征信息还包括颜色检测结果,所述输出所述目标证件为真的信息的步骤之前,还包括:判断多个所述颜色检测结果中是否存在符合预设颜色条件的第一颜色检测结果;若多个所述字符检测结果中存在符合预设颜色条件的第一颜色检测结果,则执行所述输出所述目标证件为真的信息的步骤。
- 根据权利要求3所述的证件真伪验证方法,其中,所述获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的所述影像信息进行特征检测,获得多个连续的特征信息的步骤之前,还包括:获取倾斜角度各不相同且携带字符标记信息的多张真证件图像;将多张所述真证件图像输入到所述字符识别神经网络模型中进行所述字符检测,输出多个字符信息;将各个所述字符信息分别与对应的所述字符标记信息一一进行比对,以验证所述字符识别神经网络模型的检测精度是否达到预设精度;若所述字符识别神经网络模型的检测精度未达到预设精度,则反复迭代所述字符识别神经网络模型中的参数,直至所述字符识别神经网络模型的检测精度达到预设精度为止。
- 根据权利要求1所述的证件真伪验证方法,其中,当所述影像信息为视频流时,所述获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的所述影像信息进行特征检测,获得多个连续的特征信息的步骤,包括:从不同拍摄角度连续对所述目标证件的正面进行拍摄,获得所述视频流;对所述视频流逐帧或间隔预设帧数进行所述特征检测,获得多个连续的所述特征信息。
- 根据权利要求6所述的证件真伪验证方法,其中,所述从不同拍摄角度连续对所述目标证件的正面进行拍摄,获得所述视频流的步骤,包括:对所述目标证件进行对焦,并获取对焦后的所述目标证件的第一形状参数,所述第一形状参数包括所述目标证件的两个相对边缘的第一长度参数;计算两个所述第一长度参数之间的偏差值,并判断所述偏差值是否小于第一预设阈值;若所述偏差值小于第一预设阈值,则开始从不同的拍摄角度连续对所述目标证件的正面进行拍摄,并在拍摄的过程中实时获取所述目标证件的第二形状参数,所述第二形状参数包括所述目标证件的两个相对平行边缘的第二长度参数;计算两个所述第二长度参数之间的比值,并判断所述比值是否小于第二预设阈值;若所述比值小于第二预设阈值,则停止对所述目标证件进行拍摄,获得所述视频流。
- 一种证件真伪验证装置,其中,包括:特征检测模块,用于获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的所述影像信息进行特征检测,获得多个连续的特征信息,其中,所述特征检测包括对所述影像信息中的光学变色油墨区域进行变色油墨值检测,所述特征信息包括变色油墨值;计算模块,用于计算两两相邻的所述变色油墨值之间的差值并取绝对值,获得多个变色油墨绝对值;第一判断模块,用于判断多个所述变色油墨绝对值中是否存在大于预设变色油墨绝对值的第一变色油墨绝对值;输出模块,用于当多个所述变色油墨绝对值中存在大于预设变色油墨绝对值的第一变色油墨绝对值时,输出所述目标证件为真的信息。
- 根据权利要求8所述的证件真伪验证装置,其中,特征检测还包括利用预设的字符识别神经网络模型进行字符检测,特征信息还包括字符检测结果,所述证件真伪验证装置还包括:第二确定模块,用于根据多个字符检测结果,确定目标证件的证件类型;第三确定模块,用于根据证件类型,从预设的证件类型-变色油墨绝对值对应关系中,确定出与证件类型相对应的预设变色油墨绝对值。
- 根据权利要求9所述的证件真伪验证装置,其中,还包括:获取模块,获取倾斜角度各不相同且携带字符标记信息的多张真证件图像;字符检测模块,将多张真证件图像输入到字符识别神经网络模型中进行字符检测,输出多个字符信息;比对模块,用于将各个字符信息分别与对应的字符标记信息一一进行比对,以验证字符识别神经网络模型的检测精度是否达到预设精度;迭代模块,用于当字符识别神经网络模型的检测精度未达到预设精度时,反复迭代字符识别神经网络模型中的参数,直至字符识别神经网络模型的检测精度达到预设精度为止。
- 一种计算机设备,包括存储器和处理器,其中,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现一种证件真伪验证方法;其中,所述证件真伪验证方法包括如下步骤:获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的所述影像信息进行特征检测,获得多个连续的特征信息,其中,所述特征检测包括对所述影像信息中的光学变色油墨区域进行变色油墨值检测,所述特征信息包括变色油墨值;计算两两相邻的所述变色油墨值之间的差值并取绝对值,获得多个变色油墨绝对值;判断多个所述变色油墨绝对值中是否存在大于预设变色油墨绝对值的第一变色油墨绝对值;若多个所述变色油墨绝对值中存在大于预设变色油墨绝对值的第一变色油墨绝对值,则输出所述目标证件为真的信息。
- 根据权利要求11所述的计算机设备,其中,所述特征检测还包括利用预设的字符识别神经网络模型进行字符检测,所述特征信息还包括字符检测结果,所述获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的所述影像信息进行特征检测,获得多个连续的特征信息的步骤之后,还包括:根据多个所述字符检测结果,确定所述目标证件的证件类型;根据所述证件类型,从预设的证件类型-变色油墨绝对值对应关系中,确定出与所述证件类型相对应的所述预设变色油墨绝对值。
- 根据权利要求11所述的计算机设备,其中,所述特征检测还包括利用预设的字符识别神经网络模型对所述影像信息中的光学字符区域进行字符检测,所述特征信息还包括字符检测结果,所述输出所述目标证件为真的信息的步骤之前,还包括:判断多个所述字符检测结果中是否存在符合预设字符条件的第一字符检测结果;若多个所述字符检测结果中存在符合预设字符条件的第一字符检测结果,则执行所述输出所述目标证件为真的信息的步骤。
- 根据权利要求11所述的计算机设备,其中,所述特征检测还包括利用预设的颜色识别神经网络模型对所述影像信息中的光学变色油墨区域进行颜色检测,所述特征信息还包括颜色检测结果,所述输出所述目标证件为真的信息的步骤之前,还包括:判断多个所述颜色检测结果中是否存在符合预设颜色条件的第一颜色检测结果;若多个所述字符检测结果中存在符合预设颜色条件的第一颜色检测结果,则执行所述输出所述目标证件为真的信息的步骤。
- 根据权利要求13所述的计算机设备,其中,所述获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的所述影像信息进行特征检测,获得多个连续的特征信息的步骤之前,还包括:获取倾斜角度各不相同且携带字符标记信息的多张真证件图像;将多张所述真证件图像输入到所述字符识别神经网络模型中进行所述字符检测,输出多个字符信息;将各个所述字符信息分别与对应的所述字符标记信息一一进行比对,以验证所述字符识别神经网络模型的检测精度是否达到预设精度;若所述字符识别神经网络模型的检测精度未达到预设精度,则反复迭代所述字符识别神经网络模型中的参数,直至所述字符识别神经网络模型的检测精度达到预设精度为止。
- 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现一种证件真伪验证方法;其中,所述证件真伪验证方法包括如下步骤:获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的所述影像信息进行特征检测,获得多个连续的特征信息,其中,所述特征检测包括对所述影像信息中的光学变色油墨区域进行变色油墨值检测,所述特征信息包括变色油墨值;计算两两相邻的所述变色油墨值之间的差值并取绝对值,获得多个变色油墨绝对值;判断多个所述变色油墨绝对值中是否存在大于预设变色油墨绝对值的第一变色油墨绝对值;若多个所述变色油墨绝对值中存在大于预设变色油墨绝对值的第一变色油墨绝对值,则输出所述目标证件为真的信息。
- 根据权利要求16所述的计算机可读存储介质,其中,所述特征检测还包括利用预设的字符识别神经网络模型进行字符检测,所述特征信息还包括字符检测结果,所述获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的所述影像信息进行特征检测,获得多个连续的特征信息的步骤之后,还包括:根据多个所述字符检测结果,确定所述目标证件的证件类型;根据所述证件类型,从预设的证件类型-变色油墨绝对值对应关系中,确定出与所述证件类型相对应的所述预设变色油墨绝对值。
- 根据权利要求16所述的计算机可读存储介质,其中,所述特征检测还包括利用预设的字符识别神经网络模型对所述影像信息中的光学字符区域进行字符检测,所述特征信息还包括字符检测结果,所述输出所述目标证件为真的信息的步骤之前,还包括:判断多个所述字符检测结果中是否存在符合预设字符条件的第一字符检测结果;若多个所述字符检测结果中存在符合预设字符条件的第一字符检测结果,则执行所述输出所述目标证件为真的信息的步骤。
- 根据权利要求16所述的计算机可读存储介质,其中,所述特征检测还包括利用预设的颜色识别神经网络模型对所述影像信息中的光学变色油墨区域进行颜色检测,所述特征信息还包括颜色检测结果,所述输出所述目标证件为真的信息的步骤之前,还包括:判断多个所述颜色检测结果中是否存在符合预设颜色条件的第一颜色检测结果;若多个所述字符检测结果中存在符合预设颜色条件的第一颜色检测结果,则执行所述输出所述目标证件为真的信息的步骤。
- 根据权利要求16所述的计算机可读存储介质,其中,所述获取目标证件在不同连续拍摄角度下的影像信息,并对各个拍摄角度下的所述影像信息进行特征检测,获得多个连续的特征信息的步骤之前,还包括:获取倾斜角度各不相同且携带字符标记信息的多张真证件图像;将多张所述真证件图像输入到所述字符识别神经网络模型中进行所述字符检测,输出多个字符信息;将各个所述字符信息分别与对应的所述字符标记信息一一进行比对,以验证所述字符识别神经网络模型的检测精度是否达到预设精度;若所述字符识别神经网络模型的检测精度未达到预设精度,则反复迭代所述字符识别神经网络模型中的参数,直至所述字符识别神经网络模型的检测精度达到预设精度为止。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910696321.2A CN110570209A (zh) | 2019-07-30 | 2019-07-30 | 证件真伪验证方法、装置、计算机设备及存储介质 |
CN201910696321.2 | 2019-07-30 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021017610A1 true WO2021017610A1 (zh) | 2021-02-04 |
Family
ID=68773694
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/093413 WO2021017610A1 (zh) | 2019-07-30 | 2020-05-29 | 证件真伪验证方法、装置、计算机设备及存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110570209A (zh) |
WO (1) | WO2021017610A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113240043A (zh) * | 2021-06-01 | 2021-08-10 | 平安科技(深圳)有限公司 | 基于多图片差异性的鉴伪方法、装置、设备及存储介质 |
CN113516486A (zh) * | 2021-04-07 | 2021-10-19 | 阿里巴巴新加坡控股有限公司 | 图像识别方法、装置、设备和存储介质 |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110570209A (zh) * | 2019-07-30 | 2019-12-13 | 平安科技(深圳)有限公司 | 证件真伪验证方法、装置、计算机设备及存储介质 |
CN111046842B (zh) * | 2019-12-27 | 2022-02-15 | 京东科技控股股份有限公司 | 用于更改信息的方法和装置 |
CN111259894B (zh) * | 2020-01-20 | 2023-07-07 | 普信恒业科技发展(北京)有限公司 | 一种证件信息鉴别方法、装置及计算机设备 |
CN111291761B (zh) * | 2020-02-17 | 2023-08-04 | 北京百度网讯科技有限公司 | 用于识别文字的方法和装置 |
CN112037415A (zh) * | 2020-03-18 | 2020-12-04 | 秦佑胜 | 应用区块链的成像特征分析*** |
CN111860486B (zh) * | 2020-07-27 | 2023-10-31 | 平安科技(深圳)有限公司 | 卡片识别方法、装置及设备 |
CN112104652B (zh) * | 2020-09-15 | 2023-04-07 | 北京百度网讯科技有限公司 | 身份验证方法、装置、设备和介质 |
CN112163575B (zh) * | 2020-09-23 | 2023-11-03 | 平安科技(深圳)有限公司 | 证件录入检测方法、装置、设备及存储介质 |
CN112132812B (zh) * | 2020-09-24 | 2023-06-30 | 平安科技(深圳)有限公司 | 证件校验方法、装置、电子设备及介质 |
CN112215232B (zh) * | 2020-10-10 | 2023-10-24 | 平安科技(深圳)有限公司 | 证件验证方法、装置、设备及存储介质 |
CN113239339A (zh) * | 2021-02-26 | 2021-08-10 | 平安普惠企业管理有限公司 | 证件拍摄方法、装置、计算机设备及存储介质 |
CN114638826B (zh) * | 2022-05-13 | 2022-10-28 | 河南银金达新材料股份有限公司 | 一种光致变色阻隔膜的光学疲劳度检测方法 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102890840A (zh) * | 2012-08-22 | 2013-01-23 | 山东新北洋信息技术股份有限公司 | 纸币鉴别方法和装置 |
US20150022832A1 (en) * | 2013-07-18 | 2015-01-22 | Electronics Imaging, Inc. | Method and apparatus for effecting color separation, color variation, color characterization, and gamut mapping in color printing |
CN104574642A (zh) * | 2015-01-30 | 2015-04-29 | 广州广电运通金融电子股份有限公司 | 一种基于Lab色彩空间的人民币变色油墨检测方法和装置 |
CN109543551A (zh) * | 2018-10-26 | 2019-03-29 | 平安科技(深圳)有限公司 | 身份证鉴别处理方法、装置、计算机设备及存储介质 |
CN110570209A (zh) * | 2019-07-30 | 2019-12-13 | 平安科技(深圳)有限公司 | 证件真伪验证方法、装置、计算机设备及存储介质 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104573616A (zh) * | 2013-10-29 | 2015-04-29 | 腾讯科技(深圳)有限公司 | 一种信息识别方法、相关装置及*** |
CN109446900A (zh) * | 2018-09-21 | 2019-03-08 | 平安科技(深圳)有限公司 | 证件真伪验证方法、装置、计算机设备及存储介质 |
-
2019
- 2019-07-30 CN CN201910696321.2A patent/CN110570209A/zh active Pending
-
2020
- 2020-05-29 WO PCT/CN2020/093413 patent/WO2021017610A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102890840A (zh) * | 2012-08-22 | 2013-01-23 | 山东新北洋信息技术股份有限公司 | 纸币鉴别方法和装置 |
US20150022832A1 (en) * | 2013-07-18 | 2015-01-22 | Electronics Imaging, Inc. | Method and apparatus for effecting color separation, color variation, color characterization, and gamut mapping in color printing |
CN104574642A (zh) * | 2015-01-30 | 2015-04-29 | 广州广电运通金融电子股份有限公司 | 一种基于Lab色彩空间的人民币变色油墨检测方法和装置 |
CN109543551A (zh) * | 2018-10-26 | 2019-03-29 | 平安科技(深圳)有限公司 | 身份证鉴别处理方法、装置、计算机设备及存储介质 |
CN110570209A (zh) * | 2019-07-30 | 2019-12-13 | 平安科技(深圳)有限公司 | 证件真伪验证方法、装置、计算机设备及存储介质 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113516486A (zh) * | 2021-04-07 | 2021-10-19 | 阿里巴巴新加坡控股有限公司 | 图像识别方法、装置、设备和存储介质 |
CN113240043A (zh) * | 2021-06-01 | 2021-08-10 | 平安科技(深圳)有限公司 | 基于多图片差异性的鉴伪方法、装置、设备及存储介质 |
CN113240043B (zh) * | 2021-06-01 | 2024-04-09 | 平安科技(深圳)有限公司 | 基于多图片差异性的鉴伪方法、装置、设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN110570209A (zh) | 2019-12-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021017610A1 (zh) | 证件真伪验证方法、装置、计算机设备及存储介质 | |
US10762334B2 (en) | System and method for entity recognition | |
US10650261B2 (en) | System and method for identifying re-photographed images | |
US10108860B2 (en) | Systems and methods for generating composite images of long documents using mobile video data | |
US8254691B2 (en) | Facial expression recognition apparatus and method, and image capturing apparatus | |
Ferrara et al. | On the effects of image alterations on face recognition accuracy | |
JP4908505B2 (ja) | 撮影者を利用した画像の分類 | |
CN112651348B (zh) | 身份认证方法和装置及存储介质 | |
KR200483242Y1 (ko) | 모바일 디바이스를 이용한 신분증 인식 장치 | |
CN106529414A (zh) | 一种通过图像比对实现结果认证的方法 | |
JP2014524085A (ja) | オブジェクトにおけるテキスト情報を認識するための方法およびシステム | |
CN107766811A (zh) | 一种基于复杂流型结构的人脸识别方法及*** | |
WO2019017080A1 (ja) | 照合装置及び照合方法 | |
US11315360B2 (en) | Live facial recognition system and method | |
US20230041573A1 (en) | Image processing method and apparatus, computer device and storage medium | |
EP3069298A1 (en) | Systems and methods for generating composite images of long documents using mobile video data | |
CN110490200A (zh) | 一种证件扫描方法、装置及设备 | |
WO2021166289A1 (ja) | データ登録装置、生体認証装置、および記録媒体 | |
Di Martino et al. | Liveness detection using implicit 3D features | |
WO2022222957A1 (zh) | 一种目标识别的方法和*** | |
KR20210024877A (ko) | 라이브니스 판단 방법 및 장치 | |
KR20080101388A (ko) | 엔엠씨티 기반의 얼굴 검출 방법 | |
Karthik et al. | Image quality assessment based outlier detection for face anti-spoofing | |
CN111767845B (zh) | 证件识别方法及装置 | |
JP2013029996A (ja) | 画像処理装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20847800 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20847800 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20847800 Country of ref document: EP Kind code of ref document: A1 |