Disclosure of Invention
In order to overcome the above-mentioned deficiencies in the prior art, an object of the present invention is to provide a facial information registration method applied to a server, where the server stores a permitted registration list in advance, and the permitted registration list includes at least one user identity information permitted to perform facial information registration, the method including:
acquiring certificate information of a target user, wherein the certificate information comprises user identity information and a certificate photo;
comparing the user identity information with the allowed registration list, and judging whether the user identity information is recorded in the allowed registration list;
when the user identity information is recorded in the allowed registration list, acquiring at least one current facial image of the target user;
comparing the current facial image with the certificate photo, and judging whether the current facial image is matched with the certificate photo;
and if the current facial image is matched with the certificate photo, the current facial image and the user identity information in the allowed registration list are stored in a correlation mode.
Optionally, in the above method, after the step of acquiring the certificate information of the target user, the method further includes:
and extracting the certificate photo, and inputting the certificate photo into a pre-trained first deep learning model to process the definition of the certificate photo so as to improve the resolution of the certificate photo.
Optionally, in the above method, the step of comparing the current facial image with the certificate photo and determining whether the current facial image matches the certificate photo includes:
and inputting the current facial image and the certificate photo into a second deep learning model obtained by pre-training for matching processing, thereby judging whether the current facial image is consistent with the certificate photo.
Optionally, in the method, the step of inputting the current facial image and the certificate photo into a second deep learning model trained in advance for matching processing includes:
respectively carrying out facial feature positioning on the current facial image and the certificate photo, and carrying out correction and normalization processing on the current facial image and the certificate photo according to the facial feature positioning;
and inputting the current face image and the certificate photo after the normalization processing into a second deep learning model obtained by pre-training for matching processing.
Optionally, in the above method, the server is in communication connection with a third party certificate verification system; the step of acquiring the certificate information of the target user comprises the following steps:
acquiring a certificate identifier of a target user through a certificate identification device, and sending the certificate identifier to the third-party certificate verification system;
and acquiring the user identity information and the certificate photo which are fed back by the third-party certificate verification system aiming at the certificate identification.
Optionally, in the method, the step of acquiring credential information of the target user includes:
acquiring a certificate image of the target user through an image acquisition device;
and performing character recognition and image capture on the certificate image to obtain the user identity information and the certificate photo.
Optionally, in the above method, the step of storing the current facial image in association with the user identity information in the permitted registration list includes:
displaying a registration declaration to the target user;
and acquiring confirmation feedback information of the user aiming at the registration declaration, storing the current facial image, and performing associated storage on the current facial image and the user identity information in the allowed registration list.
Optionally, in the above method, the confirmation feedback information includes one or more of voice confirmation information, video confirmation information, and signature confirmation information.
Another object of the present invention is to provide a facial information registration apparatus applied to a server which stores in advance a registration permission list including at least one user identification information permitting registration of facial information, the apparatus comprising:
the certificate information acquisition module is used for acquiring the certificate information of a target user, and the certificate information comprises user identity information and a certificate photo;
the identity information judging module is used for comparing the user identity information with the allowed registration list and judging whether the user identity information is recorded in the allowed registration list;
the facial image acquisition module is used for acquiring at least one current facial image of the target user when the user identity information is recorded in the allowed registration list;
the comparison module is used for comparing the current facial image with the certificate photo and judging whether the current facial image is matched with the certificate photo;
and the registration module is used for storing the current facial image and the user identity information in the allowed registration list in an associated manner if the current facial image is matched with the certificate photo.
Another object of the present invention is to provide a face information registration system, which includes a server and a user terminal or a registration device communicating with the server, wherein the server includes the face information registration apparatus provided by the present invention.
Compared with the prior art, the invention has the following beneficial effects:
according to the face information registration method, device and system provided by the invention, the certificate information and the current face image of the user are acquired through the interaction between the server and other terminal equipment, whether the user information is consistent with the current face image or not is verified, and the current face image and the user identity information are stored in a correlation mode when the user information is consistent with the current face image. Therefore, the user can independently register the facial information through the interaction between other terminals and the server, the operation of the user is facilitated, and the efficiency of registering the facial information is greatly improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should also be noted that, unless otherwise explicitly specified or limited, the terms "disposed," "mounted," "connected," and "connected" are to be construed broadly and may, for example, be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Referring to fig. 1, fig. 1 is a facial information registration system according to a preferred embodiment of the present invention, which includes a server 100 and a user terminal 200 or a registration device 300 communicating with the server 100. The server 100 may communicate with the user terminal 200 or the registration apparatus 300 through the network 400 to implement data communication or interaction between the server 100 and the user terminal 200 or the registration apparatus 300.
In this embodiment, the server 100 may be, but is not limited to, a web server, an ftp (file transfer protocol) server, and the like. The network 400 may be, but is not limited to, a wired network or a wireless network.
Referring to fig. 2, fig. 2 is a block diagram of the server 100 shown in fig. 1. The server 100 includes a face information registration apparatus 110, a memory 120, a processor 130, and a communication unit 140.
The elements of the memory 120, the processor 130 and the communication unit 140 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The face information registration means 110 includes at least one software function module that may be stored in the memory 120 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the server 100. The processor 130 is used for executing executable modules stored in the memory 120, such as software functional modules and computer programs included in the facial information registration apparatus 110.
The Memory 120 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 120 is used for storing a program, and the processor 130 executes the program after receiving the execution instruction. The communication unit 140 is configured to establish a communication connection between the server 100 and the user terminal 200 or the registration apparatus 300 via the network 400, and to transceive data via the network 400.
The processor 130 may be an integrated circuit chip having signal processing capabilities. The processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Referring to fig. 3, fig. 3 is a flowchart illustrating a face information registration method applied to the server 100 shown in fig. 1, and the method including various steps will be described in detail below.
Step S110, certificate information of a target user is obtained, wherein the certificate information comprises user identity information and a certificate photo.
In this embodiment, the server 100 may obtain the identity information and the certificate photo of the user from the user's identity card, driving license, passport or other certificate that can prove the unique identity of the user.
Optionally, in one manner of this embodiment, the certificate image of the target user may be acquired through an image capture device. For example, the server 100 may capture a certificate image of a user through a camera of the user terminal 200 or the registration apparatus 300.
Then, the server 100 performs character recognition and image capture on the certificate image to obtain the user identity information and the certificate photo. For example, the server 100 recognizes the user's name, sex, date of birth, and address on the identification card image by using OCR (Optical Character Recognition). And the face detection technology is utilized to intercept the certificate photo of the certificate image.
Optionally, in one manner of this embodiment, the server 100 may obtain a certificate identifier of a target user through a certificate recognition device, and send the certificate identifier to the third-party certificate verification system. For example, the registration device 300 can include a document identification module that can read electronic information in a document such as an identification card, passport, etc. as the document identification and send the document identification to the server 100, which sends the document identification to the third party document verification system (e.g., a document verification system of a public security department).
Then, the server 100 obtains the user identity information and the certificate photo fed back by the third-party certificate verification system for the certificate identification.
Further, since a general certificate photo is small and resolution of the certificate photo is not high, in this embodiment, the server 100 extracts the certificate photo, inputs the certificate photo into a first deep learning model trained in advance, and processes the resolution of the certificate photo to improve the resolution of the certificate photo.
Specifically, in this embodiment, the first deep learning model may be constructed and trained by using a method based on an antagonistic neural network.
Firstly, an image generation network is constructed, and a high-resolution image I is selectedHRDown-sampling and blurring (Gaussian filtering) are carried out to obtain a corresponding low-resolution image ILR. Will IHRCorresponding to ILRAs a training sample pair. Recording low resolution images ILRObtaining an image I after super-resolution reconstructionSR。
Then, a generating network is trained by using a convolutional neural network CNNThe corresponding weight and bias parameter is thetaG={W1:L;b1:LWhere L denotes the number of layers of the network.
For a given training sample pairN-1, …, N and correspondingN is 1, …, N, and the objective function of generating the network is:
wherein lSRIs a loss function.
Then, an image discrimination network is constructed, in this embodiment, a network structure similar to VGG and a discrimination network of a standard countermeasure network are adopted, and an objective function of the discrimination network is as follows:
wherein,for differential networks, θDIs a differential network parameter.
And finally, constructing a loss function, wherein the loss function is formed by combining a minimum Mean Square Error (MSE) based on a pixel level, a reconstruction error (VGG loss, calculated in a VGG feature space) based on content perception and a counterstudy cost function (Dis. loss):
MSE:
VGG loss:
wherein phi isi,jRepresenting the feature mapping in the VGG19 network after the jth layer and before the ith layer pooling.
Dis.Loss:
The final loss function is:
the generation network, the discrimination network and the loss function form the main components of the countermeasure network, and the constructed countermeasure network is trained and optimized to solve the generation networkThe parameter of (a), wherein,
θG={W1:L;b1:L}
to obtain thetaGThe sharpness of the document photo can then be processed to improve the resolution of the document photo.
Step S120, comparing the user identity information with the permitted registration list, and determining whether the user identity information is recorded in the permitted registration list.
In this embodiment, the server 100 stores a permitted registration list in advance, where the permitted registration list includes at least one user identity information permitted to perform facial information registration.
After the user identity information is obtained in step S110, it is determined whether the user identity information is recorded in the permitted registration list. And if the user identity information is not recorded in the allowed registration list, preventing further registration action of the user. If the user identity information is recorded in the allowed registration list, step S130 is performed.
Step S130, when the user identity information is recorded in the permitted registration list, acquiring at least one current facial image of the target user.
In this embodiment, the server 100 may transmit an image capture notification to the user terminal 200 or the registration apparatus 300. After receiving the image capturing notification, the user terminal 200 or the registration device 300 acquires at least one current facial image of the target user through an image capturing apparatus and sends the current facial image to the server 100. It is understood that, when the user registers with the user terminal 200, one of the face images stored in the user terminal 200 may be selected as the current face image and uploaded to the server 100.
Step S140, comparing the current face image with the certificate photo, and judging whether the current face image is matched with the certificate photo.
The server 100 verifies whether the current face image matches the certificate photograph to prevent an illegal user from registering by stealing another person's certificate.
In this embodiment, the service area inputs the current facial image and the certificate photo into a second deep learning model obtained by pre-training for matching processing, so as to determine whether the current facial image and the certificate photo conform to each other.
Optionally, in this embodiment, the second deep learning model may adopt a deep network model of an inclusion-rest-v 2 structure.
Firstly, a public face library is used as a training sample, and a deep network with an increment-rest structure is adopted for feature extraction and training to obtain the second deep learning model.
Then, facial feature positioning is performed on the certificate photo acquired in step S110 and the current facial image acquired in step S130, and correction and normalization processing is performed on the current facial image and the certificate photo according to the facial feature positioning.
For example, the central point of two eyeballs of the face is determined by using a face key point positioning technology, then the two central points are connected, face rotation correction and alignment are carried out according to the included angle between the connecting line between two eyes and a horizontal line, and finally normalization processing is carried out on the face by taking the centers of the two eyes as a standard.
Then, inputting the current face image and the certificate photo after the normalization processing into a second deep learning model obtained by pre-training for feature extraction, and then, comparing and identifying by using a Support Vector Machine (SVM) method so as to judge whether the current face image is consistent with the certificate photo.
And S150, if the current facial image is matched with the certificate photo, the current facial image and the user identity information in the permission registration list are stored in a correlation mode.
Optionally, in this embodiment, if the current image matches the certificate photo, the server 100 displays a registration declaration to the target user, where the registration declaration may be a text, a picture, or a video description.
The server 100 then obtains the confirmation feedback information of the user for the registration declaration. The confirmation feedback information comprises one or more of voice confirmation information, video confirmation information and signature confirmation information.
For example, the registration declaration may be a voluntary book, and the server 100 acquires, as the confirmation feedback information, a video or audio of the user reading the voluntary book through the user terminal 200 or a video and audio acquisition device of the registration system, or acquires, as the confirmation feedback information, signature information of the user through a touch screen of the user terminal 200 or a touch acquisition device of the registration apparatus 300.
After the confirmation feedback information is obtained, the server 100 stores the current facial image, and stores the current facial image and the user identity information in the permitted registration list in an associated manner. After the corresponding relation between the current face image and the user is confirmed, the current face image can be used for carrying out identity verification on the user later.
Further, after a target user completes the registration of facial information, the server 100 may display a prompt message through the user terminal 200 or the registration device 300 to prompt a relevant user of the target user to perform the registration of facial information.
Referring to fig. 4, fig. 4 is a schematic diagram of a facial information registration apparatus 110 applied to the server 100 shown in fig. 1, where the facial information registration apparatus includes a certificate information acquisition module 111, an identity information determination module 112, a facial image acquisition module 113, a comparison module 114, and a registration module 115.
The certificate information acquiring module 111 is configured to acquire certificate information of a target user, where the certificate information includes user identity information and a certificate photo.
In this embodiment, the credential information acquiring module 111 can be used to execute step S110 shown in fig. 3, and the detailed description about the credential information acquiring module 111 can refer to the description about step S110.
The identity information determining module 112 is configured to compare the user identity information with the allowed registration list, and determine whether the user identity information is recorded in the allowed registration list.
In this embodiment, the identity information determining module 112 may be configured to execute step S120 shown in fig. 3, and the detailed description about the identity information determining module 112 may refer to the description about step S120.
The facial image obtaining module 113 is configured to obtain at least one current facial image of the target user when the user identity information is recorded in the permitted registration list.
In this embodiment, the facial image acquisition module 113 may be configured to execute step S130 shown in fig. 3, and the description of step S130 may be referred to for a detailed description of the facial image acquisition module 113.
The comparing module 114 is configured to compare the current facial image with the certificate photo, and determine whether the current facial image matches the certificate photo.
In this embodiment, the comparison module 114 can be used to execute the step S140 shown in fig. 3, and the detailed description about the comparison module 114 can refer to the description about the step S140.
The registration module 115 is configured to, if the current facial image matches the certificate photo, associate and store the current facial image and the user identity information in the permitted registration list.
In this embodiment, the registration module 115 may be configured to execute step S150 shown in fig. 3, and reference may be made to the description of step S150 for a detailed description of the registration module 115.
In summary, the method, the apparatus, and the system for registering face information provided by the present invention acquire the certificate information and the current face image of the user through the interaction between the server 100 and other terminal devices, verify whether the user information matches the current face image, and store the current face image and the user identity information in association when the user information matches the current face image. Therefore, the user can independently register the facial information through the interaction between other terminals and the server 100, the operation of the user is facilitated, and the efficiency of registering the facial information is greatly improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.