Certificate identification and forgery processing method, device and equipment, storage medium and program product
By extracting the target authentication region from the boundary of the face image region in the document image, and combining the trained model with occlusion detection, the problem of low accuracy in traditional authentication is solved, achieving higher authentication accuracy and recognition efficiency.
Patent Information
- Application Number
- CN202211181770.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2042-09-27
AI Technical Summary
Traditional document authentication methods are unable to effectively distinguish between genuine and counterfeit documents, resulting in low accuracy, especially in cases of document forgery where it is difficult to accurately determine the consistency between the document and the facial image.
By extracting the target authentication region from the boundary of the face image region in the document image, the trained authentication model is used to process the document for authentication. Gradient regions are removed and the remaining regions are merged to construct negative and positive sample sets. The initial recognition model is then trained, and occlusion detection is performed to determine the authentication conditions.
It improves the accuracy of document authentication, reduces the deviation of document authentication results, increases the accuracy of counterfeit identification, and reduces the misidentification of counterfeit documents.
Smart Images

Figure CN117011516B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to a certificate identification and verification processing method and device, computer equipment, a storage medium and a program product. BACKGROUND
[0002] With the development of artificial intelligence technology, the use of image recognition, voice recognition and other technologies in different scenarios for identity verification, data verification and other processing to protect information security has gradually been promoted. For example, in the identity verification scenario, it is necessary to identify the authenticity of the data associated with the object's identity, including verifying the authenticity of the object's certificate itself, and verifying whether the current object's face image is consistent with the face image on the certificate.
[0003] Traditional identification and verification methods usually collect image data of the certificate, obtain identification and verification features contained in the image data, such as face images, certificate numbers, and identification and verification regions, and identify the certificate features to verify the authenticity of the certificate itself and determine whether it is a real certificate. While verifying the authenticity of the certificate itself, the real face image of the object currently performing identity recognition is also collected and compared with the face image contained in the certificate to determine whether they are consistent.
[0004] However, due to the existence of certificate forgery, the forged certificate and the real certificate have the same feature performance, including face images, certificate numbers, and identification and verification regions, which can all be forged and cannot be distinguished from the real one. Further, when identifying and verifying the authenticity based on the current identification and verification features and comparing the face images, the identification result of the certificate deviates due to the forged certificate, resulting in low identification accuracy. SUMMARY
[0005] Therefore, it is necessary to provide a certificate identification and verification processing method, device, computer equipment, computer readable storage medium and computer program product that can reduce the deviation of the certificate identification result and improve the identification accuracy.
[0006] In a first aspect, the present application provides a certificate identification and verification processing method. The method comprises:
[0007] obtaining a certificate image to be identified;
[0008] extracting a region image containing the region boundary of the face image region from the certificate image to be identified according to a preset target identification and verification position, to obtain a target identification and verification region to be identified; the preset target identification and verification position is located at the region boundary of the face image region in the certificate image to be identified;
[0009] If the target forgery identification area meets the forgery identification condition, a forgery identification result is obtained by performing forgery identification processing on the target forgery identification area.
[0010] In one of the embodiments, the forgery identification result is obtained by performing forgery identification processing on the target forgery identification area, including: performing forgery identification processing on the target forgery identification area based on the trained forgery identification model to obtain the forgery identification result.
[0011] The method further includes:
[0012] The first forgery identification area of the standard certificate image and the second forgery identification area of the non-standard certificate image are collected; the first forgery identification area includes a gradual change area, and the second forgery identification area does not include a gradual change area.
[0013] The third forgery identification area in which the gradual change area is removed is obtained by performing gradual change area removal processing and remaining area merging processing based on the first forgery identification area.
[0014] The positive sample set is obtained based on the first forgery identification area, and the negative sample set is obtained based on the second forgery identification area and the third forgery identification area.
[0015] The initial identification model is trained based on the positive sample set and the negative sample set to obtain the trained forgery identification model.
[0016] In one of the embodiments, the third forgery identification area in which the gradual change area is removed is obtained by performing gradual change area removal processing and remaining area merging processing based on the first forgery identification area, including:
[0017] The first forgery identification area is expanded based on a preset expansion ratio to obtain an expanded first forgery identification area.
[0018] Edge gradual change feature recognition is performed on the expanded first forgery identification area to identify the edge gradual change feature in the expanded first forgery identification area.
[0019] The gradual change area composed of the edge gradual change feature is removed from the expanded first forgery identification area, and the remaining area after the removal of the gradual change area is merged to obtain the third forgery identification area in which the gradual change area is removed.
[0020] In one of the embodiments, after the target forgery identification area carrying the target forgery point is obtained, the method further includes:
[0021] Obtaining a shielding detection identification result by performing shielding detection based on the target forgery identification area; and determining whether the target forgery identification area meets the forgery identification condition according to the shielding detection identification result.
[0022] In one of the embodiments, the determining whether the target forgery identification area meets the forgery identification condition according to the occlusion detection identification result comprises:
[0023] If it is determined according to the occlusion detection identification result that the target forgery identification area has an occlusion area, an area of the occlusion area is obtained.
[0024] If the area of the occlusion area is less than a preset area threshold, an unoccluded area in the target forgery identification area is extracted.
[0025] The unoccluded area is subjected to mirror flipping processing to obtain an unoccluded target forgery identification area, and it is determined that the target forgery identification area meets the forgery identification condition.
[0026] In one of the embodiments, the method further comprises:
[0027] If it is determined according to the occlusion detection identification result that the target forgery identification area has no occlusion area, it is determined that the target forgery identification area meets the forgery identification condition.
[0028] Or if the area of the occlusion area is greater than the preset area threshold, it is determined that the target forgery identification area does not meet the forgery identification condition; a recollection processing instruction for the to-be-identified certificate image is triggered; the recollection processing instruction is used to instruct to recollect the to-be-identified certificate image.
[0029] In one of the embodiments, the obtaining of the to-be-identified certificate image comprises:
[0030] Obtaining a to-be-identified multimedia data frame sequence.
[0031] Using a trained frame extraction model to perform frame extraction processing on the to-be-identified multimedia data frame sequence to obtain a to-be-identified certificate image that meets a forgery image screening condition.
[0032] In a second aspect, the application further provides a certificate forgery identification processing device. The device comprises:
[0033] A to-be-identified certificate image acquisition module is configured to acquire a to-be-identified certificate image.
[0034] A target forgery identification area obtaining module is configured to extract a region image containing a region boundary of a face image region from the to-be-identified certificate image according to a preset target forgery identification position to obtain a target forgery identification area to be identified; and the preset target forgery identification position is located at the region boundary of the face image region in the to-be-identified certificate image.
[0035] A forgery identification result generation module is configured to perform certificate forgery identification processing based on the target forgery identification area if the target forgery identification area meets a forgery identification condition to obtain a forgery identification result.
[0036] In a third aspect, the present application provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0037] obtaining a to-be-authenticated certificate image;
[0038] extracting a region image containing the region boundary of the face image region from the to-be-authenticated certificate image according to a preset target anti-counterfeiting position, to obtain a target anti-counterfeiting region to be authenticated; the preset target anti-counterfeiting position is located at the region boundary of the face image region in the to-be-authenticated certificate image;
[0039] if the target anti-counterfeiting region meets an anti-counterfeiting identification condition, performing certificate anti-counterfeiting processing based on the target anti-counterfeiting region to obtain an anti-counterfeiting identification result.
[0040] In a fourth aspect, the present application provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0041] obtaining a to-be-authenticated certificate image;
[0042] extracting a region image containing the region boundary of the face image region from the to-be-authenticated certificate image according to a preset target anti-counterfeiting position, to obtain a target anti-counterfeiting region to be authenticated; the preset target anti-counterfeiting position is located at the region boundary of the face image region in the to-be-authenticated certificate image;
[0043] if the target anti-counterfeiting region meets an anti-counterfeiting identification condition, performing certificate anti-counterfeiting processing based on the target anti-counterfeiting region to obtain an anti-counterfeiting identification result.
[0044] In a fifth aspect, the present application provides a computer program product. The computer program product comprises a computer program, and the computer program is executed by a processor to implement the following steps:
[0045] obtaining a to-be-authenticated certificate image;
[0046] extracting a region image containing the region boundary of the face image region from the to-be-authenticated certificate image according to a preset target anti-counterfeiting position, to obtain a target anti-counterfeiting region to be authenticated; the preset target anti-counterfeiting position is located at the region boundary of the face image region in the to-be-authenticated certificate image;
[0047] if the target anti-counterfeiting region meets an anti-counterfeiting identification condition, performing certificate anti-counterfeiting processing based on the target anti-counterfeiting region to obtain an anti-counterfeiting identification result.
[0048] In the aforementioned document authentication methods, devices, computer equipment, storage media, and program products, an image of the document to be authenticated is acquired, and a region image containing the boundary of a face image region is extracted from the document image according to a preset target authentication location to obtain the target authentication region. Since the preset target authentication location is located at the boundary of the face image region in the document image, when the authentication region is extracted using the preset target authentication location, an authentication region different from known authentication features such as traditional face images and document numbers can be extracted. Specifically, the target authentication region containing the boundary of the face image region in the document image is extracted. Therefore, when the target authentication region meets the authentication criteria, document authentication bias can be reduced and the accuracy of the obtained authentication results can be improved during document authentication processing based on the target authentication region. Attached Figure Description
[0049] Figure 1 This is a diagram illustrating the application environment of a document authentication method in one embodiment.
[0050] Figure 2 This is a flowchart illustrating a document authentication method in one embodiment;
[0051] Figure 3 This is a schematic diagram of the document authentication point area comparison in one embodiment;
[0052] Figure 4 This is a schematic diagram of the training process of a counterfeit detection model in one embodiment;
[0053] Figure 5 This is a schematic diagram of obtaining the third anti-counterfeiting region after removing the gradient region in one embodiment;
[0054] Figure 6 This is a flowchart illustrating the document authentication process in another embodiment;
[0055] Figure 7 This is a flowchart illustrating the document authentication process in another embodiment;
[0056] Figure 8 This is a structural block diagram of a document authentication processing device in one embodiment;
[0057] Figure 9 This is a structural block diagram of the document authentication processing device in another embodiment;
[0058] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0059] In order to make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not used to limit the present application.
[0060] The certificate identification method provided by the embodiments of the present application relates to artificial intelligence technology, wherein the artificial intelligence (AI) is to use a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence, that is, artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machine has the functions of perception, reasoning and decision making. As a comprehensive discipline, artificial intelligence technology involves a wide range of fields, including both hardware and software technologies, wherein the artificial intelligence basic technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. The artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.
[0061] Among them, the computer vision technology (Computer Vision, CV) is a science that studies how to make machines "see", and further, it refers to using cameras and computers to replace human eyes to identify, detect and measure targets, and further do image processing, so that the computer processing becomes more suitable for human eye observation or image transmission to instrument detection. As a scientific discipline, computer vision researches related theories and technologies, and tries to establish an artificial intelligence system that can obtain information from images or multidimensional data. The computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, etc. It also includes common face recognition, fingerprint recognition and other biometric identification technologies.
[0062] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithmic complexity theory, etc. It is a specialized study of how computers simulate or implement human learning behavior to acquire new knowledge or skills, reorganize existing knowledge structure, and continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental approach to making computers intelligent. Its applications are widespread in various fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and inductive learning, etc.
[0063] With the research and progress of artificial intelligence technology, artificial intelligence technology is researched and applied in many fields, such as common smart home, smart wearable device, virtual assistant, smart speaker, smart marketing, unmanned vehicle, autonomous driving, unmanned aerial vehicle, robot, intelligent medical treatment, intelligent customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0064] The certificate authentication processing method provided by the embodiments of the present application is related to computer vision technology, machine learning technology and other technologies in the field of artificial intelligence technology, and can be applied to the application environment as shown in Figure 1 The terminal 102 communicates with the server 104 through the network. The data storage system can store the data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, an aircraft, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0065] Further, the terminal 102 and the server 104 can be used alone to perform the certificate identification method provided in the embodiments of the present application, and the terminal 102 and the server 104 can also be used cooperatively to perform the certificate identification method provided in the embodiments of the present application. For example, taking the terminal 102 and the server 104 cooperatively performing the certificate identification method provided in the embodiments of the present application as an example, the server 104 acquires a to-be-identified certificate image, extracts a region image containing the region boundary of the face image region from the to-be-identified certificate image according to a preset target identification position, so as to obtain a target identification region to be identified. The preset target identification position is located at the region boundary of the face image region in the to-be-identified certificate image. The to-be-identified certificate image can be stored in the local storage of the terminal 102, or can be stored in the cloud storage or data storage system of the server 104, and when the certificate identification is needed, the to-be-identified certificate image is acquired from the local storage of the terminal 102, or from the cloud storage of the server 104, or from the data storage system. Further, if the server 104 determines that the target identification region meets the identification condition, the certificate identification is performed based on the target identification region, an identification result is obtained, and further processing is performed according to the identification result, including feeding back the identification result of identification passing or identification failure to the terminal 102, and the identification result can also be stored for subsequent query or re-identification.
[0066] In one embodiment, as shown in Figure 2 , a certificate identification method is provided, which is executed by a computer device. It can be understood that the computer device can be the terminal 102 as shown in Figure 1 , or the server 104, or a system composed of the terminal 102 and the server 104, and is implemented through the interaction between the terminal 102 and the server 104. In the embodiment, the certificate identification method specifically includes the following steps:
[0067] Step S202, acquiring a to-be-identified certificate image.
[0068] The to-be-identified certificate image is an image of each type of certificate of each opening application object, such as an ID card image, a temporary ID card image, a passport image, and a pass image of different regions, etc. The opening application object can be understood as an object that applies for opening in different financial institutions, i.e., an object that needs to register and open an account in different financial institutions and handle financial business.
[0069] For example, the identity card image of the to-be-authenticated certificate image is taken as the opening account application object, and the opening account application object is taken as the object that needs to be registered and opened in a bank. When registering and opening an account in a bank or other financial institution, and handling deposit / loan business, identity verification based on the opening account application object is first needed, and only after the identity verification is passed can subsequent operations such as account opening and financial business handling be performed.
[0070] In the identity verification based on the opening account application object, the certificate image uploaded by the opening account application object or the video sequence frame based on the certificate image uploaded by the opening account application object is usually used for verification. That is, the to-be-authenticated certificate image can be the certificate image directly uploaded by the opening account application object, or the video frame extracted from the video sequence frame uploaded by the opening account application object.
[0071] Specifically, the to-be-authenticated multimedia data frame sequence is obtained, and the trained frame extraction model is used to perform frame extraction processing on the to-be-authenticated multimedia data frame sequence to obtain the to-be-authenticated certificate image that meets the fake image screening condition.
[0072] Further, the to-be-authenticated multimedia data frame sequence can be understood as a video sequence frame uploaded by the opening account application object. Specifically, the trained frame extraction model is used to perform frame extraction processing based on the video sequence frame to extract the to-be-authenticated certificate image that meets the fake image screening condition from the video sequence frame.
[0073] The trained frame extraction model can be a classification model, such as a classification model composed of a ResNet network (i.e., a residual neural network), a MobileNet network (i.e., a mobile classification network), etc. The fake image screening condition can be understood as an image clarity requirement in subsequent fake identification processing, such as a video frame with an image resolution greater than a preset threshold or a video frame with the highest clarity selected from the to-be-authenticated multimedia data frame sequence as the to-be-authenticated certificate image that meets the fake image screening condition.
[0074] Step S204: Extracting a region image containing the region boundary of the face image region from the to-be-authenticated certificate image according to a preset target fake identification position to obtain a target fake identification region to be authenticated, wherein the preset target fake identification position is the region boundary of the face image region in the to-be-authenticated certificate image.
[0075] The preset target fake identification position is the region boundary of the face image region in the to-be-authenticated certificate image. Specifically, taking the to-be-authenticated certificate image as the identity card image of the opening account application object as an example, the portrait region of the identity card image is represented as the face image region, and the preset target fake identification position is located at the lower boundary part of the face image region of the identity card image.
[0076] Specifically, according to the preset target authentication location, the region image including the boundary of the face image region is extracted from the image of the document to be authenticated, and the extracted region image including the boundary of the face image region is determined as the target authentication region to be authenticated.
[0077] Furthermore, such as Figure 3 As shown, this provides a schematic diagram for comparing the authentication points area of a document. Figure 3 It can be seen that, for both standard and non-standard ID card images, the facial image area (i.e., the authentication area) in the ID card image is magnified. In the authentication area of a standard ID card image, the horizontal edge of the facial image area shows a gradually blurred state. Conversely, in the authentication area of a non-standard ID card image, the edge of the facial image area shows a clear horizontal boundary, and there is no gradual blurring.
[0078] Understandably, for the document image to be authenticated, a region image including the facial image area of the ID card image is set as the target authentication region, which is different from traditional known authentication features such as facial images and document numbers. Based on the target authentication region, standard document images and non-standard document images can be accurately distinguished, thereby further reducing the possibility of forgery in the authentication region of the document image, achieving effective interception of non-standard document images, and ensuring that account opening applicants with standard document images can pass identity verification, successfully register an account, and conduct subsequent financial business.
[0079] Step S206: If the target authentication area meets the authentication conditions, perform document authentication processing based on the target authentication area to obtain the authentication result.
[0080] The authentication criteria are used to determine whether there is an obstructed area in the target authentication area and whether the obstructed area affects the subsequent document authentication process. It can be understood that if there is an obstructed area in the target authentication area and the area of the obstructed area occupies more than half of the target authentication area, it will cause the subsequent document authentication process to fail to be executed normally, indicating that the target authentication area does not meet the authentication criteria under the current circumstances.
[0081] Similarly, if it is determined that there is no obstruction area in the target authentication area, or the obstruction area is small and does not affect the subsequent document authentication processing operation, that is, the subsequent document authentication processing operation can be executed normally, it indicates that the target authentication area in the current situation meets the authentication recognition conditions.
[0082] Specifically, if the target authentication region meets the authentication criteria, then based on the trained authentication model, the target authentication region is processed for document authentication to obtain the authentication result.
[0083] The trained forgery identification model can be obtained by training an initial identification model using a training sample set. The initial identification model can be a network model composed of a NasNet network (Neural Architecture Search Net for large-scale image classification and identification), a ResNet network (Residual Neural Network), a DenseNet network (Densely Connected Convolutional Neural Network), or the like.
[0084] In the above certificate forgery processing method, a to-be-identified certificate image is obtained, and a region image including the region boundary of the face image region is extracted from the to-be-identified certificate image according to the preset target forgery position, to obtain the target forgery region to be identified. Since the preset target forgery position is located at the region boundary of the face image region in the to-be-identified certificate image, the target forgery region to be identified can be extracted by using the preset target forgery position. The target forgery region to be identified is different from the known forgery features such as traditional face images and certificate numbers. Specifically, the target forgery region to be identified is extracted from the region boundary of the face image region in the to-be-identified certificate image. When it is determined that the target forgery region to be identified satisfies the forgery identification condition, the certificate identification deviation can be reduced and the identification accuracy of the obtained forgery identification result can be improved when the certificate forgery processing is performed based on the target forgery region to be identified.
[0085] In one embodiment, as shown in Figure 4 , a training process of a forgery identification model is provided. As shown in Figure 4 , the training process of the forgery identification model includes the following steps:
[0086] In step S402, a first forgery region of a standard certificate image and a second forgery region of a non-standard certificate image are collected. The first forgery region includes a gradual change region, and the second forgery region does not include a gradual change region.
[0087] Specifically, the first forgery region of the standard certificate image is collected, that is, the region image including the region boundary of the face image region on the standard certificate image is collected as the first forgery region. Since the horizontal edge part of the region boundary of the face image region in the first forgery region of the standard certificate image is in a gradual change and blurred state, the first forgery region includes a gradual change region.
[0088] Similarly, the second forgery region of the non-standard certificate image is collected, that is, the region image including the region boundary of the face image region on the non-standard certificate image is collected as the second forgery region. Since the edge part of the region boundary of the face image region in the second forgery region on the non-standard certificate image is in a clear horizontal direction boundary, the second forgery region does not include a gradual change region.
[0089] Step S404, based on the first anti-fake region, the gradual change region elimination processing and the remaining region merging processing are performed to obtain a third anti-fake region in which the gradual change region is eliminated.
[0090] Specifically, the first anti-fake region is boundary expanded according to a preset expansion ratio to obtain an expanded first anti-fake region, and the expanded first anti-fake region is further subjected to edge gradual change feature recognition to identify the edge gradual change feature in the expanded first anti-fake region.
[0091] The purpose of boundary expanding the first anti-fake region is to ensure that the negative sample generated by using the standard certificate image is closer to the actual negative sample form. The preset expansion ratio can be adjusted and set according to the actual scene, for example, it can be adjusted according to the actual size of the received certificate image, and is not limited in particular.
[0092] Further, the edge gradual change feature can form a gradual change region, and by eliminating the gradual change region formed by the edge gradual change feature from the expanded first anti-fake region and merging and processing the remaining region after eliminating the gradual change region, a third anti-fake region in which the gradual change region is eliminated can be obtained. For the identification of the edge feature, after the face detection model detects the face image region, the edge gradual change feature that meets the gradual change rule is further screened from the face image region to form a gradual change region. The face detection model can be a recognition model with different network structures, such as FaceNet model (i.e. face recognition convolutional neural network model) and DeepFace model (i.e. hybrid face recognition model, which is a lightweight face recognition and face attribute analysis model).
[0093] In one embodiment, as shown in Figure 5 , a way of obtaining a third anti-fake region in which the gradual change region is eliminated is provided, and as shown in Figure 5 , it can be seen that for the first anti-fake region on the standard certificate image, boundary expansion processing is performed to obtain an expanded first anti-fake region, and then the expanded first anti-fake region is cropped, the edge gradual change feature is identified, and the gradual change region is formed according to the edge gradual change feature.
[0094] Further, by splitting the expanded first anti-fake region, the gradual change region and the non-gradual change region are obtained, the gradual change region is eliminated from the expanded first anti-fake region, and the non-gradual change region after eliminating the gradual change region is merged and spliced to obtain a third anti-fake region in which the gradual change region is removed.
[0095] Step S406, based on the second anti-fake region and the third anti-fake region, a negative sample set is obtained, and based on the first anti-fake region, a positive sample set is obtained.
[0096] Specifically, the second anti-fake region extracted from the non-standard certificate image is taken as a negative sample, and the third anti-fake region excluding the gradual change region is also taken as a negative sample, that is, the negative sample set can be obtained according to the second anti-fake region and the third anti-fake region. Among them, the proportion of the third anti-fake region and the second anti-fake region in the negative sample set is the same, for example, the third anti-fake region and the second anti-fake region can be in a 1:1 ratio to form the negative sample set.
[0097] Among them, since the second anti-fake region of a small amount of non-standard certificate image is directly taken as a negative sample for model training, the number of negative samples is too small, and the anti-fake identification model is over-fitted, which cannot effectively learn the feature information of the edge of the anti-fake region. Further, the first anti-fake image region of the standard certificate image needs to be processed by boundary expansion, gradual change region elimination, etc. to obtain the third anti-fake region close to the second anti-fake region of the non-standard image, so as to expand the richness of the negative sample.
[0098] Step S408, training the initial identification model according to the positive sample set and the negative sample set to obtain a trained anti-fake identification model.
[0099] Specifically, the first anti-fake region can obtain the positive sample set, and the second anti-fake region and the third anti-fake region can obtain the negative sample set, and the complete training sample set can be obtained according to the positive sample set and the negative sample set, and the initial identification model can be trained according to the complete training sample set, and the trained anti-fake identification model can be obtained.
[0100] Among them, the initial identification model can be a network model composed of a NasNet network (Neural Architecture Search Net, neural architecture search network, used for large-scale image classification and identification), a ResNet network (residual neural network), a DenseNet network (dense convolutional neural network), etc.
[0101] In this embodiment, the first anti-fake area of the standard certificate image and the second anti-fake area of the non-standard certificate image are collected, and the first anti-fake area is used for gradient area elimination processing and residual area merging processing to obtain a third anti-fake area in which the gradient area is eliminated. Then, the negative sample set is obtained based on the second anti-fake area and the third anti-fake area, and the positive sample set is obtained based on the first anti-fake area. The initial identification model is trained based on the positive sample set and the negative sample set to obtain the trained anti-fake identification model. When the second anti-fake area of the non-standard certificate image as the negative sample is small, the first anti-fake area of the standard certificate image is used for gradient area elimination processing and residual area merging processing to obtain the third anti-fake area in which the gradient area is eliminated, and the third anti-fake area is also used as the negative sample, so that the negative sample can be expanded, the training sample set is sufficient, the model training precision is improved, and the identification accuracy of the trained anti-fake identification model is improved.
[0102] In one embodiment, after obtaining the target anti-fake area carrying the target anti-fake point, the method further comprises:
[0103] Performing occlusion detection based on the target anti-fake area to obtain an occlusion detection result, and determining whether the target anti-fake area meets the anti-fake identification condition according to the occlusion detection result.
[0104] The occlusion detection result obtained by performing occlusion detection based on the target anti-fake area is used to determine whether the target anti-fake area meets the anti-fake identification condition. Specifically, after obtaining the occlusion detection result by performing occlusion detection based on the target anti-fake area, it is further determined whether the target anti-fake area has an occlusion area according to the occlusion detection result.
[0105] Specifically, if it is determined according to the occlusion detection result that the target anti-fake area has an occlusion area, the area of the occlusion area is obtained, and it is further determined whether the area of the occlusion area is less than a preset area threshold. The preset area threshold is set to half of the area of the target anti-fake area.
[0106] Further, if it is determined that the area of the occlusion area is less than the preset area threshold, the non-occluded area in the target anti-fake area is extracted, and the non-occluded target anti-fake area is obtained by performing mirror flipping processing based on the non-occluded area. Subsequently, the non-occluded target anti-fake area obtained by the mirror flipping processing is used for anti-fake identification processing, and it can be determined that the currently extracted target anti-fake area meets the anti-fake identification condition.
[0107] In the method, since the uploaded multimedia data frame sequence to be identified, i.e., a video sequence frame, is usually captured by the account application object holding a certificate, the target anti-fake region is easily blocked when the certificate is held for capturing, resulting in loss of part of the features of the target anti-fake region and failure to accurately identify, thus requiring the multimedia data frame sequence to be re-captured and uploaded. Based on this, when the area of the blocked region is smaller than a preset area threshold, a mirror flip processing based on the unblocked region is used to obtain the target anti-fake region without blocking, thereby reducing the operation of re-capturing and re-uploading, and further reducing the cumbersome process in the account application process of the account application object and improving the work efficiency.
[0108] In one embodiment, according to the blocking detection identification result, determining whether the target anti-fake region meets the anti-fake identification condition further includes:
[0109] If it is determined according to the blocking detection identification result that the target anti-fake region does not have a blocked region, it is determined that the target anti-fake region meets the anti-fake identification condition.
[0110] Specifically, if it is determined according to the blocking detection identification result that the target anti-fake region does not have a blocked region, it indicates that the current target anti-fake region is not blocked and does not have feature loss, and can be directly used for subsequent anti-fake identification processing to obtain a corresponding anti-fake identification result.
[0111] In one embodiment, according to the blocking detection identification result, determining whether the target anti-fake region meets the anti-fake identification condition further includes:
[0112] If it is determined according to the blocking detection identification result that the target anti-fake region has a blocked region and the area of the blocked region is greater than the preset area threshold, it is determined that the target anti-fake region does not meet the anti-fake identification condition.
[0113] Triggering a re-capturing processing instruction for the certificate image to be identified; the re-capturing processing instruction is used to instruct to re-capture the certificate image to be identified.
[0114] Specifically, if it is determined according to the blocking detection identification result that the target anti-fake region has a blocked region and it is determined that the area of the blocked region is greater than the preset area threshold, it indicates that the current target anti-fake region loses more features, which will cause the subsequent certificate anti-fake processing operation to be unable to be normally executed, resulting in a failure to identify, i.e., the target anti-fake region in the current situation does not meet the anti-fake identification condition.
[0115] Further, when it is determined that the target forgery identification area does not meet the forgery identification condition, a reacquisition processing instruction for the to-be-identified certificate image is triggered, wherein the reacquisition processing instruction is used to instruct the account opening applicant to re-shoot and upload video sequence frames, and the reacquisition processing instruction carries prompt information, such as prompt information of "pay attention to not shielding the face image area", so that the account opening applicant can avoid shielding the target forgery identification area when re-shooting, and the re-shooting, re-uploading and other operations are reduced, thereby reducing the cumbersome process in the account opening application process of the account opening applicant and improving the work efficiency.
[0116] In the embodiment, the shielding detection is performed based on the target forgery identification area to obtain a shielding detection identification result, and whether the target forgery identification area meets the forgery identification condition is determined according to the shielding detection identification result, so that the shielding detection of the target forgery identification area is performed in advance, and then the subsequent forgery identification processing is performed only when it is determined that the target forgery identification area meets the forgery identification condition according to the shielding detection identification result obtained by the shielding detection of the target forgery identification area, so that the case that the identification fails and the to-be-identified certificate image needs to be reacquired is reduced, and the certificate forgery processing efficiency is improved.
[0117] In one embodiment, as shown in Figure 6 a certificate forgery processing method is provided, which specifically includes the following steps:
[0118] A to-be-identified multimedia data frame sequence is obtained, and a to-be-identified certificate image meeting a forgery image screening condition is obtained by performing frame extraction processing on the to-be-identified multimedia data frame sequence by using a trained frame extraction model. As shown in Figure 6 the to-be-identified multimedia data frame sequence can include a plurality of image frames T1 to TN.
[0119] According to a preset target forgery identification position, a region image including a region boundary of a face image region is extracted from the to-be-identified certificate image to obtain a target forgery identification region to be identified. The preset target forgery identification position is specifically a region boundary of the face image region on the left side of the to-be-identified certificate image, that is, the target forgery identification region to be identified includes a region image of a lower boundary part of the face image region.
[0120] Shielding detection is performed based on the target forgery identification area to obtain a shielding detection identification result.
[0121] If it is determined according to the shielding detection identification result that there is no shielding area in the target forgery identification area, it is determined that the target forgery identification area meets the forgery identification condition.
[0122] If it is determined according to the shielding detection identification result that there is a shielding area in the target forgery identification area, a region area of the shielding area is obtained.
[0123] If the area of the occlusion region is less than the preset area threshold, an unoccluded region in the target anti-counterfeiting region is extracted.
[0124] The unoccluded region is subjected to mirror flipping processing to obtain an unoccluded target anti-counterfeiting region, and it is determined that the target anti-counterfeiting region satisfies the anti-counterfeiting identification condition.
[0125] If the area of the occlusion region is greater than the preset area threshold, it is determined that the target anti-counterfeiting region does not satisfy the anti-counterfeiting identification condition, and a reacquisition processing instruction for the to-be-identified certificate image is triggered. The reacquisition processing instruction is used to instruct the reacquisition of the to-be-identified certificate image. It can be known that Figure 6 if the area of the occlusion region is greater than the preset area threshold, the reacquisition instruction is triggered, that is, it is used to instruct the user to re-shoot, that is, to re-shoot the to-be-identified multimedia data frame sequence containing the certificate image.
[0126] When it is determined that the target anti-counterfeiting region satisfies the anti-counterfeiting identification condition, the target anti-counterfeiting region is subjected to certificate anti-counterfeiting processing based on the trained anti-counterfeiting identification model to obtain an anti-counterfeiting identification result. The anti-counterfeiting identification result includes identification as a standard certificate and identification as a non-standard certificate.
[0127] In the above certificate anti-counterfeiting processing method, the to-be-identified certificate image is acquired, and a region image including the region boundary of the face image region is extracted from the to-be-identified certificate image according to the preset target anti-counterfeiting position to obtain a target anti-counterfeiting region to be identified. Since the preset target anti-counterfeiting position is located at the region boundary of the face image region in the to-be-identified certificate image, the anti-counterfeiting region different from the known anti-counterfeiting features such as the traditional face image and the certificate number can be extracted when the preset target anti-counterfeiting position is used for anti-counterfeiting region extraction. Specifically, the target anti-counterfeiting region including the region boundary of the face image region in the to-be-identified certificate image is extracted. When it is determined that the target anti-counterfeiting region satisfies the anti-counterfeiting identification condition, the certificate identification deviation can be reduced and the identification accuracy of the obtained anti-counterfeiting identification result can be improved when the certificate anti-counterfeiting processing is performed based on the target anti-counterfeiting region.
[0128] In one embodiment, as Figure 7 shown, a certificate anti-counterfeiting processing method is provided, which specifically includes the following steps:
[0129] Step S701, acquiring a first anti-counterfeiting region of a standard certificate image and a second anti-counterfeiting region of a non-standard certificate image.
[0130] Step S702, performing boundary expansion on the first anti-counterfeiting region according to a preset expansion ratio to obtain an expanded first anti-counterfeiting region.
[0131] In step S703, edge gradient feature recognition is performed on the expanded first authentication area, and edge gradient features in the expanded first authentication area are recognized.
[0132] In step S704, a gradient area composed of the edge gradient features is removed from the expanded first authentication area, and the remaining area after the gradient area is removed is merged to obtain a third authentication area after the gradient area is removed.
[0133] In step S705, a negative sample set is obtained based on the second authentication area and the third authentication area, and a positive sample set is obtained based on the first authentication area.
[0134] In step S706, the initial recognition model is trained according to the positive sample set and the negative sample set, and a trained authentication recognition model is obtained.
[0135] In step S707, a to-be-authenticated certificate image is obtained, and a region image including a region boundary of a face image region is extracted from the to-be-authenticated certificate image according to a preset target authentication position, and a target authentication region to be authenticated is obtained.
[0136] In step S708, occlusion detection is performed based on the target authentication region, and an occlusion detection recognition result is obtained.
[0137] In step S709, it is determined whether the target authentication region has an occlusion region according to the occlusion detection recognition result.
[0138] In step S710, if the target authentication region does not have an occlusion region, it is determined that the target authentication region satisfies the authentication recognition condition.
[0139] In step S711, if the target authentication region has an occlusion region, the area of the occlusion region is obtained.
[0140] In step S712, it is determined whether the area of the occlusion region is less than a preset area threshold.
[0141] In step S713, if the area of the occlusion region is greater than the preset area threshold, it is determined that the target authentication region does not satisfy the authentication recognition condition.
[0142] In step S714, a reacquisition processing instruction for the to-be-authenticated certificate image is triggered, and the reacquisition processing instruction is used to instruct to reacquire the to-be-authenticated certificate image.
[0143] In step S715, if the area of the occlusion region is less than the preset area threshold, an unoccluded region in the target authentication region is extracted.
[0144] In step S716, mirror flip processing is performed based on the unoccluded region, an unoccluded target authentication region is obtained, and it is determined that the target authentication region satisfies the authentication recognition condition.
[0145] After executing step S710 or step S716, execute step S717. If the target authentication region meets the authentication conditions, perform document authentication processing on the target authentication region based on the trained authentication model to obtain the authentication result.
[0146] In the aforementioned document authentication method, an image of the document to be authenticated is acquired, and a region image including the boundary of the face image region is extracted from the image according to a preset target authentication location, thus obtaining the target authentication region. Since the preset target authentication location is located at the boundary of the face image region in the document image, when using this location for authentication region extraction, an authentication region different from known authentication features such as traditional face images and document numbers can be extracted. Specifically, the target authentication region including the boundary of the face image region in the document image is extracted. Therefore, when the target authentication region meets the authentication criteria, document authentication bias can be reduced and the accuracy of the obtained authentication results can be improved during document authentication processing based on the target authentication region.
[0147] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0148] Based on the same inventive concept, this application also provides a document authentication processing device for implementing the document authentication processing method described above. The solution provided by this device is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more document authentication processing device embodiments provided below can be found in the limitations of the document authentication processing method described above, and will not be repeated here.
[0149] In one embodiment, such as Figure 8 As shown, a document authentication processing device is provided, including: a document image acquisition module 802, a target authentication region acquisition module 804, and an authentication result generation module 806, wherein:
[0150] The certificate to be identified image acquisition module 802 is configured to acquire a certificate to be identified image.
[0151] The target anti-counterfeiting region acquisition module 804 is configured to extract a region image including a region boundary of a human face image region from the certificate to be identified image according to a preset target anti-counterfeiting position, and obtain a target anti-counterfeiting region to be identified, wherein the preset target anti-counterfeiting position is located at the region boundary of the human face image region in the certificate to be identified image.
[0152] The anti-counterfeiting identification result generation module 806 is configured to perform certificate anti-counterfeiting processing based on the target anti-counterfeiting region if the target anti-counterfeiting region satisfies an anti-counterfeiting identification condition, and obtain an anti-counterfeiting identification result.
[0153] In the certificate anti-counterfeiting processing device, the certificate to be identified image is acquired, and a region image including a region boundary of a human face image region is extracted from the certificate to be identified image according to a preset target anti-counterfeiting position, and a target anti-counterfeiting region to be identified is obtained. Since the preset target anti-counterfeiting position is located at the region boundary of the human face image region in the certificate to be identified image, the target anti-counterfeiting region including the region boundary of the human face image region in the certificate to be identified image can be extracted when the anti-counterfeiting region is extracted by using the preset target anti-counterfeiting position. When it is determined that the target anti-counterfeiting region satisfies an anti-counterfeiting identification condition, the certificate identification deviation can be reduced and the identification accuracy of the obtained anti-counterfeiting identification result can be improved when the certificate anti-counterfeiting processing is performed based on the target anti-counterfeiting region.
[0154] In one embodiment, the certificate to be identified image acquisition module is further configured to acquire a multimedia data frame sequence to be identified, and perform frame extraction processing on the multimedia data frame sequence to be identified by using the trained frame extraction model, to obtain the certificate to be identified image satisfying the anti-counterfeiting image screening condition.
[0155] In one embodiment, the anti-counterfeiting identification result generation module is further configured to perform certificate anti-counterfeiting processing on the target anti-counterfeiting region based on the trained anti-counterfeiting identification model, to obtain the anti-counterfeiting identification result.
[0156] In one embodiment, as shown in FIG. 10, a certificate anti-counterfeiting processing device is provided, which specifically includes: Figure 9 The acquisition module 902 is configured to acquire a first anti-counterfeiting region of a standard certificate image and a second anti-counterfeiting region of a non-standard certificate image. The first anti-counterfeiting region includes a gradual change region, and the second anti-counterfeiting region does not include the gradual change region.
[0157]
[0158] The gradual change area elimination processing module 904 is configured to perform gradual change area elimination processing based on the first authentication area, and perform remaining area merging processing, to obtain a third authentication area in which the gradual change area is eliminated.
[0159] The training sample set obtaining module 906 is configured to obtain a negative sample set based on the second authentication area and the third authentication area, and obtain a positive sample set based on the first authentication area.
[0160] The model training module 908 is configured to train the initial identification model based on the positive sample set and the negative sample set, to obtain a trained authentication identification model.
[0161] In an embodiment, the gradual change area elimination processing module is further configured to perform boundary expansion on the first authentication area according to a preset expansion ratio, to obtain an expanded first authentication area; perform edge gradual change feature identification on the expanded first authentication area, to identify edge gradual change features in the expanded first authentication area; eliminate a gradual change area formed by the edge gradual change features from the expanded first authentication area, and perform merging processing on a remaining area in which the gradual change area is eliminated, to obtain a third authentication area in which the gradual change area is eliminated.
[0162] In an embodiment, a certificate authentication processing apparatus is provided, and the apparatus further includes a shielding detection module configured to perform shielding detection based on a target authentication area, to obtain a shielding detection identification result; and determine whether the target authentication area meets an authentication identification condition according to the shielding detection identification result.
[0163] In an embodiment, the shielding detection module is further configured to, if it is determined according to the shielding detection identification result that the target authentication area has a shielding area, obtain an area of the shielding area; if the area of the shielding area is less than a preset area threshold, extract an unshielded area in the target authentication area; perform mirror flipping processing based on the unshielded area, to obtain a target authentication area without shielding, and determine that the target authentication area meets the authentication identification condition.
[0164] In an embodiment, the shielding detection module is further configured to, if it is determined according to the shielding detection identification result that the target authentication area does not have a shielding area, determine that the target authentication area meets the authentication identification condition; or if the area of the shielding area is greater than the preset area threshold, determine that the target authentication area does not meet the authentication identification condition; trigger a re-acquisition processing instruction for the to-be-authenticated certificate image; and the re-acquisition processing instruction is configured to instruct to re-acquire the to-be-authenticated certificate image.
[0165] The modules in the above certificate identification device can be implemented by software, hardware, or a combination thereof. The modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in the computer device in software form, so that the processor can call and execute the operations of the modules.
[0166] In one embodiment, a computer device is provided, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 10 The computer device includes a processor, a memory, an input / output interface (I / O), and a communication interface. The processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing 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 internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store data such as a certificate image to be identified, a preset target identification location, a target identification area, a region boundary of a face image region in the identified certificate image, and an identification result. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through a network connection. The computer program is executed by the processor to implement a certificate identification method.
[0167] Those skilled in the art can understand that Figure 10 The structure shown in the above embodiment is only a block diagram of part of the structure related to the scheme of the present application, and does not limit the computer device to which the scheme of the present application is applied. Specifically, the computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0168] In one embodiment, a computer device is provided, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the following steps:
[0169] obtain a certificate image to be identified;
[0170] extract a region image containing a region boundary of a face image region from the certificate image to be identified according to a preset target identification location, to obtain a target identification area to be identified; the preset target identification location is located at the region boundary of the face image region in the certificate image to be identified;
[0171] If the target identification area meets the identification condition, the identification result is obtained by performing identification on the target identification area.
[0172] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0173] The identification result is obtained by performing identification on the target identification area based on the trained identification model.
[0174] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0175] The first identification area of the standard certificate image and the second identification area of the non-standard certificate image are collected; the first identification area includes a gradient area, and the second identification area does not include the gradient area.
[0176] The third identification area in which the gradient area is removed is obtained by performing gradient area removal processing and remaining area merging processing based on the first identification area.
[0177] The negative sample set is obtained based on the second identification area and the third identification area, and the positive sample set is obtained based on the first identification area.
[0178] The initial identification model is trained based on the positive sample set and the negative sample set, and the trained identification model is obtained.
[0179] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0180] The first identification area is expanded based on a preset expansion ratio to obtain an expanded first identification area.
[0181] The edge gradient feature in the expanded first identification area is identified, and the edge gradient feature in the expanded first identification area is identified.
[0182] The gradient area composed of the edge gradient feature is removed from the expanded first identification area, and the remaining area in which the gradient area is removed is merged to obtain a third identification area in which the gradient area is removed.
[0183] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0184] The occlusion detection is performed based on the target identification area to obtain an occlusion detection identification result; and whether the target identification area meets the identification condition is determined according to the occlusion detection identification result.
[0185] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0186] If it is determined according to the occlusion detection recognition result that the target anti-fake region has an occlusion region, an area of the occlusion region is obtained;
[0187] If the area of the occlusion region is less than a preset area threshold, an unoccluded region in the target anti-fake region is extracted;
[0188] The unoccluded region is subjected to mirror flipping processing to obtain an unoccluded target anti-fake region, and it is determined that the target anti-fake region satisfies the anti-fake recognition condition.
[0189] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0190] If it is determined according to the occlusion detection recognition result that the target anti-fake region has no occlusion region, it is determined that the target anti-fake region satisfies the anti-fake recognition condition;
[0191] Or if the area of the occlusion region is greater than the preset area threshold, it is determined that the target anti-fake region does not satisfy the anti-fake recognition condition; a reacquisition processing instruction for the to-be-identified certificate image is triggered; the reacquisition processing instruction is used to instruct to reacquire the to-be-identified certificate image.
[0192] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0193] A to-be-identified multimedia data frame sequence is obtained;
[0194] The to-be-identified multimedia data frame sequence is subjected to frame extraction processing by using the trained frame extraction model to obtain a to-be-identified certificate image that satisfies an anti-fake image screening condition.
[0195] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the following steps:
[0196] A to-be-identified certificate image is obtained;
[0197] A region image containing a region boundary of a face image region is extracted from the to-be-identified certificate image according to a preset target anti-fake position to obtain a target anti-fake region to be identified; the preset target anti-fake position is located at the region boundary of the face image region in the to-be-identified certificate image.
[0198] If the target anti-fake region satisfies the anti-fake recognition condition, a certificate anti-fake processing is performed on the target anti-fake region to obtain an anti-fake recognition result.
[0199] In one embodiment, the computer program is executed by the processor to implement the following steps:
[0200] The target anti-fake region is subjected to certificate anti-fake processing based on the trained anti-fake recognition model to obtain an anti-fake recognition result.
[0201] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0202] collecting a first anti-counterfeiting region of a standard certificate image and a second anti-counterfeiting region of a non-standard certificate image; the first anti-counterfeiting region includes a gradient region, and the second anti-counterfeiting region does not include the gradient region;
[0203] performing gradient region elimination processing and remaining region merging processing based on the first anti-counterfeiting region to obtain a third anti-counterfeiting region in which the gradient region is eliminated;
[0204] obtaining a negative sample set based on the second anti-counterfeiting region and the third anti-counterfeiting region, and obtaining a positive sample set based on the first anti-counterfeiting region;
[0205] training the initial identification model based on the positive sample set and the negative sample set to obtain a trained anti-counterfeiting identification model.
[0206] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0207] extending the boundary of the first anti-counterfeiting region according to a preset expansion ratio to obtain an extended first anti-counterfeiting region;
[0208] performing edge gradient feature recognition on the extended first anti-counterfeiting region to identify edge gradient features in the extended first anti-counterfeiting region;
[0209] eliminating the gradient region composed of the edge gradient features from the extended first anti-counterfeiting region, and merging the remaining region after eliminating the gradient region to obtain a third anti-counterfeiting region in which the gradient region is eliminated.
[0210] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0211] performing occlusion detection based on the target anti-counterfeiting region to obtain an occlusion detection identification result; and determining whether the target anti-counterfeiting region meets the anti-counterfeiting identification condition according to the occlusion detection identification result.
[0212] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0213] if it is determined according to the occlusion detection identification result that the target anti-counterfeiting region has an occlusion region, obtaining an area of the occlusion region;
[0214] if the area of the occlusion region is less than a preset area threshold, extracting a non-occluded region in the target anti-counterfeiting region;
[0215] performing mirror flipping processing based on the non-occluded region to obtain a target anti-counterfeiting region without occlusion, and determining that the target anti-counterfeiting region meets the anti-counterfeiting identification condition.
[0216] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0217] If it is determined according to the occlusion detection recognition result that the target forgery identification area does not have an occlusion area, it is determined that the target forgery identification area meets the forgery identification condition;
[0218] Or if the area of the occlusion area is greater than the preset area threshold, it is determined that the target forgery identification area does not meet the forgery identification condition; a reacquisition processing instruction for the to-be-identified certificate image is triggered; the reacquisition processing instruction is used to instruct to reacquire the to-be-identified certificate image.
[0219] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0220] Obtain a to-be-identified multimedia data frame sequence;
[0221] Perform frame extraction processing on the to-be-identified multimedia data frame sequence by using the trained frame extraction model, and obtain a to-be-identified certificate image that meets the forgery image screening condition.
[0222] In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the following steps:
[0223] Obtain a to-be-identified certificate image;
[0224] According to a preset target forgery identification position, extract a region image containing the region boundary of the face image region from the to-be-identified certificate image, and obtain a target forgery identification region to be identified; the preset target forgery identification position is located at the region boundary of the face image region in the to-be-identified certificate image.
[0225] If the target forgery identification region meets the forgery identification condition, perform certificate forgery identification processing based on the target forgery identification region, and obtain a forgery identification result.
[0226] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0227] Perform certificate forgery identification processing on the target forgery identification region based on the trained forgery identification model, and obtain a forgery identification result.
[0228] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0229] Acquire a first forgery identification region of a standard certificate image and a second forgery identification region of a non-standard certificate image; the first forgery identification region includes a gradual change region, and the second forgery identification region does not include the gradual change region;
[0230] obtaining a third authentication area by performing a gradual area elimination process based on the first authentication area and a remaining area merging process;
[0231] obtaining a negative sample set based on the second authentication area and the third authentication area, and obtaining a positive sample set based on the first authentication area;
[0232] training the initial identification model based on the positive sample set and the negative sample set to obtain a trained authentication identification model.
[0233] In an embodiment, the computer program, when executed by the processor, further implements the following steps:
[0234] performing boundary expansion on the first authentication area according to a preset expansion ratio to obtain an expanded first authentication area;
[0235] performing edge gradual feature identification on the expanded first authentication area to identify edge gradual features in the expanded first authentication area;
[0236] eliminating a gradual area composed of the edge gradual features from the expanded first authentication area, and performing a merging process on a remaining area after the gradual area is eliminated to obtain a third authentication area in which the gradual area is eliminated.
[0237] In an embodiment, the computer program, when executed by the processor, further implements the following steps:
[0238] performing occlusion detection based on the target authentication area to obtain an occlusion detection identification result, and determining whether the target authentication area meets an authentication identification condition according to the occlusion detection identification result.
[0239] In an embodiment, the computer program, when executed by the processor, further implements the following steps:
[0240] if it is determined according to the occlusion detection identification result that the target authentication area has an occlusion area, obtaining an area of the occlusion area;
[0241] if the area of the occlusion area is smaller than a preset area threshold, extracting a non-occluded area in the target authentication area;
[0242] performing mirror flipping processing based on the non-occluded area to obtain a target authentication area without occlusion, and determining that the target authentication area meets the authentication identification condition.
[0243] In an embodiment, the computer program, when executed by the processor, further implements the following steps:
[0244] if it is determined according to the occlusion detection identification result that the target authentication area does not have an occlusion area, determining that the target authentication area meets the authentication identification condition;
[0245] Or if the area area of the shielding area is greater than the preset area threshold, it is determined that the target authentication area does not meet the authentication identification condition; a reacquisition processing instruction for the to-be-authenticated certificate image is triggered; the reacquisition processing instruction is used to instruct to reacquire the to-be-authenticated certificate image.
[0246] In one embodiment, the computer program, when executed by the processor, also implements the following steps:
[0247] Obtain a to-be-authenticated multimedia data frame sequence; use the trained frame extraction model to perform frame extraction processing on the to-be-authenticated multimedia data frame sequence, and obtain a to-be-authenticated certificate image that meets the authentication image screening condition.
[0248] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0249] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0250] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0251] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method of document authentication, characterized in that, The method comprises: acquiring a to-be-authenticated certificate image; extracting a region image containing the region boundary of the face image region from the to-be-authenticated certificate image according to a preset target anti-fake position, to obtain a target anti-fake region to be authenticated; the preset target anti-fake position is located at the region boundary of the face image region in the to-be-authenticated certificate image; if the target anti-fake region meets an anti-fake identification condition, performing certificate anti-fake processing on the target anti-fake region based on a trained anti-fake identification model, to obtain an anti-fake identification result; The method further comprises: collecting a first anti-fake region of a standard certificate image and a second anti-fake region of a non-standard certificate image; the first anti-fake region includes a gradual change region, and the second anti-fake region does not include a gradual change region; performing gradual change region elimination processing and remaining region merging processing based on the first anti-fake region to obtain a third anti-fake region from which the gradual change region is eliminated; obtaining a negative sample set based on the second anti-fake region and the third anti-fake region, and obtaining a positive sample set based on the first anti-fake region; training an initial identification model according to the positive sample set and the negative sample set to obtain the trained anti-fake identification model.
2. The method of claim 1, wherein, The method further comprises: performing boundary expansion on the first anti-fake region according to a preset expansion ratio to obtain an expanded first anti-fake region; performing edge gradual change feature identification on the expanded first anti-fake region to identify edge gradual change features in the expanded first anti-fake region; eliminating a gradual change region composed of the edge gradual change features from the expanded first anti-fake region, and merging the remaining region after the elimination of the gradual change region to obtain a third anti-fake region from which the gradual change region is eliminated.
3. The method according to claim 1 or 2, characterized in that, After obtaining the target anti-fake region carrying the target anti-fake point, the method further comprises: performing occlusion detection based on the target anti-fake region to obtain an occlusion detection identification result; determining whether the target anti-fake region meets the anti-fake identification condition according to the occlusion detection identification result.
4. The method of claim 3, wherein, The method further comprises: if it is determined according to the occlusion detection identification result that the target anti-fake region has an occlusion region, obtaining the area of the occlusion region; if the area of the occlusion region is smaller than a preset area threshold, extracting an unoccluded region in the target anti-fake region; performing mirror image flipping processing on the unoccluded region to obtain an unoccluded target anti-fake region, and determining that the target anti-fake region meets the anti-fake identification condition.
5. The method of claim 4, wherein, The method further comprises: if it is determined according to the occlusion detection identification result that the target anti-fake region has no occlusion region, it is determined that the target anti-fake region meets the anti-fake identification condition; or if the area of the occlusion region is greater than the preset area threshold, it is determined that the target anti-fake region does not meet the anti-fake identification condition; a re-collection processing instruction for the to-be-authenticated certificate image is triggered; the re-collection processing instruction is used to instruct to re-collect the to-be-authenticated certificate image.
6. The method of claim 1 or 2, wherein, The obtaining the to-be-authenticated certificate image comprises: Obtaining a to-be-authenticated multimedia data frame sequence; Using the trained frame extraction model to perform frame extraction processing on the to-be-authenticated multimedia data frame sequence to obtain a to-be-authenticated certificate image satisfying a pseudo-authentication image screening condition.
7. A document authentication processing apparatus characterized by comprising: The device comprises: A to-be-authenticated certificate image acquisition module configured to obtain a to-be-authenticated certificate image; A target pseudo-authentication region obtaining module configured to extract a region image containing a region boundary of a human face image region from the to-be-authenticated certificate image according to a preset target pseudo-authentication position to obtain a target pseudo-authentication region to be authenticated; the preset target pseudo-authentication position is located at the region boundary of the human face image region in the to-be-authenticated certificate image; A pseudo-authentication identification result generating module configured to, if the target pseudo-authentication region satisfies a pseudo-authentication identification condition, perform certificate pseudo-authentication processing on the target pseudo-authentication region based on a trained pseudo-authentication identification model to obtain a pseudo-authentication identification result; A collection module configured to collect a first pseudo-authentication region of a standard certificate image and a second pseudo-authentication region of a non-standard certificate image; the first pseudo-authentication region comprises a gradual change region, and the second pseudo-authentication region does not comprise a gradual change region; A gradual change region elimination processing module configured to perform gradual change region elimination processing and remaining region merging processing based on the first pseudo-authentication region to obtain a third pseudo-authentication region from which the gradual change region is eliminated; A training sample set obtaining module configured to obtain a negative sample set based on the second pseudo-authentication region and the third pseudo-authentication region and obtain a positive sample set based on the first pseudo-authentication region; A model training module configured to train an initial identification model according to the positive sample set and the negative sample set to obtain the trained pseudo-authentication identification model.
8. The apparatus of claim 7, wherein, The gradual change region elimination processing module is further configured to: Perform boundary expansion on the first pseudo-authentication region according to a preset expansion ratio to obtain an expanded first pseudo-authentication region; perform edge gradual change feature identification on the expanded first pseudo-authentication region to identify edge gradual change features in the expanded first pseudo-authentication region; Eliminate the gradual change region composed of the edge gradual change features from the expanded first pseudo-authentication region, and perform merging processing on the remaining region from which the gradual change region is eliminated to obtain a third pseudo-authentication region from which the gradual change region is eliminated.
9. The apparatus of claim 7 or 8, wherein, The device further comprises a blocking detection module configured to: Perform blocking detection based on the target pseudo-authentication region to obtain a blocking detection identification result; and determine whether the target pseudo-authentication region satisfies the pseudo-authentication identification condition according to the blocking detection identification result.
10. The apparatus of claim 9, wherein, The blocking detection module is further configured to: If it is determined according to the blocking detection identification result that the target pseudo-authentication region has a blocking region, obtain a region area of the blocking region; and if the region area of the blocking region is smaller than a preset area threshold, extract a non-blocking region in the target pseudo-authentication region; Perform mirror flipping processing on the non-blocking region to obtain a target pseudo-authentication region without blocking and determine that the target pseudo-authentication region satisfies the pseudo-authentication identification condition.
11. The apparatus of claim 10, wherein, The blocking detection module is further configured to: If it is determined according to the blocking detection identification result that the target pseudo-authentication region does not have a blocking region, determine that the target pseudo-authentication region satisfies the pseudo-authentication identification condition. or if the area of the blocking area is greater than the preset area threshold, it is determined that the target anti-fake area does not satisfy the anti-fake identification condition; a re-acquisition processing instruction for the to-be-identified certificate image is triggered; the re-acquisition processing instruction is used to instruct to re-acquire the to-be-identified certificate image.
12. The apparatus of claim 7 or 8, wherein, The to-be-identified certificate image acquisition module is further configured to: acquire a to-be-identified multimedia data frame sequence; and perform frame extraction processing on the to-be-identified multimedia data frame sequence by using the trained frame extraction model, to obtain a to-be-identified certificate image satisfying an anti-fake image screening condition.
13. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.
14. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.
15. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for identifying certificate photo camouflage in certificate, equipment and storage medium
CN111160093A