Card face recognition method, device, equipment, medium and product
By generating rich card surface feature vectors through local feature extraction and encoding algorithms, the problem of low card surface recognition accuracy in existing technologies is solved, and higher-precision card surface image recognition and matching are achieved.
Patent Information
- Application Number
- CN202311185765.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-13
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-09-13
AI Technical Summary
In existing technologies, card recognition models have insufficient feature extraction capabilities when recognizing physical card images and standard card images, resulting in low recognition accuracy.
A local feature extraction algorithm is used to extract multiple feature points and their feature point vectors from the card image library. After normalization and dimensionality reduction, coarse-grained and fine-grained encoding processes are performed. Finally, feature concatenation is performed to generate richer card feature vectors for recognition and matching.
It improves the accuracy of card image recognition and matching, and enhances the precision and efficiency of recognition through stronger feature representation capabilities.
Smart Images

Figure CN117274683B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of image recognition, and particularly relates to a card face recognition method and device, equipment, medium and product. BACKGROUND
[0002] With the vigorous development of mobile Internet and the continuous popularity of electronic devices, users have more demands for mobile Internet, and the application programs (APPs) installed on electronic devices are also increasing. In payment and shopping APPs, financial cards are needed, and therefore it is inevitable to display the standard card face of the physical card on the application interface to enhance the user experience.
[0003] In related technologies, in order to display the standard card face of the physical card on the application interface, the user needs to take a photo of the physical card to be bound through a shooting operation and upload the physical card image. In this way, the electronic device automatically recognizes the physical card image and matches the corresponding standard card face image for display. The current mainstream recognition model is mostly based on unsupervised learning. In the recognition process, the feature points in the physical card image and the standard card face image and the description of the feature points are extracted to obtain a feature point set, and then the feature point sets of the two are matched one by one, and finally the similarity of the two images is measured by the number of matched feature points. The extracted features are relatively single, and the representation ability of the features is insufficient, resulting in low recognition accuracy. SUMMARY
[0004] The embodiments of the application provide a card face recognition method, device, equipment, medium and product, which can improve the accuracy of recognition when matching the standard card face image for the physical card image.
[0005] In a first aspect, the embodiments of the application provide a card face recognition method, which comprises:
[0006] Based on a local feature extraction algorithm, a plurality of feature points and their feature point vectors are extracted from each card face image in a card face image library to obtain a first feature vector, wherein the first feature vector comprises n feature point vectors extracted from all card face images in the card face image library;
[0007] The first feature vector is subjected to normalization processing and dimension reduction processing to obtain a second feature vector;
[0008] Based on a local feature coding algorithm, the second feature vector is subjected to coarse-grained coding processing and fine-grained coding processing respectively to obtain a first coarse-grained feature vector and a first fine-grained feature vector corresponding to each card face image;
[0009] The first coarse-grained feature vector and the first fine-grained feature vector are subjected to feature splicing to obtain a first card face feature vector of the card face image;
[0010] In the case that the to-be-bound image is acquired, a target card face feature vector matching the to-be-bound image is searched from the first card face feature vectors of all the card face images, and a card face image corresponding to the target card face feature vector is determined as a recognition image of the to-be-bound image.
[0011] In a second aspect, an embodiment of the present application provides a card face recognition device, which comprises:
[0012] The feature extraction module is configured to extract a plurality of feature points and feature point vectors of the plurality of feature points from each card face image in the card face image library based on a local feature extraction algorithm, to obtain a first feature vector, wherein the first feature vector comprises n feature point vectors extracted from all the card face images in the card face image library.
[0013] The post-processing module is configured to perform normalization processing and dimension reduction processing on the first feature vector, to obtain a second feature vector.
[0014] The feature encoding module is configured to perform coarse-grained encoding processing and fine-grained encoding processing on the second feature vector based on a local feature encoding algorithm, to obtain a first coarse-grained feature vector and a first fine-grained feature vector corresponding to each card face image.
[0015] The feature fusion module is configured to perform feature splicing on the first coarse-grained feature vector and the first fine-grained feature vector, to obtain a first card face feature vector of the card face image.
[0016] The card face recognition module is configured to, in the case that the to-be-bound image is acquired, search a target card face feature vector matching the to-be-bound image from the first card face feature vectors of all the card face images, and determine a card face image corresponding to the target card face feature vector as a recognition image of the to-be-bound image.
[0017] In a third aspect, an embodiment of the present application provides an electronic device, which comprises a processor and a memory storing computer program instructions; and the processor implements the steps of the card face recognition method shown in the first aspect when executing the computer program instructions.
[0018] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores programs or instructions; and the programs or instructions are executed by a processor to implement the steps of the card face recognition method shown in the first aspect.
[0019] In a fifth aspect, an embodiment of the present application provides a computer program product stored in a non-volatile storage medium, and the computer program product is executed by at least one processor to implement the steps of the card face recognition method shown in the first aspect.
[0020] In a sixth aspect, an embodiment of the present application provides a chip, which comprises a processor and a communication interface, the communication interface and the processor are coupled, and the processor is configured to run programs or instructions to implement the steps of the card face recognition method according to the first aspect.
[0021] The embodiments of the present application provide a card face recognition method, device, equipment, medium and product. A plurality of feature points and feature point vectors thereof are extracted from each card face image in a card face image library based on a local feature extraction algorithm. Thus, a first feature vector can be obtained by combining n feature point vectors extracted from all card face images. The first feature vector is subjected to normalization processing and dimension reduction processing to obtain a second feature vector. The second feature vector can be subjected to coarse-grained coding processing and fine-grained coding processing respectively based on a local feature coding algorithm to obtain a first coarse-grained feature vector and a first fine-grained feature vector corresponding to each card face image. Based on this, the first coarse-grained feature vector and the first fine-grained feature vector are subjected to feature splicing, which can make the obtained first card face feature vector more diversified, that is, the first card face feature vector has more rich card face feature information of the corresponding card face image, and the representation ability of the first card face feature vector for the card face image is enhanced. Thus, in the case of obtaining a to-be-bound image, the first card face feature vectors of all card face images can be searched based on the first card face feature vectors of all card face images. Compared with the case that the recognition accuracy is not high due to the insufficient representation ability of the extracted features in the related art, the first card face feature vector with strong representation ability for the card face image is used for recognition matching in the present application, which can improve the search precision of the search process, and then a target card face feature vector with high similarity to the to-be-bound image and the card face image thereof are searched, an image with higher accuracy is obtained, and the accuracy of card face image recognition and matching is improved. BRIEF DESCRIPTION OF DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly introduced. Those skilled in the art can obtain other drawings based on these drawings without creating any creative labor.
[0023] Figure 1 Flow chart of an embodiment of the card face recognition method provided by the first aspect of the present application;
[0024] Figure 2 Flow chart of another embodiment of the card face recognition method provided by the first aspect of the present application;
[0025] Figure 3 Flow chart of still another embodiment of the card face recognition method provided by the first aspect of the present application;
[0026] Figure 4 Flow chart of still another embodiment of the card face recognition method provided by the first aspect of the present application;
[0027] Figure 5 Structure diagram of an embodiment of the card surface recognition device provided for the second aspect of the present application;
[0028] Figure 6 Structure diagram of an embodiment of the electronic device provided for the third aspect of the present application. DETAILED DESCRIPTION
[0029] The features and exemplary embodiments of the various aspects of the present application will be described in detail below, in order to make the purposes, technical solutions and advantages of the present application clearer and more apparent, the present application will be further described in detail below in combination with the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. For those skilled in the art, the present application can be implemented without some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.
[0030] With the vigorous development of mobile Internet and the continuous popularity of electronic devices, users have more demands for mobile Internet, and the number of application programs (APP) installed on electronic devices is also increasing. In payment, shopping and other APPs, financial cards are needed, so it is inevitable to display the standard card surface of the physical card in the application interface to enhance the user's visual experience.
[0031] At present, in the mainstream payment APP, most APPs usually cannot display the standard card surface of the physical card, only the information of the financial institution name and the card nature; a few payment APPs can identify and display the standard card surface of the physical card of different banks through interaction with the financial backend when binding the card, but this interaction needs to be connected with different financial ends and strongly coupled with all access financial end query interfaces. When the card surface information of the financial party changes, the corresponding information needs to be synchronized, and the maintenance cost is high.
[0032] Other non-payment APPs aim at similar image recognition scenarios. In scenarios with more data samples and labeled data, a supervised learning-based image recognition model is mainly used. This model mainly includes two processes: offline training and online recognition. Offline training mostly relies on a neural network model to extract features and make predictions from a large number of labeled image samples. Then, the loss value of the predicted value and the true target value is calculated by constructing a loss function, and the model weight is iteratively updated using the back propagation mechanism of the neural network. Finally, a stable recognition model is obtained. Online recognition loads the model completed by offline training to complete the recognition and prediction of real-time input samples. However, the supervised learning-based model largely depends on a large number of labeled data samples. In scenarios where standard card image data is limited and labeled data is insufficient, an unsupervised learning-based image recognition model is mainly used. Specifically, feature points and feature point descriptions in entity card images and standard card images are extracted to obtain a feature point set. Then, the feature point sets of the two are matched one by one, and finally the similarity of the two images is measured by the number of matched feature points. The extracted features of this scheme are relatively single, and the insufficient representation ability of the features leads to low recognition accuracy.
[0033] Based on the above problems, the embodiments of the present application provide a card face recognition method, device, equipment, medium and product. Based on a local feature extraction algorithm, a plurality of feature points and their feature point vectors are extracted from each card face image in a card face image library. Thus, by combining n feature point vectors extracted from all card face images, a first feature vector can be obtained. The first feature vector is normalized and dimensionally reduced to obtain a second feature vector. Based on a local feature coding algorithm, the second feature vector can be respectively processed by coarse-grained coding and fine-grained coding to obtain a first coarse-grained feature vector and a first fine-grained feature vector corresponding to each card face image. Based on this, by splicing the first coarse-grained feature vector and the first fine-grained feature vector, the obtained first card face feature vector can be more diversified, that is, the first card face feature vector has more rich card face feature information of the corresponding card face image, and the representation ability of the first card face feature vector for the card face image is enhanced. In this way, when a to-be-bound image is obtained, the first card face feature vector of all card face images can be searched based on the first card face feature vector. Compared with the case where the recognition accuracy is low due to the insufficient representation ability of the extracted features in the related art, the first card face feature vector with strong representation ability for the card face image is used for recognition and matching in the present application, which can improve the search accuracy of the search process, and then search out a target card face feature vector with high similarity to the to-be-bound image and its card face image, obtain a recognition image with higher accuracy, and improve the accuracy of card face image recognition and matching.
[0034] The card surface recognition method in the embodiments of the present application can be applied to an image recognition scene of matching a standard card surface image for a physical card image, a trademark retrieval scene, and the like.
[0035] The card surface recognition method provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0036] The first aspect of the present application provides a card surface recognition method, which can be applied to an electronic device. It should be noted that the above execution subject does not constitute a limitation on the present application.
[0037] Exemplarily, the electronic device can be a background server or a server cluster of an application program.
[0038] Figure 1 A flowchart of an embodiment of the card surface recognition method provided by the first aspect of the present application is shown in FIG. 1. Figure 1 As shown in FIG. 1, the card surface recognition method can include steps 110-150.
[0039] In step 110, a plurality of feature points and their feature point vectors are extracted from each card surface image in a card surface image library based on a local feature extraction algorithm, to obtain a first feature vector, wherein the first feature vector includes n feature point vectors extracted from all card surface images in the card surface image library.
[0040] In step 120, the first feature vector is normalized and reduced in dimension to obtain a second feature vector.
[0041] In step 130, the second feature vector is respectively subjected to coarse-grained encoding processing and fine-grained encoding processing based on a local feature encoding algorithm, to obtain a first coarse-grained feature vector and a first fine-grained feature vector corresponding to each card surface image.
[0042] In step 140, the first coarse-grained feature vector and the first fine-grained feature vector are spliced to obtain a first card surface feature vector of the card surface image.
[0043] In step 150, in a case where a to-be-bound image is obtained, a target card surface feature vector matching the to-be-bound image is searched from the first card surface feature vectors of all card surface images, and a card surface image corresponding to the target card surface feature vector is determined as a recognition image of the to-be-bound image.
[0044] The card surface recognition method provided in the embodiments of the present application extracts a plurality of feature points and their feature point vectors from each card surface image in the card surface image library based on a local feature extraction algorithm. Thus, the first feature vector can be obtained by combining the n feature point vectors extracted from all the card surface images. The first feature vector is subjected to normalization processing and dimension reduction processing to obtain the second feature vector. The second feature vector can be subjected to coarse-grained coding processing and fine-grained coding processing based on a local feature coding algorithm to obtain the first coarse-grained feature vector and the first fine-grained feature vector corresponding to each card surface image. Based on this, the first card surface feature vector obtained by splicing the first coarse-grained feature vector and the first fine-grained feature vector is more diversified, that is, the first card surface feature vector has more rich card surface feature information of the corresponding card surface image, and the representation ability of the first card surface feature vector for the card surface image is enhanced. Thus, in the case of obtaining the to-be-bound image, the first card surface feature vector of all the card surface images can be searched based on the first card surface feature vector of all the card surface images. Compared with the case that the recognition accuracy is not high due to the insufficient feature representation ability in the related art, the first card surface feature vector with strong representation ability for the card surface image is used for recognition matching in the present application, which can improve the search precision of the search process, and then the target card surface feature vector with high similarity to the to-be-bound image and its card surface image are searched, the recognition image with higher accuracy is obtained, and the accuracy of card surface image recognition and matching is improved.
[0045] The specific implementation of the above steps will be described in detail in combination with embodiments as follows.
[0046] Step 110 involves extracting a plurality of feature points and their feature point vectors from each card surface image in the card surface image library based on a local feature extraction algorithm to obtain the first feature vector.
[0047] Specifically, the card surface image library is used to store standard card surface images, which can be sent by the financial end. When the standard card surface is updated, the updated card surface image can be received and stored in the card surface image library.
[0048] For each card surface image, a plurality of feature points and their feature point vectors in the card surface image can be extracted based on a local feature extraction algorithm, so as to obtain n feature points and n feature point vectors extracted from all the card surface images. The first feature vector can be obtained by combining the n feature point vectors, wherein n is a positive integer, each feature point vector is a multi-dimensional vector, and the feature point vector refers to the image description of the corresponding feature point.
[0049] In one example, the card face image library includes image 1, image 2 and image 3, if 10, 10, 20 feature points and their feature point vectors are extracted from image 1, image 2 and image 3 respectively, then n is 40, and the first feature vector can be obtained by combining 40 feature point vectors.
[0050] In another example, the first feature vector can be represented as α1={u1,u2,...,u n},wherein u1, u2, … u n are n feature point vectors respectively.
[0051] In some embodiments, the local feature extraction algorithm can be a scale-invariant feature transform (sift) algorithm, a speeded up robust features (surf) algorithm, an oriented FAST and rotated BRIEF (orb) algorithm, etc. In addition to the above, the local feature extraction algorithm can also be other algorithms for detecting local features, which are not limited in the present application.
[0052] In some embodiments of the present application, before step 110, the method can further include the following steps:
[0053] Based on the bilinear interpolation algorithm, all card face images in the card face image library are scaled to a target size.
[0054] Specifically, the target size can be pre-set, for example, set to 800*600px, 1000*750px, etc.
[0055] In the embodiments of the present application, before extracting the local features of the card face images, all card face images in the card face image library can be scaled to a fixed size by the bilinear interpolation method. In this way, since all card face images are of the same size, the number of feature points extracted from each card face image can be ensured to have little difference, and the stability of feature extraction is ensured.
[0056] Regarding step 120, the first feature vector is normalized and dimensionally reduced to obtain a second feature vector.
[0057] Specifically, after obtaining the first feature vector, the first feature vector can be subjected to local post-processing, which includes normalization processing and dimension reduction processing. The normalization processing is to square root process the first feature vector after L1 normalization, and the dimension reduction algorithm is used to reduce the square root processed first feature vector to d, to obtain a second feature vector with a dimension number of d.
[0058] In some embodiments, the second feature vector can be represented as α2={x1,x2,...,x n}, where x1, x2, ... x n These are the n feature point vectors after normalization and dimensionality reduction, respectively, x i =(L1+sqrt)u i *T, x i Let u be the vector of the i-th feature point in the second feature vector. i Let (L1+sqrt)u be the vector of the i-th feature point in the first feature vector. i Indicates the relationship between u i L1 normalization and square root extraction are performed, and T is the characteristic matrix.
[0059] In some embodiments, the first eigenvector after square root processing can be reduced in dimensionality by a target dimensionality reduction algorithm, such as principal component analysis (PCA) or other algorithms that can effectively reduce the dimensionality of the first eigenvector.
[0060] In some embodiments, d can be an integer multiple of 2. For example, if the first feature vector is 128-dimensional, then after dimensionality reduction, a second feature vector of 64 dimensions is obtained.
[0061] In step 130, based on the local feature encoding algorithm, coarse-grained encoding and fine-grained encoding are performed on the second feature vector respectively to obtain the first coarse-grained feature vector and the first fine-grained feature vector corresponding to each card image.
[0062] In step 130, the first coarse-grained feature vector is the feature vector obtained after coarse-grained encoding of the second feature vector, and the first fine-grained feature vector is the feature vector obtained after fine-grained encoding of the second feature vector.
[0063] In some embodiments of this application, Figure 2 This is a flowchart of another embodiment of the card recognition method provided in the first aspect of this application. Step 130 described above may include... Figure 2 Steps 210-250 are shown.
[0064] Step 210: Encode the second feature vector based on the local feature encoding algorithm to obtain the first coarse-grained feature vector corresponding to each card image.
[0065] Specifically, the n feature point vectors in the second feature vector can be clustered to obtain k1 cluster center vectors, the k1 cluster center vectors are used to represent k1 categories, and the cluster center vectors can be first cluster center vectors for the convenience of distinguishing; for the same card face image, if the card face image includes P feature point vectors, the P feature point vectors are respectively mapped to corresponding categories, that is, each feature point vector is associated with the corresponding first cluster center vector; a first residual value of each feature point vector and the associated first cluster center vector is calculated to obtain P first residual values; residual summation is performed based on the P first residual values to obtain a first coarse-grained feature vector of the card face image.
[0066] In step 220, each feature point vector in the second feature vector is split into M segments based on a local feature coding algorithm to obtain M local vectors corresponding to each feature point vector.
[0067] Specifically, the dimension of the second feature vector is d, and the dimension of each feature point vector in the second feature vector is d, so the feature point vector can be dimensionally split into M segments according to the dimension d, M is a positive integer, M is less than d, and M can be set according to specific requirements, which is not limited in the present application.
[0068] For example, d is 64 and M is 2, so the same feature point vector can be split into 2 segments to obtain two local vectors, specifically, the feature values with dimensions 1-32 in the same feature point vector are divided into one segment to obtain the local vector of the segment; the feature values with dimensions 33-64 in the same feature point vector are divided into another segment to obtain the local vector of the segment. In this way, the same feature point vector can be split into 2 segments to obtain 2 local vectors.
[0069] For example, d is 64 and M is 4, so all feature values of the same feature point vector can be divided according to dimensions 1-16, 17-32, 33-48 and 49-64. In this way, the same feature point vector can be split into 4 segments to obtain 4 local vectors.
[0070] For the convenience of distinguishing, the n feature point vectors in the first feature vector can be first feature point vectors, and the n feature point vectors in the second feature vector can be second feature point vectors.
[0071] For example, M=2, x i is the i-th second feature point vector, i∈[1,n], x i The dimension of x iall the eigenvalues in the matrix are split into two segments, specifically, the eigenvalues with dimension 1 to d / 2 are divided into a first segment, and the eigenvalues with dimension (d / 2)+1 to d are divided into a second segment, thus obtaining a local vector of the first segment and a local vector of the second segment
[0072] In step 230, for each card face image, P*M local vectors corresponding to the P feature point vectors are obtained in the case that the P feature point vectors are extracted from the card face image.
[0073] wherein P is a positive integer, the number of feature points extracted from different card face images can be the same or different, which is not limited in the present application.
[0074] For example, if a card face image includes P=3 feature point vectors x1, x2 and x3, and M=2, the above three feature point vectors can be split into two segments to obtain 6 local vectors: ax1, bx1, ax2, bx2, ax3 and bx3.
[0075] In step 240, P local vectors belonging to the same segment in the P*M local vectors are encoded to generate a local encoding vector of each segment, and M local encoding vectors of M segments are obtained.
[0076] Continuing to refer to the above example, after obtaining 6 local vectors, ax1, ax2 and ax3 belong to the first segment, and bx1, bx2 and bx3 belong to the second segment, thus ax1, ax2 and ax3 can be encoded to obtain a local encoding vector Va, and bx1, bx2 and bx3 can be encoded to obtain a local encoding vector Vb.
[0077] In step 250, the M local encoding vectors are spliced to obtain a first fine-grained feature vector of the card face image.
[0078] wherein the first fine-grained feature vector is a one-dimensional feature vector.
[0079] Continuing to refer to the above example, after splicing the local encoding vectors Va and Vb, the first fine-grained feature vector can be obtained.
[0080] In the embodiments of the present application, by splitting each feature point vector in the second feature vector into M local vectors, and performing encoding processing on the P local vectors belonging to the same segment in the P feature point vectors of the same card face image, a local encoding vector of the same card face image in each segment can be generated. The local vector is obtained by splitting the feature point vector, and thus the granularity of the local vector is smaller than that of the feature point vector. Therefore, the encoding processing on the local vector is fine-grained encoding processing, and the granularity of the local encoding vector obtained after the processing is also smaller. Based on this, by concatenating the M local encoding vectors of the same card face image in M segments, a fine-grained feature vector, i.e., a first fine-grained feature vector, of each card face image can be generated. The first fine-grained feature vector with smaller granularity can clearly and effectively reflect the features of the card face image. Moreover, feature fusion based on the first fine-grained feature vector and the first coarse-grained feature vector of each card face image can realize multi-granularity local feature fusion, so that the first card face feature vector has richer expression, thereby more diverse card face feature information can be extracted, the representation ability of the first card face feature vector for card face image features is improved, and then when the target card face image is recognized from all card face images based on the first card face feature vector, the accuracy of the recognition result is improved.
[0081] In some embodiments of the present application, the local feature encoding algorithm described above may, for example, be a Vector of Locally Aggregated Descriptors (VLAD), a Fisher Vector (FV), or other encoding algorithm for local aggregation vectors.
[0082] In some embodiments of the present application, in order to be able to generate a local encoding vector of the same card face image in each segment, after step 230 and before step 240, the method can further include: clustering n local vectors belonging to the same segment in the n*M local vectors to generate a cluster center vector set of each segment, to obtain M cluster center vector sets of M segments; and step 240 can specifically include: performing residual sum on the P local vectors corresponding to each segment based on the cluster center vector set of each segment, to obtain a local encoding vector of each segment.
[0083] Specifically, the set of cluster center vectors of each segment can include k2 cluster center vectors, which can be second cluster center vectors, and the k2 second cluster center vectors are used to represent k2 categories. If the same card face image includes P feature point vectors, after the P feature point vectors are split into P*M local vectors, for the P local vectors of the same segment, each local vector in the P local vectors can be mapped to a corresponding category of the segment, that is, each local vector is associated with its corresponding second cluster center vector; a second residual value of each local vector and its associated second cluster center vector is calculated to obtain P second residual values; and residual summing is performed based on the P second residual values to obtain a local encoding vector of the segment.
[0084] In the embodiments of the present application, n local vectors belonging to the same segment can be clustered to obtain a plurality of cluster center vectors of the segment. For the P local vectors of the same card face image in the segment, residual summing can be performed on the P local vectors based on the cluster center vectors of the segment to complete fine-grained encoding processing of the P local vectors, and a fine-grained local encoding vector is obtained, so as to facilitate subsequent multi-grained local feature fusion and improve the richness of the first card face feature vector.
[0085] Involving step 140, the first coarse-grained feature vector and the first fine-grained feature vector are fused to obtain the first card face feature vector of the card face image.
[0086] In step 140, by fusing the first coarse-grained feature vector and the first fine-grained feature vector, multi-grained local feature fusion can be realized, so that the first card face feature vector can accurately represent and describe the image features of the corresponding card face image.
[0087] In some embodiments of the present application, Figure 3 The flowchart of another embodiment of the card face recognition method provided by the first aspect of the present application is shown in the figure, and the above step 130 can include Figure 3 The steps 310 and 320 shown in the figure.
[0088] Step 310, the first coarse-grained feature vector and the first fine-grained feature vector are fused to obtain a mixed feature vector;
[0089] Step 320, the mixed feature vector is subjected to L2 normalization processing to obtain the first card face feature vector of the card face image.
[0090] For example, the mixed feature vector is ε, and after L2 normalization processing, the first card face feature vector
[0091] In the embodiments of the present application, after the first coarse-grained feature vector and the first fine-grained feature vector are spliced to obtain a mixed feature vector, and the mixed feature vector is subjected to L2 normalization processing, each card face image can correspond to a first card face feature vector. In this way, when a card face image is matched for the to-be-bound image in the subsequent process, the card face feature vector of the to-be-bound image is directly matched with all the first card face feature vectors of the card faces, that is, the similarity between the first card face feature vector and the card face feature vector corresponding to the to-be-bound image is directly calculated. Compared with the scheme in the related art in which all the feature points in the to-be-bound image are matched one by one, the similarity calculation amount can be effectively reduced, and the recognition and matching efficiency is improved.
[0092] Step 150 is related to, in the case where the to-be-bound image is obtained, searching, from the first card face feature vectors of all the card face images, a target card face feature vector matched with the to-be-bound image, and determining the card face image corresponding to the target card face feature vector as a recognition image of the to-be-bound image.
[0093] In step 150, the to-be-bound image is an entity card image uploaded by a user through a card binding operation, and the entity card image can be obtained by photographing an entity financial card. The target card face feature vector matched with the to-be-bound image can be a first card face feature vector with the highest similarity to the card face feature vector of the to-be-bound image, and therefore the card face image corresponding to the target card face feature vector is most matched with the to-be-bound image.
[0094] In some embodiments of the present application, when a card face image is matched for the to-be-bound image, in order to improve the accuracy and efficiency of recognition and matching, Figure 4 A flowchart of still another embodiment of the card face recognition method provided by the first aspect of the present application is shown in FIG. 4. The step 140 can include Figure 4 The steps 410-460 shown in FIG. 4.
[0095] Step 410, in the case where the to-be-bound image is obtained, a plurality of feature points and their feature point vectors are extracted from the to-be-bound image based on a local feature extraction algorithm, to obtain a third feature vector;
[0096] Step 420, the third feature vector is subjected to normalization processing and dimension reduction processing, to obtain a fourth feature vector;
[0097] Step 430, the fourth feature vector is subjected to coarse-grained encoding processing and fine-grained encoding processing based on a local feature encoding algorithm, to obtain a second coarse-grained feature vector and a second fine-grained feature vector corresponding to the to-be-bound image;
[0098] Step 440, the second coarse-grained feature vector and the second fine-grained feature vector are spliced to obtain a second card face feature vector of the to-be-bound image;
[0099] Step 450, retrieving, from the first card face feature vectors of all the card face images, a first card face feature vector with the highest similarity to the second card face feature vector, to obtain a target card face feature vector;
[0100] Step 460, determining that the card face image corresponding to the target card face feature vector is the identification image of the to-be-bound image.
[0101] In the embodiments of the present application, the image processing flow of the to-be-bound image is similar to the processing flow of the card face image in steps 110-140 described above, and the purpose is to extract image content that can accurately describe the to-be-bound image and more diversified card face feature information, so as to obtain a second card face feature vector with stronger representation ability. On this basis, based on the second card face feature vector and the first card face feature vectors of all the card face images, one-by-one matching is performed, which can effectively improve the accuracy and efficiency of identification and matching compared with the one-by-one matching based on a single feature of a feature point in the related art.
[0102] In some embodiments of the present application, in order to improve the retrieval efficiency of the target card face feature vector, after obtaining the first card face feature vector of the card face image in step 150, the method can further include the following steps:
[0103] Saving the first card face feature vectors of all the card face images in the card face image library based on the index structure, to obtain a tree index.
[0104] For example, the index structure can be a data structure such as Ball Tree, Bw-Tree based on spherical division, etc.
[0105] In some embodiments, the above-mentioned retrieval of the target card face feature vector matching the to-be-bound image can specifically include:
[0106] Retrieving, based on a target similarity algorithm, the first card face feature vector with the highest similarity to the to-be-bound image in the tree index, to obtain the target card face feature vector.
[0107] The target similarity algorithm can be Euclidean distance algorithm, cosine similarity algorithm, Manhattan Distance algorithm, Jaccard similarity algorithm, etc.
[0108] In the embodiments of the present application, the first card face feature vectors are stored by the index mechanism, which can greatly speed up the data query speed during retrieval, thereby improving the retrieval efficiency, quickly retrieving the target card face feature vector matching the to-be-bound image, and further quickly retrieving the matching card face image for the to-be-bound image, thereby improving the efficiency of identification and matching.
[0109] Based on the same inventive concept, the second aspect of the present application provides a card face identification device.Figure 5 FIG. 2 shows a structural schematic diagram of an embodiment of the card surface recognition device according to the second aspect of the present application.
[0110] As shown in FIG. 5, the card surface recognition device 500 can specifically include a feature extraction module 510, a post-processing module 520, a feature encoding module 530, a feature fusion module 540, and a card surface recognition module 550. Figure 5
[0111] The feature extraction module 510 is configured to extract a plurality of feature points and their feature point vectors from each card surface image in the card surface image library based on a local feature extraction algorithm, to obtain a first feature vector, wherein the first feature vector includes n feature point vectors extracted from all card surface images in the card surface image library.
[0112] The post-processing module 520 is configured to perform normalization processing and dimension reduction processing on the first feature vector, to obtain a second feature vector.
[0113] The feature encoding module 530 is configured to perform coarse-grained encoding processing and fine-grained encoding processing on the second feature vector based on a local feature encoding algorithm, to obtain a first coarse-grained feature vector and a first fine-grained feature vector corresponding to each card surface image.
[0114] The feature fusion module 540 is configured to perform feature splicing on the first coarse-grained feature vector and the first fine-grained feature vector, to obtain a first card surface feature vector of the card surface image.
[0115] The card surface recognition module 550 is configured to, in a case where a to-be-bound image is obtained, search for a target card surface feature vector matching the to-be-bound image from the first card surface feature vectors of all card surface images, and determine a card surface image corresponding to the target card surface feature vector as a recognition image of the to-be-bound image.
[0116] The card surface recognition device provided by the embodiments of the present application extracts a plurality of feature points and their feature point vectors from each card surface image in the card surface image library based on a local feature extraction algorithm. Thus, the first feature vector can be obtained by combining the n feature point vectors extracted from all the card surface images. The first feature vector is subjected to normalization processing and dimension reduction processing to obtain the second feature vector. The second feature vector can be subjected to coarse-grained coding processing and fine-grained coding processing based on a local feature coding algorithm to obtain the first coarse-grained feature vector and the first fine-grained feature vector corresponding to each card surface image. Based on this, the first card surface feature vector obtained by splicing the first coarse-grained feature vector and the first fine-grained feature vector is more diversified, that is, the first card surface feature vector has more rich card surface feature information of the corresponding card surface image, and the representation ability of the first card surface feature vector for the card surface image is enhanced. In this way, in the case of obtaining the to-be-bound image, the first card surface feature vector of all the card surface images can be searched based on the first card surface feature vector of all the card surface images. Compared with the case that the recognition accuracy is not high due to the insufficient feature representation ability in the related art, the first card surface feature vector with strong representation ability for the card surface image is used for recognition matching in the present application, which can improve the search precision of the search process, and then the target card surface feature vector with high similarity to the to-be-bound image and its card surface image are searched out, the recognition image with higher accuracy is obtained, and the accuracy of card surface image recognition and matching is improved.
[0117] In some embodiments of the present application, the feature coding module 530 comprises: an encoding submodule, configured to code the second feature vector based on a local feature coding algorithm to obtain the first coarse-grained feature vector corresponding to each card surface image; a feature splitting submodule, configured to split each feature point vector in the second feature vector into M segments to obtain M local vectors corresponding to each feature point vector based on the local feature coding algorithm; an acquisition submodule, configured to, for each card surface image, acquire P*M local vectors corresponding to P feature point vectors in the case that the P feature point vectors are extracted from the card surface image; the encoding submodule is further configured to code P local vectors belonging to the same segment in the P*M local vectors to generate a local coding vector of each segment and obtain M local coding vectors of M segments; and a splicing submodule, configured to splice the M local coding vectors to obtain the first fine-grained feature vector of the card surface image.
[0118] In some embodiments of the present application, the feature encoding module 530 further includes: a clustering submodule, configured to cluster n local vectors belonging to the same segment in the n*M local vectors before encoding the P local vectors belonging to the same segment in the P*M local vectors, to generate a clustering center vector set of each segment, and obtain M clustering center vector sets of M segments; and an encoding submodule, configured to perform residual sum on the P local vectors corresponding to each segment based on the clustering center vector set of each segment, to obtain a local encoding vector of each segment.
[0119] In some embodiments of the present application, the card face recognition module 550 includes: an extraction submodule, configured to extract a plurality of feature points and their feature point vectors from the to-be-bound image based on a local feature extraction algorithm to obtain a third feature vector, in a case where the to-be-bound image is acquired; a post-processing submodule, configured to perform normalization processing and dimension reduction processing on the third feature vector to obtain a fourth feature vector; an encoding submodule, configured to perform coarse-grained encoding processing and fine-grained encoding processing on the fourth feature vector respectively based on a local feature encoding algorithm, to obtain a second coarse-grained feature vector and a second fine-grained feature vector corresponding to the to-be-bound image; a feature splicing submodule, configured to splice the second coarse-grained feature vector and the second fine-grained feature vector to obtain a second card face feature vector of the to-be-bound image; a retrieval submodule, configured to retrieve a first card face feature vector with the highest similarity to the second card face feature vector from the first card face feature vectors of all card face images, to obtain a target card face feature vector; and a determination submodule, configured to determine that a card face image corresponding to the target card face feature vector is a recognition image of the to-be-bound image.
[0120] In some embodiments of the present application, the feature fusion module includes: a feature splicing submodule, configured to splice the first coarse-grained feature vector and the first fine-grained feature vector to obtain a mixed feature vector; and a normalization submodule, configured to perform L2 normalization processing on the mixed feature vector to obtain the first card face feature vector of the card face image.
[0121] In some embodiments of the present application, the apparatus further includes: a storage module, configured to save the first card face feature vectors of all card face images in the card face image library based on the index structure after obtaining the first card face feature vector of the card face image, to obtain a tree index.
[0122] In some embodiments of the present application, the card face recognition module 550 is specifically configured to retrieve a first card face feature vector with the highest similarity to the to-be-bound image in the tree index based on a target similarity algorithm, to obtain a target card face feature vector.
[0123] In some embodiments of the present application, the device further comprises an image preprocessing module configured to scale all the card face images in the card face image library to a target size based on a bilinear interpolation algorithm before extracting the plurality of feature points and their feature point vectors from each card face image in the card face image library.
[0124] The third aspect of the present application further provides an electronic device. Figure 6 An embodiment of the electronic device provided by the third aspect of the present application is shown in a structural schematic diagram. As shown in Figure 6 The electronic device 600 comprises a memory 601, a processor 602, and a computer program stored in the memory 601 and executable on the processor 602.
[0125] In one example, the processor 602 can comprise a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement one or more embodiments of the present application.
[0126] The memory 601 can comprise a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Therefore, generally, the memory comprises one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the card face recognition method in the embodiments according to the first aspect of the present application.
[0127] The processor 602 runs a computer program corresponding to the executable program code stored in the memory 601 by reading the executable program code, for implementing the card face recognition method in the embodiments of the first aspect described above.
[0128] In some examples, the electronic device 600 can further comprise a communication interface 603 and a bus 604. As shown in Figure 6 The memory 601, the processor 602, and the communication interface 603 are connected through the bus 604 and complete communication among each other.
[0129] The communication interface 603 is mainly used to realize the communication among the modules, devices, units, and / or devices in the embodiments of the present application. The input device and / or the output device can also be accessed through the communication interface 603.
[0130] Bus 604 includes a hardware, software, or both, that couples components of electronic device 600 to each other. As an example and not by way of limitation, bus 604 can include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand (IB) interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or some other suitable bus or interconnect, or a combination of two or more of these. Where appropriate, bus 604 can include one or more buses. Although this application describes and shows a particular bus, this application contemplates any suitable bus or interconnect.
[0131] The fourth aspect of the application provides a computer readable storage medium, which stores a program or instructions, and the program or instructions are executed by a processor to implement the card face recognition method of the first aspect, and achieve the same technical effects. To avoid repetition, details are not described here. The computer readable storage medium can include a non-transitory computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, which is not limited here.
[0132] The fifth aspect of the application provides a computer program product stored in a non-volatile storage medium, and the computer program product is executed by at least one processor to implement the steps of the card face recognition method of the first aspect. The specific content of the card face recognition method can be referred to the related description in the above embodiments, and details are not described here.
[0133] The sixth aspect of the present application provides a chip, which comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions to realize various processes of the embodiments of the card face recognition method shown in the first aspect and achieve the same technical effects. To avoid repetition, details are not described here.
[0134] It should be understood that the chip mentioned in the embodiments of the present application can also be referred to as a system-level chip, a system chip, a chip system or a system-on-chip, etc.
[0135] It should be clear that each embodiment in the present specification is described in a progressive manner, and the same or similar parts of each embodiment can be referred to each other. Each embodiment focuses on the differences from other embodiments. For the device embodiment, the user terminal embodiment, the equipment embodiment, the system embodiment and the computer readable storage medium embodiment, the relevant parts can be referred to the description of the method embodiment. The present application is not limited to the specific steps and structures described above and shown in the drawings. Those skilled in the art can make various changes, modifications and additions, or change the order of steps, after understanding the spirit of the present application. Moreover, in order to be brief, the detailed description of known method technology is omitted here.
[0136] The aspects of the present application are described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each block in the flowcharts and / or block diagrams, and the combination of blocks in the flowcharts and / or block diagrams can be realized by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, or a processor of other programmable card face recognition device, to produce a machine, so that the instructions executed by the computer or the processor of other programmable card face recognition device enable the implementation of the functions / actions specified in one or more blocks of the flowcharts and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It should also be understood that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can also be realized by special hardware to perform the specified functions or actions, or can be realized by a combination of special hardware and computer instructions.
[0137] It should be understood by those skilled in the art that the above embodiments are exemplary but not limiting. Different technical features appearing in different embodiments can be combined to achieve beneficial effects. Other changed embodiments of the disclosed embodiments can be understood and implemented by those skilled in the art based on the drawings, the specification and the claims. In the claims, the term "comprising" does not exclude other devices or steps; the numerical term "one" does not exclude a plurality; the terms "first", "second" are used to designate names and not to indicate any particular order. Any reference signs in the claims should not be understood as limiting the scope of protection. The functions of multiple parts appearing in the claims can be implemented by a single hardware or software module. The fact that certain technical features appear in different dependent claims does not mean that these technical features cannot be combined to achieve beneficial effects.
Claims
1. A card face recognition method, characterized by, The method comprises: extracting a plurality of feature points and their feature point vectors from each card face image in a card face image library based on a local feature extraction algorithm to obtain a first feature vector, wherein the first feature vector comprises n feature point vectors extracted from all card face images in the card face image library; normalizing and reducing the dimension of the first feature vector to obtain a second feature vector; based on a local feature coding algorithm, respectively performing coarse-grained coding processing and fine-grained coding processing on the second feature vector to obtain a first coarse-grained feature vector and a first fine-grained feature vector corresponding to each card face image; performing feature fusion on the first coarse-grained feature vector and the first fine-grained feature vector to obtain a first card face feature vector of the card face image; in the case of obtaining a to-be-bound image, searching for a target card face feature vector matching the to-be-bound image from the first card face feature vectors of all card face images, and determining the card face image corresponding to the target card face feature vector as the identification image of the to-be-bound image; the local feature coding algorithm, respectively performing coarse-grained coding processing and fine-grained coding processing on the second feature vector, comprises: based on the local feature coding algorithm, encoding processing is performed on the second feature vector to obtain a first coarse-grained feature vector corresponding to each card face image; based on the local feature coding algorithm, each feature point vector in the second feature vector is split into M segments to obtain M local vectors corresponding to each feature point vector; for each card face image, in the case of extracting P feature point vectors from the card face image, P*M local vectors corresponding to the P feature point vectors are obtained; encoding processing is performed on the P local vectors belonging to the same segment in the P*M local vectors to generate a local encoding vector for each segment, and M local encoding vectors for M segments are obtained; the M local encoding vectors are spliced to obtain a first fine-grained feature vector of the card face image.
2. The method of claim 1, wherein, Before the P local vectors belonging to the same segment in the P*M local vectors are encoded, the method further comprises: clustering n local vectors belonging to the same segment in the n*M local vectors to generate a cluster center vector set for each segment, and M cluster center vector sets for M segments are obtained; the encoding processing on the P local vectors belonging to the same segment in the P*M local vectors comprises: based on the cluster center vector set for each segment, residual sum is performed on the P local vectors corresponding to each segment to obtain the local encoding vector for each segment.
3. The method of claim 1, wherein, in the case of obtaining the to-be-bound image, a plurality of feature points and their feature point vectors are extracted from the to-be-bound image based on a local feature extraction algorithm to obtain a third feature vector; The third feature vector is normalized and dimensionally reduced to obtain a fourth feature vector; Based on a local feature coding algorithm, the fourth feature vector is respectively subjected to coarse-grained coding processing and fine-grained coding processing to obtain a second coarse-grained feature vector and a second fine-grained feature vector corresponding to the image to be bound; The second coarse-grained feature vector and the second fine-grained feature vector are subjected to feature splicing to obtain a second card surface feature vector of the image to be bound; From the first card surface feature vectors of all the card surface images, a first card surface feature vector with the highest similarity to the second card surface feature vector is searched to obtain the target card surface feature vector; The card surface image corresponding to the target card surface feature vector is determined as the recognition image of the image to be bound.
4. The method of claim 1, wherein, The first coarse-grained feature vector and the first fine-grained feature vector are subjected to feature splicing to obtain a first card surface feature vector of the card surface image, including: The first coarse-grained feature vector and the first fine-grained feature vector are subjected to feature splicing to obtain a mixed feature vector; The mixed feature vector is subjected to L2 normalization processing to obtain the first card surface feature vector of the card surface image.
5. The method of claim 1, wherein, After the first card surface feature vector of the card surface image is obtained, the method further includes: Based on an index structure, the first card surface feature vectors of all the card surface images in the card surface image library are saved to obtain a tree index.
6. The method of claim 5, wherein, The target card surface feature vector matching the image to be bound is searched, including: Based on a target similarity algorithm, the first card surface feature vector with the highest similarity to the image to be bound is searched in the tree index to obtain the target card surface feature vector.
7. The method of claim 1, wherein, Before the plurality of feature points and the feature point vectors thereof are extracted from each card surface image in the card surface image library, the method further includes: Based on a bilinear interpolation algorithm, all the card surface images in the card surface image library are scaled to a target size.
8. A card face recognition method characterized by comprising: The method includes: A feature extraction module is configured to extract a plurality of feature points and feature point vectors thereof from each card surface image in a card surface image library based on a local feature extraction algorithm to obtain a first feature vector, wherein the first feature vector includes n feature point vectors extracted from all the card surface images in the card surface image library; A post-processing module is configured to normalize and reduce the dimension of the first feature vector to obtain a second feature vector; A feature coding module is configured to subject the second feature vector to coarse-grained coding processing and fine-grained coding processing based on a local feature coding algorithm to obtain a first coarse-grained feature vector and a first fine-grained feature vector corresponding to each card surface image; A feature fusion module is configured to subject the first coarse-grained feature vector and the first fine-grained feature vector to feature splicing to obtain a first card surface feature vector of the card surface image; A card surface recognition module is configured to, in a case where an image to be bound is acquired, search a target card surface feature vector matching the image to be bound from the first card surface feature vectors of all the card surface images, and determine a card surface image corresponding to the target card surface feature vector as a recognition image of the image to be bound; The feature encoding module comprises: An encoding submodule is configured to encode the second feature vector based on the local feature encoding algorithm to obtain a first coarse-grained feature vector corresponding to each card face image; A feature splitting submodule is configured to split each feature point vector in the second feature vector into M segments based on the local feature encoding algorithm to obtain M local vectors corresponding to each feature point vector; An acquisition submodule is configured to, for each card face image, acquire P*M local vectors corresponding to P feature point vectors in the case that the P feature point vectors are extracted from the card face image; The encoding submodule is further configured to encode P local vectors belonging to the same segment in the P*M local vectors to generate a local encoding vector for each segment and obtain M local encoding vectors for M segments; A splicing submodule is configured to splice the M local encoding vectors to obtain a first fine-grained feature vector of the card face image.
9. An electronic device, comprising: The electronic device comprises a processor and a memory storing computer program instructions; The processor executes the computer program instructions to implement the card face recognition method in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores programs or instructions, and the programs or instructions are executed by the processor to implement the card face recognition method in any one of claims 1 to 7.
11. A computer program product, characterised in that, The computer program product is stored in a non-volatile storage medium, and the computer program product is executed by at least one processor to implement the card face recognition method in any one of claims 1 to 7.
Citation Information
Patent Citations
Fine-grained image identification method and device based on multi-granularity local feature soft correlation aggregation
CN113159067A
Method and device for obtaining display card surface, server and storage medium
CN113778591A