WO2021143088A1 - Synchronous check method and apparatus for multiple certificate types, and computer device and storage medium - Google Patents

Synchronous check method and apparatus for multiple certificate types, and computer device and storage medium Download PDF

Info

Publication number
WO2021143088A1
WO2021143088A1 PCT/CN2020/103394 CN2020103394W WO2021143088A1 WO 2021143088 A1 WO2021143088 A1 WO 2021143088A1 CN 2020103394 W CN2020103394 W CN 2020103394W WO 2021143088 A1 WO2021143088 A1 WO 2021143088A1
Authority
WO
WIPO (PCT)
Prior art keywords
certificate
image
detected
document
detection
Prior art date
Application number
PCT/CN2020/103394
Other languages
French (fr)
Chinese (zh)
Inventor
顾佳页
王波
孙建波
叶松
Original Assignee
深圳壹账通智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2021143088A1 publication Critical patent/WO2021143088A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features

Definitions

  • This application relates to the field of artificial intelligence image detection, and in particular to a method, device, computer equipment, and storage medium for synchronous detection of multiple document types.
  • the present application provides a method, device, computer equipment, and storage medium for synchronous detection of multiple certificate types, which realize rapid synchronous detection of multiple certificate types, thereby improving detection efficiency and reducing costs.
  • a synchronous detection method for multiple certificate types including:
  • the checklist includes Multiple document types
  • the recognition result includes a list of certificate types of all the images to be detected, and the list of certificate types includes the certificate types identified from all the images to be detected;
  • a synchronous detection device for multiple certificate types including:
  • the receiving module is used to receive the certificate detection instruction and obtain the image file to be detected containing the detection number; wherein the image file to be detected includes the image file to be detected;
  • the determining module is configured to obtain a preset numbering rule, and determine the checklist of the image file to be detected and the certificate detection model corresponding to the checklist according to the detection number of the image file to be detected and the number rule;
  • the checklist includes multiple types of documents;
  • the recognition module is used to input all the image pieces to be detected into the document detection model, extract document features from all the image pieces to be detected through the document detection model, and obtain the document detection model to output according to the document characteristics
  • the recognition result includes a list of document types for all the image pieces to be detected, and the list of document types includes the type of document identified from all the image pieces to be detected;
  • the detection module is used to confirm that the certificate type of the image file to be detected is qualified when the certificate type included in the check list is completely consistent with the certificate type in the certificate type list, and to mark the image file to be detected It is the detected image file and stored in the database.
  • a computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
  • the checklist includes Multiple document types
  • the recognition result includes a list of certificate types of all the images to be detected, and the list of certificate types includes the certificate types identified from all the images to be detected;
  • One or more readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
  • the checklist includes Multiple document types
  • the recognition result includes a list of certificate types of all the images to be detected, and the list of certificate types includes the certificate types identified from all the images to be detected;
  • the method, device, computer equipment, and storage medium for synchronous detection of multiple certificate types obtained the image file to be detected (including multiple image files to be detected) containing the detection number, and determine the location according to the detection number and numbering rules.
  • the document features are extracted from all the images to be detected, and the recognition results output by the document detection model according to the features of the documents are obtained.
  • the recognition results include a list of the document types of all the images to be detected (including from all the said images).
  • the certificate type identified in the image file to be detected when the certificate type included in the checklist is exactly the same as the certificate type in the certificate type list, confirm that the certificate type of the image file to be detected is qualified and mark it at the same time It is the detected image file and stored in the database.
  • a certificate detection model that only targets all the certificate types included in the checklist is formed, and a one-to-one identification method is formed.
  • This application is more targeted. Moreover, the training time of the document detection model is shorter, and the neural network structure of the document detection model is simpler and more accurate. At the same time, this application realizes rapid and synchronous detection of multiple document types, and different document types can be mixed in one image. , It is not necessary to confirm in advance that a type of document is in an image to be recognized, thereby improving the detection efficiency and reducing the cost.
  • FIG. 1 is a schematic diagram of an application environment of a method for synchronous detection of multiple certificate types in an embodiment of the present application
  • FIG. 2 is a flowchart of a method for synchronous detection of multiple certificate types in an embodiment of the present application
  • FIG. 3 is a flowchart of a method for synchronous detection of multiple certificate types in another embodiment of the present application.
  • step S30 is a flowchart of step S30 of the method for synchronous detection of multiple certificate types in an embodiment of the present application
  • FIG. 5 is a flowchart before step S304 of the method for synchronous detection of multiple certificate types in an embodiment of the present application
  • FIG. 6 is a flowchart after step S304 of the method for synchronous detection of multiple certificate types in an embodiment of the present application
  • FIG. 7 is a flowchart after step S40 of the method for synchronous detection of multiple certificate types in an embodiment of the present application.
  • FIG. 8 is a flowchart after step S50 of the method for synchronous detection of multiple certificate types in an embodiment of the present application.
  • Fig. 9 is a schematic block diagram of a device for synchronous detection of multiple certificate types in an embodiment of the present application.
  • Fig. 10 is a schematic diagram of a computer device in an embodiment of the present application.
  • the multi-certificate type synchronization detection method provided by this application can be applied in the application environment as shown in Fig. 1, in which the client (computer equipment) communicates with the server through the network.
  • the client includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, cameras, and portable wearable devices.
  • the server can be implemented as an independent server or a server cluster composed of multiple servers.
  • a method for synchronous detection of multiple certificate types is provided, and the technical solution mainly includes the following steps S10-S40:
  • S10 Receive a certificate detection instruction, and obtain a to-be-detected image file containing a detection number; wherein the to-be-detected image file includes the to-be-detected image file.
  • the document detection instruction is received to obtain the image file to be inspected
  • the document inspection instruction is an instruction to select the image file to be inspected to be inspected and to be triggered after confirmation.
  • the method of obtaining can be set as required.
  • the method of obtaining may be to obtain the image file to be detected through the certificate detection instruction (the certificate detection instruction includes the image file to be detected). ). Obtain the image file to be detected and so on according to the storage path of the image file to be detected included in the certificate instruction.
  • the to-be-detected image files are a plurality of to-be-detected image pieces that need to be detected and identified, and the to-be-detected image pieces include images of multiple certificate types, and the to-be-detected image files include the detection number, and the The detection number is a unique number assigned to the detection of multiple certificate types that determine the image file to be detected.
  • the component factors of the detection number can be set according to requirements, for example, the component factors of the detection number can be set by Composed of numbers or/and letters, the image file to be detected may be a folder, the image file to be detected is a single file under the folder, and the attribute of the folder contains the detection number of the image file to be detected
  • the folder name of the image file to be detected contains the detection number WJJAF201909100
  • the image to be detected can also be a file, and the file contains multiple pages of the image to be detected
  • the properties of the folder include the The detection number of the image file to be detected, for example, the file name of the image file to be detected contains the detection number WJAF201909110.
  • the numbering rule is a rule formulated according to the requirements to establish a corresponding relationship between the detection category and the numbering range.
  • the numbering rule defines: 1.
  • the numbering range is WJJAF201909001 to WJJAF201909999.
  • the corresponding detection category is September 2019 security inspection.
  • the number range is WJJBX201908001 to WJJBX201908999.
  • the corresponding test category is the insurance test category in August 2019.
  • the detection category of the image file to be detected is determined, that is, the detection of the image file to be detected is determined according to the degree of matching between the detection number and the numbering rule Category, such as:
  • the detection number of the image file to be detected is WJJAF201909100
  • its detection number WJJAF201909100 falls within the number range WJJAF201909001 to WJJAF201909999 corresponding to the type of security detection.
  • the detection category of the image file to be detected is security detection
  • the check list corresponding to the detection category is determined and recorded as the check list of the image file to be detected.
  • the certificate detection model corresponding to the detection category is determined and recorded as the check list corresponding to the detection category.
  • the certificate detection model corresponding to the checklist of the image file to be detected wherein one of the detection categories corresponds to one of the checklists, one of the detection categories corresponds to one of the certificate detection models, and the checklist is for all Describes the checklist of multiple types of document types for the image files to be detected.
  • the type of security inspection corresponds to a checklist of ID cards, social security card documents, and security certificates.
  • the document inspection model corresponding to the type of security inspection is determined.
  • the credential detection model corresponding to the checklist of the image file to be detected is a deep convolutional neural network model trained and trained for different checklists.
  • the checklist corresponds to one credential detection model, and there are many There are a variety of document detection models corresponding to different checklists.
  • the checklist includes multiple types of certificates, for example, the checklist includes ID certificates, bank card certificates, social security card certificates, etc., and the certificate detection model only identifies all certificate types included in the checklist.
  • the document detection model is highly pertinent, and only detects the document types included in the checklist, and the training time of the document detection model is short, and the accuracy of the document detection model is higher.
  • the identification result includes a list of certificate types of all the image pieces to be detected, and the list of certificate types includes all the types of documents identified in the image pieces to be detected.
  • the document detection model extracts all the document features in the image pieces to be detected, and the document detection model includes the deep convolution that has been trained A neural network model, where the document features include texture features extracted from the deep convolutional neural network model, and according to the document features, the document detection model outputs the recognition result of the image to be detected, and the recognition result includes A list of the certificate types of all the image files to be detected (the certificate types identified in all the image files to be detected).
  • the identification process of the document detection model is as follows. First, the document detection model performs gray-scale processing on all the image parts to be detected, generates gray-scale images of all the image parts to be detected, and adopts an edge detection method.
  • the image is input to the trained deep convolutional neural network model, the local binary pattern feature map is extracted through the deep convolutional neural network model, and the deep convolutional neural network model output is obtained
  • the identification result of the identification result represents the identification type of the image of the identification area; finally, all identification types of the identification area image are written into the identification type list of all the images to be detected.
  • the credential detection model can simultaneously detect the image files to be detected of multiple credential types, and credential images of different credential types can be mixed in the same image to be detected, so that the image to be detected does not need to be required There is only one type of certificate for the file, which improves the detection efficiency and reduces the cost.
  • all the images to be detected are input into the credential detection model, and all the images to be detected are processed by the credential detection model. Extract the document characteristics, and obtain the recognition result output by the document detection model according to the document characteristics; the recognition result includes a list of the document types of all the images to be inspected, and the list of document types includes all the documents to be inspected.
  • the types of documents identified in the image include:
  • S301 Obtain all the image components to be detected, perform grayscale processing on all the image components to be detected, and generate grayscale images of all the image components to be detected.
  • the image to be inspected includes an image of three RGB channels (red channel, green channel, and blue channel), that is, each pixel in the image to be inspected has three channel component values.
  • the R component value red channel component value
  • G component value green channel component value
  • B component value blue channel component value
  • each pixel in the image to be detected Perform gray-scale processing, obtain the gray-scale value of each pixel through the weighted average method, thereby generating the gray-scale image of the image to be detected.
  • the image to be detected in the three channels is transformed into one The grayscale image of the channel, and then only one channel is processed, reducing the processing of each channel separately.
  • S302 Recognize the grayscale images of all the image parts to be detected by an edge detection method, and extract a number of document area images in the grayscale images.
  • the edge detection method is to identify the pixels in the image whose gray value is significantly different from the gray value around the pixel, because the image to be detected contains all the documents.
  • the brightness on both sides of the edge is obviously different, and the difference in gray value on both sides of the edge of all the documents after gray-scale processing is more obvious, so the gray-scale image of the image to be detected is identified through the edge detection method
  • the pixels with obvious changes in gray value are then extracted by extracting the area formed by the pixels with obvious changes in gray value (that is, the area where each document is located), and mark it as the document area in the gray image image.
  • the Local Binary Patterns (LBP) method uses each pixel as a central pixel, and the gray value corresponding to the pixel is used as the threshold of the central pixel, and the adjacent regions are The gray value corresponding to the pixel point within is compared with the threshold value of the central pixel. If the gray value of the adjacent pixel point is greater than the threshold value of the central pixel, the position of the pixel point is marked as binary code 1, otherwise it is Binary code 0, which combines the binary codes corresponding to the pixels in all adjacent areas in a clockwise order into a set of binary numbers, and the binary value is the corresponding local binary pattern feature value (LBP value).
  • LBP value local binary pattern feature value
  • the adjacent area is a 3 ⁇ 3 area of 8 pixels (excluding the central pixel), an 8-bit binary number is generated, and the range of the feature value of the local binary mode is an integer value from 0 to 255.
  • the local binary mode method since the local binary mode method has the advantages of rotation invariance and gray level invariance, the local binary mode feature map has strong robustness to illumination. Through image analysis, there are some significant texture features in different document images. Therefore, the identification of the texture feature through the local binary pattern method to detect the type of document improves the reliability and accuracy of the identification.
  • the local binary pattern feature map corresponding to each of the document area images is input into the trained deep convolutional neural network model in the document detection model, so as to compare the local binary pattern features Image recognition processing, that is, the texture feature recognition of the local binary pattern feature map, the recognition result based on the texture feature statistics can be obtained, that is, the recognition result of the document area image is obtained, and the recognition result At the same time, it characterizes the document type of the image of the document area, such as ID card, bank card, social security card, and so on.
  • S305 Write the certificate types of all the images of the certificate area into the list of certificate types of all the images to be inspected.
  • the document types of all the images of the document area identified in the document type list.
  • the document types are identified as ID documents and social security card documents, then the identity documents and social security card documents Write it in the list of certificate types.
  • the edge detection method is used to identify the pixels with obvious gray value changes in the grayscale image, so as to quickly extract the regional images of all documents.
  • the local binary mode method has rotation invariance and grayscale. With the advantage of degree invariance, the identification of texture features through the local binary pattern method for document type detection improves the accuracy and reliability of recognition.
  • the deep convolution The neural network model extracts the texture feature of the regional image and outputs the recognition result of the regional image according to the texture feature.
  • the recognition result characterizes the certificate type of the regional image, it includes:
  • the training image samples are all associated with a certificate type label, and the training image samples are local binary pattern feature maps corresponding to the grayscale images of the training image samples.
  • the initial neural network model acquires all model parameters of the YOLO model, and determines all the model parameters as the initial parameters of the initial neural network model.
  • the transfer learning uses the parameters of existing training models in other fields to apply to tasks in this field, that is, the initial neural network model obtains YOLO (You Only Only) through transfer learning. Look once) all the model parameters of the model, and then determine all the model parameters as the initial parameters of the initial neural network model.
  • the initial neural network model includes the initial parameters, and the training image samples are input into the initial neural network model.
  • the training image sample is processed by the initial neural network model, and the texture feature in the training image sample is extracted, and the texture feature includes the wave pattern feature, the pattern feature, and the abnormal spot feature.
  • S3045 Obtain a recognition result output by the initial neural network model according to the texture feature, and determine a loss value according to the degree of matching between the recognition result and the certificate type label.
  • the identification type of the training image sample is performed through the initial neural network model to obtain the recognition result of the initial neural network model,
  • the identification result of the training image sample is compared with the certificate type label of the training image sample to determine the corresponding loss value, that is, the loss value is calculated by the loss function of the initial neural network model.
  • the preset convergence condition may be a condition that the value of the loss value is small and will not drop after 3000 calculations, that is, the value of the loss value is small and does not fall after 3000 calculations When it will drop again, stop training, and record the converged initial neural network model as the trained deep convolutional neural network model;
  • the preset convergence condition can also be that the loss value is less than a set threshold The condition is that when the loss value is less than the set threshold, the training is stopped, and the converged initial neural network model is recorded as the trained deep convolutional neural network model.
  • the input training image samples of the initial neural network model are grayscale images that have been grayscale processed, there is no need to perform complex image transformation processing on the image in the input layer, and only need to recognize texture features, so the initial neural network
  • the model has fast processing speed and small capacity, so it can be used in portable mobile terminals with small capacity.
  • the method includes:
  • the initial parameters of the iterative initial neural network model are continuously updated to continuously move closer to the accurate recognition result, so that the accuracy of the recognition result becomes higher and higher.
  • the initial parameters of the iterative initial neural network model are continuously updated to continuously move closer to the accurate recognition result, so that the accuracy of the recognition result becomes higher and higher.
  • the method includes:
  • S306 Determine a preset information area in the document area image according to the document type of the document area image.
  • the certificate area image is acquired, and the certificate type of the certificate area image is acquired, and the preset information area in the certificate area image is determined according to the certificate type, wherein the different The certificate type matches the different preset information areas.
  • the preset information area corresponding to the ID card is a rectangular area at the position of the ID card number
  • the preset information area corresponding to the bank card certificate is the rectangular area at the position of the bank card number.
  • S307 Cut a cropped image corresponding to each of the preset information areas from the image of the document area.
  • the preset information area in the document area image is intercepted, and the intercepted image is marked as the corresponding cropped image.
  • S308 Transform the cut image by using an inverse binarization method to generate an inverse binarized cut image corresponding to the image of the document area.
  • the inverse binarization method is to first perform gray-scale binarization processing on the cropped image to obtain a binarized image, and then perform segmentation processing on the binarized image by selecting an appropriate threshold, and finally Inverting the binarized image after the segmentation process, thereby obtaining the inverse binarized cropped image.
  • the certificate number recognition model is a trained and trained deep neural network model, wherein the training method and network structure of the certificate number recognition model can be set according to requirements.
  • the certificate number The training mode of the recognition model is a migration learning training mode
  • the network structure of the ID number recognition model is a VGG16 network structure.
  • the digital feature and letter feature of the de-binarized crop image are extracted by the document number recognition model, and the document number recognition model recognizes the document area image according to the digital feature and the letter feature So that the certificate number recognition model outputs the certificate information associated with the certificate type of the certificate area image.
  • this application uses the deep neural network model to recognize the numbers and letters in the image, which speeds up the recognition speed and reduces the requirements for image quality. Because the deep neural network model recognizes through the number and letter features, input fuzzy images The effect of accurate identification can also be achieved.
  • S310 Write the credential information and the credential type of the regional image in a credential type list of all the image files to be detected in association with each other.
  • the method further includes:
  • the method for confirming the detection failure of the image file to be detected can be set according to requirements, for example, a corresponding failure window pops up, and the failure window indicates the "XXX certificate type of the image file to be detected" "Error" and other words.
  • the checklist and the certificate type list compare the certificate types contained in the checklist with the certificate types in the certificate type list, and the certificate types contained in the checklist
  • the certificate type is completely consistent with the certificate type in the certificate type list
  • the file is marked as a detected image file and stored in the database, and the detection result is recorded, so that the detection result corresponding to the user can be retrieved in the subsequent user authentication process.
  • This application obtains the image file to be inspected (including multiple image files to be inspected) containing the inspection number, and determines the check list of the image file to be inspected and the certificate detection model corresponding to the check list according to the inspection number and numbering rules ,
  • the check list contains multiple types of documents, all the image pieces to be detected are input into the document detection model, and the document features are extracted from all the image pieces to be detected through the document detection model to obtain the document detection
  • the model outputs the recognition results based on the document features, and the recognition results include a list of document types for all the images to be inspected (including the document types identified from all the images to be inspected), in the check list
  • the included certificate type is completely consistent with the certificate type in the certificate type list, it is confirmed that the certificate type of the image file to be detected is qualified, and the image file to be detected is also marked as a detected image file and stored in the database.
  • a certificate detection model that only targets all the certificate types included in the checklist is formed, and a one-to-one identification method is formed.
  • This application is more targeted. Moreover, the training time of the document detection model is shorter, and the neural network structure of the document detection model is simpler and more accurate. At the same time, this application realizes rapid and synchronous detection of multiple document types, and different document types can be mixed in one image. , It is not necessary to confirm in advance that a type of document is in an image to be recognized, thereby improving the detection efficiency and reducing the cost.
  • the certificate type list further includes certificate information associated with each of the certificate types identified from all the image files to be detected;
  • the method further includes:
  • S50 Obtain information to be audited associated with the detection number; the information to be audited includes certificate verification parameters corresponding to each of the certificate types included in the checklist.
  • the information to be reviewed is the information associated with the detection number, and includes the certificate verification parameters corresponding to the certificate type, for example: ID card number corresponds to XXXXXXXXXXXXXXXXXXXXX (13-digit certificate number), and bank card certificate corresponds to XXXXXXXXXXXXXX ( 16-digit card number), etc., wherein the certificate type included in the information to be reviewed is consistent with the certificate type included in the checklist.
  • the certificate verification parameters and the certificate information of the same certificate type are obtained, and the certificate verification parameters of the same certificate type are compared with the certificate information, and the certificate verification parameters are compared with the certificate information.
  • the credential information matches, it is confirmed that the credential type corresponding to the credential verification parameter is successfully verified.
  • the document information associated with all the document types contained in the image file to be inspected is verified successfully, and it is confirmed that the image file to be inspected has passed the verification, such as in the case of bad assets.
  • the user’s identity is verified by providing image files of the user’s identity. After all the document types in the image files of all user identities have been verified successfully, the user’s identity verification is confirmed.
  • the method includes:
  • the certificate verification parameter does not match the certificate information, that is, the certificate verification parameter is not equal to the certificate information, as long as one of the certificate verification parameters is not equal to the certificate information, then It is confirmed that the review result of the image file to be detected is not passed, and a failure prompt message of failing the review is prompted.
  • the failure prompt information can be set according to requirements, for example, a prompt "XXXX document information does not match" pops up.
  • the multi-document type synchronous detection device includes a receiving module 11, a determining module 12, an identifying module 13 and a detecting module 14.
  • the detailed description of each functional module is as follows:
  • the receiving module 11 is configured to receive a certificate detection instruction, and obtain a to-be-detected image file containing a detection number; wherein the to-be-detected image file includes the to-be-detected image file;
  • the determining module 12 is configured to obtain a preset numbering rule, and determine a checklist of the image file to be detected and a certificate detection model corresponding to the checklist according to the detection number of the image file to be detected and the number rule;
  • the checklist includes multiple types of certificates;
  • the recognition module 13 is configured to input all the image pieces to be detected into the document detection model, extract the document features from all the image pieces to be detected through the document detection model, and obtain the document detection model according to the document characteristics Output recognition result;
  • the recognition result includes a list of certificate types of all the image files to be detected, and the list of certificate types includes the certificate types identified from all the image files to be detected;
  • the detection module 14 is used for confirming that the certificate type of the image file to be detected is qualified when the certificate type included in the check list is exactly the same as the certificate type in the certificate type list, and the image file to be detected Mark the detected image file and store it in the database.
  • the device for simultaneous detection of multiple certificate types further includes:
  • An obtaining module configured to obtain information to be audited associated with the detection number; the information to be audited includes certificate verification parameters corresponding to each of the certificate types included in the checklist;
  • the comparison module is configured to compare the certificate verification parameters of the same certificate type with the certificate information, and when the certificate verification parameters match the certificate information, confirm the certificate verification parameters corresponding to the certificate verification parameters.
  • the certificate type verification is successful;
  • the confirmation module is used for confirming that the image file to be inspected has passed the review when all the certificate types of the image file to be inspected are verified successfully.
  • the acquisition module further includes:
  • the identification module 13 includes:
  • the detection failure unit is configured to confirm that the detection of the to-be-detected image file fails when the check list is inconsistent with the certificate type list.
  • the identification module 13 further includes:
  • the first acquiring unit is configured to acquire all the image parts to be inspected, perform gray-scale processing on all the image parts to be inspected, and generate gray-scale images of all the image parts to be inspected;
  • the first extraction unit is used to identify the gray-scale images of all the image parts to be detected by the edge detection method, and extract a number of document area images in the gray-scale images;
  • a conversion unit configured to convert each of the document area images into a local binary pattern feature map corresponding to each of the document area images by using a local binary mode method
  • the recognition unit is configured to input the local binary pattern feature map corresponding to each of the document region images into the trained deep convolutional neural network model in the document detection model, and pass the deep convolutional neural network model.
  • the network model extracts the texture feature of the local binary pattern feature map, and obtains the recognition result output by the deep convolutional neural network model according to the texture feature, and the recognition result represents the document of the document area image Types of;
  • the successful detection unit is used to write the certificate types of all the images of the certificate area into the list of certificate types of all the images to be detected.
  • the identification unit includes:
  • the second acquiring unit is configured to acquire training image samples; wherein each of the training image samples is associated with a certificate type label;
  • the migration unit is used to obtain all the model parameters of the YOLO model by the initial neural network model through migration learning, and determine all the model parameters as the initial parameters of the initial neural network model;
  • a second extraction unit configured to extract texture features in the training image sample through the initial neural network model
  • a determining unit configured to obtain a recognition result output by the initial neural network model according to the texture feature, and determine a loss value according to the degree of matching between the recognition result and the certificate type label;
  • the training completion unit is configured to record the initial neural network model after convergence as the trained deep convolutional neural network model when the loss value reaches a preset convergence condition.
  • the identification unit further includes:
  • a determining subunit configured to determine a preset information area in the image of the image of the image of the image of the image of the image of the image of the image of the preset of the preset information area of the preset information area according to the type of the image of the image of the image of the image of the image of the image of the image of the image of the image of the preset information area according to the type of the image of the image of the image of the image of the image of the image of the image of the image of the image;
  • a cropping subunit configured to crop a cropped image corresponding to each of the preset information areas from the image of the document area
  • a transforming subunit configured to transform the cropped image by using an inverse binarization method to generate an inverse binarized cropped image corresponding to the image of the document area;
  • the recognition subunit is used to input the de-binarized cropped image into a credential number recognition model, and the credential number recognition model extracts the digital features of the de-binarized cropped image corresponding to the credential area image And the letter feature, and output the recognition result of the de-binarized cropped image corresponding to the document area image according to the number feature and the letter characteristic, and the recognition result characterizes the difference with the document area image Document information associated with the document type;
  • the credential information is associated with the credential type of the regional image and written into the credential type list of all the image files to be detected.
  • Each module in the above-mentioned multi-certificate type synchronous detection device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 10.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes computer readable instructions and internal memory.
  • the computer readable instructions are stored with an operating system, computer readable instructions and a database.
  • the internal memory provides an environment for the operation of the operating system and the computer-readable instructions in the computer-readable instructions.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, a method for synchronous detection of multiple certificate types is realized.
  • the readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
  • a computer device including a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor. Synchronous detection method of certificate type.
  • one or more readable storage media storing computer readable instructions are provided.
  • the readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage. Medium; the readable storage medium stores computer readable instructions, and when the computer readable instructions are executed by one or more processors, the one or more processors implement the method for synchronous detection of multiple certificate types in the foregoing embodiment.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Abstract

A synchronous check method and apparatus for multiple certificate types, and a computer device and a storage medium, which relate to the field of artificial intelligence image checking. The method comprises: receiving a certificate check instruction, and acquiring an image file to be checked which includes a check number; according to the check number of the image file to be checked and a preset numbering rule, determining a check list and a certificate check model corresponding thereto, wherein the check list includes multiple certificate types; inputting all image pieces to be checked into the certificate check model, and by means of extracting certificate features, acquiring an output recognition result including a certificate type list of all the image pieces to be checked; and when the certificate types included in the check list are completely consistent with certificate types in the certificate type list, determining that the certificate type of the image file to be checked is checked such that same is up to standard, and marking the image file to be checked as a checked image file and storing same in a database. By means of the method, rapid and synchronous checking of multiple certificate types is realized, thereby improving checking efficiency and reducing costs.

Description

多证件类型同步检测方法、装置、计算机设备及存储介质Synchronous detection method, device, computer equipment and storage medium for multiple certificate types
本申请要求于2020年1月19日提交中国专利局、申请号为202010061431.4,发明名称为“多证件类型同步检测方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the Chinese Patent Office on January 19, 2020, the application number is 202010061431.4, and the invention title is "Multi-document type synchronous detection method, device, computer equipment and storage medium", and its entire content Incorporated in this application by reference.
技术领域Technical field
本申请涉及人工智能的图像检测领域,尤其涉及一种多证件类型同步检测方法、装置、计算机设备及存储介质。This application relates to the field of artificial intelligence image detection, and in particular to a method, device, computer equipment, and storage medium for synchronous detection of multiple document types.
背景技术Background technique
随着信用社会的发展,越来越多的应用场景(比如:涉及金融、保险、不良资产、安防的应用场景)需要通过同时提供多种证件(比如:身份证、户口簿件、房产证、银行卡)的影像件对用户身份进行审核。发明人意识到,由于对于多种证件的影像资料的审核主要通过人工核查,而且影像资料的影像质量参差不齐,因此,仅依靠专业人员进行人工核查无疑会浪费巨大的人力物力。而且在现有技术中,往往只能输入含有一种证件照的影像件和通过传统OCR技术进行识别,该方案不足之处在于OCR技术在一次识别过程中仅能对一个证件的高质量影像进行有效识别,如此,在应用上存在局限性。With the development of the credit society, more and more application scenarios (such as: application scenarios involving finance, insurance, bad assets, and security) need to provide multiple documents (such as ID cards, household registration documents, real estate certificates, etc.) at the same time. (Bank card) image file to verify the user's identity. The inventor realized that since the review of the image data of a variety of documents is mainly through manual verification, and the image quality of the image data is uneven, the manual verification by professionals alone will undoubtedly waste huge manpower and material resources. Moreover, in the prior art, it is often only possible to input an image containing a type of ID photo and recognize it through the traditional OCR technology. The disadvantage of this solution is that the OCR technology can only perform a high-quality image of one ID in a recognition process. Effective recognition, as such, has limitations in application.
申请内容Application content
本申请提供一种多证件类型同步检测方法、装置、计算机设备及存储介质,实现了快速同步检测多种证件类型,从而提高了检测效率,减少了成本。The present application provides a method, device, computer equipment, and storage medium for synchronous detection of multiple certificate types, which realize rapid synchronous detection of multiple certificate types, thereby improving detection efficiency and reducing costs.
一种多证件类型同步检测方法,包括:A synchronous detection method for multiple certificate types, including:
接收证件检测指令,获取含有检测编号的待检测影像文件;其中,所述待检测影像文件包括待检测影像件;Receiving a certificate detection instruction, and obtaining a to-be-detected image file containing a detection number; wherein the to-be-detected image file includes the to-be-detected image file;
获取预设的编号规则,根据所述待检测影像文件的检测编号和所述编号规则,确定所述待检测影像文件的核查清单和所述核查清单对应的证件检测模型;所述核查清单中包含多种证件类型;Obtain a preset numbering rule, and determine the checklist of the image file to be detected and the certificate detection model corresponding to the checklist according to the detection number of the image file to be detected and the numbering rule; the checklist includes Multiple document types;
将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果;所述识别结果包括所有所述待检测影像件的证件类型清单,所述证件类型清单中包含自所有所述待检测影像件中识别的证件类型;Input all the image pieces to be detected into the document detection model, extract document features from all the image pieces to be detected through the document detection model, and obtain the recognition result output by the document detection model according to the document characteristics; The recognition result includes a list of certificate types of all the images to be detected, and the list of certificate types includes the certificate types identified from all the images to be detected;
在所述核查清单中包含的证件类型与所述证件类型清单中的证件类型完全一致时,确认所述待检测影像文件的证件类型检测合格,将所述待检测影像文件标记为已检测影像文件并存储至数据库。When the certificate type included in the check list is completely consistent with the certificate type in the certificate type list, confirm that the certificate type of the image file to be detected is qualified, and mark the image file to be detected as a detected image file And stored in the database.
一种多证件类型同步检测装置,包括:A synchronous detection device for multiple certificate types, including:
接收模块,用于接收证件检测指令,获取含有检测编号的待检测影像文件;其中,所述待检测影像文件包括待检测影像件;The receiving module is used to receive the certificate detection instruction and obtain the image file to be detected containing the detection number; wherein the image file to be detected includes the image file to be detected;
确定模块,用于获取预设的编号规则,根据所述待检测影像文件的检测编号和所述编号规则,确定所述待检测影像文件的核查清单和所述核查清单对应的证件检测模型;所述核查清单中包含多种证件类型;The determining module is configured to obtain a preset numbering rule, and determine the checklist of the image file to be detected and the certificate detection model corresponding to the checklist according to the detection number of the image file to be detected and the number rule; The checklist includes multiple types of documents;
识别模块,用于将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输 出的识别结果;所述识别结果包括所有所述待检测影像件的证件类型清单,所述证件类型清单中包含自所有所述待检测影像件中识别的证件类型;The recognition module is used to input all the image pieces to be detected into the document detection model, extract document features from all the image pieces to be detected through the document detection model, and obtain the document detection model to output according to the document characteristics The recognition result; the recognition result includes a list of document types for all the image pieces to be detected, and the list of document types includes the type of document identified from all the image pieces to be detected;
检测模块,用于在所述核查清单中包含的证件类型与所述证件类型清单中的证件类型完全一致时,确认所述待检测影像文件的证件类型检测合格,将所述待检测影像文件标记为已检测影像文件并存储至数据库。The detection module is used to confirm that the certificate type of the image file to be detected is qualified when the certificate type included in the check list is completely consistent with the certificate type in the certificate type list, and to mark the image file to be detected It is the detected image file and stored in the database.
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:A computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
接收证件检测指令,获取含有检测编号的待检测影像文件;其中,所述待检测影像文件包括待检测影像件;Receiving a certificate detection instruction, and obtaining a to-be-detected image file containing a detection number; wherein the to-be-detected image file includes the to-be-detected image file;
获取预设的编号规则,根据所述待检测影像文件的检测编号和所述编号规则,确定所述待检测影像文件的核查清单和所述核查清单对应的证件检测模型;所述核查清单中包含多种证件类型;Obtain a preset numbering rule, and determine the checklist of the image file to be detected and the certificate detection model corresponding to the checklist according to the detection number of the image file to be detected and the numbering rule; the checklist includes Multiple document types;
将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果;所述识别结果包括所有所述待检测影像件的证件类型清单,所述证件类型清单中包含自所有所述待检测影像件中识别的证件类型;Input all the image pieces to be detected into the document detection model, extract document features from all the image pieces to be detected through the document detection model, and obtain the recognition result output by the document detection model according to the document characteristics; The recognition result includes a list of certificate types of all the images to be detected, and the list of certificate types includes the certificate types identified from all the images to be detected;
在所述核查清单中包含的证件类型与所述证件类型清单中的证件类型完全一致时,确认所述待检测影像文件的证件类型检测合格,将所述待检测影像文件标记为已检测影像文件并存储至数据库。When the certificate type included in the check list is completely consistent with the certificate type in the certificate type list, confirm that the certificate type of the image file to be detected is qualified, and mark the image file to be detected as a detected image file And stored in the database.
一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:One or more readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
接收证件检测指令,获取含有检测编号的待检测影像文件;其中,所述待检测影像文件包括待检测影像件;Receiving a certificate detection instruction, and obtaining a to-be-detected image file containing a detection number; wherein the to-be-detected image file includes the to-be-detected image file;
获取预设的编号规则,根据所述待检测影像文件的检测编号和所述编号规则,确定所述待检测影像文件的核查清单和所述核查清单对应的证件检测模型;所述核查清单中包含多种证件类型;Obtain a preset numbering rule, and determine the checklist of the image file to be detected and the certificate detection model corresponding to the checklist according to the detection number of the image file to be detected and the numbering rule; the checklist includes Multiple document types;
将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果;所述识别结果包括所有所述待检测影像件的证件类型清单,所述证件类型清单中包含自所有所述待检测影像件中识别的证件类型;Input all the image pieces to be detected into the document detection model, extract document features from all the image pieces to be detected through the document detection model, and obtain the recognition result output by the document detection model according to the document characteristics; The recognition result includes a list of certificate types of all the images to be detected, and the list of certificate types includes the certificate types identified from all the images to be detected;
在所述核查清单中包含的证件类型与所述证件类型清单中的证件类型完全一致时,确认所述待检测影像文件的证件类型检测合格,将所述待检测影像文件标记When the certificate type included in the check list is exactly the same as the certificate type in the certificate type list, confirm that the certificate type of the image file to be detected is qualified, and mark the image file to be detected
本申请提供的多证件类型同步检测方法、装置、计算机设备及存储介质,通过获取含有检测编号的待检测影像文件(包含多个待检测影像件),根据所述检测编号和编号规则,确定所述待检测影像文件的核查清单和与核查清单对应的证件检测模型,所述核查清单中包含多种证件类型,将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果,所述识别结果包括所有所述待检测影像件的证件类型清单(包含自所有所述待检测影像件中识别的证件类型),在所述核查清单中包含的证件类型与所述证件类型清单中的证件类型完全一致时,确认所述待检测影像文件的证件类型检测合格,同时标记为已检测影像文件并存储至数据库。The method, device, computer equipment, and storage medium for synchronous detection of multiple certificate types provided in this application obtain the image file to be detected (including multiple image files to be detected) containing the detection number, and determine the location according to the detection number and numbering rules. A checklist of the image files to be detected and a certificate detection model corresponding to the checklist, the checklist contains multiple certificate types, all the images to be detected are input into the certificate detection model, and the certificate detection model is passed The document features are extracted from all the images to be detected, and the recognition results output by the document detection model according to the features of the documents are obtained. The recognition results include a list of the document types of all the images to be detected (including from all the said images). The certificate type identified in the image file to be detected), when the certificate type included in the checklist is exactly the same as the certificate type in the certificate type list, confirm that the certificate type of the image file to be detected is qualified and mark it at the same time It is the detected image file and stored in the database.
如此,实现了根据含有多种证件类型的核查清单对应一种仅针对核查清单中包含的所有证件类型的证件检测模型,形成一种一对一的识别方式,本申请具更强的针对性,而且证件检测模型的训练时间更短,以及证件检测模型的神经网络结构简单且准确率更高,同时,本申请实现了快速同步检测多种证件类型,而且不同证件类型可以混合在一个影像件 中,无需提前确认一种证件类型在一个影像件中才能进行识别,从而提高了检测效率,而且减少了成本。In this way, according to the checklist containing multiple certificate types, a certificate detection model that only targets all the certificate types included in the checklist is formed, and a one-to-one identification method is formed. This application is more targeted. Moreover, the training time of the document detection model is shorter, and the neural network structure of the document detection model is simpler and more accurate. At the same time, this application realizes rapid and synchronous detection of multiple document types, and different document types can be mixed in one image. , It is not necessary to confirm in advance that a type of document is in an image to be recognized, thereby improving the detection efficiency and reducing the cost.
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。The details of one or more embodiments of the present application are presented in the following drawings and description, and other features and advantages of the present application will become apparent from the description, drawings and claims.
附图说明Description of the drawings
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
图1是本申请一实施例中多证件类型同步检测方法的应用环境示意图;FIG. 1 is a schematic diagram of an application environment of a method for synchronous detection of multiple certificate types in an embodiment of the present application;
图2是本申请一实施例中多证件类型同步检测方法的流程图;2 is a flowchart of a method for synchronous detection of multiple certificate types in an embodiment of the present application;
图3是本申请另一实施例中多证件类型同步检测方法的流程图;3 is a flowchart of a method for synchronous detection of multiple certificate types in another embodiment of the present application;
图4是本申请一实施例中多证件类型同步检测方法的步骤S30的流程图;4 is a flowchart of step S30 of the method for synchronous detection of multiple certificate types in an embodiment of the present application;
图5是本申请一实施例中多证件类型同步检测方法的步骤S304之前的流程图;FIG. 5 is a flowchart before step S304 of the method for synchronous detection of multiple certificate types in an embodiment of the present application;
图6是本申请一实施例中多证件类型同步检测方法的步骤S304之后的流程图;FIG. 6 is a flowchart after step S304 of the method for synchronous detection of multiple certificate types in an embodiment of the present application;
图7是本申请一实施例中多证件类型同步检测方法的步骤S40之后的流程图;FIG. 7 is a flowchart after step S40 of the method for synchronous detection of multiple certificate types in an embodiment of the present application;
图8是本申请一实施例中多证件类型同步检测方法的步骤S50之后的流程图;FIG. 8 is a flowchart after step S50 of the method for synchronous detection of multiple certificate types in an embodiment of the present application;
图9是本申请一实施例中多证件类型同步检测装置的原理框图;Fig. 9 is a schematic block diagram of a device for synchronous detection of multiple certificate types in an embodiment of the present application;
图10是本申请一实施例中计算机设备的示意图。Fig. 10 is a schematic diagram of a computer device in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请提供的多证件类型同步检测方法,可应用在如图1的应用环境中,其中,客户端(计算机设备)通过网络与服务器进行通信。其中,客户端(计算机设备)包括但不限于为各种个人计算机、笔记本电脑、智能手机、平板电脑、摄像头和便携式可穿戴设备。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The multi-certificate type synchronization detection method provided by this application can be applied in the application environment as shown in Fig. 1, in which the client (computer equipment) communicates with the server through the network. Among them, the client (computer equipment) includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, cameras, and portable wearable devices. The server can be implemented as an independent server or a server cluster composed of multiple servers.
在一实施例中,如图2所示,提供一种多证件类型同步检测方法,其技术方案主要包括以下步骤S10-S40:In an embodiment, as shown in FIG. 2, a method for synchronous detection of multiple certificate types is provided, and the technical solution mainly includes the following steps S10-S40:
S10,接收证件检测指令,获取含有检测编号的待检测影像文件;其中,所述待检测影像文件包括待检测影像件。S10: Receive a certificate detection instruction, and obtain a to-be-detected image file containing a detection number; wherein the to-be-detected image file includes the to-be-detected image file.
可理解地,接收所述证件检测指令,获取所述待检测影像文件,所述证件检测指令为选择需要进行检测的待检测影像文件并确认之后触发的指令,接收到所述证件检测指令之后,获取所述待检测影像文件,其获取方式可以根据需要进行设定,比如获取方式可以为通过所述证件检测指令获取所述待检测影像文件(所述证件检测指令中包含所述待检测影像文件)、根据所述证件指令中包含的所述待检测影像文件的存储路径获取所述待检测影像文件等等。Understandably, the document detection instruction is received to obtain the image file to be inspected, and the document inspection instruction is an instruction to select the image file to be inspected to be inspected and to be triggered after confirmation. After the document inspection instruction is received, To obtain the image file to be detected, the method of obtaining it can be set as required. For example, the method of obtaining may be to obtain the image file to be detected through the certificate detection instruction (the certificate detection instruction includes the image file to be detected). ). Obtain the image file to be detected and so on according to the storage path of the image file to be detected included in the certificate instruction.
其中,所述待检测影像文件为需要进行检测识别的多个待检测影像件,所述待检测影像件中包括多种证件类型的图像,所述待检测影像文件包含所述检测编号,所述检测编号为对所述待检测影像文件进行确定的多个证件类型检测而赋予的唯一编号,所述检测编号的组成因素可以根据需求进行设定,比如所述检测编号的组成因素可以设定由数字或/和字母组成,所述待检测影像文件可以为文件夹,所述待检测影像件为该文件夹下的单个文件, 其文件夹的属性中包含有所述待检测影像文件的检测编号,例如:待检测影像文件的文件夹名字中包含检测编号WJJAF201909100;所述待检测影像亦可以为文件,其文件中有多页所述待检测影像件,其文件夹的属性中包含有所述待检测影像文件的检测编号,例如:待检测影像文件的文件名字中包含检测编号WJAF201909110。Wherein, the to-be-detected image files are a plurality of to-be-detected image pieces that need to be detected and identified, and the to-be-detected image pieces include images of multiple certificate types, and the to-be-detected image files include the detection number, and the The detection number is a unique number assigned to the detection of multiple certificate types that determine the image file to be detected. The component factors of the detection number can be set according to requirements, for example, the component factors of the detection number can be set by Composed of numbers or/and letters, the image file to be detected may be a folder, the image file to be detected is a single file under the folder, and the attribute of the folder contains the detection number of the image file to be detected For example, the folder name of the image file to be detected contains the detection number WJJAF201909100; the image to be detected can also be a file, and the file contains multiple pages of the image to be detected, and the properties of the folder include the The detection number of the image file to be detected, for example, the file name of the image file to be detected contains the detection number WJAF201909110.
S20,获取预设的编号规则,根据所述待检测影像文件的检测编号和所述编号规则,确定所述待检测影像文件的核查清单和所述核查清单对应的证件检测模型;所述核查清单中包含多种证件类型。S20. Obtain a preset numbering rule, and determine a checklist of the image file to be detected and a certificate detection model corresponding to the checklist according to the detection number of the image file to be detected and the number rule; the checklist Contains a variety of document types.
可理解地,所述编号规则为根据需求对检测类别和编号范围建立对应关系而制定的规则,例如:编号规则中定义:1、编号范围为WJJAF201909001至WJJAF201909999对应检测类别为2019年9月份安防检测的种类,2、编号范围为WJJBX201908001至WJJBX201908999对应检测类别为2019年8月份保险检测的种类。根据所述待检测影像文件的检测编号和所述编号规则,确定所述待检测影像文件的检测类别,即根据所述检测编号和所述编号规则的匹配程度确定所述待检测影像文件的检测类别,例如:上述例子中,检测编号为WJJAF201909100的待检测影像文件,其检测编号WJJAF201909100落在安防检测的种类对应的编号范围WJJAF201909001至WJJAF201909999内,可以确定待检测影像文件的检测类别为安防检测的种类,再根据所述检测类别,确定与所述检测类别对应的核查清单并记录为所述待检测影像文件的核查清单,同时确定与所述检测类别对应的证件检测模型并记录为与所述待检测影像文件的核查清单对应的证件检测模型,其中,一个所述检测类别对应一种所述核查清单,一个所述检测类别对应一种所述证件检测模型,所述核查清单为需要对所述待检测影像文件种多种证件类型进行检测的清单,例如:安防检测的种类对应一种核对清单为身份证证件、社保卡证件和安防证书,同时确定安防检测的种类对应的证件检测模型。所述与所述待检测影像文件的核查清单对应的证件检测模型为针对不同的核查清单进行训练并训练完成的深度卷积神经网络模型,一种所述核查清单对应一个证件检测模型,存在多种不同的核查清单就存在多种证件检测模型与之相对应。所述核查清单中包含多种证件类型,比如核对清单中包含身份证证件、银行卡证件、社保卡证件等等,所述证件检测模型仅对所述核查清单中包含的所有证件类型进行识别。Understandably, the numbering rule is a rule formulated according to the requirements to establish a corresponding relationship between the detection category and the numbering range. For example, the numbering rule defines: 1. The numbering range is WJJAF201909001 to WJJAF201909999. The corresponding detection category is September 2019 security inspection. 2. The number range is WJJBX201908001 to WJJBX201908999. The corresponding test category is the insurance test category in August 2019. According to the detection number of the image file to be detected and the numbering rule, the detection category of the image file to be detected is determined, that is, the detection of the image file to be detected is determined according to the degree of matching between the detection number and the numbering rule Category, such as: In the above example, the detection number of the image file to be detected is WJJAF201909100, and its detection number WJJAF201909100 falls within the number range WJJAF201909001 to WJJAF201909999 corresponding to the type of security detection. It can be determined that the detection category of the image file to be detected is security detection According to the detection category, the check list corresponding to the detection category is determined and recorded as the check list of the image file to be detected. At the same time, the certificate detection model corresponding to the detection category is determined and recorded as the check list corresponding to the detection category. The certificate detection model corresponding to the checklist of the image file to be detected, wherein one of the detection categories corresponds to one of the checklists, one of the detection categories corresponds to one of the certificate detection models, and the checklist is for all Describes the checklist of multiple types of document types for the image files to be detected. For example, the type of security inspection corresponds to a checklist of ID cards, social security card documents, and security certificates. At the same time, the document inspection model corresponding to the type of security inspection is determined. The credential detection model corresponding to the checklist of the image file to be detected is a deep convolutional neural network model trained and trained for different checklists. One type of the checklist corresponds to one credential detection model, and there are many There are a variety of document detection models corresponding to different checklists. The checklist includes multiple types of certificates, for example, the checklist includes ID certificates, bank card certificates, social security card certificates, etc., and the certificate detection model only identifies all certificate types included in the checklist.
如此,所述证件检测模型的针对性强,只针对核查清单中包含的证件类型进行检测,而且所述证件检测模型的训练时间短,以及所述证件检测模型的准确率更高。In this way, the document detection model is highly pertinent, and only detects the document types included in the checklist, and the training time of the document detection model is short, and the accuracy of the document detection model is higher.
S30,将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果;所述识别结果包括所有所述待检测影像件的证件类型清单,所述证件类型清单中包含自所有所述待检测影像件中识别的证件类型。S30. Input all the image pieces to be detected into the document detection model, extract document features from all the image pieces to be detected through the document detection model, and obtain a recognition result output by the document detection model according to the document characteristics The identification result includes a list of certificate types of all the image pieces to be detected, and the list of certificate types includes all the types of documents identified in the image pieces to be detected.
可理解地,将所有所述待检测影像件输入至所述证件检测模型,所述证件检测模型提取所有所述待检测影像件中的证件特征,所述证件检测模型包括训练完成的深度卷积神经网络模型,所述证件特征包括所述深度卷积神经网络模型中提取的纹理特征,根据所述证件特征,所述证件检测模型输出所述待检测影像件的识别结果,所述识别结果包括所有所述待检测影像件的证件类型清单(所有所述待检测影像件中识别的证件类型)。优选地,所述证件检测模型的识别过程如下,首先,所述证件检测模型对所有所述待检测影像件进行灰度处理,生成所有所述待检测影像件的灰度图像,通过边缘检测法提取出所有所述灰度图像中的若干证件区域图像;通过局部二值模式法将每个所述证件区域图像转换成对应的局部二值模式特征图;其次,将所述局部二值模式特征图输入至所述训练完成的深度卷积神经网络模型,通过所述深度卷积神经网络模型对所述局部二值模式特征图进行纹理特征的提取,并获取所述深度卷积神经网络模型输出的识别结果,所述识别结果表征了所述证件区域图像的证件类型;最后,将所有所述证件区域图像的证件类型写入所有所述待检测影像件的证件类型清单中。Understandably, all of the image pieces to be detected are input to the document detection model, the document detection model extracts all the document features in the image pieces to be detected, and the document detection model includes the deep convolution that has been trained A neural network model, where the document features include texture features extracted from the deep convolutional neural network model, and according to the document features, the document detection model outputs the recognition result of the image to be detected, and the recognition result includes A list of the certificate types of all the image files to be detected (the certificate types identified in all the image files to be detected). Preferably, the identification process of the document detection model is as follows. First, the document detection model performs gray-scale processing on all the image parts to be detected, generates gray-scale images of all the image parts to be detected, and adopts an edge detection method. Extract a number of document area images from all the gray-scale images; convert each of the document area images into a corresponding local binary pattern feature map through the local binary pattern method; secondly, convert the local binary pattern feature The image is input to the trained deep convolutional neural network model, the local binary pattern feature map is extracted through the deep convolutional neural network model, and the deep convolutional neural network model output is obtained The identification result of the identification result represents the identification type of the image of the identification area; finally, all identification types of the identification area image are written into the identification type list of all the images to be detected.
如此,所述证件检测模型可以同步检测多种证件类型的所述待检测影像文件,并且不同证件类型的证件图像可以混合在同一个所述待检测影像件中,从而无需要求所述待检测影像文件只存在一种证件类型,提高了检测效率,而且减少了成本。In this way, the credential detection model can simultaneously detect the image files to be detected of multiple credential types, and credential images of different credential types can be mixed in the same image to be detected, so that the image to be detected does not need to be required There is only one type of certificate for the file, which improves the detection efficiency and reduces the cost.
在一实施例中,如图4所示,所述步骤S30中,即所述将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果;所述识别结果包括所有所述待检测影像件的证件类型清单,所述证件类型清单中包含自所有所述待检测影像件中识别的证件类型,包括:In one embodiment, as shown in FIG. 4, in the step S30, all the images to be detected are input into the credential detection model, and all the images to be detected are processed by the credential detection model. Extract the document characteristics, and obtain the recognition result output by the document detection model according to the document characteristics; the recognition result includes a list of the document types of all the images to be inspected, and the list of document types includes all the documents to be inspected. The types of documents identified in the image include:
S301,获取所有所述待检测影像件,对所有所述待检测影像件进行灰度处理,生成所有所述待检测影像件的灰度图像。S301: Obtain all the image components to be detected, perform grayscale processing on all the image components to be detected, and generate grayscale images of all the image components to be detected.
可理解地,所述待检测影像件包括RGB三个通道(红色通道、绿色通道、蓝色通道)的图像,即每个所述待检测影像件中的每个像素点有三个通道的分量值,分别为R分量值(红色通道的分量值)、G分量值(绿色通道的分量值)和B分量值(蓝色通道的分量值),将所述待检测影像件中的每个像素点进行灰度处理,通过加权平均法得出每个像素点的灰度值,从而生成所述待检测影像件的灰度图像,如此,则将三个通道的所述待检测影像件变换成一个通道的灰度图像,进而只对一个通道进行处理,减少了分别对各个通道的处理。Understandably, the image to be inspected includes an image of three RGB channels (red channel, green channel, and blue channel), that is, each pixel in the image to be inspected has three channel component values. , Respectively, the R component value (red channel component value), G component value (green channel component value) and B component value (blue channel component value), and each pixel in the image to be detected Perform gray-scale processing, obtain the gray-scale value of each pixel through the weighted average method, thereby generating the gray-scale image of the image to be detected. In this way, the image to be detected in the three channels is transformed into one The grayscale image of the channel, and then only one channel is processed, reducing the processing of each channel separately.
S302,通过边缘检测法对所有所述待检测影像件的灰度图像进行识别,并提取出所述灰度图像中的若干证件区域图像。S302: Recognize the grayscale images of all the image parts to be detected by an edge detection method, and extract a number of document area images in the grayscale images.
可理解地,所述边缘检测法是为了标识出图像中的像素点的灰度值与该像素点周围的灰度值存在明显差异的像素点,由于所述待检测影像件中包含所有证件的边缘两侧的亮度是明显不同而且通过灰度处理后的所有所述证件的边缘两侧的灰度值差异更加明显,所以通过所述边缘检测法识别出所述待检测影像件的灰度图像中所述灰度值变化明显的像素点,然后通过提取所述灰度值变化明显的像素点形成的区域(也即每一个证件所在区域),并标记为所述灰度图像中的证件区域图像。Understandably, the edge detection method is to identify the pixels in the image whose gray value is significantly different from the gray value around the pixel, because the image to be detected contains all the documents. The brightness on both sides of the edge is obviously different, and the difference in gray value on both sides of the edge of all the documents after gray-scale processing is more obvious, so the gray-scale image of the image to be detected is identified through the edge detection method The pixels with obvious changes in gray value are then extracted by extracting the area formed by the pixels with obvious changes in gray value (that is, the area where each document is located), and mark it as the document area in the gray image image.
S303,通过局部二值模式法将每个所述证件区域图像转换成与每个所述证件区域图像对应的局部二值模式特征图。S303: Convert each of the document area images into a local binary pattern feature map corresponding to each of the document area images by using a local binary mode method.
可理解地,所述局部二值模式法(Local Binary Patterns,缩写为LBP)通过以每一个像素点为中心像素,该像素点对应的灰度值作为所述中心像素的阈值,将相邻区域内的像素点对应的灰度值与所述中心像素的阈值进行比较,若相邻的像素点的灰度值大于中心像素的阈值,则该像素点的位置被标记为二进制码1,否则为二进制码0,将所有相邻区域内的像素点对应的二进制码进行顺时针顺序组合成一组二进制数,所述二进制值为对应的局部二值模式特征值(LBP值)。优选地,所述相邻区域为3×3的8个像素点区域(去除中心像素),生成8位二进制数,所述局部二值模式特征值的范围为0至255的整数值。通过所述局部二值模式法得到每个所述证件区域图像中每个像素点对应的所述局部二值模式特征值,从而生成与每个所述证件区域图像对应的局部二值模式特征图,即将所有所述像素点的局部二值模式特征值按照对应像素点所在的位置进行排列,生成与每个所述证件区域图像对应的局部二值模式特征图,进而增强了每个所述证件区域图像中的纹理特征。Understandably, the Local Binary Patterns (LBP) method uses each pixel as a central pixel, and the gray value corresponding to the pixel is used as the threshold of the central pixel, and the adjacent regions are The gray value corresponding to the pixel point within is compared with the threshold value of the central pixel. If the gray value of the adjacent pixel point is greater than the threshold value of the central pixel, the position of the pixel point is marked as binary code 1, otherwise it is Binary code 0, which combines the binary codes corresponding to the pixels in all adjacent areas in a clockwise order into a set of binary numbers, and the binary value is the corresponding local binary pattern feature value (LBP value). Preferably, the adjacent area is a 3×3 area of 8 pixels (excluding the central pixel), an 8-bit binary number is generated, and the range of the feature value of the local binary mode is an integer value from 0 to 255. Obtain the local binary pattern feature value corresponding to each pixel in each of the document area images by the local binary pattern method, thereby generating a local binary pattern feature map corresponding to each of the document area images That is, the local binary pattern feature values of all the pixels are arranged according to the positions of the corresponding pixels to generate a local binary pattern feature map corresponding to each of the document area images, thereby enhancing each document Texture features in the area image.
如此,由于所述局部二值模式法具有旋转不变性和灰度不变性的优点,因而局部二值模式特征图对光照具有很强的鲁棒性。通过图像分析,不同证件图像中存在一些比较显著的纹理特征。所以通过所述局部二值模式法识别纹理特征进行证件类型检测提高了识别可靠性和准确率。In this way, since the local binary mode method has the advantages of rotation invariance and gray level invariance, the local binary mode feature map has strong robustness to illumination. Through image analysis, there are some significant texture features in different document images. Therefore, the identification of the texture feature through the local binary pattern method to detect the type of document improves the reliability and accuracy of the identification.
S304,将所述与每个所述证件区域图像对应的局部二值模式特征图输入至所述证件检测模型中的训练完成的深度卷积神经网络模型,通过所述深度卷积神经网络模型对所述局部二值模式特征图进行纹理特征的提取,并获取所述深度卷积神经网络模型根据所述纹理特征输出的识别结果,所述识别结果表征了所述证件区域图像的证件类型。S304. Input the local binary pattern feature map corresponding to each of the document area images to the trained deep convolutional neural network model in the document detection model, and pair The local binary pattern feature map extracts texture features, and obtains a recognition result output by the deep convolutional neural network model according to the texture feature, and the recognition result represents the document type of the document area image.
可理解地,将所述与每个所述证件区域图像对应的局部二值模式特征图输入所述证件检测模型中的训练完成的深度卷积神经网络模型,从而对所述局部二值模式特征图进行识别处理,即对所述局部二值模式特征图进行纹理特征的识别,可以得出根据所述纹理特征统计的识别结果,即得出所述证件区域图像的识别结果,所述识别结果同时表征了所述证件区域图像的证件类型,比如身份证证件、银行卡证件、社保卡证件等等。Understandably, the local binary pattern feature map corresponding to each of the document area images is input into the trained deep convolutional neural network model in the document detection model, so as to compare the local binary pattern features Image recognition processing, that is, the texture feature recognition of the local binary pattern feature map, the recognition result based on the texture feature statistics can be obtained, that is, the recognition result of the document area image is obtained, and the recognition result At the same time, it characterizes the document type of the image of the document area, such as ID card, bank card, social security card, and so on.
S305,将所有所述证件区域图像的证件类型写入所有所述待检测影像件的证件类型清单中。S305: Write the certificate types of all the images of the certificate area into the list of certificate types of all the images to be inspected.
可理解地,将识别出的所有所述证件区域图像的证件类型写入所述证件类型清单中,例如:识别出证件类型有身份证证件和社保卡证件,则将身份证证件和社保卡证件写入证件类型清单中。Understandably, write the document types of all the images of the document area identified in the document type list. For example, if the document types are identified as ID documents and social security card documents, then the identity documents and social security card documents Write it in the list of certificate types.
如此,实现了通过边缘检测法识别出灰度图像中所述灰度值变化明显的像素点,从而快速地提取出所有证件的区域图像,同时,基于局部二值模式法具有旋转不变性和灰度不变性的优点,通过局部二值模式法识别纹理特征进行证件类型检测提高了识别准确率和可靠性。In this way, the edge detection method is used to identify the pixels with obvious gray value changes in the grayscale image, so as to quickly extract the regional images of all documents. At the same time, the local binary mode method has rotation invariance and grayscale. With the advantage of degree invariance, the identification of texture features through the local binary pattern method for document type detection improves the accuracy and reliability of recognition.
在一实施例中,如图5所示,所述步骤S304之前,即所述将所述区域图像输入至所述证件检测模型中的训练完成的深度卷积神经网络模型,所述深度卷积神经网络模型通过提取所述区域图像的纹理特征,并根据所述纹理特征输出所述区域图像的识别结果,所述识别结果表征了所述区域图像的证件类型之前,包括:In an embodiment, as shown in FIG. 5, before the step S304, that is, the input of the region image into the trained deep convolutional neural network model in the document detection model, the deep convolution The neural network model extracts the texture feature of the regional image and outputs the recognition result of the regional image according to the texture feature. Before the recognition result characterizes the certificate type of the regional image, it includes:
S3041,获取训练图像样本;其中,每个所述训练图像样本均与一个证件类型标签关联。S3041. Obtain training image samples; where each training image sample is associated with a certificate type label.
可理解地,所述训练图像样本均与一个证件类型标签关联,而且所述训练图像样本为训练图像样本的灰度图像对应的局部二值模式特征图。Understandably, the training image samples are all associated with a certificate type label, and the training image samples are local binary pattern feature maps corresponding to the grayscale images of the training image samples.
S3042,通过迁移学习,初始神经网络模型获取YOLO模型的所有模型参数,将所述所有模型参数确定为所述初始神经网络模型的初始参数。S3042: Through transfer learning, the initial neural network model acquires all model parameters of the YOLO model, and determines all the model parameters as the initial parameters of the initial neural network model.
可理解地,所述迁移学习(Transfer Learning,TL)为利用其他领域已有的训练模型的参数应用在本领域的任务中,即所述初始神经网络模型通过迁移学习的方式获取YOLO(You Only Look Once)模型的所有模型参数,然后将所述所有模型参数确定为所述初始神经网络模型的初始参数。Understandably, the transfer learning (Transfer Learning, TL) uses the parameters of existing training models in other fields to apply to tasks in this field, that is, the initial neural network model obtains YOLO (You Only Only) through transfer learning. Look once) all the model parameters of the model, and then determine all the model parameters as the initial parameters of the initial neural network model.
S3043,将所述训练图像样本输入包含初始参数的初始神经网络模型。S3043: Input the training image sample into an initial neural network model containing initial parameters.
可理解地,所述初始神经网络模型包括所述初始参数,将所述训练图像样本输入至所述初始神经网络模型中。Understandably, the initial neural network model includes the initial parameters, and the training image samples are input into the initial neural network model.
S3044,通过所述初始神经网络模型提取所述训练图像样本中的纹理特征。S3044: Extract texture features in the training image sample through the initial neural network model.
可理解地,通过所述初始神经网络模型对所述训练图像样本进行处理,提取出所述训练图像样本中的纹理特征,所述纹理特征包括波光纹特征、花纹特征和异常斑纹特征。Understandably, the training image sample is processed by the initial neural network model, and the texture feature in the training image sample is extracted, and the texture feature includes the wave pattern feature, the pattern feature, and the abnormal spot feature.
S3045,获取所述初始神经网络模型根据所述纹理特征输出的识别结果,并根据所述识别结果和所述证件类型标签的匹配程度确定损失值。S3045: Obtain a recognition result output by the initial neural network model according to the texture feature, and determine a loss value according to the degree of matching between the recognition result and the certificate type label.
可理解地,根据所述初始神经网络模型提取出的所述纹理特征,通过所述初始神经网络模型进行所述训练图像样本的证件类型的识别,获取得到所述初始神经网络模型的识别结果,通过所述训练图像样本的识别结果与所述训练图像样本的证件类型标签进行比对,确定出与之相对应的损失值,即通过所述初始神经网络模型的损失函数计算出损失值。Understandably, according to the texture feature extracted by the initial neural network model, the identification type of the training image sample is performed through the initial neural network model to obtain the recognition result of the initial neural network model, The identification result of the training image sample is compared with the certificate type label of the training image sample to determine the corresponding loss value, that is, the loss value is calculated by the loss function of the initial neural network model.
S3046,在所述损失值达到预设的收敛条件时,将收敛之后的所述初始神经网络模型记录为训练完成的深度卷积神经网络模型。S3046: When the loss value reaches a preset convergence condition, record the initial neural network model after convergence as a trained deep convolutional neural network model.
其中,所述预设的收敛条件可以为所述损失值经过了3000次计算后值为很小且不会再下降的条件,即在所述损失值经过3000次计算后值为很小且不会再下降时,停止训练,并将收敛后的所述初始神经网络模型记录为训练完成的深度卷积神经网络模型;所述预设 的收敛条件也可以为所述损失值小于设定阈值的条件,即在所述损失值小于设定阈值时,停止训练,并将收敛后的所述初始神经网络模型记录为训练完成的深度卷积神经网络模型。Wherein, the preset convergence condition may be a condition that the value of the loss value is small and will not drop after 3000 calculations, that is, the value of the loss value is small and does not fall after 3000 calculations When it will drop again, stop training, and record the converged initial neural network model as the trained deep convolutional neural network model; the preset convergence condition can also be that the loss value is less than a set threshold The condition is that when the loss value is less than the set threshold, the training is stopped, and the converged initial neural network model is recorded as the trained deep convolutional neural network model.
如此,由于所述初始神经网络模型的输入训练图像样本为已经灰度处理后的灰度图像,无需在输入层对图像进行复杂的图像变换处理,只需对纹理特征进行识别,所以初始神经网络模型的处理速度快和容量小,因此,可以应用在便携式容量小的移动终端中。In this way, since the input training image samples of the initial neural network model are grayscale images that have been grayscale processed, there is no need to perform complex image transformation processing on the image in the input layer, and only need to recognize texture features, so the initial neural network The model has fast processing speed and small capacity, so it can be used in portable mobile terminals with small capacity.
在一实施例中,所述步骤S3045之后,包括:In an embodiment, after the step S3045, the method includes:
S3047,在所述损失值未达到预设的收敛条件时,迭代更新所述初始神经网络模型的初始参数,直至所述损失值达到所述预设的收敛条件时,将收敛之后的所述初始神经网络模型记录为训练完成的深度卷积神经网络模型。S3047: When the loss value does not reach a preset convergence condition, iteratively update the initial parameters of the initial neural network model, until the loss value reaches the preset convergence condition, converge the initial parameters after convergence. The neural network model is recorded as a deep convolutional neural network model that has been trained.
如此,在所述损失值未达到预设的收敛条件时,不断更新迭代所述初始神经网络模型的初始参数,可以不断向准确的识别结果靠拢,让识别结果的准确率越来越高。In this way, when the loss value does not reach the preset convergence condition, the initial parameters of the iterative initial neural network model are continuously updated to continuously move closer to the accurate recognition result, so that the accuracy of the recognition result becomes higher and higher.
可理解地,所述损失值不满足所述预设的收敛条件时,通过所述初始神经网络模型的损失函数进行收敛,并迭代更新所述初始神经网络模型的初始参数,一直循环步骤S3044和S3045,直到所述损失值满足所述预设的收敛条件时,停止训练,将收敛之后的所述初始神经网络模型记录为训练完成的深度卷积神经网络模型。Understandably, when the loss value does not meet the preset convergence condition, convergence is performed through the loss function of the initial neural network model, and the initial parameters of the initial neural network model are iteratively updated, and steps S3044 and S3044 are looped all the time. S3045: Stop training until the loss value meets the preset convergence condition, and record the initial neural network model after convergence as the deep convolutional neural network model that has been trained.
如此,在所述损失值未达到预设的收敛条件时,不断更新迭代所述初始神经网络模型的初始参数,可以不断向准确的识别结果靠拢,让识别结果的准确率越来越高。In this way, when the loss value does not reach the preset convergence condition, the initial parameters of the iterative initial neural network model are continuously updated to continuously move closer to the accurate recognition result, so that the accuracy of the recognition result becomes higher and higher.
在一实施例中,如图6所示,所述步骤S304之后,包括:In an embodiment, as shown in FIG. 6, after the step S304, the method includes:
S306,根据所述证件区域图像的证件类型确定所述证件区域图像中的预设信息区域。S306: Determine a preset information area in the document area image according to the document type of the document area image.
可理解地,获取所述证件区域图像,以及获取所述证件区域图像的证件类型,根据所述证件类型确定所述证件区域图像中的所述预设信息区域,其中,所述不同的所述证件类型匹配不同的所述预设信息区域,比如,身份证证件对应的预设信息区域为身份证号码位置的矩形区域,银行卡证件对应的预设信息区域为银行卡号位置的矩形区域。Understandably, the certificate area image is acquired, and the certificate type of the certificate area image is acquired, and the preset information area in the certificate area image is determined according to the certificate type, wherein the different The certificate type matches the different preset information areas. For example, the preset information area corresponding to the ID card is a rectangular area at the position of the ID card number, and the preset information area corresponding to the bank card certificate is the rectangular area at the position of the bank card number.
S307,在所述证件区域图像中截取与各所述预设信息区域对应的裁切图像。S307: Cut a cropped image corresponding to each of the preset information areas from the image of the document area.
可理解地,在所述证件区域图像中的所述预设信息区域进行截取,并将截取出的图像标记为所述对应的裁切图像。Understandably, the preset information area in the document area image is intercepted, and the intercepted image is marked as the corresponding cropped image.
S308,通过反二值化法对所述裁切图像进行变换,生成与所述证件区域图像对应的反二值化裁切图像。S308: Transform the cut image by using an inverse binarization method to generate an inverse binarized cut image corresponding to the image of the document area.
可理解地,所述反二值化法为首先对所述裁切图像进行灰度二值化处理得到二值化图像,其次通过选取适当的阈值对所述二值化图像进行分割处理,最后将分割处理后的所述二值化图像进行取反,从而得到所述反二值化裁切图像。Understandably, the inverse binarization method is to first perform gray-scale binarization processing on the cropped image to obtain a binarized image, and then perform segmentation processing on the binarized image by selecting an appropriate threshold, and finally Inverting the binarized image after the segmentation process, thereby obtaining the inverse binarized cropped image.
如此,通过反二值法可以让所述反二值化裁切图像的数字特征和字母特征更加明显,提高了识别的准确率。In this way, through the inverse binary method, the numerical features and letter characteristics of the inverse binary cropped image can be made more obvious, which improves the accuracy of recognition.
S309,将所述反二值化裁切图像输入证件号识别模型,所述证件号识别模型通过提取与所述证件区域图像对应的所述反二值化裁切图像的数字特征和字母特征,并根据所述数字特征和所述字母特征输出与所述证件区域图像对应的所述反二值化裁切图像的识别结果,所述识别结果表征了与所述证件区域图像的证件类型关联的证件信息。S309. Input the de-binarized cropped image into a credential number recognition model, and the credential number recognition model extracts digital features and letter features of the de-binarized cropped image corresponding to the credential area image. And according to the digital feature and the letter feature, output the recognition result of the de-binarized cropped image corresponding to the document area image, and the recognition result represents the document type associated with the document area image identity informaiton.
可理解地,所述证件号识别模型为经过训练并训练完成的深度神经网络模型,其中,所述证件号识别模型的训练方式和网络结构可以根据需求进行设定,优选地,所述证件号识别模型的训练方式为迁移学习训练方式,所述证件号识别模型的网络结构为VGG16网络结构。通过所述证件号识别模型对所述反二值化裁切图像的数字特征和字母特征进行提取,根据所述数字特征和所述字母特征,所述证件号识别模型识别出所述证件区域图像中的数字和字母,从而所述证件号识别模型输出所述证件区域图像的证件类型关联的证件信息。Understandably, the certificate number recognition model is a trained and trained deep neural network model, wherein the training method and network structure of the certificate number recognition model can be set according to requirements. Preferably, the certificate number The training mode of the recognition model is a migration learning training mode, and the network structure of the ID number recognition model is a VGG16 network structure. The digital feature and letter feature of the de-binarized crop image are extracted by the document number recognition model, and the document number recognition model recognizes the document area image according to the digital feature and the letter feature So that the certificate number recognition model outputs the certificate information associated with the certificate type of the certificate area image.
如此,本申请通过深度神经网络模型进行识别图像中的数字和字母,加快了识别速度 和降低了图像质量的要求,因为深度神经网络模型是通过数字特征和字母特征进行识别,所以输入模糊的图像也可以达到准确识别的效果。In this way, this application uses the deep neural network model to recognize the numbers and letters in the image, which speeds up the recognition speed and reduces the requirements for image quality. Because the deep neural network model recognizes through the number and letter features, input fuzzy images The effect of accurate identification can also be achieved.
S310,将所述证件信息与所述区域图像的证件类型关联写入所有所述待检测影像件的证件类型清单中。S310: Write the credential information and the credential type of the regional image in a credential type list of all the image files to be detected in association with each other.
在一实施例中,如图3所示,所述步骤S30之后,还包括:In an embodiment, as shown in FIG. 3, after the step S30, the method further includes:
S100,在所述核查清单与所述证件类型清单不一致时,确认所述待检测影像文件的检测失败。S100: When the check list is inconsistent with the certificate type list, confirm that the detection of the to-be-detected image file has failed.
可理解地,所述确认所述待检测影像文件的检测失败的方式可以根据需求进行设定,比如可以为弹出相应的失败窗口,所述失败窗口说明所述待检测影像文件的“XXX证件类型错误”等字样。Understandably, the method for confirming the detection failure of the image file to be detected can be set according to requirements, for example, a corresponding failure window pops up, and the failure window indicates the "XXX certificate type of the image file to be detected" "Error" and other words.
如此,通过明显的、对应的检测失败提示,可以缩小证件类型错误的范围,方便对所述待检测影像文件进行纠错。In this way, through an obvious and corresponding detection failure prompt, the scope of credential type errors can be narrowed, and error correction of the image file to be detected can be facilitated.
S40,在所述核查清单中包含的证件类型与所述证件类型清单中的证件类型完全一致时,确认所述待检测影像文件的证件类型检测合格,将所述待检测影像文件标记为已检测影像文件并存储至数据库。S40: When the certificate type included in the check list is completely consistent with the certificate type in the certificate type list, confirm that the certificate type of the image file to be inspected is qualified, and mark the image file to be inspected as inspected Image files are stored in the database.
可理解地,获取所述核查清单和所述证件类型清单,将所述核查清单中包含的证件类型与所述证件类型清单中的证件类型进行比对,在所述核查清单中包含的证件类型与所述证件类型清单中的证件类型完全一致时,确认所述待检测影像文件的证件类型检测合格,即所述待检测影像文件中包含的证件类型满足检测要求,并将所述待检测影像文件标记为已检测影像文件并存储至数据库中,记录检测结果,以便于后续用户身份验证过程中进行调取与用户对应的检测结果。Understandably, obtain the checklist and the certificate type list, compare the certificate types contained in the checklist with the certificate types in the certificate type list, and the certificate types contained in the checklist When the certificate type is completely consistent with the certificate type in the certificate type list, it is confirmed that the certificate type of the image file to be inspected is qualified, that is, the certificate type contained in the image file to be inspected meets the inspection requirements, and the image to be inspected The file is marked as a detected image file and stored in the database, and the detection result is recorded, so that the detection result corresponding to the user can be retrieved in the subsequent user authentication process.
本申请通过获取含有检测编号的待检测影像文件(包含多个待检测影像件),根据所述检测编号和编号规则,确定所述待检测影像文件的核查清单和与核查清单对应的证件检测模型,所述核查清单中包含多种证件类型,将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果,所述识别结果包括所有所述待检测影像件的证件类型清单(包含自所有所述待检测影像件中识别的证件类型),在所述核查清单中包含的证件类型与所述证件类型清单中的证件类型完全一致时,确认所述待检测影像文件的证件类型检测合格,同时标记为已检测影像文件并存储至数据库。This application obtains the image file to be inspected (including multiple image files to be inspected) containing the inspection number, and determines the check list of the image file to be inspected and the certificate detection model corresponding to the check list according to the inspection number and numbering rules , The check list contains multiple types of documents, all the image pieces to be detected are input into the document detection model, and the document features are extracted from all the image pieces to be detected through the document detection model to obtain the document detection The model outputs the recognition results based on the document features, and the recognition results include a list of document types for all the images to be inspected (including the document types identified from all the images to be inspected), in the check list When the included certificate type is completely consistent with the certificate type in the certificate type list, it is confirmed that the certificate type of the image file to be detected is qualified, and the image file to be detected is also marked as a detected image file and stored in the database.
如此,实现了根据含有多种证件类型的核查清单对应一种仅针对核查清单中包含的所有证件类型的证件检测模型,形成一种一对一的识别方式,本申请具更强的针对性,而且证件检测模型的训练时间更短,以及证件检测模型的神经网络结构简单且准确率更高,同时,本申请实现了快速同步检测多种证件类型,而且不同证件类型可以混合在一个影像件中,无需提前确认一种证件类型在一个影像件中才能进行识别,从而提高了检测效率,而且减少了成本。In this way, according to the checklist containing multiple certificate types, a certificate detection model that only targets all the certificate types included in the checklist is formed, and a one-to-one identification method is formed. This application is more targeted. Moreover, the training time of the document detection model is shorter, and the neural network structure of the document detection model is simpler and more accurate. At the same time, this application realizes rapid and synchronous detection of multiple document types, and different document types can be mixed in one image. , It is not necessary to confirm in advance that a type of document is in an image to be recognized, thereby improving the detection efficiency and reducing the cost.
在一实施例中,如图7所示,所述证件类型清单中还包含自所有所述待检测影像件中识别的与各所述证件类型关联的证件信息;In an embodiment, as shown in FIG. 7, the certificate type list further includes certificate information associated with each of the certificate types identified from all the image files to be detected;
所述步骤S40之后,即所述确认所述待检测影像文件的证件类型检测合格之后,还包括:After the step S40, that is, after confirming that the certificate type of the image file to be detected is qualified, the method further includes:
S50,获取与所述检测编号关联的待审核信息;所述待审核信息中包含与所述核查清单中包含的各所述证件类型对应的证件验证参数。S50: Obtain information to be audited associated with the detection number; the information to be audited includes certificate verification parameters corresponding to each of the certificate types included in the checklist.
可理解地,所述待审核信息为与所述检测编号关联的信息,并且包含证件类型对应的证件验证参数,比如:身份证号证件对应XXXXXXXXXXXXXXXXXX(13位证件号),银行卡证件对应XXXXXXXXXXXXXXXX(16位卡号)等等,其中,所述待审核信息中包含的证件类型与所述核查清单中包含的证件类型一致。Understandably, the information to be reviewed is the information associated with the detection number, and includes the certificate verification parameters corresponding to the certificate type, for example: ID card number corresponds to XXXXXXXXXXXXXXXXXX (13-digit certificate number), and bank card certificate corresponds to XXXXXXXXXXXXXXXX ( 16-digit card number), etc., wherein the certificate type included in the information to be reviewed is consistent with the certificate type included in the checklist.
S60,将证件类型一致的所述证件验证参数与所述证件信息进行比对,在所述证件验证参数与所述证件信息匹配时,确认与所述证件验证参数对应的所述证件类型验证成功。S60. Compare the certificate verification parameters of the same certificate type with the certificate information, and when the certificate verification parameters match the certificate information, confirm that the certificate type corresponding to the certificate verification parameters is successfully verified .
可理解地,获取同一种证件类型的所述证件验证参数和所述证件信息,将同一种证件类型的所述证件验证参数与所述证件信息进行比对,在所述证件验证参数与所述证件信息匹配时,确认与所述证件验证参数对应的所述证件类型验证成功。Understandably, the certificate verification parameters and the certificate information of the same certificate type are obtained, and the certificate verification parameters of the same certificate type are compared with the certificate information, and the certificate verification parameters are compared with the certificate information. When the credential information matches, it is confirmed that the credential type corresponding to the credential verification parameter is successfully verified.
S70,在所述待检测影像文件的所有所述证件类型均验证成功时,确认所述待检测影像文件为通过审核。S70: When all the certificate types of the image file to be detected are verified successfully, confirm that the image file to be detected has passed the review.
可理解地,在所有所述证件类型均验证成功时,即表明所述待检测影像文件中包含的所有证件类型关联的证件信息验证成功,确认所述待检测影像文件审核通过,比如在不良资产行业进行用户身份验证中,通过提供用户身份的影像件资料进行审核,在所有用户身份的影像件资料中的所有证件类型均验证成功后,确认用户身份验证通过。Understandably, when all the document types are verified successfully, it means that the document information associated with all the document types contained in the image file to be inspected is verified successfully, and it is confirmed that the image file to be inspected has passed the verification, such as in the case of bad assets. In the industry’s user identity verification, the user’s identity is verified by providing image files of the user’s identity. After all the document types in the image files of all user identities have been verified successfully, the user’s identity verification is confirmed.
如此,通过先确认所述待检测影像文件的证件类型是否检测合格,再确认所述待检测影像文件的证件类型对应的证件信息是否验证成功,最后确认所述待检测影像文件是否通过审核,减少了因所述待检测影像文件的证件类型检测失败情况下所述待检测影像文件的证件类型对应的证件信息验证的操作时间,从而提高了效率,节省了成本。In this way, by first confirming whether the certificate type of the image file to be inspected is qualified, then confirming whether the certificate information corresponding to the certificate type of the image file to be inspected is successfully verified, and finally confirming whether the image file to be inspected has passed the audit, reducing The operation time of the certificate information verification corresponding to the certificate type of the image file to be detected in the case that the certificate type of the image file to be detected fails to be detected, thereby improving efficiency and saving costs.
在一实施例中,如图8所示,所述步骤S50之后,即所述获取与所述检测编号关联的待审核信息之后,包括:In one embodiment, as shown in FIG. 8, after the step S50, that is, after the obtaining information to be audited associated with the detection number, the method includes:
S80,将证件类型一致的所述证件验证参数与所述证件信息进行比对,在所述证件验证参数与所述证件信息不匹配时,确认与所述证件验证参数对应的所述证件类型验证失败,同时确认所述待检测影像文件为不通过审核。S80. Compare the certificate verification parameters with the same certificate type with the certificate information, and when the certificate verification parameters do not match the certificate information, confirm the certificate type verification corresponding to the certificate verification parameters If it fails, it is confirmed that the image file to be detected is not approved.
可理解地,在所述证件验证参数与所述证件信息不匹配时,即所述证件验证参数与所述证件信息不相等,只要有一个所述证件验证参数与所述证件信息不相等,就确认所述待检测影像文件的审核结果为不通过,并提示不通过审核的失败提示信息,所述失败提示信息可以根据需求进行设定,比如弹出“XXXX证件信息不匹配”的提示等。Understandably, when the certificate verification parameter does not match the certificate information, that is, the certificate verification parameter is not equal to the certificate information, as long as one of the certificate verification parameters is not equal to the certificate information, then It is confirmed that the review result of the image file to be detected is not passed, and a failure prompt message of failing the review is prompted. The failure prompt information can be set according to requirements, for example, a prompt "XXXX document information does not match" pops up.
如此,通过只要有一个与所述证件验证参数对应的所述证件类型验证成功失败,就确认所述待检测影像文件审核不通过,减少了其他证件类型一致的所述证件验证参数与所述证件信息进行比对时间。In this way, as long as one of the certificate types corresponding to the certificate verification parameters fails, the verification of the image file to be detected is confirmed to be unsuccessful, which reduces the number of certificate verification parameters and the certificate that are consistent with other certificate types. The time when the information is compared.
在一实施例中,提供一种多证件类型同步检测装置,该多证件类型同步检测装置与上述实施例中多证件类型同步检测方法一一对应。如图9所示,该多证件类型同步检测装置包括接收模块11、确定模块12、识别模块13和检测模块14。各功能模块详细说明如下:In one embodiment, there is provided a multi-certificate type synchronization detection device, which corresponds to the multi-certificate type synchronization detection method in the foregoing embodiment in a one-to-one correspondence. As shown in FIG. 9, the multi-document type synchronous detection device includes a receiving module 11, a determining module 12, an identifying module 13 and a detecting module 14. The detailed description of each functional module is as follows:
接收模块11,用于接收证件检测指令,获取含有检测编号的待检测影像文件;其中,所述待检测影像文件包括待检测影像件;The receiving module 11 is configured to receive a certificate detection instruction, and obtain a to-be-detected image file containing a detection number; wherein the to-be-detected image file includes the to-be-detected image file;
确定模块12,用于获取预设的编号规则,根据所述待检测影像文件的检测编号和所述编号规则,确定所述待检测影像文件的核查清单和所述核查清单对应的证件检测模型;所述核查清单中包含多种证件类型;The determining module 12 is configured to obtain a preset numbering rule, and determine a checklist of the image file to be detected and a certificate detection model corresponding to the checklist according to the detection number of the image file to be detected and the number rule; The checklist includes multiple types of certificates;
识别模块13,用于将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果;所述识别结果包括所有所述待检测影像件的证件类型清单,所述证件类型清单中包含自所有所述待检测影像件中识别的证件类型;The recognition module 13 is configured to input all the image pieces to be detected into the document detection model, extract the document features from all the image pieces to be detected through the document detection model, and obtain the document detection model according to the document characteristics Output recognition result; the recognition result includes a list of certificate types of all the image files to be detected, and the list of certificate types includes the certificate types identified from all the image files to be detected;
检测模块14,用于在所述核查清单中包含的证件类型与所述证件类型清单中的证件类型完全一致时,确认所述待检测影像文件的证件类型检测合格,将所述待检测影像文件标记为已检测影像文件并存储至数据库。The detection module 14 is used for confirming that the certificate type of the image file to be detected is qualified when the certificate type included in the check list is exactly the same as the certificate type in the certificate type list, and the image file to be detected Mark the detected image file and store it in the database.
在一实施例中,多证件类型同步检测装置还包括:In an embodiment, the device for simultaneous detection of multiple certificate types further includes:
获取模块,用于获取与所述检测编号关联的待审核信息;所述待审核信息中包含与所述核查清单中包含的各所述证件类型对应的证件验证参数;An obtaining module, configured to obtain information to be audited associated with the detection number; the information to be audited includes certificate verification parameters corresponding to each of the certificate types included in the checklist;
比对模块,用于将证件类型一致的所述证件验证参数与所述证件信息进行比对,在所述证件验证参数与所述证件信息匹配时,确认与所述证件验证参数对应的所述证件类型验证成功;The comparison module is configured to compare the certificate verification parameters of the same certificate type with the certificate information, and when the certificate verification parameters match the certificate information, confirm the certificate verification parameters corresponding to the certificate verification parameters. The certificate type verification is successful;
确认模块,用于在所述待检测影像文件的所有所述证件类型均验证成功时,确认所述待检测影像文件为通过审核。The confirmation module is used for confirming that the image file to be inspected has passed the review when all the certificate types of the image file to be inspected are verified successfully.
在一实施例中,所述获取模块还包括:In an embodiment, the acquisition module further includes:
将证件类型一致的所述证件验证参数与所述证件信息进行比对,在所述证件验证参数与所述证件信息不匹配时,确认与所述证件验证参数对应的所述证件类型验证失败,同时确认所述待检测影像文件为不通过审核。Comparing the certificate verification parameters with the same certificate types with the certificate information, and when the certificate verification parameters do not match the certificate information, confirming that the certificate type verification corresponding to the certificate verification parameters has failed, At the same time, it is confirmed that the image file to be detected is not approved.
在一实施例中,所述识别模块13包括:In an embodiment, the identification module 13 includes:
检测失败单元,用于在所述核查清单与所述证件类型清单不一致时,确认所述待检测影像文件的检测失败。The detection failure unit is configured to confirm that the detection of the to-be-detected image file fails when the check list is inconsistent with the certificate type list.
在一实施例中,所述识别模块13还包括:In an embodiment, the identification module 13 further includes:
第一获取单元,用于获取所有所述待检测影像件,对所有所述待检测影像件进行灰度处理,生成所有所述待检测影像件的灰度图像;The first acquiring unit is configured to acquire all the image parts to be inspected, perform gray-scale processing on all the image parts to be inspected, and generate gray-scale images of all the image parts to be inspected;
第一提取单元,用于通过边缘检测法对所有所述待检测影像件的灰度图像进行识别,并提取出所述灰度图像中的若干证件区域图像;The first extraction unit is used to identify the gray-scale images of all the image parts to be detected by the edge detection method, and extract a number of document area images in the gray-scale images;
转换单元,用于通过局部二值模式法将每个所述证件区域图像转换成与每个所述证件区域图像对应的局部二值模式特征图;A conversion unit, configured to convert each of the document area images into a local binary pattern feature map corresponding to each of the document area images by using a local binary mode method;
识别单元,用于将所述与每个所述证件区域图像对应的局部二值模式特征图输入至所述证件检测模型中的训练完成的深度卷积神经网络模型,通过所述深度卷积神经网络模型对所述局部二值模式特征图进行纹理特征的提取,并获取所述深度卷积神经网络模型根据所述纹理特征输出的识别结果,所述识别结果表征了所述证件区域图像的证件类型;The recognition unit is configured to input the local binary pattern feature map corresponding to each of the document region images into the trained deep convolutional neural network model in the document detection model, and pass the deep convolutional neural network model. The network model extracts the texture feature of the local binary pattern feature map, and obtains the recognition result output by the deep convolutional neural network model according to the texture feature, and the recognition result represents the document of the document area image Types of;
检测成功单元,用于将所有所述证件区域图像的证件类型写入所有所述待检测影像件的证件类型清单中。The successful detection unit is used to write the certificate types of all the images of the certificate area into the list of certificate types of all the images to be detected.
在一实施例中,所述识别单元包括:In an embodiment, the identification unit includes:
第二获取单元,用于获取训练图像样本;其中,所述每个所述训练图像样本均与一个证件类型标签关联;The second acquiring unit is configured to acquire training image samples; wherein each of the training image samples is associated with a certificate type label;
迁移单元,用于通过迁移学习,初始神经网络模型获取YOLO模型的所有模型参数,将所述所有模型参数确定为所述初始神经网络模型的初始参数;The migration unit is used to obtain all the model parameters of the YOLO model by the initial neural network model through migration learning, and determine all the model parameters as the initial parameters of the initial neural network model;
输入单元,用于将所述训练图像样本输入包含初始参数的初始神经网络模型;An input unit for inputting the training image sample into an initial neural network model containing initial parameters;
第二提取单元,用于通过所述初始神经网络模型提取所述训练图像样本中的纹理特征;A second extraction unit, configured to extract texture features in the training image sample through the initial neural network model;
确定单元,用于获取所述初始神经网络模型根据所述纹理特征输出的识别结果,并根据所述识别结果和所述证件类型标签的匹配程度确定损失值;A determining unit, configured to obtain a recognition result output by the initial neural network model according to the texture feature, and determine a loss value according to the degree of matching between the recognition result and the certificate type label;
训练完成单元,用于在所述损失值达到预设的收敛条件时,将收敛之后的所述初始神经网络模型记录为训练完成的深度卷积神经网络模型。The training completion unit is configured to record the initial neural network model after convergence as the trained deep convolutional neural network model when the loss value reaches a preset convergence condition.
在一实施例中,所述识别单元还包括:In an embodiment, the identification unit further includes:
确定子单元,用于根据所述证件区域图像的证件类型确定所述证件区域图像中的预设信息区域;A determining subunit, configured to determine a preset information area in the image of the image of the image of the image of the image of the image of the image of the preset of the preset information area of the preset information area according to the type of the image of the image of the image of the image of the image of the image;
裁切子单元,用于在所述证件区域图像中截取与各所述预设信息区域对应的裁切图像;A cropping subunit, configured to crop a cropped image corresponding to each of the preset information areas from the image of the document area;
变换子单元,用于通过反二值化法对所述裁切图像进行变换,生成与所述证件区域图像对应的反二值化裁切图像;A transforming subunit, configured to transform the cropped image by using an inverse binarization method to generate an inverse binarized cropped image corresponding to the image of the document area;
识别子单元,用于将所述反二值化裁切图像输入证件号识别模型,所述证件号识别模型通过提取与所述证件区域图像对应的所述反二值化裁切图像的数字特征和字母特征,并根据所述数字特征和所述字母特征输出与所述证件区域图像对应的所述反二值化裁切图 像的识别结果,所述识别结果表征了与所述证件区域图像的证件类型关联的证件信息;The recognition subunit is used to input the de-binarized cropped image into a credential number recognition model, and the credential number recognition model extracts the digital features of the de-binarized cropped image corresponding to the credential area image And the letter feature, and output the recognition result of the de-binarized cropped image corresponding to the document area image according to the number feature and the letter characteristic, and the recognition result characterizes the difference with the document area image Document information associated with the document type;
将所述证件信息与所述区域图像的证件类型关联写入所有所述待检测影像件的证件类型清单中。The credential information is associated with the credential type of the regional image and written into the credential type list of all the image files to be detected.
关于多证件类型同步检测装置的具体限定可以参见上文中对于多证件类型同步检测方法的限定,在此不再赘述。上述多证件类型同步检测装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Regarding the specific limitation of the multi-certificate type synchronization detection device, please refer to the above definition of the multi-certificate type synchronization detection method, which will not be repeated here. Each module in the above-mentioned multi-certificate type synchronous detection device can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图10所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括计算机可读指令、内存储器。该计算机可读指令存储有操作系统、计算机可读指令和数据库。该内存储器为计算机可读指令中的操作系统和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种多证件类型同步检测方法。本实施例所提供的可读存储介质包括非易失性可读存储介质和易失性可读存储介质。In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 10. The computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes computer readable instructions and internal memory. The computer readable instructions are stored with an operating system, computer readable instructions and a database. The internal memory provides an environment for the operation of the operating system and the computer-readable instructions in the computer-readable instructions. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, a method for synchronous detection of multiple certificate types is realized. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现上述实施例中多证件类型同步检测方法。In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor. Synchronous detection method of certificate type.
在一个实施例中,提供了一个或多个存储有计算机可读指令的可读存储介质,本实施例所提供的可读存储介质包括非易失性可读存储介质和易失性可读存储介质;该可读存储介质上存储有计算机可读指令,该计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现上述实施例中多证件类型同步检测方法。In one embodiment, one or more readable storage media storing computer readable instructions are provided. The readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage. Medium; the readable storage medium stores computer readable instructions, and when the computer readable instructions are executed by one or more processors, the one or more processors implement the method for synchronous detection of multiple certificate types in the foregoing embodiment.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质或易失性可读存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the methods of the foregoing embodiments can be implemented by computer-readable instructions to instruct relevant hardware. The computer-readable instructions can be stored in a non-volatile computer. In a readable storage medium or a volatile readable storage medium, when the computer readable instruction is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above functional units and modules is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as needed. Module completion, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, a person of ordinary skill in the art should understand that it can still implement the foregoing The technical solutions recorded in the examples are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in Within the scope of protection of this application.

Claims (20)

  1. 一种多证件类型同步检测方法,其中,包括:A synchronous detection method for multiple certificate types, which includes:
    接收证件检测指令,获取含有检测编号的待检测影像文件;其中,所述待检测影像文件包括待检测影像件;Receiving a certificate detection instruction, and obtaining a to-be-detected image file containing a detection number; wherein the to-be-detected image file includes the to-be-detected image file;
    获取预设的编号规则,根据所述待检测影像文件的检测编号和所述编号规则,确定所述待检测影像文件的核查清单和所述核查清单对应的证件检测模型;所述核查清单中包含多种证件类型;Obtain a preset numbering rule, and determine the checklist of the image file to be detected and the certificate detection model corresponding to the checklist according to the detection number of the image file to be detected and the numbering rule; the checklist includes Multiple document types;
    将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果;所述识别结果包括所有所述待检测影像件的证件类型清单,所述证件类型清单中包含自所有所述待检测影像件中识别的证件类型;Input all the image pieces to be detected into the document detection model, extract document features from all the image pieces to be detected through the document detection model, and obtain the recognition result output by the document detection model according to the document characteristics; The recognition result includes a list of certificate types of all the images to be detected, and the list of certificate types includes the certificate types identified from all the images to be detected;
    在所述核查清单中包含的证件类型与所述证件类型清单中的证件类型完全一致时,确认所述待检测影像文件的证件类型检测合格,将所述待检测影像文件标记为已检测影像文件并存储至数据库。When the certificate type included in the check list is completely consistent with the certificate type in the certificate type list, confirm that the certificate type of the image file to be detected is qualified, and mark the image file to be detected as a detected image file And stored in the database.
  2. 如权利要求1所述的多证件类型同步检测方法,其中,所述证件类型清单中还包含自所有所述待检测影像件中识别的与各所述证件类型关联的证件信息;所述确认所述待检测影像文件的证件类型检测合格之后,还包括:The method for simultaneous detection of multiple certificate types according to claim 1, wherein the list of certificate types further includes certificate information associated with each of the certificate types identified from all the image files to be detected; After the certificate type of the image file to be tested is qualified, it also includes:
    获取与所述检测编号关联的待审核信息;所述待审核信息中包含与所述核查清单中包含的各所述证件类型对应的证件验证参数;Acquiring information to be audited associated with the detection number; the information to be audited includes certificate verification parameters corresponding to each of the certificate types included in the check list;
    将证件类型一致的所述证件验证参数与所述证件信息进行比对,在所述证件验证参数与所述证件信息匹配时,确认与所述证件验证参数对应的所述证件类型验证成功;Comparing the certificate verification parameters with the same certificate type with the certificate information, and confirming that the certificate type corresponding to the certificate verification parameter is successfully verified when the certificate verification parameters match the certificate information;
    在所述待检测影像文件的所有所述证件类型均验证成功时,确认所述待检测影像文件为通过审核。When all the certificate types of the to-be-detected image file are verified successfully, it is confirmed that the to-be-detected image file is approved.
  3. 如权利要求2所述的多证件类型同步检测方法,其中,所述获取与所述检测编号关联的待审核信息之后,包括:3. The method for simultaneous detection of multiple certificate types according to claim 2, wherein said obtaining the pending information associated with said detection number comprises:
    将证件类型一致的所述证件验证参数与所述证件信息进行比对,在所述证件验证参数与所述证件信息不匹配时,确认与所述证件验证参数对应的所述证件类型验证失败,同时确认所述待检测影像文件为不通过审核。Comparing the certificate verification parameters with the same certificate types with the certificate information, and when the certificate verification parameters do not match the certificate information, confirming that the certificate type verification corresponding to the certificate verification parameters has failed, At the same time, it is confirmed that the image file to be detected is not approved.
  4. 如权利要求1所述的多证件类型同步检测方法,其中,所述将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果之后,包括:The method for simultaneous detection of multiple document types according to claim 1, wherein said inputting all said image pieces to be detected into said document detection model, and extracting document features from all said image pieces to be detected through said document detection model , After obtaining the recognition result output by the certificate detection model according to the characteristics of the certificate, the method includes:
    在所述核查清单与所述证件类型清单不一致时,确认所述待检测影像文件的检测失败。When the check list is inconsistent with the certificate type list, it is confirmed that the detection of the to-be-detected image file has failed.
  5. 如权利要求1所述的多证件类型同步检测方法,其中,所述将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果,包括:The method for simultaneous detection of multiple document types according to claim 1, wherein said inputting all said image pieces to be detected into said document detection model, and extracting document features from all said image pieces to be detected through said document detection model , Obtaining the recognition result output by the certificate detection model according to the characteristics of the certificate, including:
    获取所有所述待检测影像件,对所有所述待检测影像件进行灰度处理,生成所有所述待检测影像件的灰度图像;Acquiring all the image parts to be detected, performing gray-scale processing on all the image parts to be detected, and generating gray-scale images of all the image parts to be detected;
    通过边缘检测法对所有所述待检测影像件的灰度图像进行识别,并提取出所述灰度图像中的若干证件区域图像;Recognizing the gray-scale images of all the image parts to be detected by an edge detection method, and extracting a number of document area images in the gray-scale images;
    通过局部二值模式法将每个所述证件区域图像转换成与每个所述证件区域图像对应的局部二值模式特征图;Converting each of the document area images into a local binary pattern feature map corresponding to each of the document area images by using a local binary mode method;
    将所述与每个所述证件区域图像对应的局部二值模式特征图输入至所述证件检测模型中的训练完成的深度卷积神经网络模型,通过所述深度卷积神经网络模型对所述局部二值模式特征图进行纹理特征的提取,并获取所述深度卷积神经网络模型根据所述纹理特征 输出的识别结果,所述识别结果表征了所述证件区域图像的证件类型;The local binary pattern feature map corresponding to each of the document area images is input to the trained deep convolutional neural network model in the document detection model, and the deep convolutional neural network model is used to compare the The local binary pattern feature map extracts texture features, and obtains the recognition result output by the deep convolutional neural network model according to the texture feature, and the recognition result represents the document type of the document area image;
    将所有所述证件区域图像的证件类型写入所有所述待检测影像件的证件类型清单中。Write the certificate types of all the images of the certificate area into the list of certificate types of all the images to be inspected.
  6. 如权利要求5所述的多证件类型同步检测方法,其中,所述将所述区域图像输入至所述证件检测模型中的训练完成的深度卷积神经网络模型,所述深度卷积神经网络模型通过提取所述区域图像的纹理特征,并根据所述纹理特征输出所述区域图像的识别结果,所述识别结果表征了所述区域图像的证件类型之前,包括:The method for simultaneous detection of multiple document types according to claim 5, wherein said inputting said regional image into said document detection model is a trained deep convolutional neural network model, said deep convolutional neural network model By extracting the texture feature of the regional image, and outputting the recognition result of the regional image according to the texture feature, before the recognition result characterizes the certificate type of the regional image, it includes:
    获取训练图像样本;其中,每个所述训练图像样本均与一个证件类型标签关联;Obtain training image samples; wherein each of the training image samples is associated with a certificate type label;
    通过迁移学习,初始神经网络模型获取YOLO模型的所有模型参数,将所述所有模型参数确定为所述初始神经网络模型的初始参数;Through transfer learning, the initial neural network model acquires all model parameters of the YOLO model, and determines all the model parameters as the initial parameters of the initial neural network model;
    将所述训练图像样本输入包含初始参数的初始神经网络模型;Input the training image sample into an initial neural network model containing initial parameters;
    通过所述初始神经网络模型提取所述训练图像样本中的纹理特征;Extracting texture features in the training image sample through the initial neural network model;
    获取所述初始神经网络模型根据所述纹理特征输出的识别结果,并根据所述识别结果和所述证件类型标签的匹配程度确定损失值;Acquiring a recognition result output by the initial neural network model according to the texture feature, and determining a loss value according to the degree of matching between the recognition result and the certificate type label;
    在所述损失值达到预设的收敛条件时,将收敛之后的所述初始神经网络模型记录为训练完成的深度卷积神经网络模型。When the loss value reaches a preset convergence condition, the initial neural network model after convergence is recorded as the trained deep convolutional neural network model.
  7. 如权利要求5所述的多证件类型同步检测方法,其中,所述将所述区域图像输入至所述证件检测模型中的训练完成的深度卷积神经网络模型,所述深度卷积神经网络模型通过提取所述区域图像的纹理特征,并根据所述纹理特征输出所述区域图像的识别结果,所述识别结果表征了所述区域图像的证件类型之后,包括:The method for simultaneous detection of multiple document types according to claim 5, wherein said inputting said regional image into said document detection model is a trained deep convolutional neural network model, said deep convolutional neural network model By extracting the texture feature of the regional image, and outputting the recognition result of the regional image according to the texture feature, after the recognition result characterizes the certificate type of the regional image, it includes:
    根据所述证件区域图像的证件类型确定所述证件区域图像中的预设信息区域;Determining the preset information area in the document area image according to the document type of the document area image;
    在所述证件区域图像中截取与各所述预设信息区域对应的裁切图像;Intercepting a cropped image corresponding to each of the preset information areas from the image of the document area;
    通过反二值化法对所述裁切图像进行变换,生成与所述证件区域图像对应的反二值化裁切图像;Transforming the cut image by using an inverse binarization method to generate an inverse binarized cut image corresponding to the image of the document area;
    将所述反二值化裁切图像输入证件号识别模型,所述证件号识别模型通过提取与所述证件区域图像对应的所述反二值化裁切图像的数字特征和字母特征,并根据所述数字特征和所述字母特征输出与所述证件区域图像对应的所述反二值化裁切图像的识别结果,所述识别结果表征了与所述证件区域图像的证件类型关联的证件信息;The de-binarized cropped image is input into a credential number recognition model, and the credential number recognition model extracts the digital and letter features of the de-binarized cropped image corresponding to the credential area image, and according to The digital feature and the letter feature output the recognition result of the inverse binarization cropped image corresponding to the document area image, and the recognition result represents the document information associated with the document type of the document area image ;
    将所述证件信息与所述区域图像的证件类型关联写入所有所述待检测影像件的证件类型清单中。The credential information is associated with the credential type of the regional image and written into the credential type list of all the image files to be detected.
  8. 一种多证件类型同步检测装置,其中,包括:A synchronous detection device for multiple certificate types, which includes:
    接收模块,用于接收证件检测指令,获取含有检测编号的待检测影像文件;其中,所述待检测影像文件包括待检测影像件;The receiving module is used to receive the certificate detection instruction and obtain the image file to be detected containing the detection number; wherein the image file to be detected includes the image file to be detected;
    确定模块,用于获取预设的编号规则,根据所述待检测影像文件的检测编号和所述编号规则,确定所述待检测影像文件的核查清单和所述核查清单对应的证件检测模型;所述核查清单中包含多种证件类型;The determining module is configured to obtain a preset numbering rule, and determine the checklist of the image file to be detected and the certificate detection model corresponding to the checklist according to the detection number of the image file to be detected and the number rule; The checklist includes multiple types of documents;
    识别模块,用于将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果;所述识别结果包括所有所述待检测影像件的证件类型清单,所述证件类型清单中包含自所有所述待检测影像件中识别的证件类型;The recognition module is used to input all the image pieces to be detected into the document detection model, extract document features from all the image pieces to be detected through the document detection model, and obtain the document detection model to output according to the document characteristics The recognition result; the recognition result includes a list of document types for all the image pieces to be detected, and the list of document types includes the type of document identified from all the image pieces to be detected;
    检测模块,用于在所述核查清单中包含的证件类型与所述证件类型清单中的证件类型完全一致时,确认所述待检测影像文件的证件类型检测合格,将所述待检测影像文件标记为已检测影像文件并存储至数据库。The detection module is used to confirm that the certificate type of the image file to be detected is qualified when the certificate type included in the check list is completely consistent with the certificate type in the certificate type list, and to mark the image file to be detected It is the detected image file and stored in the database.
  9. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其中,所述处理器执行所述计算机可读指令时实现如下步骤:A computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, wherein the processor implements the following steps when the processor executes the computer-readable instructions:
    接收证件检测指令,获取含有检测编号的待检测影像文件;其中,所述待检测影像文 件包括待检测影像件;Receiving a certificate detection instruction, and obtaining a to-be-detected image file containing a detection number; wherein the to-be-detected image file includes the to-be-detected image file;
    获取预设的编号规则,根据所述待检测影像文件的检测编号和所述编号规则,确定所述待检测影像文件的核查清单和所述核查清单对应的证件检测模型;所述核查清单中包含多种证件类型;Obtain a preset numbering rule, and determine the checklist of the image file to be detected and the certificate detection model corresponding to the checklist according to the detection number of the image file to be detected and the numbering rule; the checklist includes Multiple document types;
    将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果;所述识别结果包括所有所述待检测影像件的证件类型清单,所述证件类型清单中包含自所有所述待检测影像件中识别的证件类型;Input all the image pieces to be detected into the document detection model, extract document features from all the image pieces to be detected through the document detection model, and obtain the recognition result output by the document detection model according to the document characteristics; The recognition result includes a list of certificate types of all the images to be detected, and the list of certificate types includes the certificate types identified from all the images to be detected;
    在所述核查清单中包含的证件类型与所述证件类型清单中的证件类型完全一致时,确认所述待检测影像文件的证件类型检测合格,将所述待检测影像文件标记为已检测影像文件并存储至数据库。When the certificate type included in the check list is completely consistent with the certificate type in the certificate type list, confirm that the certificate type of the image file to be detected is qualified, and mark the image file to be detected as a detected image file And stored in the database.
  10. 如权利要求9所述的计算机设备,其中,所述证件类型清单中还包含自所有所述待检测影像件中识别的与各所述证件类型关联的证件信息;所述确认所述待检测影像文件的证件类型检测合格之后,所述处理器执行所述计算机可读指令时还实现如下步骤:9. The computer device according to claim 9, wherein the list of certificate types further includes certificate information associated with each of the certificate types identified from all the images to be detected; the confirmation of the image to be detected After the certificate type of the file is qualified, the processor further implements the following steps when executing the computer-readable instruction:
    获取与所述检测编号关联的待审核信息;所述待审核信息中包含与所述核查清单中包含的各所述证件类型对应的证件验证参数;Acquiring information to be audited associated with the detection number; the information to be audited includes certificate verification parameters corresponding to each of the certificate types included in the check list;
    将证件类型一致的所述证件验证参数与所述证件信息进行比对,在所述证件验证参数与所述证件信息匹配时,确认与所述证件验证参数对应的所述证件类型验证成功;Comparing the certificate verification parameters with the same certificate type with the certificate information, and confirming that the certificate type corresponding to the certificate verification parameter is successfully verified when the certificate verification parameters match the certificate information;
    在所述待检测影像文件的所有所述证件类型均验证成功时,确认所述待检测影像文件为通过审核。When all the certificate types of the to-be-detected image file are verified successfully, it is confirmed that the to-be-detected image file is approved.
  11. 如权利要求10所述的计算机设备,其中,所述获取与所述检测编号关联的待审核信息之后,所述处理器执行所述计算机可读指令时还实现如下步骤:10. The computer device according to claim 10, wherein after said obtaining the pending information associated with the detection number, the processor further implements the following steps when executing the computer-readable instruction:
    将证件类型一致的所述证件验证参数与所述证件信息进行比对,在所述证件验证参数与所述证件信息不匹配时,确认与所述证件验证参数对应的所述证件类型验证失败,同时确认所述待检测影像文件为不通过审核。Comparing the certificate verification parameters with the same certificate types with the certificate information, and when the certificate verification parameters do not match the certificate information, confirming that the certificate type verification corresponding to the certificate verification parameters has failed, At the same time, it is confirmed that the image file to be detected is not approved.
  12. 如权利要求9所述的计算机设备,其中,所述将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果之后,所述处理器执行所述计算机可读指令时还实现如下步骤:8. The computer device according to claim 9, wherein said inputting all said image pieces to be detected into said document detection model, and extracting document features from all said image pieces to be detected through said document detection model, to obtain said After the identification result output by the credential detection model according to the credential feature, the processor further implements the following steps when executing the computer-readable instruction:
    在所述核查清单与所述证件类型清单不一致时,确认所述待检测影像文件的检测失败。When the check list is inconsistent with the certificate type list, it is confirmed that the detection of the to-be-detected image file has failed.
  13. 如权利要求9所述的计算机设备,其中,所述将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果,包括:8. The computer device according to claim 9, wherein said inputting all said image pieces to be detected into said document detection model, and extracting document features from all said image pieces to be detected through said document detection model, to obtain said The identification result output by the document detection model based on the characteristics of the document includes:
    获取所有所述待检测影像件,对所有所述待检测影像件进行灰度处理,生成所有所述待检测影像件的灰度图像;Acquiring all the image parts to be detected, performing gray-scale processing on all the image parts to be detected, and generating gray-scale images of all the image parts to be detected;
    通过边缘检测法对所有所述待检测影像件的灰度图像进行识别,并提取出所述灰度图像中的若干证件区域图像;Recognizing the gray-scale images of all the image parts to be detected by an edge detection method, and extracting a number of document area images in the gray-scale images;
    通过局部二值模式法将每个所述证件区域图像转换成与每个所述证件区域图像对应的局部二值模式特征图;Converting each of the document area images into a local binary pattern feature map corresponding to each of the document area images by using a local binary mode method;
    将所述与每个所述证件区域图像对应的局部二值模式特征图输入至所述证件检测模型中的训练完成的深度卷积神经网络模型,通过所述深度卷积神经网络模型对所述局部二值模式特征图进行纹理特征的提取,并获取所述深度卷积神经网络模型根据所述纹理特征输出的识别结果,所述识别结果表征了所述证件区域图像的证件类型;The local binary pattern feature map corresponding to each of the document area images is input to the trained deep convolutional neural network model in the document detection model, and the deep convolutional neural network model is used to compare the The local binary pattern feature map extracts texture features, and obtains the recognition result output by the deep convolutional neural network model according to the texture feature, and the recognition result represents the document type of the document area image;
    将所有所述证件区域图像的证件类型写入所有所述待检测影像件的证件类型清单中。Write the certificate types of all the images of the certificate area into the list of certificate types of all the images to be inspected.
  14. 如权利要求9所述的计算机设备,其中,所述将所述区域图像输入至所述证件检测 模型中的训练完成的深度卷积神经网络模型,所述深度卷积神经网络模型通过提取所述区域图像的纹理特征,并根据所述纹理特征输出所述区域图像的识别结果,所述识别结果表征了所述区域图像的证件类型之前,所述处理器执行所述计算机可读指令时还实现如下步骤:The computer device according to claim 9, wherein said inputting said region image into said document detection model is a trained deep convolutional neural network model, and said deep convolutional neural network model extracts said The texture feature of the regional image, and output the recognition result of the regional image according to the texture feature. Before the recognition result characterizes the document type of the regional image, the processor executes the computer-readable instruction. The following steps:
    获取训练图像样本;其中,每个所述训练图像样本均与一个证件类型标签关联;Obtain training image samples; wherein each of the training image samples is associated with a certificate type label;
    通过迁移学习,初始神经网络模型获取YOLO模型的所有模型参数,将所述所有模型参数确定为所述初始神经网络模型的初始参数;Through transfer learning, the initial neural network model acquires all model parameters of the YOLO model, and determines all the model parameters as the initial parameters of the initial neural network model;
    将所述训练图像样本输入包含初始参数的初始神经网络模型;Input the training image sample into an initial neural network model containing initial parameters;
    通过所述初始神经网络模型提取所述训练图像样本中的纹理特征;Extracting texture features in the training image sample through the initial neural network model;
    获取所述初始神经网络模型根据所述纹理特征输出的识别结果,并根据所述识别结果和所述证件类型标签的匹配程度确定损失值;Acquiring a recognition result output by the initial neural network model according to the texture feature, and determining a loss value according to the degree of matching between the recognition result and the certificate type label;
    在所述损失值达到预设的收敛条件时,将收敛之后的所述初始神经网络模型记录为训练完成的深度卷积神经网络模型。When the loss value reaches a preset convergence condition, the initial neural network model after convergence is recorded as the trained deep convolutional neural network model.
  15. 如权利要求9所述的计算机设备,其中,所述将所述区域图像输入至所述证件检测模型中的训练完成的深度卷积神经网络模型,所述深度卷积神经网络模型通过提取所述区域图像的纹理特征,并根据所述纹理特征输出所述区域图像的识别结果,所述识别结果表征了所述区域图像的证件类型之后,所述处理器执行所述计算机可读指令时还实现如下步骤:The computer device according to claim 9, wherein said inputting said region image into said document detection model is a trained deep convolutional neural network model, and said deep convolutional neural network model extracts said The texture feature of the regional image, and output the recognition result of the regional image according to the texture feature. After the recognition result characterizes the document type of the regional image, the processor executes the computer-readable instruction. The following steps:
    根据所述证件区域图像的证件类型确定所述证件区域图像中的预设信息区域;Determining the preset information area in the document area image according to the document type of the document area image;
    在所述证件区域图像中截取与各所述预设信息区域对应的裁切图像;Intercepting a cropped image corresponding to each of the preset information areas from the image of the document area;
    通过反二值化法对所述裁切图像进行变换,生成与所述证件区域图像对应的反二值化裁切图像;Transforming the cut image by using an inverse binarization method to generate an inverse binarized cut image corresponding to the image of the document area;
    将所述反二值化裁切图像输入证件号识别模型,所述证件号识别模型通过提取与所述证件区域图像对应的所述反二值化裁切图像的数字特征和字母特征,并根据所述数字特征和所述字母特征输出与所述证件区域图像对应的所述反二值化裁切图像的识别结果,所述识别结果表征了与所述证件区域图像的证件类型关联的证件信息;The de-binarized cropped image is input into the ID number recognition model, and the ID number recognition model extracts the digital and letter features of the de-binarized cropped image corresponding to the image of the ID area, and according to The digital feature and the letter feature output the recognition result of the inverse binarization cropped image corresponding to the document area image, and the recognition result represents the document information associated with the document type of the document area image ;
    将所述证件信息与所述区域图像的证件类型关联写入所有所述待检测影像件的证件类型清单中。The credential information is associated with the credential type of the regional image and written into the credential type list of all the image files to be detected.
  16. 一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:One or more readable storage media storing computer readable instructions, where when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
    接收证件检测指令,获取含有检测编号的待检测影像文件;其中,所述待检测影像文件包括待检测影像件;Receiving a certificate detection instruction, and obtaining a to-be-detected image file containing a detection number; wherein the to-be-detected image file includes the to-be-detected image file;
    获取预设的编号规则,根据所述待检测影像文件的检测编号和所述编号规则,确定所述待检测影像文件的核查清单和所述核查清单对应的证件检测模型;所述核查清单中包含多种证件类型;Obtain a preset numbering rule, and determine the checklist of the image file to be detected and the certificate detection model corresponding to the checklist according to the detection number of the image file to be detected and the numbering rule; the checklist includes Multiple document types;
    将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果;所述识别结果包括所有所述待检测影像件的证件类型清单,所述证件类型清单中包含自所有所述待检测影像件中识别的证件类型;Input all the image pieces to be detected into the document detection model, extract document features from all the image pieces to be detected through the document detection model, and obtain the recognition result output by the document detection model according to the document characteristics; The recognition result includes a list of certificate types of all the images to be detected, and the list of certificate types includes the certificate types identified from all the images to be detected;
    在所述核查清单中包含的证件类型与所述证件类型清单中的证件类型完全一致时,确认所述待检测影像文件的证件类型检测合格,将所述待检测影像文件标记为已检测影像文件并存储至数据库。When the certificate type included in the check list is completely consistent with the certificate type in the certificate type list, confirm that the certificate type of the image file to be detected is qualified, and mark the image file to be detected as a detected image file And stored in the database.
  17. 如权利要求16所述的可读存储介质,其中,所述证件类型清单中还包含自所有所述待检测影像件中识别的与各所述证件类型关联的证件信息;所述确认所述待检测影像文件的证件类型检测合格之后,所述计算机可读指令被一个或多个处理器执行时,使得所述 一个或多个处理器还执行如下步骤:The readable storage medium according to claim 16, wherein the list of certificate types further includes certificate information associated with each of the certificate types identified from all the images to be detected; the confirmation of the pending After the certificate type of the detected image file is qualified, when the computer-readable instructions are executed by one or more processors, the one or more processors further execute the following steps:
    获取与所述检测编号关联的待审核信息;所述待审核信息中包含与所述核查清单中包含的各所述证件类型对应的证件验证参数;Acquiring information to be audited associated with the detection number; the information to be audited includes certificate verification parameters corresponding to each of the certificate types included in the check list;
    将证件类型一致的所述证件验证参数与所述证件信息进行比对,在所述证件验证参数与所述证件信息匹配时,确认与所述证件验证参数对应的所述证件类型验证成功;Comparing the certificate verification parameters with the same certificate type with the certificate information, and confirming that the certificate type corresponding to the certificate verification parameter is successfully verified when the certificate verification parameters match the certificate information;
    在所述待检测影像文件的所有所述证件类型均验证成功时,确认所述待检测影像文件为通过审核。When all the certificate types of the to-be-detected image file are verified successfully, it is confirmed that the to-be-detected image file is approved.
  18. 如权利要求17所述的可读存储介质,其中,所述获取与所述检测编号关联的待审核信息之后,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:The readable storage medium according to claim 17, wherein, after the obtaining of the pending information associated with the detection number, when the computer-readable instruction is executed by one or more processors, the one or Multiple processors also perform the following steps:
    将证件类型一致的所述证件验证参数与所述证件信息进行比对,在所述证件验证参数与所述证件信息不匹配时,确认与所述证件验证参数对应的所述证件类型验证失败,同时确认所述待检测影像文件为不通过审核。Comparing the certificate verification parameters with the same certificate types with the certificate information, and when the certificate verification parameters do not match the certificate information, confirming that the certificate type verification corresponding to the certificate verification parameters has failed, At the same time, it is confirmed that the image file to be detected is not approved.
  19. 如权利要求16所述的可读存储介质,其中,所述将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果之后,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:The readable storage medium according to claim 16, wherein said inputting all said images to be detected into said credential detection model, extracting credential features from all said images to be detected through said credential detection model, and obtaining After the identification result output by the credential detection model according to the credential features, when the computer-readable instructions are executed by one or more processors, the one or more processors further execute the following steps:
    在所述核查清单与所述证件类型清单不一致时,确认所述待检测影像文件的检测失败。When the check list is inconsistent with the certificate type list, it is confirmed that the detection of the to-be-detected image file has failed.
  20. 如权利要求16所述的可读存储介质,其中,所述将所有所述待检测影像件输入所述证件检测模型,通过所述证件检测模型对所有所述待检测影像件提取证件特征,获取所述证件检测模型根据所述证件特征输出的识别结果,包括:The readable storage medium according to claim 16, wherein said inputting all said images to be detected into said credential detection model, extracting credential features from all said images to be detected through said credential detection model, and obtaining The recognition result output by the certificate detection model according to the characteristics of the certificate includes:
    获取所有所述待检测影像件,对所有所述待检测影像件进行灰度处理,生成所有所述待检测影像件的灰度图像;Acquiring all the image parts to be detected, performing gray-scale processing on all the image parts to be detected, and generating gray-scale images of all the image parts to be detected;
    通过边缘检测法对所有所述待检测影像件的灰度图像进行识别,并提取出所述灰度图像中的若干证件区域图像;Recognizing the gray-scale images of all the image parts to be detected by an edge detection method, and extracting a number of document area images in the gray-scale images;
    通过局部二值模式法将每个所述证件区域图像转换成与每个所述证件区域图像对应的局部二值模式特征图;Converting each of the document area images into a local binary pattern feature map corresponding to each of the document area images by using a local binary mode method;
    将所述与每个所述证件区域图像对应的局部二值模式特征图输入至所述证件检测模型中的训练完成的深度卷积神经网络模型,通过所述深度卷积神经网络模型对所述局部二值模式特征图进行纹理特征的提取,并获取所述深度卷积神经网络模型根据所述纹理特征输出的识别结果,所述识别结果表征了所述证件区域图像的证件类型;The local binary pattern feature map corresponding to each of the document area images is input to the trained deep convolutional neural network model in the document detection model, and the deep convolutional neural network model is used to compare the The local binary pattern feature map extracts texture features, and obtains the recognition result output by the deep convolutional neural network model according to the texture feature, and the recognition result represents the document type of the document area image;
    将所有所述证件区域图像的证件类型写入所有所述待检测影像件的证件类型清单中。Write the certificate types of all the images of the certificate area into the list of certificate types of all the images to be inspected.
PCT/CN2020/103394 2020-01-19 2020-07-22 Synchronous check method and apparatus for multiple certificate types, and computer device and storage medium WO2021143088A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010061431.4A CN111275102A (en) 2020-01-19 2020-01-19 Multi-certificate type synchronous detection method and device, computer equipment and storage medium
CN202010061431.4 2020-01-19

Publications (1)

Publication Number Publication Date
WO2021143088A1 true WO2021143088A1 (en) 2021-07-22

Family

ID=71003364

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/103394 WO2021143088A1 (en) 2020-01-19 2020-07-22 Synchronous check method and apparatus for multiple certificate types, and computer device and storage medium

Country Status (2)

Country Link
CN (1) CN111275102A (en)
WO (1) WO2021143088A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116402070A (en) * 2023-05-31 2023-07-07 中电长城(长沙)信息技术有限公司 SP service realization method and system for multiple certificates
CN117391068A (en) * 2023-10-27 2024-01-12 中国人寿保险股份有限公司山东省分公司 Method and system for checking life insurance security business information based on RPA

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111275102A (en) * 2020-01-19 2020-06-12 深圳壹账通智能科技有限公司 Multi-certificate type synchronous detection method and device, computer equipment and storage medium
CN112418278A (en) * 2020-11-05 2021-02-26 中保车服科技服务股份有限公司 Multi-class object detection method, terminal device and storage medium
CN113657398B (en) * 2021-08-18 2023-02-07 北京百度网讯科技有限公司 Image recognition method and device
CN113743327A (en) * 2021-09-07 2021-12-03 中国工商银行股份有限公司 Document identification method, document checking method, device and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008942A (en) * 2019-01-15 2019-07-12 阿里巴巴集团控股有限公司 Certificate verification method, device, server and storage medium
US20190253254A1 (en) * 2018-02-06 2019-08-15 NB Research LLC System and method for securing a resource
CN110569769A (en) * 2019-08-29 2019-12-13 浙江大搜车软件技术有限公司 image recognition method and device, computer equipment and storage medium
CN111275102A (en) * 2020-01-19 2020-06-12 深圳壹账通智能科技有限公司 Multi-certificate type synchronous detection method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190253254A1 (en) * 2018-02-06 2019-08-15 NB Research LLC System and method for securing a resource
CN110008942A (en) * 2019-01-15 2019-07-12 阿里巴巴集团控股有限公司 Certificate verification method, device, server and storage medium
CN110569769A (en) * 2019-08-29 2019-12-13 浙江大搜车软件技术有限公司 image recognition method and device, computer equipment and storage medium
CN111275102A (en) * 2020-01-19 2020-06-12 深圳壹账通智能科技有限公司 Multi-certificate type synchronous detection method and device, computer equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116402070A (en) * 2023-05-31 2023-07-07 中电长城(长沙)信息技术有限公司 SP service realization method and system for multiple certificates
CN116402070B (en) * 2023-05-31 2023-08-08 中电长城(长沙)信息技术有限公司 SP service realization method and system for multiple certificates
CN117391068A (en) * 2023-10-27 2024-01-12 中国人寿保险股份有限公司山东省分公司 Method and system for checking life insurance security business information based on RPA
CN117391068B (en) * 2023-10-27 2024-04-05 中国人寿保险股份有限公司山东省分公司 Method and system for checking life insurance security business information based on RPA

Also Published As

Publication number Publication date
CN111275102A (en) 2020-06-12

Similar Documents

Publication Publication Date Title
WO2021143088A1 (en) Synchronous check method and apparatus for multiple certificate types, and computer device and storage medium
US20200293772A1 (en) Storing anonymized identifiers instead of personally identifiable information
CN110287971B (en) Data verification method, device, computer equipment and storage medium
US10410309B2 (en) Classification and authentication of identification documents using a convolutional neural network
WO2021027336A1 (en) Authentication method and apparatus based on seal and signature, and computer device
CN110569341B (en) Method and device for configuring chat robot, computer equipment and storage medium
US20170177852A1 (en) Document authentication based on expected wear
CN108256591B (en) Method and apparatus for outputting information
CN110362799B (en) On-line arbitration-based method and device for generating and processing resolution book and computer equipment
CN111191568A (en) Method, device, equipment and medium for identifying copied image
CN108053545B (en) Certificate verification method and device, server and storage medium
CN111666932B (en) Document auditing method, device, computer equipment and storage medium
US20180033020A1 (en) System and apparatus for detecting forgery features on identification documents
CN110503099B (en) Information identification method based on deep learning and related equipment
CN112232336A (en) Certificate identification method, device, equipment and storage medium
CN113111880A (en) Certificate image correction method and device, electronic equipment and storage medium
CN110889341A (en) Form image recognition method and device based on AI (Artificial Intelligence), computer equipment and storage medium
CN113704111A (en) Page automatic testing method, device, equipment and storage medium
CN112396047B (en) Training sample generation method and device, computer equipment and storage medium
CN112686255A (en) Seal identification method, device, equipment and storage medium based on Hough transform
CN112363929B (en) System online method and device, computer equipment and storage medium
WO2023173546A1 (en) Method and apparatus for training text recognition model, and computer device and storage medium
CN113496115B (en) File content comparison method and device
CN110751140A (en) Character batch recognition method and device and computer equipment
CN113610090A (en) Seal image identification and classification method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20914315

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 14.11.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20914315

Country of ref document: EP

Kind code of ref document: A1