WO2021189856A1 - 证件校验方法、装置、电子设备及介质 - Google Patents

证件校验方法、装置、电子设备及介质 Download PDF

Info

Publication number
WO2021189856A1
WO2021189856A1 PCT/CN2020/125465 CN2020125465W WO2021189856A1 WO 2021189856 A1 WO2021189856 A1 WO 2021189856A1 CN 2020125465 W CN2020125465 W CN 2020125465W WO 2021189856 A1 WO2021189856 A1 WO 2021189856A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
holographic
image set
document
value
Prior art date
Application number
PCT/CN2020/125465
Other languages
English (en)
French (fr)
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 WO2021189856A1 publication Critical patent/WO2021189856A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Definitions

  • This application relates to the field of artificial intelligence, and in particular to a certificate verification method, device, electronic equipment, and computer-readable storage medium.
  • the document verification method is to recognize a single document image through traditional image processing or machine learning methods.
  • the inventor realizes that due to the influence of light and other environments, this method will cause multiple verifications to be repeated. And the problem of inaccurate verification results.
  • a certificate verification method provided by this application includes:
  • the verification value is greater than or equal to the preset verification threshold, it is determined that the verification document to be verified is a real document.
  • a certificate verification device comprising:
  • An image collection acquisition module configured to acquire an image collection of the proof to be proofread, the image collection including a plurality of images of the proof to be proofread in different angles;
  • An edge detection module configured to perform edge detection processing on the image set to obtain an edge certificate image set
  • the holographic document image acquisition module is used for extracting the holographic verification area of each image in the edge document image set, and synthesizing the extracted multiple holographic verification areas to obtain a holographic document image;
  • the model training module is used to input the holographic certificate image to the trained 3D convolutional network model to identify the change degree value of the holographic certificate image;
  • a check value calculation module configured to calculate the check value of the verification document to be verified according to the change degree value of the holographic document image and a preset verification algorithm
  • the determining module is configured to determine that the verification document to be verified is a real document if the verification value is greater than or equal to a preset verification threshold.
  • An electronic device which includes:
  • At least one processor and,
  • a memory communicatively connected with the at least one processor; wherein,
  • the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the following steps:
  • the verification value is greater than or equal to the preset verification threshold, it is determined that the verification document to be verified is a real document.
  • a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the following steps are implemented:
  • the verification value is greater than or equal to the preset verification threshold, it is determined that the verification document to be verified is a real document.
  • FIG. 1 is a schematic flowchart of a certificate verification method provided by an embodiment of this application
  • FIG. 2 is a schematic diagram of modules of a credential verification device provided by an embodiment of the application.
  • FIG. 3 is a schematic diagram of the internal structure of an electronic device for implementing a certificate verification method provided by an embodiment of the application;
  • the execution subject of the certificate verification method provided in the embodiment of the present application includes but is not limited to at least one of the electronic devices that can be configured to execute the method provided in the embodiment of the present application, such as a server and a terminal.
  • the certificate verification method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform.
  • the server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
  • the certificate verification method includes:
  • the image set of the proof to be verified includes multiple images of the proof to be verified at different angles, for example, images collected through multiple different angles such as the front, the upward tilt angle, and the downward tilt angle.
  • the documents to be verified for school include, but are not limited to, second-generation resident ID cards, yearly travel between Hong Kong, Macao and Taiwan, Hong Kong ID cards, campus cards, medical insurance cards, etc.
  • the image collection is a collection of images collected by a mobile electronic device, such as a smart phone.
  • performing edge detection processing on the image set specifically refers to performing edge detection processing on each image in the image set, and determining that the multiple images after the edge detection processing are edge document image sets.
  • the performing edge detection processing on the image set to obtain an edge certificate image set includes:
  • the edge selection process is performed on the thinned image set by using a double threshold method to obtain an edge document image set.
  • performing smoothing filtering processing on the image set specifically refers to performing smoothing filtering processing on each image in the image set, determining that the smoothed filtering processed image is a filtered image, and collecting multiple filtered images into a filtered image set.
  • performing edge thinning processing on the filtered image set specifically refers to performing edge thinning processing on each filtered image in the filtered image set, determining that each image after the edge thinning processing is a thinned image, and combining multiple The refined images are collected into a refined image set; the edge selection processing of the refined image set using the dual threshold method is specifically to perform edge selection processing on each refined image in the refined image set, and determine the edge selection process after the edge selection process.
  • Each image is an edge document image, and multiple edge document images are collected into an edge document image set.
  • the performing smoothing filtering processing on the image set to obtain a filtered image set includes:
  • a Gaussian filter is used to smoothly filter the training certificate image set to obtain a filtered image set G(x, y).
  • f(x,y) is the image set
  • G(x,y) is the filtered image set
  • H(x,y) is the Gaussian filter
  • exp is the filter processing operation
  • represents the value It is a constant system parameter.
  • the performing edge refinement processing on the filtered image set to obtain a refined image set includes performing the following processing on each filtered image in the filtered image set:
  • the target pixel is set to 0, and the non-target pixel is kept unchanged;
  • the target pixel remains unchanged, and the non-target pixel is set to 0;
  • the filtered image after the pixel value adjustment is a refined image.
  • the preset Sobel operator is divided into X direction (that is, horizontal) and Y direction (that is, longitudinal), and the Sobel operator in X direction is The Sobel operator in the Y direction is
  • the gray value of the image in the first direction is:
  • the gray value of the second direction image is:
  • I is the filtered image set.
  • the calculating the gradient amplitude and the gradient direction of the filtered image according to the gray value of the image in the first direction and the gray value of the image in the second direction includes:
  • G represents the gradient magnitude of the filtered image
  • represents the gradient direction of the filtered image
  • G x is the gray value of the image in the first direction
  • G y is the gray value of the image in the second direction.
  • edge selection processing is performed on the thinned image set using a dual threshold method to obtain the edge credential image set, including:
  • the first pixel point set and the second pixel point set in each refined image are connected to obtain an edge document image set.
  • the high pixel threshold condition refers to greater than a preset high threshold TH
  • the low pixel threshold condition refers to less than a preset low threshold TL.
  • more meaningful and characteristic pixels can be selected through high pixel threshold conditions and low pixel threshold conditions. Further, by synthesizing these pixels, an edge with rich details and a more compact volume can be obtained. Set of credential images.
  • each image in the edge document image collection is respectively mapped to a two-dimensional coordinate axis, and the holographic verification area of each image is respectively mapped to a two-dimensional coordinate axis, and then 3D synthesis is performed according to the image obtained by the mapping. Obtain a holographic document image.
  • the method further includes obtaining the trained 3D convolutional network model, and the obtaining the trained 3D convolutional network model includes:
  • each training value identifies the degree of change of the holographic image in the training holographic image set
  • the parameters of the pre-built 3D convolutional network model are continuously adjusted until the loss value is less than the preset threshold, and the training is determined to be completed and the trained 3D convolutional network model is obtained.
  • the label value is the degree of change of the holographic image in the holographic image set.
  • the preset holographic image set corresponds to six label values, which respectively represent the degree of change of the holographic image.
  • the images in the holographic image set are mapped to a preset codebook to form a holographic image vector set, where the codebook is a list for converting images into image vectors.
  • the using the convolution layer in the pre-built 3D convolutional network model to perform a convolution operation on the holographic image vector set to obtain a convolutional image vector set includes: performing a convolution operation on the holographic image vector set The dimensionality is reduced, and the convolutional picture vector set is obtained.
  • the preferred implementation of this application uses the following formula to perform convolution operation on the holographic image vector set:
  • ⁇ ' represents a set of convolutional picture vectors
  • represents a set of holographic image vectors
  • k represents the size of the convolution kernel of the pre-built 3D convolutional network model
  • f represents the volume of the pre-built 3D convolutional network model.
  • Product stride, p represents the zero-filling matrix of the holographic image vector set.
  • the activation function in the pre-built 3D convolutional network model is used to calculate the training value of the feature picture vector set, and the activation function includes:
  • y′ i represents the training value of the i-th feature picture vector in the feature picture vector set
  • s represents the feature picture vector in the feature picture vector set
  • the loss function value of the training value is calculated by using the loss function in the pre-built 3D convolutional network model, and the loss function includes:
  • L(s) represents the value of the loss function
  • si represents the difference between the training value and the corresponding label value
  • k represents the number of feature image vector sets
  • y i represents the i-th corresponding label value
  • y′ i represents the i-th Training value.
  • the parameters of the pre-built 3D convolutional network model include: weight and bias.
  • the holographic document image is input to a pre-built 3D convolutional network model for multi-class training, and multiple training values are obtained.
  • the obtained training values are: x 0 , x 1 , x 2 , X 3 , x 4 and x 5 .
  • the method further includes:
  • the number of the several images can be arbitrary.
  • Performing color conversion processing on the plurality of images includes:
  • Brightness expansion processing, contrast expansion processing, and sharpness expansion processing are performed on the plurality of images.
  • the r, g, and b of several images are calculated according to the brightness expansion formula, and the brightness expansion formula is:
  • r is the red value of the several images
  • g is the green value of the several images
  • b is the blue value of the several images
  • bg 1.
  • the r1, g1, and b1 of the image after brightness expansion are calculated according to the contrast expansion formula, and the contrast expansion formula is:
  • r2 is the red value of the image after contrast expansion
  • g2 is the green value of the image after contrast expansion
  • b2 is the blue value of the image after contrast expansion
  • a mean(r1g1b1)+0.5
  • mean is the average value
  • bg is [0,1] random number.
  • the r2, g2, and b2 of the image after the sharpness expansion are calculated according to the sharpness expansion formula, and the sharpness expansion formula is:
  • r3 is the red value of the sharpness-expanded image
  • g3 is the green value of the sharpness-expanded image
  • b3 is the blue value of the sharpness-expanded image
  • bg is the sharpness-expanded image
  • the r, g, and b of the image respectively refer to the red value, the green value, and the blue value in the image.
  • the difference of r, g, and b in the image will affect the color presented by the image.
  • the preset check algorithm may be weight calculation.
  • the preset verification algorithm may be:
  • F is the check value
  • x 0 , x 1 , x 2 , x 3 , x 4 and x 5 are the value of the degree of change of the holographic document image.
  • the verification value is greater than or equal to the preset verification threshold, it is determined that the verification document to be verified is a real document.
  • the judgment is made according to the verification value of the verification document to be verified, and if the verification value is greater than or equal to a preset verification threshold, it is determined that the verification document to be verified is a real certificate.
  • the edge detection process is performed on the image set, the holographic verification area of each image in the edge document image set is extracted, and the holographic verification area is synthesized Processing to obtain a holographic credential image, use the trained 3D convolutional network model and a preset verification algorithm to process the holographic credential image to obtain a verification value, and compare the verification value with a preset verification threshold, Determine the authenticity of the verification document to be verified.
  • a multi-dimensional holographic document image is obtained through synthesis, and the real document is restored more accurately.
  • the document verification method proposed in this application can improve the accuracy of the document verification method.
  • FIG. 2 it is a schematic diagram of the module of the credential verification device of this application.
  • the credential verification device 100 described in this application can be installed in an electronic device.
  • the credential verification device 100 may include an image collection acquisition module 101, an edge detection module 102, a holographic credential image acquisition module 103, a model training module 104, a verification value calculation module 105, and a determination module 106.
  • the module described in this application can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.
  • each module/unit is as follows:
  • the image collection acquiring module 101 is configured to acquire an image collection of the proof to be verified, the image collection including a plurality of images of the proof to be proofed in different angles;
  • the edge detection module 102 is configured to perform edge detection processing on the image set to obtain an edge certificate image set;
  • the holographic credential image acquisition module 103 is used to extract the holographic verification area of each image in the edge credential image set, and perform synthesis processing on the extracted multiple holographic verification areas to obtain a holographic credential image;
  • the model training module 104 is configured to input the holographic credential image into the trained 3D convolutional network model to identify the change degree value of the holographic credential image;
  • the verification value calculation module 105 is configured to calculate the verification value of the verification document to be verified according to the change degree value of the holographic document image and a preset verification algorithm;
  • the determining module 106 is configured to determine that the verification document to be verified is a real document if the verification value is greater than or equal to a preset verification threshold.
  • each module of the credential verification device 100 is as follows:
  • the image collection acquiring module 101 is configured to acquire an image collection of the proof to be verified, and the image set includes a plurality of images of the proof to be proofed in different angles.
  • the image set of the proof to be verified includes multiple images of the proof to be verified at different angles, for example, images collected through multiple different angles such as the front, the upward tilt angle, and the downward tilt angle.
  • the documents to be verified for school include, but are not limited to, second-generation resident ID cards, yearly travel between Hong Kong, Macao and Taiwan, Hong Kong ID cards, campus cards, medical insurance cards, etc.
  • the image collection is a collection of images collected by a mobile electronic device, such as a smart phone.
  • the edge detection module 102 is configured to perform edge detection processing on the image set to obtain an edge document image set.
  • performing edge detection processing on the image set specifically refers to performing edge detection processing on each image in the image set, and determining that the multiple images after the edge detection processing are edge document image sets.
  • the edge detection module 102 is specifically configured to:
  • the edge selection process is performed on the thinned image set by using a double threshold method to obtain an edge document image set.
  • performing smoothing filtering processing on the image set specifically refers to performing smoothing filtering processing on each image in the image set, determining that the smoothed filtering processed image is a filtered image, and collecting multiple filtered images into a filtered image set.
  • performing edge thinning processing on the filtered image set specifically refers to performing edge thinning processing on each filtered image in the filtered image set, determining that each image after the edge thinning processing is a thinned image, and combining multiple The refined images are collected into a refined image set; the edge selection processing of the refined image set using the dual threshold method is specifically to perform edge selection processing on each refined image in the refined image set, and determine the edge selection process after the edge selection process.
  • Each image is an edge document image, and multiple edge document images are collected into an edge document image set.
  • the performing smoothing filtering processing on the image set to obtain a filtered image set includes:
  • a Gaussian filter is used to smoothly filter the training certificate image set to obtain a filtered image set G(x, y).
  • f(x,y) is the image set
  • G(x,y) is the filtered image set
  • H(x,y) is the Gaussian filter
  • exp is the filter processing operation
  • represents the value It is a constant system parameter.
  • the performing edge refinement processing on the filtered image set to obtain a refined image set includes performing the following processing on each filtered image in the filtered image set:
  • the target pixel is set to 0, and the non-target pixel is kept unchanged;
  • the target pixel remains unchanged, and the non-target pixel is set to 0;
  • the filtered image after the pixel value adjustment is a refined image.
  • the preset Sobel operator is divided into X direction (that is, horizontal) and Y direction (that is, longitudinal), and the Sobel operator in X direction is The Sobel operator in the Y direction is
  • the gray value of the image in the first direction is:
  • the gray value of the second direction image is:
  • I is the filtered image set.
  • the calculating the gradient amplitude and the gradient direction of the filtered image according to the gray value of the image in the first direction and the gray value of the image in the second direction includes:
  • G represents the gradient magnitude of the filtered image
  • represents the gradient direction of the filtered image
  • G x is the gray value of the image in the first direction
  • G y is the gray value of the image in the second direction.
  • edge selection processing is performed on the thinned image set using a dual threshold method to obtain the edge credential image set, including:
  • the first pixel point set and the second pixel point set in each refined image are connected to obtain an edge document image set.
  • the high pixel threshold condition refers to greater than a preset high threshold TH
  • the low pixel threshold condition refers to less than a preset low threshold TL.
  • more meaningful and characteristic pixels can be selected through high pixel threshold conditions and low pixel threshold conditions. Further, by synthesizing these pixels, an edge with rich details and a more compact volume can be obtained. Set of credential images.
  • the holographic credential image module 103 is used to extract the holographic verification area of each image in the edge credential image set, and perform synthesis processing on the extracted multiple holographic verification areas to obtain a holographic credential image.
  • each image in the edge document image collection is respectively mapped to a two-dimensional coordinate axis, and the holographic verification area of each image is respectively mapped to a two-dimensional coordinate axis, and then 3D synthesis is performed according to the image obtained by the mapping. Obtain a holographic document image.
  • the model training module 104 is configured to input the holographic document image into the trained 3D convolutional network model to identify the change degree value of the holographic document image.
  • the device further includes a model acquisition module for acquiring the trained 3D convolutional network model, and the model acquisition module is specifically used for:
  • each training value identifies the degree of change of the holographic image in the training holographic image set
  • the parameters of the pre-built 3D convolutional network model are continuously adjusted until the loss value is less than the preset threshold, and the training is determined to be completed and the trained 3D convolutional network model is obtained.
  • the label value is the degree of change of the holographic image in the holographic image set.
  • the preset holographic image set corresponds to six label values, which respectively represent the degree of change of the holographic image.
  • the images in the holographic image set are mapped to a preset codebook to form a holographic image vector set, where the codebook is a list for converting images into image vectors.
  • the using the convolution layer in the pre-built 3D convolutional network model to perform a convolution operation on the holographic image vector set to obtain a convolutional image vector set includes: performing a convolution operation on the holographic image vector set The dimensionality is reduced, and the convolutional picture vector set is obtained.
  • the preferred implementation of this application uses the following formula to perform convolution operation on the holographic image vector set:
  • ⁇ ' represents a set of convolutional picture vectors
  • represents a set of holographic image vectors
  • k represents the size of the convolution kernel of the pre-built 3D convolutional network model
  • f represents the volume of the pre-built 3D convolutional network model.
  • Product stride, p represents the zero-filling matrix of the holographic image vector set.
  • the activation function in the pre-built 3D convolutional network model is used to calculate the training value of the feature picture vector set, and the activation function includes:
  • y′ i represents the training value of the i-th feature picture vector in the feature picture vector set
  • s represents the feature picture vector in the feature picture vector set
  • the loss function value of the training value is calculated by using the loss function in the pre-built 3D convolutional network model, and the loss function includes:
  • L(s) represents the loss function value
  • s i represents the difference between the training value and the corresponding label value
  • k represents the number of feature image vector sets
  • y i represents the i-th corresponding label value
  • y′ i represents the i-th Training value.
  • the parameters of the pre-built 3D convolutional network model include: weight and bias.
  • the holographic document image is input to a pre-built 3D convolutional network model for multi-class training, and multiple training values are obtained.
  • the obtained training values are: x 0 , x 1 , x 2 , X 3 , x 4 and x 5 .
  • the device further includes an adding module, and the adding module is used for
  • the number of the several images can be arbitrary.
  • Performing color conversion processing on the plurality of images includes:
  • Brightness expansion processing, contrast expansion processing, and sharpness expansion processing are performed on the plurality of images.
  • the r, g, and b of several images are calculated according to the brightness expansion formula, and the brightness expansion formula is:
  • r is the red value of the several images
  • g is the green value of the several images
  • b is the blue value of the several images
  • bg 1.
  • the r1, g1, and b1 of the image after brightness expansion are calculated according to the contrast expansion formula, and the contrast expansion formula is:
  • r2 is the red value of the image after contrast expansion
  • g2 is the green value of the image after contrast expansion
  • b2 is the blue value of the image after contrast expansion
  • a mean(r1g1b1)+0.5
  • mean is the average value
  • bg is [0,1] random number.
  • the r2, g2, and b2 of the image after the sharpness expansion are calculated according to the sharpness expansion formula, and the sharpness expansion formula is:
  • r3 is the red value of the sharpness-expanded image
  • g3 is the green value of the sharpness-expanded image
  • b3 is the blue value of the sharpness-expanded image
  • bg is the sharpness-expanded image
  • the r, g, and b of the image respectively refer to the red value, the green value, and the blue value in the image.
  • the difference of r, g, and b in the image will affect the color presented by the image.
  • the verification value calculation module 105 is configured to calculate the verification value of the verification document to be verified according to the change degree value of the holographic document image and a preset verification algorithm.
  • the preset check algorithm may be weight calculation.
  • the preset verification algorithm may be:
  • F is the check value
  • x 0 , x 1 , x 2 , x 3 , x 4 and x 5 are the value of the degree of change of the holographic document image.
  • the certificate judgment module 106 is configured to determine that the verification document to be verified is a real document if the verification value is greater than or equal to a preset verification threshold.
  • the judgment is made according to the verification value of the verification document to be verified, and if the verification value is greater than or equal to a preset verification threshold, it is determined that the verification document to be verified is a real certificate.
  • the edge detection process is performed on the image set, the holographic verification area of each image in the edge document image set is extracted, and the holographic verification area is synthesized Processing to obtain a holographic credential image, use the trained 3D convolutional network model and a preset verification algorithm to process the holographic credential image to obtain a verification value, and compare the verification value with a preset verification threshold, Determine the authenticity of the verification document to be verified.
  • a multi-dimensional holographic document image is obtained through synthesis, and the real document is restored more accurately.
  • the credential verification device proposed in this application can improve the accuracy of the credential verification method.
  • FIG. 3 it is a schematic diagram of the structure of the electronic device implementing the certificate verification method of the present application.
  • the electronic device 1 may include a processor 10, a memory 11, and a bus, and may also include a computer program stored in the memory 11 and running on the processor 10, such as a certificate verification program 12.
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc.
  • the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, for example, a mobile hard disk of the electronic device 1.
  • the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart media card (SMC), and a secure digital (Secure Digital) equipped on the electronic device 1. , SD) card, flash card (Flash Card), etc.
  • the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
  • the memory 11 can be used not only to store application software and various data installed in the electronic device 1, such as the code of the credential verification program 12, etc., but also to temporarily store data that has been output or will be output.
  • the processor 10 may be composed of integrated circuits in some embodiments, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same function or different functions, including one or more Combinations of central processing unit (CPU), microprocessor, digital processing chip, graphics processor, and various control chips, etc.
  • the processor 10 is the control unit of the electronic device, which uses various interfaces and lines to connect the various components of the entire electronic device, and runs or executes programs or modules stored in the memory 11 (such as executing Certificate verification program, etc.), and call the data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
  • the bus may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
  • PCI peripheral component interconnect standard
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus and so on.
  • the bus is configured to implement connection and communication between the memory 11 and at least one processor 10 and the like.
  • FIG. 3 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 3 does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure. Components, or a combination of certain components, or different component arrangements.
  • the electronic device 1 may also include a power source (such as a battery) for supplying power to various components.
  • the power source may be logically connected to the at least one processor 10 through a power management device, thereby controlling power
  • the device implements functions such as charge management, discharge management, and power consumption management.
  • the power supply may also include any components such as one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators.
  • the electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
  • the electronic device 1 may also include a network interface.
  • the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • the electronic device 1 may also include a user interface.
  • the user interface may be a display (Display) and an input unit (such as a keyboard (Keyboard)).
  • the user interface may also be a standard wired interface or a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc.
  • the display can also be appropriately called a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visualized user interface.
  • the credential verification program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can realize:
  • the verification value is greater than or equal to the preset verification threshold, it is determined that the verification document to be verified is a real document.
  • the integrated module/unit of the electronic device 1 can be stored in a computer readable storage medium. It can be non-volatile or volatile.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) .
  • the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function, etc.; the storage data area may store a block chain node Use the created data, etc.
  • modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional modules.

Landscapes

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

Abstract

一种证件校验方法,涉及人工智能技术,包括:获取待校验证件的图像集,所述图像集包括多张不同角度的所述待校验证件的图像(S1);对所述图像集进行边缘检测处理,得到边缘证件图像集(S2);提取所述边缘证件图像集中各图像的全息校验区域,将提取到的多个全息校验区域进行合成处理,得到全息证件图像(S3);将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值(S4);根据所述全息证件图像的变化程度值和预置校验算法计算所述待校验证件的校验值(S5);若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件(S6)。还揭露一种证件校验装置、电子设备及存储介质。可以提高证件校验的准确性。

Description

证件校验方法、装置、电子设备及介质
本申请要求于2020年9月24日提交中国专利局、申请号为202011018247.8,发明名称为“证件校验方法、装置、电子设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能领域,尤其涉及一种证件校验方法、装置、电子设备及计算机可读存储介质。
背景技术
随着信息技术的发展,网上业务越来越多(例如,水电业务网上办理业务、银行业务网上办理业务),在网上业务办理时,通常需要进行用户身份的校验,在进行身份校验时,通常需要对用户的证件进行校验,进而再根据证件的内容确定用户的身份。
现有技术中,证件校验方式是通过传统的图像处理或者机器学习等方法对单张证件图像进行识别,发明人意识到由于受光线等环境的影响这种方法会引起需要多次重复校验以及校验结果不准确的问题。
发明内容
本申请提供的一种证件校验方法,包括:
获取待校验证件的图像集,所述图像集包括多张不同角度的所述待校验证件的图像;
对所述图像集进行边缘检测处理,得到边缘证件图像集;
提取所述边缘证件图像集中各图像的全息校验区域,将提取到的多个全息校验区域进行合成处理,得到全息证件图像;
将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值;
根据所述全息证件图像的变化程度值和预置校验算法计算所述待校验证件的校验值;
若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件。
一种证件校验装置,所述装置包括:
图像集获取模块,用于获取待校验证件的图像集,所述图像集包括多张不同角度的所述待校验证件的图像;
边缘检测模块,用于对所述图像集进行边缘检测处理,得到边缘证件图像集;
全息证件图像获取模块,用于提取所述边缘证件图像集中各图像的全息校验区域,将提取到的多个全息校验区域进行合成处理,得到全息证件图像;
模型训练模块,用于将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值;
校验值计算模块,用于根据所述全息证件图像的变化程度值和预置校验算法计算所述待校验证件的校验值;
确定模块,用于若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件。
一种电子设备,所述电子设备包括:
至少一个处理器;以及,
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:
获取待校验证件的图像集,所述图像集包括多张不同角度的所述待校验证件的图像;
对所述图像集进行边缘检测处理,得到边缘证件图像集;
提取所述边缘证件图像集中各图像的全息校验区域,将提取到的多个全息校验区域进行合成处理,得到全息证件图像;
将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值;
根据所述全息证件图像的变化程度值和预置校验算法计算所述待校验证件的校验值;
若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件。
一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现如下步骤:
获取待校验证件的图像集,所述图像集包括多张不同角度的所述待校验证件的图像;
对所述图像集进行边缘检测处理,得到边缘证件图像集;
提取所述边缘证件图像集中各图像的全息校验区域,将提取到的多个全息校验区域进行合成处理,得到全息证件图像;
将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值;
根据所述全息证件图像的变化程度值和预置校验算法计算所述待校验证件的校验值;
若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件。
附图说明
图1为本申请一实施例提供的证件校验方法的流程示意图;
图2为本申请一实施例提供的证件校验装置的模块示意图;
图3为本申请一实施例提供的实现证件校验方法的电子设备的内部结构示意图;
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例提供的证件校验方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述证件校验方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。
参照图1所示,为本申请实施例提供的一种证件校验方法的流程示意图。在本实施例中,所述证件校验方法包括:
S1、获取待校验证件的图像集,所述图像集包括多张不同角度的所述待校验证件的图像。
本申请实施例中,所述待校验证件的图像集包括多张不同角度的待校验证件的图像,例如,通过正面、上倾斜角度、下倾斜角度等多个不同角度采集到的图像。
本申请实施例中,所述待校验证件包括但不限于二代居民身份证、港澳台来往内地通行证、香港身份证、校园卡、医保卡等证件。
本申请一可选实施例中,图像集为通过移动电子设备,如智能手机,采集到的图像的集合。
S2、对所述图像集进行边缘检测处理,得到边缘证件图像集。
本申请实施例中,对所述图像集进行边缘检测处理具体是对所述图像集中每张图像进行边缘检测处理,确定边缘检测处理后的多张图像为边缘证件图像集。
在本申请实施例中,所述对所述图像集进行边缘检测处理,得到边缘证件图像集,包括:
对所述图像集进行平滑滤波处理,得到滤波图像集;
对所述滤波图像集进行边缘细化处理,得到细化图像集;
利用双阈值法对所述细化图像集进行边缘选取处理,得到边缘证件图像集。
本申请实施例中,对所述图像集进行平滑滤波处理具体是对所述图像集中每张图像进行平滑滤波处理,确定平滑滤波处理后的图像为滤波图像,将多张滤波图像汇集为滤波图像集。
类似地,对所述滤波图像集进行边缘细化处理具体是对所述滤波图像集中每张滤波图像进行边缘细化处理,确定边缘细化处理后的每张图像为细化图像,将多张细化图像汇集为细化图像集;利用双阈值法对所述细化图像集进行边缘选取处理具体是对所述细化图像集中每张细化图像进行边缘选取处理,确定边缘选取处理后的每张图像为边缘证件图像,将多张边缘证件图像汇集为边缘证件图像集。
进一步地,所述对所述图像集进行平滑滤波处理,得到滤波图像集,包括:
利用高斯滤波器对所述训练证件图像集进行平滑滤波处理,得到滤波图像集G(x,y)。
具体地,G(x,y)=f(x,y)*H(x,y),且H(x,y)=exp[-(x 2+y 2)/2σ 2]
其中,f(x,y)为所述图像集,G(x,y)为所述滤波图像集,H(x,y)为所述高斯滤波器,exp为滤波处理运算,σ表示取值为常数的系统参数。
进一步地,所述对所述滤波图像集进行边缘细化处理,得到细化图像集,包括对所述滤波图像集中每张滤波图像进行如下处理:
利用预设的Sobel算子计算滤波图像的第一方向图像灰度值和第二方向图像灰度值;
根据所述第一方向图像灰度值和所述第二方向图像灰度值,计算所述滤波图像的梯度幅值和梯度方向;
沿着所述梯度方向选取目标像素点,比较所述目标像素点上的目标梯度幅值和非目标像素点上的非目标梯度幅值;
若所述目标梯度幅度小于或等于所述非目标梯度幅值,则将所述目标像素点设置为0,将所述非目标像素点保持不变;
若所述目标梯度幅值大于所述非目标梯度幅值,则所述目标像素点保持不变,并且将所述非目标像素点设为0;
确定像素值调整后的滤波图像为细化图像。
详细地,所述预设的Sobel算子分为X方向(即横向)和Y方向(即纵向),其中X方向的Sobel算子为
Figure PCTCN2020125465-appb-000001
Y方向的Sobel算子为
Figure PCTCN2020125465-appb-000002
具体地,所述第一方向图像灰度值为:
Figure PCTCN2020125465-appb-000003
所述第二方向图像灰度值为:
Figure PCTCN2020125465-appb-000004
其中,I为滤波图像集。
进一步地,所述根据所述第一方向图像灰度值和所述第二方向图像灰度值,计算所述滤波图像的梯度幅值和梯度方向,包括:
Figure PCTCN2020125465-appb-000005
θ=arctan(G y/G x)
其中,G表示所述滤波图像的梯度幅值,θ表示所述滤波图像的梯度方向,G x为第一方向图像灰度值,G y为第二方向图像灰度值。
进一步地,本申请实施例利用双阈值法对所述细化图像集进行边缘选取处理,得到所述边缘证件图像集,包括:
获取高像素阈值条件和低像素阈值条件;
选取所述细化图像集的各细化图像中符合所述高像素阈值条件的第一像素点集合,以及符合所述低像素阈值条件的第二像素点集合;
将各细化图像中所述第一像素点集合与所述第二像素点集合进行连接,得到边缘证件图像集。
其中,所述高像素阈值条件是指大于预设的高阈值TH,所述低像素阈值条件是指小于预设的低阈值TL。
本申请实施例通过高像素阈值条件和低像素阈值条件能够选取到更有意义且更具特征的像素点,进一步的,通过将这些像素点进行合成,能够得到细节丰富,且体积更精简的边缘证件图像集。
S3、提取所述边缘证件图像集中各图像的全息校验区域,将提取到的多个全息校验区域进行合成处理,得到全息证件图像。
本申请实施例中,将边缘证件图像集中各图像分别映射到二维坐标轴上,以及将各图像的全息校验区域分别映射到二维坐标轴上之后再根据映射得到的图像进行3D合成,得到全息证件图像。
S4、将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值。
优选的,所述方法还包括获取训练的3D卷积网络模型,所述获取训练的3D卷积网络模型包括:
获取训练全息图像集及所述训练全息图像集的标签值;
将所述训练全息图像集转换为全息图像向量集;
利用预构建的3D卷积网络模型中的卷积层对所述全息图像向量集进行卷积操作,得到卷积图像向量集;
利用所述预构建的3D卷积网络模型中的池化层提取所述卷积图像向量集的特征图像向量,得到特征图片向量集;
利用所述预构建的3D卷积网络模型中的激活函数计算所述特征图片向量集的多个训练值,其中,每个训练值标识所述训练全息图像集中全息图像的变化程度;
利用所述预构建的3D卷积网络模型中的损失函数计算所述多个训练值的损失值;
若所述损失值大于预设损失阈值,持续调整所述预构建的3D卷积网络模型的参数,直至所述损失值小于预设阈值时,确定训练完毕,得到训练的3D卷积网络模型。
其中,标签值为所述全息图像集中全息图像的变化程度。
例如,预设全息图像集对应有六个标签值,分别代表全息图像的变化程度。
具体地,将所述全息图像集中的图像映射到预设的码本上,形成全息图像向量集,其中,码本是将图像转换为图像向量的列表。
进一步地,所述利用所述预构建的3D卷积网络模型中的卷积层对所述全息图像向量集进行卷积操作,得到卷积图像向量集,包括:对所述全息图像向量集进行降维,得到所述卷积图片向量集。
优选地,本申请较佳实施利用下述公式对所述全息图像向量集进行卷积操作:
Figure PCTCN2020125465-appb-000006
其中,ω’表示卷积图片向量集,ω表示全息图像向量集,k表示所述预构建的3D卷积网络模型的卷积核大小,f表示所述预构建的3D卷积网络模型的卷积步幅,p表示全息图像向量集的补零矩阵。
具体地,利用所述预构建的3D卷积网络模型中的激活函数计算所述特征图片向量集的训练值,所述激活函数包括:
Figure PCTCN2020125465-appb-000007
其中,y′ i表示特征图片向量集中第i个特征图片向量的训练值,s表示特征图片向量集中的特征图片向量。
具体地,利用所述预构建的3D卷积网络模型中的损失函数计算所述训练值的损失函数值,所述损失函数包括:
Figure PCTCN2020125465-appb-000008
其中,L(s)表示损失函数值,s i表示训练值与对应标签值的差值,k表示特征图片向量集的数量,y i表示第i个对应标签值,y′ i表示第i个训练值。
详细地,所述预构建的3D卷积网络模型的参数包括:权重和偏置。
本申请实施例中,将所述全息证件图像输入至预构建的3D卷积网络模型进行多分类训练,得到多个训练值,例如,得到的训练值分别为:x 0、x 1、x 2、x 3、x 4和x 5
优选的,所述将所述训练全息图像集转换为全息图像向量集之前,所述方法还包括:
获取所述训练全息图像集中若干图像;
对所述若干图像进行颜色变换处理,将图像处理后得到的图像添加至所述训练全息图像集。
具体地,所述若干图像的数量可以为任意的。
对所述若干图像进行颜色变换处理包括:
对所述若干图像进行亮度扩充处理、对比度扩充处理和锐度扩充处理。
具体地,根据亮度扩充公式对若干图像的r、g和b进行计算,所述亮度扩充公式为:
r1=bg*(1-a)+r*a
g1=bg*(1-a)+g*a
b1=bg*(1-a)+b*a
其中,r为所述若干图像的红色值,g为若干图像的绿色值,b为若干图像的蓝色值,a=为[0.5,1]之间的随机数,bg=1。
进一步地,根据对比度扩充公式对经过亮度扩充后图像的r1、g1和b1进行计算,所述对比度扩充公式为:
r2=bg*(1-a)+r1*a
g2=bg*(1-a)+g1*a
b2=bg*(1-a)+b1*a
其中,r2为对比度扩充后图像的红色值,g2为对比度扩充后图像的绿色值,b2为对比度扩充后图像的蓝色值,a=mean(r1g1b1)+0.5,mean为求平均值,bg为[0,1]的随机数。
具体地,根据锐度扩充公式对经过锐度扩充后图像的r2、g2和b2进行计算,所述锐度扩充公式为:
r3=bg*(1-a)+r2*a
g3=bg*(1-a)+g2*a
b3=bg*(1-a)+b2*a
其中,r3为所述锐度扩充后图像的红色值,g3为所述锐度扩充后图像的绿色值,b3为所述锐度扩充后图像的蓝色值,bg为所述锐度扩充后的图像均值滤波后的bg值,a=为[0.5,1]之间的随机数。
详细地,图像的r、g、b分别指图像中的红色值、绿色值和蓝色值,图像中r、g、b的不同会影响图片所呈现出来的颜色。
由于证件图像存在隐私性,难以收集到大量的样本,故采用颜色变化算法,可以生成大量的伪造样本,从而增加训练的泛化性,提升识别精度。
S5、根据所述全息证件图像的变化程度值和预置校验算法计算所述待校验证件的校验值。
本申请实施例中,所述预置校验算法可以为权重计算。
具体的,若变化程度值为x 0、x 1、x 2、x 3、x 4和x 5,则所述预置校验算法可以为:
F=x 0*0+x 1*0.2+x 2*0.4+x 3*0.6+x 4*0.8+x 5*1
其中,F为校验值,x 0、x 1、x 2、x 3、x 4和x 5为所述全息证件图像的变化程度值。
S6、若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件。
本申请实施例中,根据所述待校验证件的校验值进行判断,若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件。
本申请实施例在获取到待校验证件的图像集之后,对所述图像集进行边缘检测处理,提取所述边缘证件图像集中各图像的全息校验区域并对所述全息校验区域进行合成处理,得到全息证件图像,利用所述训练的3D卷积网络模型和预置校验算法对全息证件图像进行处理,得到校验值,将所述校验值与预设校验阈值进行比较,判断所述待校验证件的真实性。通过提取边缘证件图像集中各图像的全息校验区域并进行合成处理,通过合成得到多维的全息证件图像,更准确的还原真实的证件,通过将多维的全息证件图像输入至训练的3D卷积神经网络进行训练,能够得到更准确的全息证件图像的变化程度值,从而能够更准确的确定待校验证件是否为真实证件。因此本申请提出的证件校验方法,可以提高证件校验方法的准确率。
如图2所示,是本申请证件校验装置的模块示意图。
本申请所述证件校验装置100可以安装于电子设备中。根据实现的功能,所述证件校验装置100可以包括图像集获取模块101、边缘检测模块102、全息证件图像获取模块103、模型训练模块104、校验值计算模块105、确定模块106。本申请所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。
在本实施例中,关于各模块/单元的功能如下:
所述图像集获取模块101,用于获取待校验证件的图像集,所述图像集包括多张不同角度的所述待校验证件的图像;
所述边缘检测模块102,用于对所述图像集进行边缘检测处理,得到边缘证件图像集;
所述全息证件图像获取模块103,用于提取所述边缘证件图像集中各图像的全息校验区域,将提取到的多个全息校验区域进行合成处理,得到全息证件图像;
所述模型训练模块104,用于将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值;
所述校验值计算模块105,用于根据所述全息证件图像的变化程度值和预置校验算法计算所述待校验证件的校验值;
所述确定模块106,用于若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件。
详细地,所述证件校验装置100各模块的具体实施方式如下:
所述图像集获取模块101,用于获取待校验证件的图像集,所述图像集包括多张不同角度的所述待校验证件的图像。
本申请实施例中,所述待校验证件的图像集包括多张不同角度的待校验证件的图像,例如,通过正面、上倾斜角度、下倾斜角度等多个不同角度采集到的图像。
本申请实施例中,所述待校验证件包括但不限于二代居民身份证、港澳台来往内地通行证、香港身份证、校园卡、医保卡等证件。
本申请一可选实施例中,图像集为通过移动电子设备,如智能手机,采集到的图像的集合。
所述边缘检测模块102,用于对所述图像集进行边缘检测处理,得到边缘证件图像集。
本申请实施例中,对所述图像集进行边缘检测处理具体是对所述图像集中每张图像进行边缘检测处理,确定边缘检测处理后的多张图像为边缘证件图像集。
在本申请实施例中,所述边缘检测模块102具体用于:
对所述图像集进行平滑滤波处理,得到滤波图像集;
对所述滤波图像集进行边缘细化处理,得到细化图像集;
利用双阈值法对所述细化图像集进行边缘选取处理,得到边缘证件图像集。
本申请实施例中,对所述图像集进行平滑滤波处理具体是对所述图像集中每张图像进行平滑滤波处理,确定平滑滤波处理后的图像为滤波图像,将多张滤波图像汇集为滤波图像集。
类似地,对所述滤波图像集进行边缘细化处理具体是对所述滤波图像集中每张滤波图像进行边缘细化处理,确定边缘细化处理后的每张图像为细化图像,将多张细化图像汇集为细化图像集;利用双阈值法对所述细化图像集进行边缘选取处理具体是对所述细化图像集中每张细化图像进行边缘选取处理,确定边缘选取处理后的每张图像为边缘证件图像,将多张边缘证件图像汇集为边缘证件图像集。
进一步地,所述对所述图像集进行平滑滤波处理,得到滤波图像集,包括:
利用高斯滤波器对所述训练证件图像集进行平滑滤波处理,得到滤波图像集G(x,y)。
具体地,G(x,y)=f(x,y)*H(x,y),且H(x,y)=exp[-(x 2+y 2)/2σ 2]
其中,f(x,y)为所述图像集,G(x,y)为所述滤波图像集,H(x,y)为所述高斯滤波器,exp为滤波处理运算,σ表示取值为常数的系统参数。
进一步地,所述对所述滤波图像集进行边缘细化处理,得到细化图像集,包括对所述滤波图像集中每张滤波图像进行如下处理:
利用预设的Sobel算子计算滤波图像的第一方向图像灰度值和第二方向图像灰度值;
根据所述第一方向图像灰度值和所述第二方向图像灰度值,计算所述滤波图像的梯度幅值和梯度方向;
沿着所述梯度方向选取目标像素点,比较所述目标像素点上的目标梯度幅值和非目标像素点上的非目标梯度幅值;
若所述目标梯度幅度小于或等于所述非目标梯度幅值,则将所述目标像素点设置为0,将所述非目标像素点保持不变;
若所述目标梯度幅值大于所述非目标梯度幅值,则所述目标像素点保持不变,并且将所述非目标像素点设为0;
确定像素值调整后的滤波图像为细化图像。
详细地,所述预设的Sobel算子分为X方向(即横向)和Y方向(即纵向),其中X方向的Sobel算子为
Figure PCTCN2020125465-appb-000009
Y方向的Sobel算子为
Figure PCTCN2020125465-appb-000010
具体地,所述第一方向图像灰度值为:
Figure PCTCN2020125465-appb-000011
所述第二方向图像灰度值为:
Figure PCTCN2020125465-appb-000012
其中,I为滤波图像集。
进一步地,所述根据所述第一方向图像灰度值和所述第二方向图像灰度值,计算所述滤波图像的梯度幅值和梯度方向,包括:
Figure PCTCN2020125465-appb-000013
θ=arctan(G y/G x)
其中,G表示所述滤波图像的梯度幅值,θ表示所述滤波图像的梯度方向,G x为第一方向图像灰度值,G y为第二方向图像灰度值。
进一步地,本申请实施例利用双阈值法对所述细化图像集进行边缘选取处理,得到所述边缘证件图像集,包括:
获取高像素阈值条件和低像素阈值条件;
选取所述细化图像集的各细化图像中符合所述高像素阈值条件的第一像素点集合,以及符合所述低像素阈值条件的第二像素点集合;
将各细化图像中所述第一像素点集合与所述第二像素点集合进行连接,得到边缘证件图像集。
其中,所述高像素阈值条件是指大于预设的高阈值TH,所述低像素阈值条件是指小于预设的低阈值TL。
本申请实施例通过高像素阈值条件和低像素阈值条件能够选取到更有意义且更具特征的像素点,进一步的,通过将这些像素点进行合成,能够得到细节丰富,且体积更精简的边缘证件图像集。
所述全息证件图像模块103,用于提取所述边缘证件图像集中各图像的全息校验区域,将提取到的多个全息校验区域进行合成处理,得到全息证件图像。
本申请实施例中,将边缘证件图像集中各图像分别映射到二维坐标轴上,以及将各图像的全息校验区域分别映射到二维坐标轴上之后再根据映射得到的图像进行3D合成,得到全息证件图像。
所述模型训练模块104,用于将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值。
优选的,所述装置还包括模型获取模块,用于获取训练的3D卷积网络模型,所述模型获取模块具体用于:
获取训练全息图像集及所述训练全息图像集的标签值;
将所述训练全息图像集转换为全息图像向量集;
利用预构建的3D卷积网络模型中的卷积层对所述全息图像向量集进行卷积操作,得到卷积图像向量集;
利用所述预构建的3D卷积网络模型中的池化层提取所述卷积图像向量集的特征图像向量,得到特征图片向量集;
利用所述预构建的3D卷积网络模型中的激活函数计算所述特征图片向量集的多个训练值,其中,每个训练值标识所述训练全息图像集中全息图像的变化程度;
利用所述预构建的3D卷积网络模型中的损失函数计算所述多个训练值的损失值;
若所述损失值大于预设损失阈值,持续调整所述预构建的3D卷积网络模型的参数,直至所述损失值小于预设阈值时,确定训练完毕,得到训练的3D卷积网络模型。
其中,标签值为所述全息图像集中全息图像的变化程度。
例如,预设全息图像集对应有六个标签值,分别代表全息图像的变化程度。
具体地,将所述全息图像集中的图像映射到预设的码本上,形成全息图像向量集,其中,码本是将图像转换为图像向量的列表。
进一步地,所述利用所述预构建的3D卷积网络模型中的卷积层对所述全息图像向量集进行卷积操作,得到卷积图像向量集,包括:对所述全息图像向量集进行降维,得到所述卷积图片向量集。
优选地,本申请较佳实施利用下述公式对所述全息图像向量集进行卷积操作:
Figure PCTCN2020125465-appb-000014
其中,ω’表示卷积图片向量集,ω表示全息图像向量集,k表示所述预构建的3D卷积网络模型的卷积核大小,f表示所述预构建的3D卷积网络模型的卷积步幅,p表示全息图像向量集的补零矩阵。
具体地,利用所述预构建的3D卷积网络模型中的激活函数计算所述特征图片向量集的训练值,所述激活函数包括:
Figure PCTCN2020125465-appb-000015
其中,y′ i表示特征图片向量集中第i个特征图片向量的训练值,s表示特征图片向量集中的特征图片向量。
具体地,利用所述预构建的3D卷积网络模型中的损失函数计算所述训练值的损失函数值,所述损失函数包括:
Figure PCTCN2020125465-appb-000016
其中,L(s)表示损失函数值,s i表示训练值与对应标签值的差值,k表示特征图片向量集的数量,y i表示第i个对应标签值,y′ i表示第i个训练值。
详细地,所述预构建的3D卷积网络模型的参数包括:权重和偏置。
本申请实施例中,将所述全息证件图像输入至预构建的3D卷积网络模型进行多分类训练,得到多个训练值,例如,得到的训练值分别为:x 0、x 1、x 2、x 3、x 4和x 5
优选的,所述装置还包括添加模块,所述添加模块用于
将所述训练全息图像集转换为全息图像向量集之前,获取所述训练全息图像集中若干图像;
对所述若干图像进行颜色变换处理,将图像处理后得到的图像添加至所述训练全息图像集。
具体地,所述若干图像的数量可以为任意的。
对所述若干图像进行颜色变换处理包括:
对所述若干图像进行亮度扩充处理、对比度扩充处理和锐度扩充处理。
具体地,根据亮度扩充公式对若干图像的r、g和b进行计算,所述亮度扩充公式为:
r1=bg*(1-a)+r*a
g1=bg*(1-a)+g*a
b1=bg*(1-a)+b*a
其中,r为所述若干图像的红色值,g为若干图像的绿色值,b为若干图像的蓝色值,a=为[0.5,1]之间的随机数,bg=1。
进一步地,根据对比度扩充公式对经过亮度扩充后图像的r1、g1和b1进行计算,所述对比度扩充公式为:
r2=bg*(1-a)+r1*a
g2=bg*(1-a)+g1*a
b2=bg*(1-a)+b1*a
其中,r2为对比度扩充后图像的红色值,g2为对比度扩充后图像的绿色值,b2为对比度扩充后图像的蓝色值,a=mean(r1g1b1)+0.5,mean为求平均值,bg为[0,1]的随机数。
具体地,根据锐度扩充公式对经过锐度扩充后图像的r2、g2和b2进行计算,所述锐度扩充公式为:
r3=bg*(1-a)+r2*a
g3=bg*(1-a)+g2*a
b3=bg*(1-a)+b2*a
其中,r3为所述锐度扩充后图像的红色值,g3为所述锐度扩充后图像的绿色值,b3为所述锐度扩充后图像的蓝色值,bg为所述锐度扩充后的图像均值滤波后的bg值,a=为[0.5,1]之间的随机数。
详细地,图像的r、g、b分别指图像中的红色值、绿色值和蓝色值,图像中r、g、b的不同会影响图片所呈现出来的颜色。
由于证件图像存在隐私性,难以收集到大量的样本,故采用颜色变化算法,可以生成大量的伪造样本,从而增加训练的泛化性,提升识别精度。
所述校验值计算模块105,用于根据所述全息证件图像的变化程度值和预置校验算法计算所述待校验证件的校验值。
本申请实施例中,所述预置校验算法可以为权重计算。
具体的,若变化程度值为x 0、x 1、x 2、x 3、x 4和x 5,则所述预置校验算法可以为:
F=x 0*0+x 1*0.2+x 2*0.4+x 3*0.6+x 4*0.8+x 5*1
其中,F为校验值,x 0、x 1、x 2、x 3、x 4和x 5为所述全息证件图像的变化程度值。
所述证件判断模块106,用于若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件。
本申请实施例中,根据所述待校验证件的校验值进行判断,若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件。
本申请实施例在获取到待校验证件的图像集之后,对所述图像集进行边缘检测处理,提取所述边缘证件图像集中各图像的全息校验区域并对所述全息校验区域进行合成处理,得到全息证件图像,利用所述训练的3D卷积网络模型和预置校验算法对全息证件图像进行处理,得到校验值,将所述校验值与预设校验阈值进行比较,判断所述待校验证件的真实性。通过提取边缘证件图像集中各图像的全息校验区域并进行合成处理,通过合成得到多维的全息证件图像,更准确的还原真实的证件,通过将多维的全息证件图像输入至训练的3D卷积神经网络进行训练,能够得到更准确的全息证件图像的变化程度值,从而能够更准确的确定待校验证件是否为真实证件。因此本申请提出的证件校验装置,可以提高证件校验方法的准确率。
如图3所示,是本申请实现证件校验方法的电子设备的结构示意图。
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如证件校验程序12。
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例 如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如证件校验程序12的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如执行证件校验程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。
图3仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图3示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。
所述电子设备1中的所述存储器11存储的证件校验程序12是多个指令的组合,在所述处理器10中运行时,可以实现:
获取待校验证件的图像集,所述图像集包括多张不同角度的所述待校验证件的图像;
对所述图像集进行边缘检测处理,得到边缘证件图像集;
提取所述边缘证件图像集中各图像的全息校验区域,将提取到的多个全息校验区域进行合成处理,得到全息证件图像;
将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值;
根据所述全息证件图像的变化程度值和预置校验算法计算所述待校验证件的校验值;
若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件。
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中,所述计算机可读存储介质可以是非易失性,也可以是易失性。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。
进一步地,所述计算机可用存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据区块链节点的使用所创建的数据等。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图表记视为限制所涉及的权利要求。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (20)

  1. 一种证件校验方法,其中,所述方法包括:
    获取待校验证件的图像集,所述图像集包括多张不同角度的所述待校验证件的图像;
    对所述图像集进行边缘检测处理,得到边缘证件图像集;
    提取所述边缘证件图像集中各图像的全息校验区域,将提取到的多个全息校验区域进行合成处理,得到全息证件图像;
    将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值;
    根据所述全息证件图像的变化程度值和预置校验算法计算所述待校验证件的校验值;
    若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件。
  2. 如权利要求1所述的证件校验方法,其中,所述对所述图像集进行边缘检测处理,得到边缘证件图像集,包括:
    对所述图像集进行平滑滤波处理,得到滤波图像集;
    对所述滤波图像集进行边缘细化处理,得到细化图像集;
    利用双阈值法对所述细化图像集进行边缘选取处理,得到边缘证件图像集。
  3. 如权利要求2所述的证件校验方法,其中,所述对所述图像集进行平滑滤波处理,得到滤波图像集,包括:
    利用高斯滤波器对所述图像集进行平滑滤波处理,得到滤波图像集G(x,y):
    G(x,y)=f(x,y)*H(x,y)
    H(x,y)=exp[-(x 2+y 2)/2σ 2]
    其中,f(x,y)为所述图像集,G(x,y)为所述滤波图像集,H(x,y)为所述高斯滤波器,exp为滤波处理运算,σ表示取值为常数的系统参数。
  4. 如权利要求2所述的证件校验方法,其中,所述利用双阈值法对所述细化图像集进行边缘选取处理,得到所述边缘证件图像集,包括:
    获取高像素阈值条件和低像素阈值条件;
    选取所述细化图像集的各细化图像中符合所述高像素阈值条件的第一像素点集合,以及符合所述低像素阈值条件的第二像素点集合;
    将各细化图像中所述第一像素点集合与所述第二像素点集合进行连接,得到边缘证件图像集。
  5. 如权利要求1所述的证件校验方法,其中,所述将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值之前,所述方法还包括:
    获取训练全息图像集及所述训练全息图像集的标签值;
    将所述训练全息图像集转换为全息图像向量集;
    利用预构建的3D卷积网络模型中的卷积层对所述全息图像向量集进行卷积操作,得到卷积图像向量集;
    利用所述预构建的3D卷积网络模型中的池化层提取所述卷积图像向量集的特征图像向量,得到特征图片向量集;
    利用所述预构建的3D卷积网络模型中的激活函数计算所述特征图片向量集的多个训练值,其中,每个训练值标识所述训练全息图像集中全息图像的变化程度;
    利用所述预构建的3D卷积网络模型中的损失函数计算所述多个训练值的损失值;
    若所述损失值大于预设损失阈值,持续调整所述预构建的3D卷积网络模型的参数,直至所述损失值小于预设阈值时,确定训练完毕,得到训练的3D卷积网络模型。
  6. 如权利要求5所述的证件校验方法,其中,所述利用所述预构建的3D卷积网络模型中的损失函数计算所述训练值集合的损失值,所述损失函数包括:
    Figure PCTCN2020125465-appb-100001
    其中,L(s)表示损失值,s i表示y i与y′ i的差值,k表示所述特征图片向量集的数量,y i表示所述特征图片向量集中第i个特征图片向量对应的训练全息图像的标签值,y′ i表示所述特征图片向量集中第i个训练值。
  7. 如权利要求5所述的证件校验方法,其中,所述将所述训练全息图像集转换为全息图像向量集之前,所述方法还包括:
    获取所述训练全息图像集中若干图像;
    对所述若干图像进行颜色变换处理,将图像处理后得到的图像添加至所述训练全息图像集。
  8. 一种证件校验装置,其中,所述装置包括:
    图像集获取模块,用于获取待校验证件的图像集,所述图像集包括多张不同角度的所述待校验证件的图像;
    边缘检测模块,用于对所述图像集进行边缘检测处理,得到边缘证件图像集;
    全息证件图像获取模块,用于提取所述边缘证件图像集中各图像的全息校验区域,将提取到的多个全息校验区域进行合成处理,得到全息证件图像;
    模型训练模块,用于将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值;
    校验值计算模块,用于根据所述全息证件图像的变化程度值和预置校验算法计算所述待校验证件的校验值;
    确定模块,用于若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件。
  9. 一种电子设备,其中,所述电子设备包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:
    获取待校验证件的图像集,所述图像集包括多张不同角度的所述待校验证件的图像;
    对所述图像集进行边缘检测处理,得到边缘证件图像集;
    提取所述边缘证件图像集中各图像的全息校验区域,将提取到的多个全息校验区域进行合成处理,得到全息证件图像;
    将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值;
    根据所述全息证件图像的变化程度值和预置校验算法计算所述待校验证件的校验值;
    若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件。
  10. 如权利要求9所述的电子设备,其中,所述对所述图像集进行边缘检测处理,得到边缘证件图像集,包括:
    对所述图像集进行平滑滤波处理,得到滤波图像集;
    对所述滤波图像集进行边缘细化处理,得到细化图像集;
    利用双阈值法对所述细化图像集进行边缘选取处理,得到边缘证件图像集
  11. 如权利要求10所述的电子设备,其中,所述对所述图像集进行平滑滤波处理,得到滤波图像集,包括:
    利用高斯滤波器对所述图像集进行平滑滤波处理,得到滤波图像集G(x,y):
    G(x,y)=f(x,y)*H(x,y)
    H(x,y)=exp[-(x 2+y 2)/2σ 2]
    其中,f(x,y)为所述图像集,G(x,y)为所述滤波图像集,H(x,y)为所述高斯滤波器,exp为滤波处理运算,σ表示取值为常数的系统参数。
  12. 如权利要求10所述的电子设备,其中,所述利用双阈值法对所述细化图像集进行边缘选取处理,得到所述边缘证件图像集,包括:
    获取高像素阈值条件和低像素阈值条件;
    选取所述细化图像集的各细化图像中符合所述高像素阈值条件的第一像素点集合,以及符合所述低像素阈值条件的第二像素点集合;
    将各细化图像中所述第一像素点集合与所述第二像素点集合进行连接,得到边缘证件图像集。
  13. 如权利要求9所述的电子设备,其中,所述将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值之前,所述方法还包括:
    获取训练全息图像集及所述训练全息图像集的标签值;
    将所述训练全息图像集转换为全息图像向量集;
    利用预构建的3D卷积网络模型中的卷积层对所述全息图像向量集进行卷积操作,得到卷积图像向量集;
    利用所述预构建的3D卷积网络模型中的池化层提取所述卷积图像向量集的特征图像向量,得到特征图片向量集;
    利用所述预构建的3D卷积网络模型中的激活函数计算所述特征图片向量集的多个训练值,其中,每个训练值标识所述训练全息图像集中全息图像的变化程度;
    利用所述预构建的3D卷积网络模型中的损失函数计算所述多个训练值的损失值;
    若所述损失值大于预设损失阈值,持续调整所述预构建的3D卷积网络模型的参数,直至所述损失值小于预设阈值时,确定训练完毕,得到训练的3D卷积网络模型。
  14. 如权利要求13所述的电子设备,其中,所述利用所述预构建的3D卷积网络模型中的损失函数计算所述训练值集合的损失值,所述损失函数包括:
    Figure PCTCN2020125465-appb-100002
    其中,L(s)表示损失值,s i表示y i与y′ i的差值,k表示所述特征图片向量集的数量,y i表示所述特征图片向量集中第i个特征图片向量对应的训练全息图像的标签值,y′ i表示所述特征图片向量集中第i个训练值。
  15. 如权利要求13所述的电子设备,其中,所述将所述训练全息图像集转换为全息图像向量集之前,所述方法还包括:
    获取所述训练全息图像集中若干图像;
    对所述若干图像进行颜色变换处理,将图像处理后得到的图像添加至所述训练全息图像集。
  16. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:
    获取待校验证件的图像集,所述图像集包括多张不同角度的所述待校验证件的图像;
    对所述图像集进行边缘检测处理,得到边缘证件图像集;
    提取所述边缘证件图像集中各图像的全息校验区域,将提取到的多个全息校验区域进行合成处理,得到全息证件图像;
    将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值;
    根据所述全息证件图像的变化程度值和预置校验算法计算所述待校验证件的校验值;
    若所述校验值大于或等于预设校验阈值,确定所述待校验证件为真实证件。
  17. 如权利要求16所述的计算机可读存储介质,其中,所述对所述图像集进行边缘检测处理,得到边缘证件图像集,包括:
    对所述图像集进行平滑滤波处理,得到滤波图像集;
    对所述滤波图像集进行边缘细化处理,得到细化图像集;
    利用双阈值法对所述细化图像集进行边缘选取处理,得到边缘证件图像集。
  18. 如权利要求17所述的计算机可读存储介质,其中,所述对所述图像集进行平滑滤波处理,得到滤波图像集,包括:
    利用高斯滤波器对所述图像集进行平滑滤波处理,得到滤波图像集G(x,y):
    G(x,y)=f(x,y)*H(x,y)
    H(x,y)=exp[-(x 2+y 2)/2σ 2]
    其中,f(x,y)为所述图像集,G(x,y)为所述滤波图像集,H(x,y)为所述高斯滤波器,exp为滤波处理运算,σ表示取值为常数的系统参数。
  19. 如权利要求17所述的计算机可读存储介质,其中,所述利用双阈值法对所述细化图像集进行边缘选取处理,得到所述边缘证件图像集,包括:
    获取高像素阈值条件和低像素阈值条件;
    选取所述细化图像集的各细化图像中符合所述高像素阈值条件的第一像素点集合,以及符合所述低像素阈值条件的第二像素点集合;
    将各细化图像中所述第一像素点集合与所述第二像素点集合进行连接,得到边缘证件图像集。
  20. 如权利要求16所述的计算机可读存储介质,其中,所述将所述全息证件图像输入至训练的3D卷积网络模型识别所述全息证件图像的变化程度值之前,所述方法还包括:
    获取训练全息图像集及所述训练全息图像集的标签值;
    将所述训练全息图像集转换为全息图像向量集;
    利用预构建的3D卷积网络模型中的卷积层对所述全息图像向量集进行卷积操作,得到卷积图像向量集;
    利用所述预构建的3D卷积网络模型中的池化层提取所述卷积图像向量集的特征图像向量,得到特征图片向量集;
    利用所述预构建的3D卷积网络模型中的激活函数计算所述特征图片向量集的多个训练值,其中,每个训练值标识所述训练全息图像集中全息图像的变化程度;
    利用所述预构建的3D卷积网络模型中的损失函数计算所述多个训练值的损失值;
    若所述损失值大于预设损失阈值,持续调整所述预构建的3D卷积网络模型的参数,直至所述损失值小于预设阈值时,确定训练完毕,得到训练的3D卷积网络模型。
PCT/CN2020/125465 2020-09-24 2020-10-30 证件校验方法、装置、电子设备及介质 WO2021189856A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011018247.8A CN112132812B (zh) 2020-09-24 2020-09-24 证件校验方法、装置、电子设备及介质
CN202011018247.8 2020-09-24

Publications (1)

Publication Number Publication Date
WO2021189856A1 true WO2021189856A1 (zh) 2021-09-30

Family

ID=73839804

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/125465 WO2021189856A1 (zh) 2020-09-24 2020-10-30 证件校验方法、装置、电子设备及介质

Country Status (2)

Country Link
CN (1) CN112132812B (zh)
WO (1) WO2021189856A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114817518A (zh) * 2022-06-21 2022-07-29 广州卓腾科技有限公司 基于大数据档案识别的证照办理方法、系统及介质
CN117173545A (zh) * 2023-11-03 2023-12-05 天逸财金科技服务(武汉)有限公司 一种基于计算机图形学的证照原件识别方法
CN117611923A (zh) * 2024-01-08 2024-02-27 北京锐融天下科技股份有限公司 一种身份证件真伪识别方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778545A (zh) * 2016-11-29 2017-05-31 重庆重智机器人研究院有限公司 表情特征提取方法及装置
CN110570209A (zh) * 2019-07-30 2019-12-13 平安科技(深圳)有限公司 证件真伪验证方法、装置、计算机设备及存储介质
CN111079571A (zh) * 2019-11-29 2020-04-28 杭州数梦工场科技有限公司 证卡信息识别及其边缘检测模型训练方法、装置
CN111242047A (zh) * 2020-01-15 2020-06-05 北京明略软件系统有限公司 图像处理方法和装置、电子设备及计算机可读存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11514325B2 (en) * 2018-03-21 2022-11-29 The Regents Of The University Of California Method and system for phase recovery and holographic image reconstruction using a neural network
US20220012874A1 (en) * 2018-07-31 2022-01-13 Deutsches Krebsforschungszentrum Stiftung des öffentlichen Rechts Method and system for augmented imaging using multispectral information
CN109446900A (zh) * 2018-09-21 2019-03-08 平安科技(深圳)有限公司 证件真伪验证方法、装置、计算机设备及存储介质
CN109871845B (zh) * 2019-01-10 2023-10-31 平安科技(深圳)有限公司 证件图像提取方法及终端设备
CN110598033B (zh) * 2019-08-14 2023-03-28 中国平安财产保险股份有限公司 智能自核验车方法、装置及计算机可读存储介质
CN110751041A (zh) * 2019-09-19 2020-02-04 平安科技(深圳)有限公司 证件真伪验证方法、系统、计算机设备及可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778545A (zh) * 2016-11-29 2017-05-31 重庆重智机器人研究院有限公司 表情特征提取方法及装置
CN110570209A (zh) * 2019-07-30 2019-12-13 平安科技(深圳)有限公司 证件真伪验证方法、装置、计算机设备及存储介质
CN111079571A (zh) * 2019-11-29 2020-04-28 杭州数梦工场科技有限公司 证卡信息识别及其边缘检测模型训练方法、装置
CN111242047A (zh) * 2020-01-15 2020-06-05 北京明略软件系统有限公司 图像处理方法和装置、电子设备及计算机可读存储介质

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114817518A (zh) * 2022-06-21 2022-07-29 广州卓腾科技有限公司 基于大数据档案识别的证照办理方法、系统及介质
CN114817518B (zh) * 2022-06-21 2022-09-20 广州卓腾科技有限公司 基于大数据档案识别的证照办理方法、系统及介质
CN117173545A (zh) * 2023-11-03 2023-12-05 天逸财金科技服务(武汉)有限公司 一种基于计算机图形学的证照原件识别方法
CN117173545B (zh) * 2023-11-03 2024-01-30 天逸财金科技服务(武汉)有限公司 一种基于计算机图形学的证照原件识别方法
CN117611923A (zh) * 2024-01-08 2024-02-27 北京锐融天下科技股份有限公司 一种身份证件真伪识别方法及系统

Also Published As

Publication number Publication date
CN112132812A (zh) 2020-12-25
CN112132812B (zh) 2023-06-30

Similar Documents

Publication Publication Date Title
WO2021189856A1 (zh) 证件校验方法、装置、电子设备及介质
WO2021217851A1 (zh) 异常细胞自动标注方法、装置、电子设备及存储介质
WO2021189912A1 (zh) 图像中目标物的检测方法、装置、电子设备及存储介质
CN109583483B (zh) 一种基于卷积神经网络的目标检测方法和系统
WO2021189901A1 (zh) 图像分割方法、装置、电子设备及计算机可读存储介质
US11354797B2 (en) Method, device, and system for testing an image
WO2022247005A1 (zh) 图像中目标物识别方法、装置、电子设备及存储介质
US11538096B2 (en) Method, medium, and system for live preview via machine learning models
WO2019071662A1 (zh) 电子装置、票据信息识别方法和计算机可读存储介质
WO2022213465A1 (zh) 基于神经网络的图像识别方法、装置、电子设备及介质
WO2021151338A1 (zh) 医学影像图片分析方法、装置、电子设备及可读存储介质
US10311099B2 (en) Method and system for 3D model database retrieval
WO2021151313A1 (zh) 证件鉴伪方法、装置、电子设备及存储介质
US9092697B2 (en) Image recognition system and method for identifying similarities in different images
WO2022105179A1 (zh) 生物特征图像识别方法、装置、电子设备及可读存储介质
WO2020253508A1 (zh) 异常细胞检测方法、装置及计算机可读存储介质
EP4109332A1 (en) Certificate authenticity identification method and apparatus, computer-readable medium, and electronic device
WO2021189853A1 (zh) 闪光灯光斑位置识别方法、装置、电子设备及存储介质
US11323577B2 (en) Image processing device for creating an album
CN113705462B (zh) 人脸识别方法、装置、电子设备及计算机可读存储介质
CN104281856B (zh) 用于脑部医学图像分类的图像预处理方法和系统
WO2020125062A1 (zh) 一种图像融合方法及相关装置
WO2021151277A1 (zh) 目标物损伤程度判定方法、装置、电子设备及存储介质
CN107480621A (zh) 一种基于人脸图像的年龄识别方法
WO2021168703A1 (zh) 字符处理及字符识别方法、存储介质和终端设备

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: 20926681

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20926681

Country of ref document: EP

Kind code of ref document: A1