WO2016177259A1 - 一种相似图像识别方法及设备 - Google Patents
一种相似图像识别方法及设备 Download PDFInfo
- Publication number
- WO2016177259A1 WO2016177259A1 PCT/CN2016/079158 CN2016079158W WO2016177259A1 WO 2016177259 A1 WO2016177259 A1 WO 2016177259A1 CN 2016079158 W CN2016079158 W CN 2016079158W WO 2016177259 A1 WO2016177259 A1 WO 2016177259A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- identified
- feature
- normalized
- distance
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/761—Proximity, similarity or dissimilarity measures
Definitions
- the present application relates to the field of communications technologies, and in particular, to a similar image recognition method.
- the application also relates to a similar image recognition device.
- the traditional face authentication method is mainly based on SIFT (Scale-invariant feature transform), LBP (Local Binary Patterns) and other features to describe the photos and the faces in the existing photos. Then, through the classifier, it is judged whether the two faces are the same person, wherein SIFT is a local feature descriptor for the field of image processing, and the description has scale invariance and can detect key points in the image, and the SIFT feature is Regardless of the size and rotation of the image based on some local appearance of interest points on the object, the tolerance for light, noise, and slight viewing angle changes is also quite high; LBP is an effective texture description operator that can measure and extract images. Local texture information, which is invariant to illumination.
- SIFT Scale-invariant feature transform
- LBP Local Binary Patterns
- the prior art has the following disadvantages: the traditional feature-based face authentication algorithm often extracts high-dimensional features from the face region and uses a classifier. Face authentication. Such algorithms are often only targeted at face features. Don't notice the pictures or photos to be effective. In the case that the background is complicated and the face changes greatly, the recognition technology in the prior art often cannot accurately pass the images in the two photos to be the same person. Therefore, how to ensure the recognition accuracy is The fast and efficient recognition of the image to be detected and the existing image has become a technical problem to be solved by those skilled in the art.
- the present application provides a similar image recognition method for quickly and efficiently identifying an image to be detected and an existing image under the premise of ensuring accuracy, and the method includes:
- a metric distance between the normalized image and a normalized image of the second image to be recognized the metric distance being characterized according to the normalized image and the normalized image of the second image to be recognized Distance generation in space, wherein the distance of the similar normalized image in the feature space is less than the distance of the non-similar normalized image in the feature space;
- the metric distance is less than or equal to the threshold, confirming that the first to-be-identified image is similar to a specified feature of the second to-be-identified image.
- the area to be compared corresponding to the specified feature in the first to-be-identified image is obtained, specifically:
- the key point coordinates corresponding to the plurality of key point features of the specified feature in the to-be-contrast area are obtained by a preset key point regression model.
- the image in the area to be identified is aligned with a preset standard image, specifically:
- the parameter M is generated according to coordinates of each key point of the standard image and key point coordinates of an image corresponding to the specified feature in the labeled image.
- the method further includes:
- the resolution of the normalized image is adjusted to a preset resolution.
- determining a metric distance between the normalized image and the normalized image of the second to-be-identified image is specifically:
- the designated feature is specifically a face region
- the key feature includes at least a left eye region, a right eye region, a nose region, a left corner region, and a right corner region.
- the convolutional neural network parameters are trained according to an annotated image comprising a normalized image in which the specified features are similar to each other and a normalized image in which the specified features are not similar to each other.
- the present application also proposes a similar image recognition device, including:
- An acquiring module configured to acquire an area to be compared corresponding to the specified feature in the first to-be-identified image
- An alignment module configured to align an image in the area to be identified with a preset standard image, And using the aligned image as a normalized image of the first to-be-identified image, the standard image corresponding to the designated feature;
- a determining module configured to determine a metric distance between the normalized image of the first to-be-identified image and a normalized image of the second to-be-identified image, the metric distance according to the normalized image and the Calculating a distance of the normalized image of the second image to be recognized in the feature space, wherein a distance of the similar normalized image in the feature space is smaller than a distance of the non-similar normalized image in the feature space;
- An identification module configured to confirm, when the metric distance is greater than a preset threshold, that the first to-be-identified image is not similar to a specified feature of the second to-be-identified image, and that the metric distance is less than or equal to the threshold It is confirmed that the first to-be-identified image is similar to the specified feature of the second to-be-identified image.
- the determining module is specifically configured to:
- the alignment module is specifically configured to:
- the method further comprises:
- an adjustment module configured to adjust a resolution of the normalized image to a preset resolution.
- the obtaining module is specifically configured to:
- the designated feature is specifically a face region
- the key feature includes at least a left eye region, a right eye region, a nose region, a left corner region, and a right corner region.
- the convolutional neural network parameters are trained according to an annotated image comprising a normalized image in which the specified features are similar to each other and a normalized image in which the specified features are not similar to each other.
- the present application also proposes a similar image recognition method, which is applied to a client, and includes the following steps:
- the identity authentication request carries the first to-be-identified image uploaded by the user and the authentication information of the user;
- the client presents the authentication result to the user according to the identity authentication response.
- the user identity authentication request is received, specifically:
- the identity authentication response is an identity authentication success response or an identity authentication failure response, and further includes:
- the identity authentication success response is generated by the server after confirming that the first to-be-identified image is similar to the specified feature of the second to-be-identified image;
- the identity authentication failure response is generated by the server after confirming that the first to-be-identified image is not similar to the specified feature of the second to-be-identified image.
- the authentication result is displayed to the user according to the identity authentication response, specifically:
- the user When receiving the identity authentication failure response, the user is presented with a preset interface corresponding to the identity authentication failure response, and prompting the user whether the manual verification is required.
- the method further includes:
- the identity authentication request is sent to a preset server.
- the application also proposes a client, including:
- a receiving module configured to receive an identity authentication request of the user, where the identity authentication request carries the first to-be-identified image uploaded by the user and the authentication information of the user;
- a sending module configured to send the identity authentication request to the server, so that the server acquires a second to-be-identified image corresponding to the user according to the authentication information;
- a receiving module configured to receive an identity authentication response sent by the server
- a display module configured to display the authentication result to the user according to the identity authentication response.
- the receiving module is specifically configured to:
- the identity authentication response is an identity authentication success response or an identity authentication failure response. Also includes:
- the identity authentication success response is generated by the server after confirming that the first to-be-identified image is similar to the specified feature of the second to-be-identified image;
- the identity authentication failure response is generated by the server after confirming that the first to-be-identified image is not similar to the specified feature of the second to-be-identified image.
- the displaying module is configured to: when the receiving module receives the identity authentication success response, display the preset interface corresponding to the identity authentication success response to the user;
- the displaying module is specifically configured to: when the receiving module receives the identity authentication failure response, display, to the user, a preset interface corresponding to the identity authentication failure response, and to the user Show tips for manual verification.
- the receiving module when the display module displays the preset interface corresponding to the identity authentication failure response to the user and prompts the user whether the manual verification is required, the receiving module further receives the The manual verification request of the user, the receiving module instructing the sending module to send the identity authentication request to a preset server.
- the present application also proposes a similar image recognition method, which is applied to a server, and includes the following steps:
- the metric distance is generated according to a distance of the normalized image and the normalized image of the second image to be recognized in the feature space, wherein a distance of the similar normalized image in the feature space is less than a non-similar The normalized image of the distance in the feature space;
- metric distance is greater than a preset threshold, confirm that the first to-be-identified image is not similar to the specified feature of the second to-be-identified image, and return an identity verification failure response to the client;
- the metric distance is less than or equal to the threshold, confirm that the first to-be-identified image is similar to the specified feature of the second to-be-identified image, and return an identity verification success response to the client.
- the area to be compared corresponding to the specified feature in the first to-be-identified image is obtained, specifically:
- the key point coordinates corresponding to the plurality of key point features of the specified feature in the to-be-contrast area are obtained by a preset key point regression model.
- the image in the area to be identified is aligned with a preset standard image, specifically:
- the parameter M is generated according to coordinates of each key point of the standard image and key point coordinates of an image corresponding to the specified feature in the labeled image.
- the method further includes:
- the resolution of the normalized image is adjusted to a preset resolution.
- determining a metric distance between the normalized image and the normalized image of the second to-be-identified image is specifically:
- the specified feature is mapped to Solving the feature value after the space, and using the feature value as the feature value of the normalized image;
- the designated feature is specifically a face region
- the key feature includes at least a left eye region, a right eye region, a nose region, a left corner region, and a right corner region.
- the convolutional neural network parameters are trained according to an annotated image comprising a normalized image in which the specified features are similar to each other and a normalized image in which the specified features are not similar to each other.
- a server including:
- a querying module configured to query, according to the authentication information, a second to-be-identified image corresponding to the user
- An acquiring module configured to acquire an area to be compared corresponding to the specified feature in the first to-be-identified image
- An alignment module configured to align an image in the to-be-identified area with a preset standard image, and use the aligned image as a normalized image of the first to-be-identified image, the standard image and the Specify the feature correspondence;
- a determining module configured to determine a metric distance between the normalized image of the first to-be-identified image and a normalized image of the second to-be-identified image, the metric distance according to the normalized image and the Calculating a distance of the normalized image of the second image to be recognized in the feature space, wherein a distance of the similar normalized image in the feature space is smaller than a distance of the non-similar normalized image in the feature space;
- An identification module configured to confirm, when the metric distance is greater than a preset threshold, that the first to-be-identified image is not similar to a specified feature of the second to-be-identified image, and that the metric distance is less than or When the threshold is equal to the confirmation, the first to-be-identified image is similar to the specified feature of the second to-be-identified image;
- a sending module configured to return an identity verification failure response to the client when the identification module confirms that the first to-be-identified image is not similar to a specified feature of the second to-be-identified image, and confirm in the identification module And returning the identity verification success response to the client when the first to-be-identified image is similar to the specified feature of the second to-be-identified image.
- the determining module is specifically configured to:
- the alignment module is specifically configured to map coordinates of each key point of the to-be-identified area to key point coordinates of the aligned image according to the parameter M, wherein the parameter M is a key according to the standard image. Point coordinates and keypoint coordinates of the image corresponding to the specified feature in the annotated image.
- the method further comprises:
- an adjustment module configured to adjust a resolution of the normalized image to a preset resolution.
- the obtaining module is specifically configured to:
- the designated feature is specifically a face region
- the key feature includes at least a left eye region, a right eye region, a nose region, a left corner region, and a right corner region.
- the convolutional neural network parameters are obtained according to the labeled image training, and the labeled
- the annotation image includes a normalized image in which the specified features are similar to each other and a normalized image in which the specified features are not similar to each other.
- the area to be identified is to be recognized.
- the resolution of the aligned image is adjusted to a preset resolution, and the adjusted image is used as a normalized image, and finally the normalized image of the first image to be recognized and the normalized image of the second image to be recognized are acquired.
- the metric distance between the images determines whether the specified features of the first to-be-identified image and the second to-be-identified image are similar according to a size between the metric distance and the preset threshold. Therefore, under the premise of ensuring accuracy, the similarity between the image to be detected and another image to be detected is quickly and efficiently identified, which provides a reference for improving the security of the existing system.
- FIG. 1 is a schematic flow chart of a similar image recognition method proposed in the present application.
- FIG. 2 is a structural diagram of a convolutional neural network for training face feature point positioning in a specific embodiment of the present application
- FIG. 3 is a schematic flowchart of performing depth metric learning in a specific embodiment of the present application.
- FIG. 4 is a structural diagram of a convolutional neural network for training face authentication in a specific embodiment of the present application
- FIG. 5 is a schematic flowchart of a similar image recognition performed by a client in a specific embodiment of the present application.
- FIG. 6 is a schematic flowchart of performing similar image recognition by a server in a specific embodiment of the present application.
- FIG. 7 is a schematic structural diagram of a similar image recognition device according to the present application.
- FIG. 8 is a schematic structural diagram of a client according to the present application.
- FIG. 9 is a schematic structural diagram of a server according to the present application.
- the present application proposes a recognition method for similar images, which can be implemented by means of a computer device in a network environment.
- the main purpose of judging the similarity is the server in the background of the system, and the client-oriented client is either a mobile device compatible with key input and touch screen input, or a PC device, and the client and the server are wired or A wireless way to achieve network connectivity.
- a schematic flowchart of a similar image recognition method proposed in the present application includes the following steps:
- the area to be compared can be obtained by determining the key point coordinates (related to the face). Specifically, in determining a region to be compared corresponding to the specified feature in the first to-be-identified image, the to-be-contrast region in the first to-be-identified image may be first determined according to a detection algorithm corresponding to the specified feature.
- the key point coordinates corresponding to the plurality of key point features of the specified feature in the to-be-compared area are obtained by using a preset key point regression model, so as to accurately determine the area to be compared.
- the designated feature may be a face region
- the key feature includes at least a left eye region, a right eye region, a nose region, a left corner region, and a right corner region.
- a deep convolutional neural network is used to implement regression of face key points.
- the structure of the neural network in this embodiment is as shown in FIG. 2, and includes four convolution layers and two fully connected layers.
- the first three convolutional layers contain the maximum pooling operation, and the last convolutional layer contains only the convolution operation.
- the first fully connected layer contains 100 nodes, and the second is fully connected to have 10 nodes, representing the coordinates of the five key points of the face.
- Regression uses the Euclidean distance as the loss function, and the expression is as follows:
- x represents the coordinates of the key points of the annotation, representing the coordinates of the key points predicted by the convolutional neural network.
- the specific embodiment uses a stochastic gradient descent algorithm to optimize the parameters in the model, thereby training to obtain a model for predicting key points of the face.
- this step maps the coordinates of each key point of the to-be-identified area to the key point coordinates of the aligned image according to the parameter M, wherein the parameter M is the coordinate of each key point according to the standard image and the labeled image
- the key point coordinates of the image corresponding to the specified feature are generated.
- the specific embodiment defines five key point positions in the standard human face, which are the left eye, the right eye, the nose, the left mouth corner, and the right mouth corner position, and are detected by The face is rotated, panned, and scaled to align to a standard face. Assuming that the position of the feature point in the standard face is (x, y) and the position of the predicted feature point is (x', y'), then the relationship between the two is:
- 4 equations are needed.
- the specific embodiment maps five points, establishes a linear equation group, and calculates a system of linear equations by the least squares method of the linear equations. details as follows:
- the above process is a detailed generation process of the parameter M.
- Those skilled in the art can perform alignment processing on the face image according to the parameter M.
- other improved implementation manners that can obtain the parameter M are all within the protection scope of the present application.
- the comparison result is more accurate.
- the application needs to align the image in the area to be identified with the preset standard image.
- this step aligns the face to a standard face, and those skilled in the art can set the face of the standard based on existing comparison criteria, which are all within the scope of the present application. .
- the present application adjusts the resolution of the normalized image to a preset resolution.
- the step will be the face key.
- the point coordinate information is normalized to the 39x39 scale space.
- a specified feature in the normalized image is first extracted by a convolutional neural network, and then the specified feature is mapped to the convolutional neural network and the distance metric loss function.
- the feature value after the feature space, and the feature value is used as the feature value of the normalized image, and finally determining the feature value of the normalized image and the feature of the normalized image of the second image to be recognized
- the Euclidean distance between the values, the Euclidean distance is taken as the metric distance.
- the technical solution of the present application combines a deep convolutional neural network and metric learning to train a face authentication model.
- Deep convolutional neural networks are widely used in the field of image understanding, including image classification, image retrieval, target detection, and face recognition.
- the convolutional neural network has a feature self-learning, and the model generalization ability is good.
- Metric learning is a linear or non-linear mapping of feature spaces such that the same face feature distance is less than a different face feature distance.
- the convolutional neural network parameters are obtained according to the labeled image training, and the labeled image includes a normalized image in which the specified features are similar to each other and a normalized image in which the specified features are not similar to each other.
- sample pairing is performed in a pair-wise manner, and each sample includes two portrait images, if two images are in the image Not the same person, indicating a negative sample, if the same person is expressed as Positive sample.
- a positive sample is generated by combining two pictures belonging to the same person, and a negative sample is generated by a picture that is not the same person.
- the depth metric learning mainly consists of two parts. One of them is the parameter W, which represents the parameters of the resulting convolutional neural network that need to be trained, and the other is the distance metric loss function. Different from traditional face recognition, the input of this application is 2 faces, and the final loss is also the distance between 2 faces in the feature space.
- the structure of the convolutional neural network used in this embodiment is as shown in FIG.
- metric learning is to find a transformation space in which the distance of similar samples is reduced, and the distance between different types of samples is increased. Therefore, this step first searches for a nonlinear transformation through metric learning, transforming the face from the original pixel to a feature space, so that the similar face distance is small and the dissimilar face distance is large in this space. Then the facial features are extracted by the deep convolutional neural network. Finally, the features learned by the convolutional neural network are mapped to a feature space in combination with metric learning. Since the convolutional neural network continues the non-linear mapping of the face image, the feature expression thus obtained is more robust than the artificially designed feature, and the face authentication accuracy is higher.
- the resulting 100-dimensional feature will be subjected to metric learning, and the loss function employed in the process is as follows:
- the parameter W of the model can be obtained by minimizing the loss function.
- the technician can use the chain derivation rule to obtain the gradient of the corresponding parameter and use the stochastic gradient descent method (SGD) to optimize the parameters of the calculation model.
- SGD stochastic gradient descent method
- Other calculation models capable of achieving the optimization effect are also within the protection scope of the present application.
- the faces in the map are respectively detected, and feature point extraction and face alignment are performed according to the face region.
- the feature extraction is performed and the feature is mapped into the space of 100 dimensions.
- the Euclidean distance of the two facial features is calculated. When the distance is greater than or equal to ⁇ , it means that it is not the same person, otherwise it is the same person.
- the process can be completed by the client and the server.
- the user can use a mobile terminal such as a smart phone or a tablet to upload images and information, and also upload images and related information through the PC terminal.
- the server may be a data server or a web server pre-configured by the system operator.
- the client As a link between the user and the server, the client is mainly used to forward the user's input content to the server, and the server verifies the identity of the user according to the content input by the user, and finally the client displays the verification result according to the server.
- the following first introduces the similar image recognition method on the client side, as shown in FIG. 5, including the following steps:
- S501 Receive an identity authentication request of the user, where the identity authentication request carries the first to-be-identified image uploaded by the user and the authentication information of the user.
- the form of the client is not limited, and the client may be a PC device or a mobile device. However, both can provide the user with the function of image uploading and information input. Specifically, the client first acquires the image uploaded by the user and the information input by the user, and then uses the image as the first image to be recognized, and Using the information as the authentication information, and finally generating the identity authentication request according to the first to-be-identified image and the authentication information.
- the server may obtain the second to-be-identified image corresponding to the user according to the data.
- the server queries the database for the image in the user ID according to the identity information provided by the user, and uses the image as the second image to be identified, thereby determining whether the image uploaded by the user is the same as the ID card. Image matching.
- the identity authentication response is an identity authentication success response or an identity authentication failure response, wherein the identity authentication success response is that the server confirms that the first to-be-identified image is similar to the specified feature of the second to-be-identified image. And then generated, and the identity authentication failure response is generated by the server after confirming that the first to-be-identified image is not similar to the specified feature of the second to-be-identified image.
- the client When the client receives the identity authentication success response, the client displays the preset interface corresponding to the identity authentication success response to the user;
- the client when the client receives the identity authentication failure response, the client displays the preset interface corresponding to the identity authentication failure response to the user, and shows whether the user needs to perform Manually verified prompt information.
- the present application automatically judges a group of images to be recognized by the device, in order to further avoid the influence of the error, when the failure response is returned to the user, the prompt information indicating whether manual verification is required is simultaneously displayed to the user. . If the user thinks that the manual review needs to be resubmitted, then the client re-advertises the manual verification request, and after receiving the manual verification request from the user, the client sends the identity authentication request to the preset server.
- the above is the process of the client, and is mainly used to implement the interaction between the user and the server.
- the following embodiment is a similar image recognition method on the server side, as shown in FIG. 6, including the following steps:
- S605. Determine a metric distance between the normalized image and a normalized image of the second to-be-identified image, the metric distance according to the normalized image and the normalized image of the second to-be-identified image a distance generation in the feature space, wherein a distance of the similar normalized image in the feature space is less than a distance of the non-similar normalized image in the feature space;
- the present application also proposes a similar image recognition device, as shown in FIG. 7, comprising:
- the obtaining module 710 is configured to obtain an area to be compared corresponding to the specified feature in the first to-be-identified image
- the aligning module 720 is configured to align an image in the to-be-identified area with a preset standard image, and use the aligned image as a normalized image of the first to-be-identified image, the standard image and the Corresponding to the specified feature;
- a determining module 730 configured to determine a metric distance between the normalized image of the first to-be-identified image and a normalized image of the second to-be-identified image, the metric distance according to the normalized image and A normalized image of the second image to be identified is generated in a distance in the feature space, wherein a distance of the similar normalized image in the feature space is smaller than a non-similar normalized image in the feature Distance of space;
- the identification module 740 is configured to confirm that the first to-be-identified image is not similar to the specified feature of the second to-be-identified image when the metric distance is greater than a preset threshold, and that the metric distance is less than or equal to the The threshold is confirmed to be similar to the specified feature of the second image to be recognized.
- the determining module is specifically configured to:
- the alignment module is specifically configured to:
- an adjustment module configured to adjust a resolution of the normalized image to a preset resolution.
- the acquiring module is specifically configured to:
- the designated feature is specifically a face region
- the key feature includes at least a left eye region, a right eye region, a nose region, a left corner region, and a right corner region.
- the convolutional neural network parameters are obtained according to the labeled image, and the labeled image includes normalized images with specified features being similar to each other and designated features are not mutually exclusive. A similar normalized image.
- the application also proposes a client, as shown in FIG. 8, comprising:
- the receiving module 810 is configured to receive an identity authentication request of the user, where the identity authentication request carries the first to-be-identified image uploaded by the user and the authentication information of the user;
- the sending module 820 is configured to send the identity authentication request to the server, so that the server acquires a second to-be-identified image corresponding to the user according to the authentication information;
- the receiving module 810 is further configured to receive an identity authentication response sent by the server.
- the displaying module 830 is configured to display the authentication result to the user according to the identity authentication response.
- the receiving module is specifically configured to:
- the identity authentication response is an identity authentication success response or an identity authentication failure response, and further includes:
- the identity authentication success response is generated by the server after confirming that the first to-be-identified image is similar to the specified feature of the second to-be-identified image;
- the identity authentication failure response is generated by the server after confirming that the first to-be-identified image is not similar to the specified feature of the second to-be-identified image.
- the displaying module is specifically configured to: when the receiving module receives the identity authentication success response, display the preset interface corresponding to the identity authentication success response to the user; Or the displaying module is specifically configured to: when the receiving module receives the identity authentication failure response, display, to the user, a preset interface corresponding to the identity authentication failure response, and to the user Show tips for manual verification.
- the receiving module displays to the user in the display module Receiving a manual verification request corresponding to the identity authentication failure response and a prompt to the user to indicate whether manual verification is required, the receiving module instructing the sending module to The identity authentication request is sent to the preset server.
- the embodiment of the present application further provides a server, as shown in FIG. 9, including:
- the receiving module 910 is configured to receive an identity authentication request sent by the client, where the identity authentication request carries the first to-be-identified image uploaded by the user and the authentication information of the user;
- the querying module 920 is configured to query, according to the authentication information, a second to-be-identified image corresponding to the user;
- the obtaining module 930 is configured to acquire an area to be compared corresponding to the specified feature in the first to-be-identified image
- An alignment module 940 configured to align an image in the to-be-identified area with a preset standard image, and use the aligned image as a normalized image of the first to-be-identified image, the standard image and the Corresponding to the specified feature;
- a determining module 950 configured to determine a metric distance between the normalized image of the first to-be-identified image and the normalized image of the second to-be-identified image, the metric distance according to the normalized image and a normalized image of the second image to be identified is generated in a distance in the feature space, wherein a distance of the similar normalized image in the feature space is smaller than a distance of the non-similar normalized image in the feature space ;
- the identification module 960 is configured to confirm that the first to-be-identified image is not similar to the specified feature of the second to-be-identified image when the metric distance is greater than a preset threshold, and that the metric distance is less than or equal to the Confirming, at the threshold, that the first to-be-identified image is similar to a specified feature of the second to-be-identified image;
- the sending module 970 is configured to: when the identifying module confirms that the first to-be-identified image is not similar to the specified feature of the second to-be-identified image, return an identity verification failure response to the client, and And when the identifying module confirms that the first to-be-identified image is similar to the specified feature of the second to-be-identified image, returning an identity verification success response to the client.
- the determining module is specifically configured to:
- the alignment module is specifically configured to:
- an adjustment module configured to adjust a resolution of the normalized image to a preset resolution.
- the acquiring module is specifically configured to:
- the designated feature is specifically a face region
- the key feature includes at least a left eye region, a right eye region, a nose region, a left corner region, and a right corner region.
- the convolutional neural network parameters are trained according to the labeled image, and the labeled image includes a normalized image in which the specified features are similar to each other and a normalized image in which the specified features are not similar to each other.
- the present application can be implemented in hardware or by means of software plus the necessary general hardware platform.
- the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including several The instructions are for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various implementation scenarios of the present application.
- modules in the apparatus in the implementation scenario may be distributed in the apparatus for implementing the scenario according to the implementation scenario description, or may be correspondingly changed in one or more devices different from the implementation scenario.
- the modules of the above implementation scenarios may be combined into one module, or may be further split into multiple sub-modules.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Medical Informatics (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Collating Specific Patterns (AREA)
- Image Analysis (AREA)
Abstract
一种相似图像识别方法,在确定第一待识别图像中与指定特征对应的待对比区域并将待识别区域中的图像与预设的标准图像进行对齐后,即将待识别区域中对齐后的图像的分辨率调整至预设的分辨率,以及将调整后的图像作为归一化图像,最后获取第一待识别图像的归一化图像与第二待识别图像的归一化图像之间的度量距离,根据度量距离与预设的阈值之间的大小确定第一待识别图像与第二待识别图像的指定特征是否相似。从而在保证准确性的前提下,针对待检测图像与另一待检测图像之间的相似度进行快速高效的识别,为提高现有的系统的安全性提供了参考依据。
Description
本申请涉及通信技术领域,特别涉及一种相似图像识别方法。本申请同时还涉及一种相似图像识别设备。
随着互联网和计算机信息技术的发展,网络购物日渐成为人们购物的新时尚。对于访问量以及购买量都很大的销售系统来说,每天都有着上千万的商家用户通过该销售系统售卖商品,但同时也有很多不法分子假冒他人身份企图在销售系统上进行交易处理,由此可能会产生各种违规操作,从而对其他合法用户的权益造成损害。因此如何基于从商家用户上传的待检测照片和已有的备案照片判断两种照片中是否是同一个人,成为销售系统所要解决的问题之一。
传统的人脸认证方法主要基于SIFT(Scale-invariant feature transform,尺度不变特征转换)、LBP(Local Binary Patterns,局部二值模式)等特征对待检测照片以及已有照片中的人脸进行描述,然后通过分类器来判断两个人脸是否是同一个人,其中SIFT是用于图像处理领域的一种局部特征描述子,这种描述具有尺度不变性且可在图像中检测出关键点,SIFT特征是基于物体上的一些局部外观的兴趣点而与影像的大小和旋转无关,对于光线、噪声、些微视角改变的容忍度也相当高;LBP为一种有效的纹理描述算子,能够度量和提取图像局部的纹理信息,对光照具有不变性。
然而,在实现本申请的过程中,发明人发现现有技术存在着以下缺点:传统的基于特征描述的人脸认证算法往往通过对人脸区域提取高维度的特征,通过分类器的方式来进行人脸认证。这类算法往往只有针对人脸特征特
别明显的图片或照片才有效果。在背景比较复杂,人脸变化较大的情况下,现有技术中的识别技术往往无法准确的通过两张照片中的图像是否为同一个人,因此,如何在保证识别准确度的前提下,针对待检测图像与已有的图像进行快速高效的识别,成为本领域技术人员亟待解决的技术问题。
发明内容
本申请提供了一种相似图像识别方法,用于在保证准确性的前提下,针对待检测图像与已有的图像进行快速高效的识别,该方法包括:
获取第一待识别图像中与指定特征对应的待对比区域;
将所述待识别区域中的图像与预设的标准图像进行对齐,并将对齐后的图像作为所述第一待识别图像的归一化图像,所述标准图像与所述指定特征对应;
确定所述归一化图像与第二待识别图像的归一化图像之间的度量距离,所述度量距离根据所述归一化图像以及所述第二待识别图像的归一化图像在特征空间中的距离生成,其中,相似的归一化图像在所述特征空间的距离小于非相似的归一化图像在所述特征空间的距离;
若所述度量距离大于预设的阈值,确认所述第一待识别图像与所述第二待识别图像的指定特征不相似;
若所述度量距离小于或等于所述阈值,确认所述第一待识别图像与所述第二待识别图像的指定特征相似。
优选地,获取第一待识别图像中与指定特征对应的待对比区域,具体为:
根据与所述指定特征对应的检测算法确定所述第一待识别图像中的所述待对比区域;
通过预设的关键点回归模型获取所述待对比区域中与所述指定特征的多个关键点特征对应的关键点坐标。
优选地,将所述待识别区域中的图像与预设的标准图像进行对齐,具体为:
根据参数M将所述待识别区域的各关键点坐标映射为对齐后的图像的关键点坐标;
其中,所述参数M为根据所述标准图像的各关键点坐标以及已标注图像中与所述指定特征对应的图像的关键点坐标生成的。
优选地,在将对齐后的图像作为所述第一待识别图像的归一化图像之后,还包括:
将所述归一化图像的分辨率调整至预设的分辨率。
优选地,确定所述归一化图像与第二待识别图像的归一化图像之间的度量距离,具体为:
通过卷积神经网络提取所述归一化图像中的指定特征;
根据卷积神经网络以及距离度量损失函数确定所述指定特征在映射至特征空间后的特征值,并将所述特征值作为所述归一化图像的特征值;
确定所述归一化图像的特征值与所述第二待识别图像的归一化图像的特征值之间的欧式距离,将所述欧式距离作为所述度量距离。
优选地,所述指定特征具体为脸部区域,所述关键点特征至少包括左眼区域、右眼区域、鼻子区域、左嘴角区域以及右嘴角区域。
优选地,所述卷积神经网络参数是根据已标注图像训练得到,所述已标注图像包括指定特征互相相似的归一化图像以及指定特征互不相似的归一化图像。
相应的,本申请还提出了一种相似图像识别设备,包括:
获取模块,用于获取第一待识别图像中与指定特征对应的待对比区域;
对齐模块,用于将所述待识别区域中的图像与预设的标准图像进行对齐,
并将对齐后的图像作为所述第一待识别图像的归一化图像,所述标准图像与所述指定特征对应;
确定模块,用于确定所述第一待识别图像的所述归一化图像与第二待识别图像的归一化图像之间的度量距离,所述度量距离根据所述归一化图像以及所述第二待识别图像的归一化图像在特征空间中的距离生成,其中,相似的归一化图像在所述特征空间的距离小于非相似的归一化图像在所述特征空间的距离;
识别模块,用于在所述度量距离大于预设的阈值时确认所述第一待识别图像与所述第二待识别图像的指定特征不相似,以及在所述度量距离小于或等于所述阈值时确认所述第一待识别图像与所述第二待识别图像的指定特征相似。
优选地,所述确定模块具体用于:
根据与所述指定特征对应的检测算法确定所述第一待识别图像中的所述待对比区域,通过预设的关键点回归模型获取所述待对比区域中与所述指定特征的多个关键点特征对应的关键点坐标。
优选地,所述对齐模块具体用于:
根据参数M将所述待识别区域的各关键点坐标映射为对齐后的图像的关键点坐标,其中,所述参数M为根据所述标准图像的各关键点坐标以及已标注图像中与所述指定特征对应的图像的关键点坐标生成的。
优选地,还包括:
调整模块,用于将所述归一化图像的分辨率调整至预设的分辨率。
优选地,所述获取模块具体用于:
通过卷积神经网络提取所述归一化图像中的指定特征;
根据卷积神经网络以及距离度量损失函数确定所述指定特征在映射至特征空间后的特征值,并将所述特征值作为所述归一化图像的特征值;
确定所述归一化图像的特征值与所述第二待识别图像的归一化图像的特征值之间的欧式距离,将所述欧式距离作为所述度量距离。
优选地,所述指定特征具体为脸部区域,所述关键点特征至少包括左眼区域、右眼区域、鼻子区域、左嘴角区域以及右嘴角区域。
优选地,所述卷积神经网络参数是根据已标注图像训练得到,所述已标注图像包括指定特征互相相似的归一化图像以及指定特征互不相似的归一化图像。
相应的,本申请还提出了一种相似图像识别方法,该方法应用于客户端,包括以下步骤:
接收用户的身份认证请求,所述身份认证请求携带所述用户上传的第一待识别图像以及所述用户的认证信息;
将所述身份认证请求发送至服务器,以使所述服务器根据所述认证信息获取与所述用户对应的第二待识别图像;
接收所述服务器发送的身份认证响应;
所述客户端根据所述身份认证响应向所述用户展示认证结果。
优选地,接收用户的身份认证请求,具体为:
获取所述用户上传的图像以及所述用户输入的信息;
将所述图像作为所述第一待识别图像,以及将所述信息作为所述认证信息;
根据所述第一待识别图像以及所述认证信息生成所述身份认证请求。
优选地,所述身份认证响应为身份认证成功响应或身份认证失败响应,还包括:
所述身份认证成功响应为所述服务器在确认所述第一待识别图像与所述第二待识别图像的指定特征相似之后生成的;
所述身份认证失败响应为所述服务器在确认所述第一待识别图像与所述第二待识别图像的指定特征不相似之后生成的。
优选地,根据所述身份认证响应向所述用户展示认证结果,具体为:
当接收到所述身份认证成功响应时,向所述用户展示预设的与所述身份认证成功响应对应的界面;
当接收到所述身份认证失败响应时,向所述用户展示预设的与所述身份认证失败响应对应的界面,以及向所述用户展示是否需要进行人工验证的提示信息。
优选地,在向所述用户展示预设的与所述身份认证失败响应对应的界面以及向所述用户展示是否需要进行人工验证的提示之后,还包括:
若接收到所述用户的人工验证请求,将所述身份认证请求发送至预设的服务端。
相应的,本申请还提出了一种客户端,包括:
接收模块,用于接收用户的身份认证请求,所述身份认证请求携带所述用户上传的第一待识别图像以及所述用户的认证信息;
发送模块,用于将所述身份认证请求发送至服务器,以使所述服务器根据所述认证信息获取与所述用户对应的第二待识别图像;
接收模块,用于接收所述服务器发送的身份认证响应;
展示模块,用于根据所述身份认证响应向所述用户展示认证结果。
优选地,所述接收模块具体用于:
获取所述用户上传的图像以及所述用户输入的信息,将所述图像作为所述第一待识别图像,以及将所述信息作为所述认证信息,根据所述第一待识别图像以及所述认证信息生成所述身份认证请求。
优选地,所述身份认证响应为身份认证成功响应或身份认证失败响应,
还包括:
所述身份认证成功响应为所述服务器在确认所述第一待识别图像与所述第二待识别图像的指定特征相似之后生成的;
所述身份认证失败响应为所述服务器在确认所述第一待识别图像与所述第二待识别图像的指定特征不相似之后生成的。
优选地,所述展示模块,具体用于在当所述接收模块接收到所述身份认证成功响应时,向所述用户展示预设的与所述身份认证成功响应对应的界面;
或,所述展示模块,具体用于在当所述接收模块接收到所述身份认证失败响应时,向所述用户展示预设的与所述身份认证失败响应对应的界面,以及向所述用户展示是否需要进行人工验证的提示信息。
优选地,当所述接收模块在所述展示模块向所述用户展示预设的与所述身份认证失败响应对应的界面以及向所述用户展示是否需要进行人工验证的提示之后,还接收到所述用户的人工验证请求,所述接收模块指示所述发送模块将所述身份认证请求发送至预设的服务端。
相应的,本申请还提出了一种相似图像识别方法,该方法应用于服务器,包括以下步骤:
接收由所述客户端发送的身份认证请求,所述身份认证请求携带所述用户上传的第一待识别图像以及所述用户的认证信息;
根据所述认证信息查询与所述用户对应的第二待识别图像;
获取第一待识别图像中与指定特征对应的待对比区域;
将所述待识别区域中的图像与预设的标准图像进行对齐,并将对齐后的图像作为所述第一待识别图像的归一化图像,所述标准图像与所述指定特征对应;
确定所述归一化图像与第二待识别图像的归一化图像之间的度量距离,
所述度量距离根据所述归一化图像以及所述第二待识别图像的归一化图像在特征空间中的距离生成,其中,相似的归一化图像在所述特征空间的距离小于非相似的归一化图像在所述特征空间的距离;
若所述度量距离大于预设的阈值,确认所述第一待识别图像与所述第二待识别图像的指定特征不相似,并向所述客户端返回身份验证失败响应;
若所述度量距离小于或等于所述阈值,确认所述第一待识别图像与所述第二待识别图像的指定特征相似,并向所述客户端返回身份验证成功响应。
优选地,获取第一待识别图像中与指定特征对应的待对比区域,具体为:
根据与所述指定特征对应的检测算法确定所述第一待识别图像中的所述待对比区域;
通过预设的关键点回归模型获取所述待对比区域中与所述指定特征的多个关键点特征对应的关键点坐标。
优选地,将所述待识别区域中的图像与预设的标准图像进行对齐,具体为:
根据参数M将所述待识别区域的各关键点坐标映射为对齐后的图像的关键点坐标;
其中,所述参数M为根据所述标准图像的各关键点坐标以及已标注图像中与所述指定特征对应的图像的关键点坐标生成的。
优选地,在将对齐后的图像作为所述第一待识别图像的归一化图像之后,还包括:
将所述归一化图像的分辨率调整至预设的分辨率。
优选地,确定所述归一化图像与第二待识别图像的归一化图像之间的度量距离,具体为:
通过卷积神经网络提取所述归一化图像中的指定特征;
根据卷积神经网络以及距离度量损失函数确定所述指定特征在映射至特
征空间后的特征值,并将所述特征值作为所述归一化图像的特征值;
确定所述归一化图像的特征值与所述第二待识别图像的归一化图像的特征值之间的欧式距离,将所述欧式距离作为所述度量距离。
优选地,所述指定特征具体为脸部区域,所述关键点特征至少包括左眼区域、右眼区域、鼻子区域、左嘴角区域以及右嘴角区域。
优选地,所述卷积神经网络参数是根据已标注图像训练得到,所述已标注图像包括指定特征互相相似的归一化图像以及指定特征互不相似的归一化图像。
相应的,本申请还提出了一种服务器,包括:
接收模块,用接收由所述客户端发送的身份认证请求,所述身份认证请求携带所述用户上传的第一待识别图像以及所述用户的认证信息;
查询模块,用于根据所述认证信息查询与所述用户对应的第二待识别图像;
获取模块,用于获取第一待识别图像中与指定特征对应的待对比区域;
对齐模块,用于将所述待识别区域中的图像与预设的标准图像进行对齐,并将对齐后的图像作为所述第一待识别图像的归一化图像,所述标准图像与所述指定特征对应;
确定模块,用于确定所述第一待识别图像的所述归一化图像与第二待识别图像的归一化图像之间的度量距离,所述度量距离根据所述归一化图像以及所述第二待识别图像的归一化图像在特征空间中的距离生成,其中,相似的归一化图像在所述特征空间的距离小于非相似的归一化图像在所述特征空间的距离;
识别模块,用于在所述度量距离大于预设的阈值时确认所述第一待识别图像与所述第二待识别图像的指定特征不相似,以及在所述度量距离小于或
等于所述阈值时确认所述第一待识别图像与所述第二待识别图像的指定特征相似;
发送模块,用于在所述识别模块确认所述第一待识别图像与所述第二待识别图像的指定特征不相似时向所述客户端返回身份验证失败响应,以及在所述识别模块确认所述第一待识别图像与所述第二待识别图像的指定特征相似时向所述客户端返回身份验证成功响应。
优选地,所述确定模块具体用于:
根据与所述指定特征对应的检测算法确定所述第一待识别图像中的所述待对比区域,通过预设的关键点回归模型获取所述待对比区域中与所述指定特征的多个关键点特征对应的关键点坐标。
优选地,所述对齐模块具体用于根据参数M将所述待识别区域的各关键点坐标映射为对齐后的图像的关键点坐标,其中,所述参数M为根据所述标准图像的各关键点坐标以及已标注图像中与所述指定特征对应的图像的关键点坐标生成的。
优选地,还包括:
调整模块,用于将所述归一化图像的分辨率调整至预设的分辨率。
优选地,所述获取模块具体用于:
通过卷积神经网络提取所述归一化图像中的指定特征;
根据卷积神经网络以及距离度量损失函数确定所述指定特征在映射至特征空间后的特征值,并将所述特征值作为所述归一化图像的特征值;
确定所述归一化图像的特征值与所述第二待识别图像的归一化图像的特征值之间的欧式距离,将所述欧式距离作为所述度量距离。
优选地,所述指定特征具体为脸部区域,所述关键点特征至少包括左眼区域、右眼区域、鼻子区域、左嘴角区域以及右嘴角区域。
优选地,所述卷积神经网络参数是根据已标注图像训练得到,所述已标
注图像包括指定特征互相相似的归一化图像以及指定特征互不相似的归一化图像。
由此可见,通过应用本申请的技术方案,在确定第一待识别图像中与指定特征对应的待对比区域并将待识别区域中的图像与预设的标准图像进行对齐后,即将待识别区域中对齐后的图像的分辨率调整至预设的分辨率,以及将调整后的图像作为归一化图像,最后获取第一待识别图像的归一化图像与第二待识别图像的归一化图像之间的度量距离,根据度量距离与预设的阈值之间的大小确定第一待识别图像与第二待识别图像的指定特征是否相似。从而在保证准确性的前提下,针对待检测图像与另一待检测图像之间的相似度进行快速高效的识别,为提高现有的系统的安全性提供了参考依据。
图1为本申请提出的一种相似图像识别方法的流程示意图;
图2为本申请具体实施例中训练人脸特征点定位的卷积神经网络结构图;
图3为本申请具体实施例中进行深度度量学习的流程示意图;
图4为本申请具体实施例中训练人脸认证的卷积神经网络结构图;
图5为本申请具体实施例中客户端进行相似图像识别的流程示意图;
图6为本申请具体实施例中服务器进行相似图像识别的流程示意图;
图7为本申请提出的一种相似图像识别设备的结构示意图;
图8为本申请提出的一种客户端的结构示意图;
图9为本申请提出的一种服务器的结构示意图。
随着移动设备的普及,人脸认证在越来越多的地方发挥着重要的作用。但人脸认证过程中受到很多其他客观因素的干扰,再加上角度等原因,一般
包含人脸的图像中的人脸往往并不能直接进行特征对比以及提取。有鉴于该问题,本申请提出了针对相似图像的识别方法,该方法能够借助于网络环境下的计算机设备实现。其中主要用于对相似度进行判断的为系统后台的服务器,而面向用户的客户端既可是兼容键位输入以及触屏输入的移动设备,也可以是PC设备,客户端与服务器通过有线或是无线的方式实现网络连接。
如图1所示,为本申请所提出的一种相似图像识别方法的流程示意图,包括以下步骤:
S101,获取第一待识别图像中与指定特征对应的待对比区域。
在针对人脸类的图片进行相似度判断以准确的分辨两张照片是否为同一人的过程中,准确地定位出人脸的一些关键点(例如眼睛,鼻子,嘴角等)人脸对齐必不可少的步骤。因此在本申请优选的实施例中,待对比区域可通过确定关键点坐标(与人脸相关)的方式来获取。具体地,在确定第一待识别图像中与指定特征对应的待对比区域的过程中,可首先根据与所述指定特征对应的检测算法确定所述第一待识别图像中的所述待对比区域,然后通过预设的关键点回归模型获取所述待对比区域中与所述指定特征的多个关键点特征对应的关键点坐标,以此准确的确定待对比区域。相应地,指定特征可为脸部区域,而关键点特征至少包括左眼区域、右眼区域、鼻子区域、左嘴角区域以及右嘴角区域。
根据本申请一个实施例,采用了深度卷积神经网络实现人脸关键点的回归。该具体实施例中的神经网络的结构如图2所示,包括4个卷积层和2个全连接层。其中前3个卷积层包含最大池化(max pooling)操作,最后一个卷积层仅仅含有卷积操作。第一个全连接层含有100个节点,第二个全连接成有10个节点,表示人脸5个关键点的坐标。回归采用欧式距离最作为损失函数,表达式如下:
通过最小化上述损失函数,本具体实施例采用随机梯度下降算法优化模型中的参数,从而训练得到预测人脸关键点的模型。
其次,本步骤根据参数M将所述待识别区域的各关键点坐标映射为对齐后的图像的关键点坐标,其中参数M为根据所述标准图像的各关键点坐标以及已标注图像中与所述指定特征对应的图像的关键点坐标生成。
以上述具体实施例中参数为例,该具体实施例定义了标准人脸中的5个关键点位置,分别是左眼,右眼,鼻子,左嘴角,右嘴角位置,并通过将检测到的人脸进行旋转、平移、缩放,从而对齐到标准人脸。假设标准人脸中的特征点位置为(x,y),预测得到的特征点的位置为(x',y'),那么两者的关系为:
其中位置的参数为a=s cosθ,b=s sinθ,c=tx,d=ty4个未知参数,为了求解这4个参数,需要4个等式。为了使得对齐的结果更加健壮,本具体实施例将5个点进行映射,建立线性方程组,将线性方程组的最小二乘方法计算改线性方程组的系统。具体如下:
将上述等式表述成线性方程组的形式,可以变为:
以上过程为参数M的详细生成过程,本领域技术人员能够根据该参数M对人脸图像进行对齐处理,在此基础上,其他能够得到该参数M的改进实现方式均属于本申请的保护范围。
S102,将所述待识别区域中的图像与预设的标准图像进行对齐,并将对齐后的图像作为所述第一待识别图像的归一化图像。
为了降低其他客观因素的干扰,使得对比结果更加的准确,本申请在确定与指定特征对应的待对比区域后,需要将待识别区域中的图像与预设的标准图像进行对齐。在本申请的优选实施例中,该步骤将人脸对齐到一个标准的人脸,本领域技术人员能够基于现有的对比标准设置该标准的人脸,这些均在本申请的保护范围之内。
此外,为了进一步地将图像标准化以便于处理,在以上过程结束后,本申请将归一化图像的分辨率调整至预设的分辨率。根据本申请一个实施例,若根据预设的参数需要将人脸区域缩放到39x39该规格时,该步骤将人脸关键
点坐标信息归一化到39x39尺度空间内。
S103,确定所述第一待识别图像的所述归一化图像与第二待识别图像的归一化图像之间的度量距离,所述度量距离根据所述归一化图像以及所述第二待识别图像的归一化图像在特征空间中的距离生成,其中,相似的归一化图像在所述特征空间的距离小于非相似的归一化图像在所述特征空间的距离。
基于上述说明,在本申请优选的实施例中,首先通过卷积神经网络提取所述归一化图像中的指定特征,随后根据卷积神经网络以及距离度量损失函数确定所述指定特征在映射至特征空间后的特征值,并将所述特征值作为所述归一化图像的特征值,最后确定所述归一化图像的特征值与所述第二待识别图像的归一化图像的特征值之间的欧式距离,将所述欧式距离作为所述度量距离。
针对人脸认证(两个人脸进行比较)的特殊场景,本申请的技术方案结合了深度卷积神经网络和度量学习来训练人脸认证模型。深度卷积神经网络目前在图像理解的领域,包括图像分类,图像检索,目标检测,人脸识别等,得到了广泛的使用。和传统的特征加分类器的方法相比,卷积神经网络具有特征自学习、模型泛化能力好等有点。度量学习是通过将特征空间进行线性或者非线性的映射,从而使得相同的人脸特征距离小于不同的人脸特征距离。
需要说明的是,所述卷积神经网络参数是根据已标注图像训练得到,所述已标注图像包括指定特征互相相似的归一化图像以及指定特征互不相似的归一化图像。
具体的,为了得到基于深度度量学习的人脸认证模型,本申请具体的实施例中采用成对(pair-wise)的方式进行样本标注,每个样本包含2个人像图片,如果两个图像中的不是同一个人,表示负样本,如果是同一个人表示为
正样本。正样本通过收集属于同一个人的多个图片进行两两组合生成,负样本则通过不是同一个人的图片进行仿真生成。在将样本进行人脸检测、通过训练得到的人脸关键点预测模型对人脸的关键点进行预测、将人脸对齐到标准脸、以及将图像分辨率缩放到39x39等一系列过程后,即可训练基于深度度量学习的人脸认证模型。
如图3所示,每一组样本中的两个图像经过人脸检测、关键点定位以及人脸对齐后,输入到卷积神经网络,通过卷积提取学习到的人脸特征。其中左边和右边的网络的参数W共享的。最后在高层的语义空间进行特征的距离度量。深度度量学习主要包含2个部分。其中一个是参数W,表示需要训练的得到的卷积神经网络的参数,另外一个是距离度量损失函数。与传统的人脸识别不同,本申请的输入是2个人脸,最后的损失也是衡量2个人脸在特征空间上的距离。本具体实施例中使用的卷积神经网络的结构如图4所示,包含4个卷积层和2个全连接层,其中3个卷积层后面接了最大采样层。最大采样层使得提取的特征具有平移不变性,并且降低了计算复杂度。最后将人脸的特征非线性映射到100维的特征空间中。
由此可见,度量学习是寻找一个变换空间,在这个空间中同类样本的距离缩小,不同类样本距离增大。因此该步骤首先通过度量学习寻找一个非线性变换,将人脸从原始像素变换到一个特征空间,使得在这个空间中相似的人脸距离小,不相似的人脸距离大。随后通过深度卷积神经网络提取人脸特征,最后结合度量学习将卷积神经网络学到的特征映射到一个特征空间。由于卷积神经网络是将人脸图像继续非线性映射,由此得到的特征表达与人工设计的特征相比更加健壮,且人脸认证准确率更高。
S104,若所述度量距离大于预设的阈值,确认所述第一待识别图像与所述第二待识别图像的指定特征不相似。
S105,若所述度量距离小于或等于所述阈值,确认所述第一待识别图像与所述第二待识别图像的指定特征相似。
在S103的具体实施例中,最后得到的100维特征将进行度量学习,该过程采用的损失函数如下:
其中表示广义的逻辑损失函数。(Xi,Xj)∈P表示样本集合,lij表示样本的类别,lij=1表示Xi和Xj是同一个人,lij=-1表示Xi和Xj不是同一个人,W是模型的参数,FW(Xi)表示当前模型参数为W时,映射到100维的特征的值。表示两个人脸在特征空间中的距离,距离越小表示两个人脸越相似。当(Xi,Xj)是同一个人时,lij=1,损失函数随着的增大而增大,相应的当(Xi,Xj)不是同一个人时损失函数随着的增大而减小,τ表示是否是同一个人的阈值。
通过最小化损失函数可以得到模型的参数W。优选的,技术人员可以采用链式求导法则求得对应参数的梯度并使用随机梯度下降法(SGD)来优化计算模型的参数,其他能够实现优化效果的计算模型同样在本申请的保护范围之内。
基于上述说明,当一对图像输入时,分别检测图中的人脸,根据人脸区域进行特征点提取与人脸对齐。然后根据之前步骤中训练得到的模型进行特征提取并将特征映射到100维度的空间中,最后计算两个人脸特征的欧式距离,当距离大于等于τ是表示不是同一个人,否则就是同一个人。
以上方案详细描述了如何针对一组待识别图像判断其是否相似的过程,具体的实现场景中该过程可以由客户端以及服务器共同完成。在该实现场景中,用户可以使用诸如智能手机、平板电脑等移动终端进行图片与信息的上传,也可通过PC终端上传图片及相关信息。作为对图像进行处理的主体,服务器可以为系统运营商预先架设的数据服务器或者网络服务器。
作为用户与服务器之间的纽带,客户端主要用于将用户的输入内容转发至服务器,由服务器根据用户输入的内容对用户的身份进行验证,最终客户端根据服务器返回的验证结果向用户进行展示。以下首先对客户端侧的相似图像识别方法进行介绍,如图5所示,包括以下步骤:
S501,接收用户的身份认证请求,所述身份认证请求携带所述用户上传的第一待识别图像以及所述用户的认证信息。
需要说明的是,本实施例中对客户端的形式并不做限定,客户端可为PC设备,也可以为移动端设备。但是均能够向用户提供图片上传以及信息输入的功能,具体的,客户端首先获取所述用户上传的图像以及所述用户输入的信息,随后将所述图像作为所述第一待识别图像,以及将所述信息作为所述认证信息,最后根据所述第一待识别图像以及所述认证信息生成所述身份认证请求。
S502,将所述身份认证请求发送至服务器,以使所述服务器根据所述认证信息获取与所述用户对应的第二待识别图像。
在获取到用户的认证信息后,服务器即可据此获取该用户对应的第二待识别图像。在具体的实施例中,服务器根据用户提供的身份信息,在数据库中查询该用户身份证中的图像,并将此图像作为第二待识别图像,从而确定用户上传的自身的图像是否与其身份证图像匹配。
S503,接收所述服务器发送的身份认证响应。
在本实施例中,身份认证响应为身份认证成功响应或身份认证失败响应,其中身份认证成功响应为所述服务器在确认所述第一待识别图像与所述第二待识别图像的指定特征相似之后生成的,而身份认证失败响应为所述服务器在确认所述第一待识别图像与所述第二待识别图像的指定特征不相似之后生成的。
S504,根据所述身份认证响应向所述用户展示认证结果。
基于身份认证成功响应或是身份认证失败响应,本步骤的具体实施过程如下:
(1)当所述客户端接收到所述身份认证成功响应时,所述客户端向所述用户展示预设的与所述身份认证成功响应对应的界面;
(2)当所述客户端接收到所述身份认证失败响应时,所述客户端向所述用户展示预设的与所述身份认证失败响应对应的界面,以及向所述用户展示是否需要进行人工验证的提示信息。
由于本申请是由设备自动地对一组待识别图像进行判断,因此为了进一步避免误差所带来的影响,在向用户返回失败响应的同时,会同时向用户展示是否需要进行人工验证的提示信息。如果用户认为需要重新提交人工审核的话,那么即重新通告客户端输入人工验证请求,而客户端在接收到所述用户的人工验证请求后,即将身份认证请求发送至预设的服务端。
以上为客户端的流程,主要用于实现用户与服务器之间的交互,以下实施例为服务器侧的相似图像识别方法,如图6所示,包括如下步骤:
S601,接收由所述客户端发送的身份认证请求,所述身份认证请求携带所述用户上传的第一待识别图像以及所述用户的认证信息;
S602,根据所述认证信息查询与所述用户对应的第二待识别图像;
S603,获取第一待识别图像中与指定特征对应的待对比区域;
S604,将所述待识别区域中的图像与预设的标准图像进行对齐,并将对齐后的图像作为所述第一待识别图像的归一化图像,所述标准图像与所述指定特征对应;
S605,确定所述归一化图像与第二待识别图像的归一化图像之间的度量距离,所述度量距离根据所述归一化图像以及所述第二待识别图像的归一化图像在特征空间中的距离生成,其中,相似的归一化图像在所述特征空间的距离小于非相似的归一化图像在所述特征空间的距离;
S606,若所述度量距离大于预设的阈值,确认所述第一待识别图像与所述第二待识别图像的指定特征不相似,并向所述客户端返回身份验证失败响应;
S607,若所述度量距离小于或等于所述阈值,确认所述第一待识别图像与所述第二待识别图像的指定特征相似,并向所述客户端返回身份验证成功响应。
为达到以上技术目的,本申请还提出了一种相似图像识别设备,如图7所示,包括:
获取模块710,用于获取第一待识别图像中与指定特征对应的待对比区域;
对齐模块720,用于将所述待识别区域中的图像与预设的标准图像进行对齐,并将对齐后的图像作为所述第一待识别图像的归一化图像,所述标准图像与所述指定特征对应;
确定模块730,用于确定所述第一待识别图像的所述归一化图像与第二待识别图像的归一化图像之间的度量距离,所述度量距离根据所述归一化图像以及所述第二待识别图像的归一化图像在特征空间中的距离生成,其中,相似的归一化图像在所述特征空间的距离小于非相似的归一化图像在所述特征
空间的距离;
识别模块740,用于在所述度量距离大于预设的阈值时确认所述第一待识别图像与所述第二待识别图像的指定特征不相似,以及在所述度量距离小于或等于所述阈值时确认所述第一待识别图像与所述第二待识别图像的指定特征相似。
在具体的应用场景中,所述确定模块具体用于:
根据与所述指定特征对应的检测算法确定所述第一待识别图像中的所述待对比区域,通过预设的关键点回归模型获取所述待对比区域中与所述指定特征的多个关键点特征对应的关键点坐标。
在具体的应用场景中,所述对齐模块具体用于:
根据参数M将所述待识别区域的各关键点坐标映射为对齐后的图像的关键点坐标,其中,所述参数M为根据所述标准图像的各关键点坐标以及已标注图像中与所述指定特征对应的图像的关键点坐标生成的。
在具体的应用场景中,还包括:
调整模块,用于将所述归一化图像的分辨率调整至预设的分辨率。
在具体的应用场景中,所述获取模块具体用于:
通过卷积神经网络提取所述归一化图像中的指定特征;
根据卷积神经网络以及距离度量损失函数确定所述指定特征在映射至特征空间后的特征值,并将所述特征值作为所述归一化图像的特征值;
确定所述归一化图像的特征值与所述第二待识别图像的归一化图像的特征值之间的欧式距离,将所述欧式距离作为所述度量距离。
在具体的应用场景中,所述指定特征具体为脸部区域,所述关键点特征至少包括左眼区域、右眼区域、鼻子区域、左嘴角区域以及右嘴角区域。
在具体的应用场景中,所述卷积神经网络参数是根据已标注图像训练得到,所述已标注图像包括指定特征互相相似的归一化图像以及指定特征互不
相似的归一化图像。
本申请还提出了一种客户端,如图8所示,包括:
接收模块810,用于接收用户的身份认证请求,所述身份认证请求携带所述用户上传的第一待识别图像以及所述用户的认证信息;
发送模块820,用于将所述身份认证请求发送至服务器,以使所述服务器根据所述认证信息获取与所述用户对应的第二待识别图像;
所述接收模块810,还用于接收所述服务器发送的身份认证响应;
展示模块830,用于根据所述身份认证响应向所述用户展示认证结果。
在具体的应用场景中,所述接收模块具体用于:
获取所述用户上传的图像以及所述用户输入的信息,将所述图像作为所述第一待识别图像,以及将所述信息作为所述认证信息,根据所述第一待识别图像以及所述认证信息生成所述身份认证请求。
在具体的应用场景中,所述身份认证响应为身份认证成功响应或身份认证失败响应,还包括:
所述身份认证成功响应为所述服务器在确认所述第一待识别图像与所述第二待识别图像的指定特征相似之后生成的;
所述身份认证失败响应为所述服务器在确认所述第一待识别图像与所述第二待识别图像的指定特征不相似之后生成的。
在具体的应用场景中,所述展示模块,具体用于在当所述接收模块接收到所述身份认证成功响应时,向所述用户展示预设的与所述身份认证成功响应对应的界面;或,所述展示模块,具体用于在当所述接收模块接收到所述身份认证失败响应时,向所述用户展示预设的与所述身份认证失败响应对应的界面,以及向所述用户展示是否需要进行人工验证的提示信息。
在具体的应用场景中,当所述接收模块在所述展示模块向所述用户展示
预设的与所述身份认证失败响应对应的界面以及向所述用户展示是否需要进行人工验证的提示之后,还接收到所述用户的人工验证请求,所述接收模块指示所述发送模块将所述身份认证请求发送至预设的服务端。
本申请实施例还提出了一种服务器,如图9所示,包括:
接收模块910,用接收由所述客户端发送的身份认证请求,所述身份认证请求携带所述用户上传的第一待识别图像以及所述用户的认证信息;
查询模块920,用于根据所述认证信息查询与所述用户对应的第二待识别图像;
获取模块930,用于获取第一待识别图像中与指定特征对应的待对比区域;
对齐模块940,用于将所述待识别区域中的图像与预设的标准图像进行对齐,并将对齐后的图像作为所述第一待识别图像的归一化图像,所述标准图像与所述指定特征对应;
确定模块950,用于确定所述第一待识别图像的所述归一化图像与第二待识别图像的归一化图像之间的度量距离,所述度量距离根据所述归一化图像以及所述第二待识别图像的归一化图像在特征空间中的距离生成,其中,相似的归一化图像在所述特征空间的距离小于非相似的归一化图像在所述特征空间的距离;
识别模块960,用于在所述度量距离大于预设的阈值时确认所述第一待识别图像与所述第二待识别图像的指定特征不相似,以及在所述度量距离小于或等于所述阈值时确认所述第一待识别图像与所述第二待识别图像的指定特征相似;
发送模块970,用于在所述识别模块确认所述第一待识别图像与所述第二待识别图像的指定特征不相似时向所述客户端返回身份验证失败响应,以及
在所述识别模块确认所述第一待识别图像与所述第二待识别图像的指定特征相似时向所述客户端返回身份验证成功响应。
在具体的应用场景中,所述确定模块具体用于:
根据与所述指定特征对应的检测算法确定所述第一待识别图像中的所述待对比区域,通过预设的关键点回归模型获取所述待对比区域中与所述指定特征的多个关键点特征对应的关键点坐标。
在具体的应用场景中,所述对齐模块具体用于:
根据参数M将所述待识别区域的各关键点坐标映射为对齐后的图像的关键点坐标,其中,所述参数M为根据所述标准图像的各关键点坐标以及已标注图像中与所述指定特征对应的图像的关键点坐标生成的。
在具体的应用场景中,还包括:
调整模块,用于将所述归一化图像的分辨率调整至预设的分辨率。
在具体的应用场景中,所述获取模块具体用于:
通过卷积神经网络提取所述归一化图像中的指定特征;
根据卷积神经网络以及距离度量损失函数确定所述指定特征在映射至特征空间后的特征值,并将所述特征值作为所述归一化图像的特征值;
确定所述归一化图像的特征值与所述第二待识别图像的归一化图像的特征值之间的欧式距离,将所述欧式距离作为所述度量距离。
在具体的应用场景中,所述指定特征具体为脸部区域,所述关键点特征至少包括左眼区域、右眼区域、鼻子区域、左嘴角区域以及右嘴角区域。
在具体的应用场景中,所述卷积神经网络参数是根据已标注图像训练得到,所述已标注图像包括指定特征互相相似的归一化图像以及指定特征互不相似的归一化图像。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本申
请可以通过硬件实现,也可以借助软件加必要的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施场景所述的方法。
本领域技术人员可以理解附图只是一个优选实施场景的示意图,附图中的模块或流程并不一定是实施本申请所必须的。
本领域技术人员可以理解实施场景中的装置中的模块可以按照实施场景描述进行分布于实施场景的装置中,也可以进行相应变化位于不同于本实施场景的一个或多个装置中。上述实施场景的模块可以合并为一个模块,也可以进一步拆分成多个子模块。
上述本申请序号仅仅为了描述,不代表实施场景的优劣。
以上公开的仅为本申请的几个具体实施场景,但是,本申请并非局限于此,任何本领域的技术人员能思之的变化都应落入本申请的保护范围。
Claims (25)
- 一种相似图像识别方法,其特征在于,包括:获取第一待识别图像中与指定特征对应的待对比区域;将所述待识别区域中的图像与预设的标准图像进行对齐,并将对齐后的图像作为所述第一待识别图像的归一化图像,所述标准图像与所述指定特征对应;确定所述归一化图像与第二待识别图像的归一化图像之间的度量距离,所述度量距离根据所述归一化图像以及所述第二待识别图像的归一化图像在特征空间中的距离生成,其中,相似的归一化图像在所述特征空间的距离小于非相似的归一化图像在所述特征空间的距离;若所述度量距离大于预设的阈值,确认所述第一待识别图像与所述第二待识别图像的指定特征不相似;若所述度量距离小于或等于所述阈值,确认所述第一待识别图像与所述第二待识别图像的指定特征相似。
- 如权利要求1所述的方法,其特征在于,获取第一待识别图像中与指定特征对应的待对比区域,具体为:根据与所述指定特征对应的检测算法确定所述第一待识别图像中的所述待对比区域;通过预设的关键点回归模型获取所述待对比区域中与所述指定特征的多个关键点特征对应的关键点坐标。
- 如权利要求2所述的方法,其特征在于,将所述待识别区域中的图像与预设的标准图像进行对齐,具体为:根据参数M将所述待识别区域的各关键点坐标映射为对齐后的图像的关键点坐标;其中,所述参数M为根据所述标准图像的各关键点坐标以及已标注图像 中与所述指定特征对应的图像的关键点坐标生成的。
- 如权利要求3所述的方法,其特征在于,在将对齐后的图像作为所述第一待识别图像的归一化图像之后,还包括:将所述归一化图像的分辨率调整至预设的分辨率。
- 如权利要求1所述的方法,其特征在于,确定所述归一化图像与第二待识别图像的归一化图像之间的度量距离,具体为:通过卷积神经网络提取所述归一化图像中的指定特征;根据卷积神经网络以及距离度量损失函数确定所述指定特征在映射至特征空间后的特征值,并将所述特征值作为所述归一化图像的特征值;确定所述归一化图像的特征值与所述第二待识别图像的归一化图像的特征值之间的欧式距离,将所述欧式距离作为所述度量距离。
- 如权利要求1-5任一项所述的方法,其特征在于,所述指定特征具体为脸部区域,所述关键点特征至少包括左眼区域、右眼区域、鼻子区域、左嘴角区域以及右嘴角区域。
- 如权利要求6所述的方法,其特征在于,所述卷积神经网络参数是根据已标注图像训练得到,所述已标注图像包括指定特征互相相似的归一化图像以及指定特征互不相似的归一化图像。
- 一种相似图像识别设备,其特征在于,包括:获取模块,用于获取第一待识别图像中与指定特征对应的待对比区域;对齐模块,用于将所述待识别区域中的图像与预设的标准图像进行对齐,并将对齐后的图像作为所述第一待识别图像的归一化图像,所述标准图像与所述指定特征对应;确定模块,用于确定所述第一待识别图像的所述归一化图像与第二待识别图像的归一化图像之间的度量距离,所述度量距离根据所述归一化图像以及所述第二待识别图像的归一化图像在特征空间中的距离生成,其中,相似 的归一化图像在所述特征空间的距离小于非相似的归一化图像在所述特征空间的距离;识别模块,用于在所述度量距离大于预设的阈值时确认所述第一待识别图像与所述第二待识别图像的指定特征不相似,以及在所述度量距离小于或等于所述阈值时确认所述第一待识别图像与所述第二待识别图像的指定特征相似。
- 如权利要求8所述的设备,其特征在于,所述确定模块具体用于:根据与所述指定特征对应的检测算法确定所述第一待识别图像中的所述待对比区域,通过预设的关键点回归模型获取所述待对比区域中与所述指定特征的多个关键点特征对应的关键点坐标。
- 如权利要求9所述的设备,其特征在于,所述对齐模块具体用于:根据参数M将所述待识别区域的各关键点坐标映射为对齐后的图像的关键点坐标,其中,所述参数M为根据所述标准图像的各关键点坐标以及已标注图像中与所述指定特征对应的图像的关键点坐标生成的。
- 如权利要求8所述的设备,其特征在于,所述获取模块具体用于:通过卷积神经网络提取所述归一化图像中的指定特征;根据卷积神经网络以及距离度量损失函数确定所述指定特征在映射至特征空间后的特征值,并将所述特征值作为所述归一化图像的特征值;确定所述归一化图像的特征值与所述第二待识别图像的归一化图像的特征值之间的欧式距离,将所述欧式距离作为所述度量距离。
- 一种相似图像识别方法,应用于客户端,其特征在于,该方法包括:接收用户的身份认证请求,所述身份认证请求携带所述用户上传的第一待识别图像以及所述用户的认证信息;将所述身份认证请求发送至服务器,以使所述服务器根据所述认证信息获取与所述用户对应的第二待识别图像;接收所述服务器发送的身份认证响应;根据所述身份认证响应向所述用户展示认证结果。
- 如权利要求12所述的方法,其特征在于,接收用户的身份认证请求,具体为:获取所述用户上传的图像以及所述用户输入的信息;将所述图像作为所述第一待识别图像,以及将所述信息作为所述认证信息;根据所述第一待识别图像以及所述认证信息生成所述身份认证请求。
- 如权利要求13所述的方法,其特征在于,所述身份认证响应为身份认证成功响应或身份认证失败响应,还包括:所述身份认证成功响应为所述服务器在确认所述第一待识别图像与所述第二待识别图像的指定特征相似之后生成的;所述身份认证失败响应为所述服务器在确认所述第一待识别图像与所述第二待识别图像的指定特征不相似之后生成的。
- 如权利要求14所述的方法,其特征在于,根据所述身份认证响应向所述用户展示认证结果,具体为:当接收到所述身份认证成功响应时,向所述用户展示预设的与所述身份认证成功响应对应的界面;当接收到所述身份认证失败响应时,向所述用户展示预设的与所述身份认证失败响应对应的界面,以及向所述用户展示是否需要进行人工验证的提示信息。
- 如权利要求15所述的方法,其特征在于,在向所述用户展示预设的与所述身份认证失败响应对应的界面以及向所述用户展示是否需要进行人工验证的提示之后,还包括:若接收到所述用户的人工验证请求,将所述身份认证请求发送至预设的 服务端。
- 一种客户端,其特征在于,包括:接收模块,用于接收用户的身份认证请求,所述身份认证请求携带所述用户上传的第一待识别图像以及所述用户的认证信息;发送模块,用于将所述身份认证请求发送至服务器,以使所述服务器根据所述认证信息获取与所述用户对应的第二待识别图像;所述接收模块,还用于接收所述服务器发送的身份认证响应;展示模块,用于根据所述身份认证响应向所述用户展示认证结果。
- 一种相似图像识别方法,应用于服务器,其特征在于,该方法包括:接收由客户端发送的身份认证请求,所述身份认证请求携带用户上传的第一待识别图像以及所述用户的认证信息;根据所述认证信息查询与所述用户对应的第二待识别图像;获取第一待识别图像中与指定特征对应的待对比区域;将所述待识别区域中的图像与预设的标准图像进行对齐,并将对齐后的图像作为所述第一待识别图像的归一化图像,所述标准图像与所述指定特征对应;确定所述归一化图像与第二待识别图像的归一化图像之间的度量距离,所述度量距离根据所述归一化图像以及所述第二待识别图像的归一化图像在特征空间中的距离生成,其中,相似的归一化图像在所述特征空间的距离小于非相似的归一化图像在所述特征空间的距离;若所述度量距离大于预设的阈值,确认所述第一待识别图像与所述第二待识别图像的指定特征不相似,并向所述客户端返回身份验证失败响应;若所述度量距离小于或等于所述阈值,确认所述第一待识别图像与所述第二待识别图像的指定特征相似,并向所述客户端返回身份验证成功响应。
- 如权利要求18所述的方法,其特征在于,获取第一待识别图像中与 指定特征对应的待对比区域,具体为:根据与所述指定特征对应的检测算法确定所述第一待识别图像中的所述待对比区域;通过预设的关键点回归模型获取所述待对比区域中与所述指定特征的多个关键点特征对应的关键点坐标。
- 如权利要求19所述的方法,其特征在于,将所述待识别区域中的图像与预设的标准图像进行对齐,具体为:根据参数M将所述待识别区域的各关键点坐标映射为对齐后的图像的关键点坐标;其中,所述参数M为根据所述标准图像的各关键点坐标以及已标注图像中与所述指定特征对应的图像的关键点坐标生成的。
- 如权利要求18所述的方法,其特征在于,确定所述归一化图像与第二待识别图像的归一化图像之间的度量距离,具体为:通过卷积神经网络提取所述归一化图像中的指定特征;根据卷积神经网络以及距离度量损失函数确定所述指定特征在映射至特征空间后的特征值,并将所述特征值作为所述归一化图像的特征值;确定所述归一化图像的特征值与所述第二待识别图像的归一化图像的特征值之间的欧式距离,将所述欧式距离作为所述度量距离。
- 一种服务器,其特征在于,包括:接收模块,用接收由所述客户端发送的身份认证请求,所述身份认证请求携带所述用户上传的第一待识别图像以及所述用户的认证信息;查询模块,用于根据所述认证信息查询与所述用户对应的第二待识别图像;获取模块,用于获取第一待识别图像中与指定特征对应的待对比区域;对齐模块,用于将所述待识别区域中的图像与预设的标准图像进行对齐, 并将对齐后的图像作为所述第一待识别图像的归一化图像,所述标准图像与所述指定特征对应;确定模块,用于确定所述第一待识别图像的所述归一化图像与第二待识别图像的归一化图像之间的度量距离,所述度量距离根据所述归一化图像以及所述第二待识别图像的归一化图像在特征空间中的距离生成,其中,相似的归一化图像在所述特征空间的距离小于非相似的归一化图像在所述特征空间的距离;识别模块,用于在所述度量距离大于预设的阈值时确认所述第一待识别图像与所述第二待识别图像的指定特征不相似,以及在所述度量距离小于或等于所述阈值时确认所述第一待识别图像与所述第二待识别图像的指定特征相似;发送模块,用于在所述识别模块确认所述第一待识别图像与所述第二待识别图像的指定特征不相似时向所述客户端返回身份验证失败响应,以及在所述识别模块确认所述第一待识别图像与所述第二待识别图像的指定特征相似时向所述客户端返回身份验证成功响应。
- 如权利要求22所述的服务器,其特征在于,所述确定模块具体用于:根据与所述指定特征对应的检测算法确定所述第一待识别图像中的所述待对比区域,通过预设的关键点回归模型获取所述待对比区域中与所述指定特征的多个关键点特征对应的关键点坐标。
- 如权利要求23所述的服务器,其特征在于,所述对齐模块具体用于:根据参数M将所述待识别区域的各关键点坐标映射为对齐后的图像的关键点坐标,其中,所述参数M为根据所述标准图像的各关键点坐标以及已标注图像中与所述指定特征对应的图像的关键点坐标生成的。
- 如权利要求22所述的服务器,其特征在于,所述获取模块具体用于:通过卷积神经网络提取所述归一化图像中的指定特征;根据卷积神经网络以及距离度量损失函数确定所述指定特征在映射至特征空间后的特征值,并将所述特征值作为所述归一化图像的特征值;确定所述归一化图像的特征值与所述第二待识别图像的归一化图像的特征值之间的欧式距离,将所述欧式距离作为所述度量距离。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510229654.6 | 2015-05-07 | ||
| CN201510229654.6A CN106203242B (zh) | 2015-05-07 | 2015-05-07 | 一种相似图像识别方法及设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016177259A1 true WO2016177259A1 (zh) | 2016-11-10 |
Family
ID=57217488
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/079158 Ceased WO2016177259A1 (zh) | 2015-05-07 | 2016-04-13 | 一种相似图像识别方法及设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN106203242B (zh) |
| WO (1) | WO2016177259A1 (zh) |
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108804996A (zh) * | 2018-03-27 | 2018-11-13 | 腾讯科技(深圳)有限公司 | 人脸验证方法、装置、计算机设备及存储介质 |
| CN109345770A (zh) * | 2018-11-14 | 2019-02-15 | 深圳市尼欧科技有限公司 | 一种孩童遗留车内报警系统及孩童遗留车内报警方法 |
| CN109508623A (zh) * | 2018-08-31 | 2019-03-22 | 杭州千讯智能科技有限公司 | 基于图像处理的物品识别方法和装置 |
| CN110084161A (zh) * | 2019-04-17 | 2019-08-02 | 中山大学 | 一种人体骨骼关键点的快速检测方法及系统 |
| CN111079644A (zh) * | 2019-12-13 | 2020-04-28 | 四川新网银行股份有限公司 | 基于距离和关节点识别外力辅助拍照的方法及存储介质 |
| CN112464689A (zh) * | 2019-09-06 | 2021-03-09 | 佳能株式会社 | 生成神经网络的方法、装置和系统及存储指令的存储介质 |
| CN113568571A (zh) * | 2021-06-28 | 2021-10-29 | 西安电子科技大学 | 基于残差神经网络的图像去重方法 |
| CN113688737A (zh) * | 2017-12-15 | 2021-11-23 | 北京市商汤科技开发有限公司 | 人脸图像处理方法、装置、电子设备、存储介质及程序 |
| CN113744769A (zh) * | 2021-09-06 | 2021-12-03 | 盐城市聚云网络科技有限公司 | 一种计算机信息安全产品用存储装置 |
| WO2022242713A1 (zh) * | 2021-05-21 | 2022-11-24 | 北京字跳网络技术有限公司 | 一种图像对齐方法及装置 |
| US12314342B2 (en) | 2019-03-26 | 2025-05-27 | Huawei Technologies Co., Ltd. | Object recognition method and apparatus |
| CN120411983A (zh) * | 2025-05-08 | 2025-08-01 | 南通神盾信息科技有限公司 | Ocr识别及网络电子身份认证的无证比对信息系统、装置及检验方法 |
Families Citing this family (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106897390B (zh) * | 2017-01-24 | 2019-10-15 | 北京大学 | 基于深度度量学习的目标精确检索方法 |
| CN108428242B (zh) * | 2017-02-15 | 2022-02-08 | 宏达国际电子股份有限公司 | 图像处理装置及其方法 |
| CN108573201A (zh) * | 2017-03-13 | 2018-09-25 | 金德奎 | 一种基于人脸识别技术的用户身份识别匹配方法 |
| SG11201811691RA (en) * | 2017-06-30 | 2019-01-30 | Beijing Didi Infinity Technology & Development Co Ltd | Systems and methods for verifying authenticity of id photo |
| CN107451965B (zh) * | 2017-07-24 | 2019-10-18 | 深圳市智美达科技股份有限公司 | 畸变人脸图像校正方法、装置、计算机设备和存储介质 |
| CN108012080B (zh) * | 2017-12-04 | 2020-02-04 | Oppo广东移动通信有限公司 | 图像处理方法、装置、电子设备及计算机可读存储介质 |
| CN108932727B (zh) * | 2017-12-29 | 2021-08-27 | 浙江宇视科技有限公司 | 人脸跟踪方法和装置 |
| CN110110189A (zh) | 2018-02-01 | 2019-08-09 | 北京京东尚科信息技术有限公司 | 用于生成信息的方法和装置 |
| CN108921209A (zh) * | 2018-06-21 | 2018-11-30 | 杭州骑轻尘信息技术有限公司 | 图片识别方法、装置及电子设备 |
| CN109459873A (zh) * | 2018-11-12 | 2019-03-12 | 广州小鹏汽车科技有限公司 | 一种测试方法、装置、自动测试系统及存储介质 |
| CN110781917B (zh) * | 2019-09-18 | 2021-03-02 | 北京三快在线科技有限公司 | 重复图像的检测方法、装置、电子设备及可读存储介质 |
| US11610391B2 (en) | 2019-12-30 | 2023-03-21 | Industrial Technology Research Institute | Cross-domain image comparison method and system using semantic segmentation |
| CN112508109B (zh) * | 2020-12-10 | 2023-05-19 | 锐捷网络股份有限公司 | 一种图像识别模型的训练方法及装置 |
| CN112560971B (zh) * | 2020-12-21 | 2024-07-16 | 上海明略人工智能(集团)有限公司 | 一种主动学习自迭代的图像分类方法和系统 |
| CN114359933B (zh) * | 2021-11-18 | 2022-09-20 | 珠海读书郎软件科技有限公司 | 一种封面图像的识别方法 |
| CN114596594B (zh) * | 2022-01-20 | 2025-10-31 | 天津极豪科技有限公司 | 一种指纹图像匹配方法、设备、介质及程序产品 |
| CN116310420B (zh) * | 2023-03-22 | 2025-10-03 | 浙江大学嘉兴研究院 | 一种基于邻域差值的图像相似度度量方法及装置 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030146913A1 (en) * | 2002-02-07 | 2003-08-07 | Hong Shen | Object-correspondence identification without full volume registration |
| CN101669824A (zh) * | 2009-09-22 | 2010-03-17 | 浙江工业大学 | 基于生物特征识别的人与身份证同一性检验装置 |
| CN102629320A (zh) * | 2012-03-27 | 2012-08-08 | 中国科学院自动化研究所 | 基于特征层定序测量统计描述的人脸识别方法 |
| CN103207898A (zh) * | 2013-03-19 | 2013-07-17 | 天格科技(杭州)有限公司 | 一种基于局部敏感哈希的相似人脸快速检索方法 |
| CN103678984A (zh) * | 2013-12-20 | 2014-03-26 | 湖北微模式科技发展有限公司 | 一种利用摄像头实现用户身份验证的方法 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101510257B (zh) * | 2009-03-31 | 2011-08-10 | 华为技术有限公司 | 一种人脸相似度匹配方法及装置 |
| CN102375970B (zh) * | 2010-08-13 | 2016-03-30 | 北京中星微电子有限公司 | 一种基于人脸的身份认证方法和认证装置 |
| CN103824051B (zh) * | 2014-02-17 | 2017-05-03 | 北京旷视科技有限公司 | 一种基于局部区域匹配的人脸搜索方法 |
-
2015
- 2015-05-07 CN CN201510229654.6A patent/CN106203242B/zh active Active
-
2016
- 2016-04-13 WO PCT/CN2016/079158 patent/WO2016177259A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030146913A1 (en) * | 2002-02-07 | 2003-08-07 | Hong Shen | Object-correspondence identification without full volume registration |
| CN101669824A (zh) * | 2009-09-22 | 2010-03-17 | 浙江工业大学 | 基于生物特征识别的人与身份证同一性检验装置 |
| CN102629320A (zh) * | 2012-03-27 | 2012-08-08 | 中国科学院自动化研究所 | 基于特征层定序测量统计描述的人脸识别方法 |
| CN103207898A (zh) * | 2013-03-19 | 2013-07-17 | 天格科技(杭州)有限公司 | 一种基于局部敏感哈希的相似人脸快速检索方法 |
| CN103678984A (zh) * | 2013-12-20 | 2014-03-26 | 湖北微模式科技发展有限公司 | 一种利用摄像头实现用户身份验证的方法 |
Cited By (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113688737A (zh) * | 2017-12-15 | 2021-11-23 | 北京市商汤科技开发有限公司 | 人脸图像处理方法、装置、电子设备、存储介质及程序 |
| CN108804996A (zh) * | 2018-03-27 | 2018-11-13 | 腾讯科技(深圳)有限公司 | 人脸验证方法、装置、计算机设备及存储介质 |
| CN108804996B (zh) * | 2018-03-27 | 2022-03-04 | 腾讯科技(深圳)有限公司 | 人脸验证方法、装置、计算机设备及存储介质 |
| CN109508623A (zh) * | 2018-08-31 | 2019-03-22 | 杭州千讯智能科技有限公司 | 基于图像处理的物品识别方法和装置 |
| CN109345770A (zh) * | 2018-11-14 | 2019-02-15 | 深圳市尼欧科技有限公司 | 一种孩童遗留车内报警系统及孩童遗留车内报警方法 |
| US12314342B2 (en) | 2019-03-26 | 2025-05-27 | Huawei Technologies Co., Ltd. | Object recognition method and apparatus |
| CN110084161A (zh) * | 2019-04-17 | 2019-08-02 | 中山大学 | 一种人体骨骼关键点的快速检测方法及系统 |
| CN112464689A (zh) * | 2019-09-06 | 2021-03-09 | 佳能株式会社 | 生成神经网络的方法、装置和系统及存储指令的存储介质 |
| CN111079644A (zh) * | 2019-12-13 | 2020-04-28 | 四川新网银行股份有限公司 | 基于距离和关节点识别外力辅助拍照的方法及存储介质 |
| WO2022242713A1 (zh) * | 2021-05-21 | 2022-11-24 | 北京字跳网络技术有限公司 | 一种图像对齐方法及装置 |
| US12567223B2 (en) | 2021-05-21 | 2026-03-03 | Beijing Zitiao Network Technology Co., Ltd. | Image alignment method and device |
| CN113568571A (zh) * | 2021-06-28 | 2021-10-29 | 西安电子科技大学 | 基于残差神经网络的图像去重方法 |
| CN113568571B (zh) * | 2021-06-28 | 2024-06-04 | 西安电子科技大学 | 基于残差神经网络的图像去重方法 |
| CN113744769A (zh) * | 2021-09-06 | 2021-12-03 | 盐城市聚云网络科技有限公司 | 一种计算机信息安全产品用存储装置 |
| CN120411983A (zh) * | 2025-05-08 | 2025-08-01 | 南通神盾信息科技有限公司 | Ocr识别及网络电子身份认证的无证比对信息系统、装置及检验方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106203242A (zh) | 2016-12-07 |
| CN106203242B (zh) | 2019-12-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106203242B (zh) | 一种相似图像识别方法及设备 | |
| US12518511B2 (en) | Entity recognition from an image | |
| US10755084B2 (en) | Face authentication to mitigate spoofing | |
| WO2020207189A1 (zh) | 身份验证方法、装置、存储介质和计算机设备 | |
| WO2021012526A1 (zh) | 人脸识别模型的训练方法、人脸识别方法、装置、设备及存储介质 | |
| WO2022188697A1 (zh) | 提取生物特征的方法、装置、设备、介质及程序产品 | |
| WO2018086607A1 (zh) | 一种目标跟踪方法及电子设备、存储介质 | |
| CN110472460B (zh) | 人脸图像处理方法及装置 | |
| CN108230383A (zh) | 手部三维数据确定方法、装置及电子设备 | |
| US10956738B1 (en) | Identity authentication using an inlier neural network | |
| CN111091075A (zh) | 人脸识别方法、装置、电子设备及存储介质 | |
| US12192207B2 (en) | Media data based user profiles | |
| WO2019033567A1 (zh) | 眼球动作捕捉方法、装置及存储介质 | |
| CN114743277B (zh) | 活体检测方法、装置、电子设备、存储介质及程序产品 | |
| WO2022078168A1 (zh) | 基于人工智能的身份验证方法、装置、计算机设备和存储介质 | |
| WO2018072028A1 (en) | Face authentication to mitigate spoofing | |
| CN110008943B (zh) | 一种图像处理方法及装置、一种计算设备及存储介质 | |
| TW201822150A (zh) | 基於圖片的判別方法及裝置和計算設備 | |
| CN113591603A (zh) | 证件的验证方法、装置、电子设备及存储介质 | |
| KR20220000851A (ko) | 딥러닝 기술을 활용한 피부과 시술 추천 시스템 및 방법 | |
| US12457208B2 (en) | Enhanced authentication using a secure document | |
| CN118887689A (zh) | 手写电子签名的真实性验证方法、装置 | |
| CN117218398A (zh) | 一种数据处理的方法以及相关装置 | |
| US12413596B2 (en) | Enhanced authentication using a secure document | |
| CN119649067A (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: 16789253 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: 16789253 Country of ref document: EP Kind code of ref document: A1 |





