Identity verification method, electronic device, storage medium and computer program product
By obtaining verification images from different angles for animals with hair all over the body, performing object detection and feature extraction, and comparing them with the registered database, the rapid, accurate and safe problems of animal identity verification in the prior art are solved, and automated and non-invasive identity verification is achieved.
Patent Information
- Application Number
- CN202210116228.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-30
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-01-30
AI Technical Summary
The prior art is difficult to achieve rapid and accurate identity verification of animals (such as horses) with hair all over, especially when the appearance characteristics are blocked by hair, and there are risks such as artificial errors and electronic chip replacement.
By obtaining a set of verification images from different angles of the object to be verified, object detection is performed to identify the area where the target part is located, input a feature extraction model to obtain object features, and compare it with the base library features in the registered database for identity verification.
It realizes the need for a large amount of manual operations and automated identity verification, reduces user workload and human resources waste, ensures the accuracy and stability of verification, and avoids harm to the animal's bodies and verification errors.
Smart Images

Figure CN114647826B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of pattern recognition, and more specifically to an identity verification method, an electronic device, a storage medium, and a computer program product. Background Art
[0002] Identity verification technology is a technology used to confirm the identity of an object. Through identity verification technology, it is possible to clarify "who the target object is". With the development of science and technology, identity verification technology is increasingly being applied to various application fields. For example, identity verification technology can be used to verify the identity of horses in horse farms or equestrian clubs.
[0003] At present, the main ways to verify the identity of animals with hair all over their bodies, such as horses, are to verify using manually registered features and to verify by implanting electronic chips. The following is a detailed description of horses as an example. In the scheme of verifying using manually registered features, the user needs to observe the local features of the horse's body with human eyes, and compare the observed features with the features in the previously drawn horse feature book one by one to verify the identity of the horse. This scheme is difficult to achieve rapid identification of large-scale horses. In addition, since the scheme is entirely implemented manually, there may be large errors, which also increases the workload of users. In the scheme of implanting electronic chips, surgery is required on the horse to implant the electronic chip containing the horse information into the corresponding horse body, so as to verify the identity of the horse by identifying the electronic chip. However, there is a risk that the electronic chip may be replaced or removed in this scheme, which may make it difficult to complete the work of identifying the horse.
[0004] The appearance of animals covered with hair has its own particularities. For example, it is difficult to determine key points on the appearance, which poses a great challenge to automatic identity verification. Taking horses as an example, horses have long hair all over their bodies, which blocks their appearance features, making it difficult to verify their identity through appearance features such as specific feature points. In addition, in the process of collecting and verifying images, it is difficult to ensure the cooperation of the horse, and thus it is difficult to ensure the quality of the collected images.
[0005] Therefore, a new identity verification method is urgently needed to solve the above technical problems. Summary of the invention
[0006] The present application is proposed in consideration of the above-mentioned problems. According to one aspect of the present application, an identity verification method is provided, the method comprising: obtaining a set of verification images of an object to be verified at different angles; wherein the object to be verified is an animal covered with fur all over its body; detecting each verification image separately to determine and identify the area where the target part of the object to be verified is located in each verification image; inputting the images to be identified that respectively identify the area where the target part of the object to be verified is located into a feature extraction model to obtain the object features of the object to be verified output by the feature extraction model; and verifying the identity of the object to be verified based on the object features of the object to be verified and the base database features of the registered objects in the registration database.
[0007] Exemplarily, the registration database includes a first database, and the base database features in the first database are stored in a tree structure with a depth greater than 2, each node of the tree structure corresponds to a base database feature cluster, the base database feature cluster corresponding to the leaf node of the tree structure is each base database feature, and the base database feature cluster corresponding to the non-leaf node of the tree structure is generated by clustering representative features of the base database feature cluster corresponding to each node at a level below the non-leaf node;
[0008] The identity verification of the object to be verified based on the object characteristics of the object to be verified and the base database characteristics of the registered object in the registration database includes:
[0009] According to the order from high level to low level of the tree structure, the object features of the object to be verified are respectively compared with the base database feature clusters corresponding to the nodes to be compared at each level of the tree structure;
[0010] Among them, the nodes to be compared at the second highest level of the tree structure include all nodes at the second highest level, and the nodes to be compared at the levels below the second highest level of the tree structure are determined by comparing the object characteristics of the object to be verified with the base database feature clusters corresponding to the nodes to be compared at the previous level of the level.
[0011] Exemplarily, comparing the object features of the object to be verified with the base database feature clusters corresponding to the nodes to be compared at each level of the tree structure in order from high level to low level of the tree structure includes:
[0012] For each node to be compared at a level other than the lowest level of the tree structure, perform the following operations:
[0013] Match the object features of the object to be verified with the representative features of the base database feature cluster corresponding to the node to be compared at this level;
[0014] The child nodes of the node to be compared corresponding to the representative feature whose matching degree meets the first target condition are determined as the nodes to be compared at the next level; wherein the first target condition includes the maximum matching degree or the matching degree being greater than the target threshold.
[0015] Exemplarily, the first database is generated in the following manner:
[0016] The base database features of all registered objects are respectively used as leaf nodes of the tree structure;
[0017] From the second lowest level to the second highest level of the tree structure, the underlying feature cluster corresponding to each node at each level is determined in the following way:
[0018] Cluster the representative features of the underlying feature clusters corresponding to each node in the next level;
[0019] The base feature clusters corresponding to the representative features in each category obtained by clustering are respectively used as the base feature clusters corresponding to each node in the level.
[0020] Exemplarily, matching the object features of the object to be verified with the representative features of the base database feature cluster corresponding to the node to be compared at the level includes:
[0021] For the representative features of the base database feature cluster corresponding to each node to be compared at this level, the object features of the object to be verified and the representative features of the base database feature cluster corresponding to the node to be compared are input into the classification model, so that the classification model outputs the similarity between the object to be verified and the compared representative features, so as to determine whether the registered object corresponding to the node to be compared includes the object to be verified based on the output similarity.
[0022] Exemplarily, matching the object features of the object to be verified with the representative features of the base database feature cluster corresponding to the node to be compared at the level includes:
[0023] Calculate the similarity between the object feature of the object to be verified and the representative feature of the base database feature cluster corresponding to each node to be compared at this level;
[0024] The node to be compared to which the object to be verified belongs is determined based on the similarity.
[0025] Exemplarily, the registration database further includes a second database, and the method further includes:
[0026] For each newly added object, obtaining and storing the object features of the newly added object in the second database;
[0027] When the number of newly added objects in the second database meets the second target condition, for each level from the second lowest level to the second highest level of the tree structure, the object features of the newly added objects are compared with the base database feature clusters corresponding to all nodes of the level in order from the low level to the high level, until the node in the level to which the object features of the newly added objects belong is determined according to the comparison result, so as to update the tree structure.
[0028] According to another aspect of the present application, an electronic device is provided, including a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions are used to execute the identity verification method described above when the processor is executed.
[0029] According to another aspect of the present application, a storage medium is provided, on which program instructions are stored, and the program instructions are used to execute the identity verification method as described above when running.
[0030] According to another aspect of the present application, a computer program product is provided, including program instructions, which are used to execute the identity verification method described above when running.
[0031] In the above technical solution, a group of verification images of different perspectives of the object to be verified are first obtained, and then the verification images are detected to refine valid data, and finally the valid data is used for identity verification. The whole process does not require a lot of manual operation, and the identity verification process can be automatically realized by the machine. It greatly reduces the workload of users, reduces the waste of human resources, and ensures the accuracy and stability of identity verification. In addition, the scheme will not cause any harm to the body of the object to be verified, and belongs to non-invasive identity verification; and it relies on the characteristics of the object to be verified for verification. Therefore, while ensuring the health and safety of the object to be verified, it avoids verification errors caused by reasons such as chip replacement. Finally, the present application scheme verifies the identity of the object to be verified based on a group of verification objects at multiple different angles. The above overcomes the problems such as the appearance characteristics of horses with long hair and the object to be verified not cooperating with taking pictures, which cause troubles in the identity verification process, and ensures the accuracy of the identity verification of the object to be verified. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0033] Figure 1 A schematic block diagram of an example electronic device for implementing the identity verification method and device according to an embodiment of the present application is shown;
[0034] Figure 2 A schematic flow chart of an identity verification method according to an embodiment of the present application is shown;
[0035] Figure 3A schematic diagram showing a set of verification images of a horse according to an embodiment of the present application;
[0036] Figure 4 A schematic flow chart of training an identity discrimination neural network model according to an embodiment of the present application is shown;
[0037] Figure 5 A schematic diagram showing a tree structure of a first database according to an embodiment of the present application;
[0038] Figure 6 A schematic flow chart of building a registration database according to an embodiment of the present application is shown;
[0039] Figure 7 A schematic flow chart showing the steps of updating a registration database according to an embodiment of the present application is shown;
[0040] Figure 8 A schematic block diagram of an identity verification device according to an embodiment of the present application is shown; and
[0041] Fig. 9 A schematic block diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0042] In recent years, research on computer vision, deep learning, machine learning, image processing, image recognition and other technologies based on artificial intelligence has made important progress. Artificial Intelligence (AI) is an emerging science and technology that studies and develops theories, methods, technologies and application systems for simulating and extending human intelligence. Artificial intelligence is a comprehensive discipline involving many types of technologies such as chips, big data, cloud computing, the Internet of Things, distributed storage, deep learning, machine learning, neural networks, etc. Computer vision, as an important branch of artificial intelligence, specifically allows machines to recognize the world. Computer vision technology usually includes face recognition, liveness detection, fingerprint recognition and anti-counterfeiting verification, biometric recognition, face detection, pedestrian detection, target detection, pedestrian recognition, image processing, image recognition, image semantic understanding, image retrieval, text recognition, video processing, video content recognition, behavior recognition, 3D reconstruction, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), computational photography, robot navigation and positioning and other technologies. With the research and advancement of artificial intelligence technology, this technology has been applied in many fields, such as security, urban management, traffic management, building management, park management, facial access, facial attendance, logistics management, warehouse management, robots, intelligent marketing, computational photography, mobile phone imaging, cloud services, smart homes, wearable devices, unmanned driving, automatic driving, smart medical care, facial payment, facial unlocking, fingerprint unlocking, identity verification, smart screens, smart TVs, cameras, mobile Internet, live streaming, beauty, makeup, medical beauty, and smart temperature measurement.
[0043] In order to make the purpose, technical solutions and advantages of the present application more obvious, the example embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the example embodiments described herein. Based on the embodiments described in the present application, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of the present application.
[0044] First, refer to Figure 1 An example electronic device 100 for implementing the identity verification method and apparatus according to an embodiment of the present application is described.
[0045] like Figure 1 As shown, the electronic device 100 includes one or more processors 102 and one or more storage devices 104. Optionally, the electronic device 100 may also include an input device 106, an output device 108 and an image acquisition device 110, and these components are interconnected via a bus system 112 and / or other forms of connection mechanisms (not shown). It should be noted that Figure 1The components and structures of the electronic device 100 shown are merely exemplary and non-limiting. The electronic device may also have other components and structures as required.
[0046] The processor 102 may be implemented in at least one hardware form of a microprocessor, a digital signal processor (DSP), a field programmable gate array (FPGA), or a programmable logic array (PLA). The processor 102 may also be a central processing unit (CPU), a graphics processing unit (GPU), an application specific integrated circuit (ASIC), or a combination of one or more of other processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 100 to perform desired functions.
[0047] The storage device 104 may include one or more computer program products. The computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on a computer-readable storage medium, and the processor 102 may run the program instructions to implement the client functions (implemented by the processor) and / or other desired functions in the embodiments of the present application described below. Various applications and various data, such as various data used and / or generated by the application, may also be stored in the computer-readable storage medium.
[0048] The input device 106 may be a device used by a user to input information, and may include one or more of a keyboard, a mouse, a microphone, a touch screen, and the like.
[0049] The output device 108 can output various information (such as images and / or sounds) to the outside (such as a user), and can include one or more of a display, a speaker, etc. Optionally, the input device 106 and the output device 108 can be integrated together and implemented using the same interactive device (such as a touch screen).
[0050] The image acquisition device 110 can acquire images (including static images and video frames) and store the acquired images in the storage device 104 for use by other components. The image acquisition device 110 can be a separate camera, a camera in a mobile terminal, or an image sensor in a capture machine. It should be understood that the image acquisition device 110 is only an example, and the electronic device 100 may not include the image acquisition device 110. In this case, other image acquisition devices can be used to acquire images and send the acquired images to the electronic device 100.
[0051] Exemplarily, the example electronic device for implementing the identity verification method and apparatus according to the embodiments of the present application can be implemented on a device such as a personal computer or a remote server.
[0052] According to one aspect of the present application, a method for identity verification is proposed, which can more accurately verify the identity of an animal covered with fur, that is, determine which specific animal the animal is.
[0053] The following will refer to Figure 2 Describe the identity verification method according to the embodiment of the present application. Figure 2 A schematic flow chart of an identity verification method 200 according to an embodiment of the present application is shown. The object to be verified by the identity verification method is an animal with a full body coat. The animal with a full body coat can be an animal such as a cow, a sheep, a horse, a dog, a cat, a rabbit, etc. For ease of description, in the present application, the following description is made by taking the case that the object to be verified is a horse. It can be understood that the identity verification of the horse to be verified in the following technical solution is merely exemplary, and the horse can be replaced by any suitable animal with a full body coat to achieve its identity verification.
[0054] The identity of the horse to be verified, that is, which horse it is, can be determined by the identity verification method 200. For example, each registered horse in the database has its unique identification number. The identification number of the horse to be verified can be determined by the identity verification method 200, thereby determining the identity of the horse to be verified. Figure 2 As shown, the method 200 includes the following steps.
[0055] Step S210, obtaining a group of verification images of the horse to be verified at different angles.
[0056] The verification image may be an original image acquired by the image acquisition device 110, or an image obtained after preprocessing the original image. The preprocessing operation may include all operations for more clearly identifying the target. For example, the preprocessing operation may include a denoising operation such as filtering.
[0057] The verification image may be a full-body image of the horse to be verified, or a partial image containing one or more body parts of the horse to be verified, such as an image containing the head, torso, etc. A set of verification images includes at least two images of the horse to be verified taken from different angles. Figure 3 FIG. 1 is a schematic diagram showing a set of verification images according to an embodiment of the present application. Figure 3 As shown, the left picture is a frontal image of a horse's head, and the right picture is a side image of a horse's head.
[0058] Step S230 , detecting each verification image separately to determine and identify the area where the target part of the horse to be verified is located in each verification image.
[0059] After performing target detection on the verification image, the target's bounding box can be obtained. The bounding box can be the smallest external figure that contains only one target and is for the target, for example, it can be a rectangular box, an elliptical box, etc. The bounding box can identify the area where the target part is located in the verification image. Figure 3 The results of target detection on the verification image are also shown. Figure 3 As shown, a rectangular frame surrounding the horse's head is obtained after detection. The image area inside the bounding box can better highlight the characteristics of the horse, that is, distinguish the horse from other horses. It can be considered that the area in the bounding box is the area where the target part of the horse to be verified in the verification image is located. In this embodiment, the target part is the horse's head. It can be understood that the target part can be any part or the whole body of the horse. Preferably, the target part is a part that can reflect the local characteristics of the horse, such as Figure 3 The head of the horse shown. Figure 3 In the embodiment shown, different verification images provide the head area of the horse to be verified at two different angles. Through target detection, the area where the horse to be verified is located is determined. Therefore, in subsequent operations, data analysis and processing are performed only based on this valid area. This avoids interference of background areas and other areas in the verification image with the horse identity verification, which not only reduces the amount of data processing, but also improves the accuracy of horse identity verification.
[0060] Exemplarily, the verification image can be detected using algorithms such as one-stage target detection, two-stage target detection, image semantic segmentation or image instance segmentation. The target detection model can be implemented using but not limited to a region-based convolutional neural network (R-CNN), a region-based fully convolutional neural network (R-FCN) and other neural networks derived from R-CNN or R-FCN. The specific detection scheme is not limited in the present application, and any existing or future technical schemes that can achieve detection are within the scope of protection of the present application. It can be understood that the above-mentioned target detection model can be obtained by training based on training images and corresponding annotation data. The annotation data marks the area where the target part of the horse in the training image is located.
[0061] Step S250, inputting the images to be identified that respectively identify the target areas of the horse to be verified into the feature extraction model, and obtaining the object features of the horse to be verified output by the feature extraction model.
[0062] Through step S210 and step S230, images to be identified that respectively identify the area where one or more body parts of the horse to be verified are located can be obtained. For example, a group of images to be identified with bounding boxes are obtained. This group of images to be identified is input into the feature extraction model, and the feature extraction model can output the horse features of the horse to be verified in the bounding box. For example, two images to be identified with a height and a width of 256 pixels and including three data channels are input into the feature extraction model, and the feature extraction model can output a high-dimensional feature vector with a length of 2048. The high-dimensional feature vector is the horse feature of the horse to be verified.
[0063] The feature extraction model can use, but is not limited to, a multi-layer perceptron (MLP), a convolutional neural network (CNN), and a transformer neural network (Transformer) to implement its feature extraction function.
[0064] Step S270 , verifying the identity of the horse to be verified based on the horse characteristics of the horse to be verified and the base database characteristics of the registered horses in the registration database.
[0065] In this step, the base database features of each registered horse in the registration database can be compared with the horse features of the horse to be verified one by one to determine the identity of the horse to be verified. If there is a base database feature of a registered horse in the registration database whose similarity with the horse features of the horse to be verified is higher than the similarity threshold, then the identity of the horse to be verified can be determined to be the registered horse with the highest similarity to the horse to be verified among these registered horses.
[0066] Exemplarily, the horse features of the horse to be verified and the base database features of the registered horses in the registration database can be simultaneously input into a model for horse feature comparison, which can be implemented, for example, by a neural network. The output of the model is a feature comparison result, and the identity of the horse to be verified can be determined based on the feature comparison result. For example, the feature comparison result can be represented by the similarity between the horse features of the horse to be verified and the base database features of the registered horses in the registration database. Specifically, after the feature comparison is performed by the above model, when the similarity between the two horses corresponding to the two sets of feature data is greater than or equal to the similarity threshold, it means that the two horses are the same horse. Otherwise, they are not the same horse. The similarity threshold can be set to any reasonable value such as 75% or 80%. It can be understood that the horse features of the horse to be verified can obtain the maximum similarity after being compared one by one with the base database features of each registered horse in the registration database. If the maximum similarity is greater than the similarity threshold, it can be determined that the registered horse in the registration database corresponding to the maximum similarity and the horse to be verified are the same horse, and then the identity of the horse to be verified can be determined by, for example, reading the identity information of the registered horse in the database.
[0067] In the above technical solution, a group of verification images of the object to be verified from different angles are first collected, and then the verification images are detected to refine the valid data, and finally the valid data is used to verify the identity of the horse. The whole process does not require a lot of manual operation, and the identity verification process can be realized by the machine. It greatly reduces the workload of users, reduces the waste of human resources, and ensures the accuracy and stability of identity verification. In addition, unlike the implantation of electronic chips, this solution not only does not cause any harm to the body of the object, but also belongs to non-invasive identity verification; and it relies on the characteristics of the object to be verified for verification. Therefore, while ensuring the health and safety of the object to be verified, it avoids verification errors caused by chip replacement and other reasons. Finally, in the above solution, a group of verification images of the object to be verified from different perspectives are used to realize identity verification, which overcomes the troubles caused by the horse's appearance characteristics such as long hair and the horse's refusal to cooperate with taking pictures, and ensures the accuracy of the horse's identity verification.
[0068] Exemplarily, before step S250, method 200 further includes: cropping each verification image based on the area where the target part of the horse to be verified is located, and using the image that only includes the area where the target part of the horse to be verified is located as the image to be identified. It can be understood that cropping means changing the size of the verification image. Taking the verification image as a rectangle as an example, the cropping operation can reduce the length and / or width of the verification image. The scale of the cropping operation is related to the size of the area where the target part of the horse to be verified is located. Preferably, the cropped verification image only includes the area where the target part of the horse to be verified is located, that is, the cropped verification image is as follows: Figure 3 The target area of the horse to be inspected is shown within the bounding box.
[0069] In this way, while ensuring that necessary data in the image to be identified is not missing, the operation of processing redundant data and the negative impact of redundant data on the identity verification results can be effectively avoided, thereby improving the efficiency and accuracy of horse identity verification and enhancing the user experience.
[0070] Exemplarily, the feature extraction model mentioned in the above step S250 is obtained by training. Exemplarily, the feature extraction model is included in the identity discrimination neural network model. The identity discrimination neural network model is used in this embodiment to determine whether the horses in different images are the same horse. Figure 4A schematic flow chart of training an identity discrimination neural network model according to an embodiment of the present application is shown. The identity discrimination neural network model includes the aforementioned feature extraction model and classification model connected in sequence. The feature extraction model is used to receive a set of training images and output corresponding horse features. The classification model is used to receive horse features corresponding to two sets of training images from the feature extraction model and output the similarity of the horses from which the two sets of training images come. The step of training the identity discrimination neural network model can be performed at any time before step S250. By way of example and not limitation, this step includes the following steps: Figure 4 Steps S241 and S242 are shown.
[0071] Step S241, obtaining different groups of training images of training horses and corresponding annotation data, wherein the annotation data includes identity information of the training horses.
[0072] For example, the shooting location of the training image can be set in an outdoor place such as a pasture or track of a horse farm or equestrian club, or in an indoor place such as a stable. The shooting time can be selected in the early morning, morning, noon, afternoon, evening, etc. to obtain different training images of the training horse under different natural light sources. Different light-emitting devices can also be used to provide different artificial light sources for the acquisition of training images to obtain different training images of the training horse under different artificial light sources. It can be understood that a variety of shooting conditions for the training image can be obtained by cross-combining the above-mentioned shooting locations and shooting times.
[0073] Similar to the verification image, the training image may be a full-body image of the horse, or a partial image containing one or more body parts of the horse, such as an image containing the head, torso, etc. A set of training images includes at least two training images of the same training horse from different perspectives. Each training horse in the training image has corresponding annotation data. The annotation data can be obtained, for example, by manual or machine annotation. The annotation data is an accurate annotation of the target in the training image. The annotation data may include the identity information of the registered horse, such as the identity number of the registered horse, and may also include the position information of the real bounding box of the target in the training image. For example, the real bounding box is a rectangular box, and its position information may be the position coordinates of any pair of non-adjacent vertices on the rectangular box.
[0074] Step S242, inputting different groups of training images into the identity discrimination neural network model to train the identity discrimination neural network model based on the labeled data.
[0075] After inputting two different sets of training images into the feature extraction model of the identity discrimination neural network model respectively, a feature extraction result, i.e., two sets of corresponding horse features of the training horses, can be obtained. Exemplarily, the identity discrimination neural network model may include a feature extraction model. Thus, the two different sets of training images may be input into the feature extraction model respectively at different times to obtain corresponding horse features respectively. Alternatively, the identity discrimination neural network model may include two feature extraction models. Both feature extraction models are connected to the classification model. Two different sets of training images are input into the two feature extraction models respectively to obtain corresponding horse features respectively.
[0076] Afterwards, the feature extraction results of the two sets of training images are input into the classification model, and the classification model outputs the classification result, that is, the similarity of the two sets of horse features, and it can be determined whether the corresponding two sets of training images are from the same horse based on the similarity. Among them, the classification model can be implemented using a multi-layer perceptron (MLP), a convolutional neural network (CNN), and a transformer neural network.
[0077] By comparing the classification results with the labeled data, the function values of the loss functions of the feature extraction model and the classification model can be obtained. The loss function can be, for example, the mean square error loss function (MSE, L2_Loss, LSE), the mean absolute error loss function (MAE, L1_Loss, LAE), the activation function (Softmax), the cross-entropy loss function (Cross-entropyLoss), the ternary loss function (Triplet Loss), etc. According to the function value of the loss function, the relevant parameters of the feature extraction model and the classification model can be adjusted respectively, thereby obtaining an identity discrimination neural network model with better performance, and then obtaining the desired feature extraction model.
[0078] In addition, data augmentation operations can be performed on training images first. For example, operations such as rotation, translation, scaling, mirroring, brightness adjustment, and noise addition can be performed on training images to obtain multiple variants of training images, thereby increasing inputs for the identity discrimination neural network model training process and optimizing the training results of the identity discrimination neural network model.
[0079] After multiple training processes, feature extraction models and classification models with higher accuracy and stronger generalization can be obtained. For the feature extraction model, it can output more representative high-dimensional features of horses. For example, the height and width of the input training image are both 256 pixels and include three channels. After being processed by the trained feature extraction model, 2048-dimensional high-dimensional features can be output. This ensures that when the horses in the two sets of training images are the same horse, the horse features of the two are highly similar. At the same time, when the horses in the two sets of training images are not the same horse, the horse features of the two are very different. The robustness and stability of the identity discrimination neural network model are enhanced, and the accuracy of the output results is improved. At the same time, a more ideal feature extraction model is obtained, which provides a guarantee for the accurate verification of the horse's identity.
[0080] Exemplarily, the above-mentioned registration database may include a first database. The bottom library features in the first database may be stored in a tree structure with a depth greater than 2. Each node of the tree structure corresponds to a bottom library feature cluster, that is, the node of the tree structure has a one-to-one correspondence with the bottom library feature cluster. Each bottom library feature cluster may include one or more bottom library features. The bottom library feature cluster corresponding to the leaf node of the tree structure is each bottom library feature. In other words, the leaf node of the tree structure corresponds to the bottom library feature one-to-one. The bottom library feature cluster corresponding to the non-leaf node of the tree structure is generated by clustering the representative features of the bottom library feature cluster corresponding to each node of the next level of the non-leaf node. The bottom library features in the bottom library feature cluster corresponding to each node are the same as the set of bottom library features in the bottom library feature cluster corresponding to each of its child nodes.
[0081] For ease of description, the following description is made by taking a tree structure with a depth of 4 as an example. It can be understood that the depth of the tree structure corresponds to its level. That is, in this embodiment, the tree structure includes four levels. Optionally, the four levels of the tree structure can be named as the first level, the second level, the third level and the fourth level in order from high to low. Among them, the first level of the tree structure includes a node, and each node includes a plurality of child nodes. The terminal node that no longer branches in the tree structure is called a leaf node. In this embodiment, the leaf node belongs to the fourth level in the tree structure, that is, the lowest level. The bottom library feature cluster corresponding to the leaf node only includes one bottom library feature. In other words, each leaf node can represent a horse feature respectively. Exemplarily, the nodes other than the leaf nodes can be called non-leaf nodes. In this embodiment, the non-leaf nodes belong to the first level, the second level and the third level in the tree structure. Taking the third level as an example, the bottom library feature cluster corresponding to the nodes of this level can be generated by clustering the various horse features corresponding to the leaf nodes. For the second level, the base library feature cluster corresponding to the nodes of this level can be generated by clustering based on the representative features of the base library feature clusters corresponding to each node of the third level. It can be understood that the representative features of the base library feature clusters can be the average result of the base library features in the base library feature clusters, any base library feature in the base library feature clusters, or the specific base library features in the base library feature clusters, etc. It is not limited in this application. For the first level, no clustering operation can be performed, and it only includes one node, and the base library feature cluster corresponding to this node can include all base library features in the first database. Figure 5 A schematic diagram of a tree structure of a first database according to an embodiment of the present application is shown. In this embodiment, the tree structure includes 4 levels. The first level includes a unique base database feature cluster, namely, the first feature cluster A. The second level is divided into 2 base database feature clusters, the second feature cluster A and the second feature cluster B. Correspondingly, the 2 base database feature clusters include 3 third feature clusters and 2 third feature clusters, respectively. The third level is divided into 5 base database feature clusters. Each leaf node of the lowest level corresponds to a base database feature.
[0082] Exemplarily, the first database can be generated in the following manner. First, the base database features of all registered horses are respectively used as leaf nodes of the tree structure. Then, from the second lowest level to the second highest level of the tree structure, the base database feature clusters corresponding to each node of each level are determined in the following manner: a) clustering the representative features of the base database feature clusters corresponding to each node of the next level; b) the base database feature clusters corresponding to the representative features in each category obtained by clustering are respectively used as the base database feature clusters corresponding to each node of the level.
[0083] For example, the base features of all registered horses in the first database can be classified layer by layer according to a classification algorithm, a clustering algorithm or a multi-layer perceptron. Taking the clustering algorithm as an example, the base features with high similarity can be clustered into one category, that is, they belong to the same base feature cluster. For example, in the process of constructing the first database, the base features of all registered horses can be used as leaf nodes of the tree structure, and then the base features of all registered horses are clustered to obtain the base feature clusters corresponding to each node of the second lowest level. The representative features of the base feature clusters corresponding to all nodes in the second lowest level can be clustered by similar means to obtain another new level, until the second highest level of the tree structure. It can be understood that for the base feature clusters of every two adjacent levels, the base features in each base feature cluster of the next level are a subset of the base features in a corresponding base feature cluster of the previous level. Thus, the first database with base feature hierarchies is constructed.
[0084] Thus, a first database with a tree structure can be generated by constructing it layer by layer from bottom to top. The base database features in the base database feature clusters at each level in the first database are reasonably distributed, ensuring the accuracy and efficiency of the horse identity verification process.
[0085] Exemplarily, step S270 of verifying the identity of the horse to be verified based on the horse features of the horse to be verified and the base database features of the registered horses in the registration database may include: comparing the horse features of the horse to be verified with the base database feature clusters corresponding to the nodes to be compared at each level of the tree structure in order from high level to low level. The nodes to be compared at the second highest level of the tree structure include all nodes at the second highest level. For the second highest level of the tree structure, for example Figure 5 At the second level shown, the horse features of the horses to be verified can be compared one by one with the underlying feature clusters corresponding to all nodes of the level. The nodes to be compared at the level below the second highest level of the tree structure are determined by comparing the horse features of the horses to be verified with the underlying feature clusters corresponding to the nodes to be compared at the previous level of the level. For each level below the second highest level of the tree structure, for example Figure 5 The third and fourth levels shown determine which base database feature clusters corresponding to which nodes are to be compared at the level based on the comparison results of the base database feature clusters corresponding to the nodes to be compared at the previous level.
[0086] The first database is a multi-level tree structure, which is easy to manage. The identity verification process is realized quickly and accurately through the top-down comparison operation between the object to be verified and the feature clusters of the base database corresponding to the nodes of the tree structure.
[0087] In a specific embodiment, the following operations are performed for the nodes to be compared at each level other than the lowest level of the tree structure: 1) the horse features of the horse to be verified are matched with the representative features of the base feature cluster corresponding to the nodes to be compared at that level; 2) the child nodes of the nodes to be compared corresponding to the representative features whose matching degree meets the first target condition are determined as the nodes to be compared at the next level. The first target condition may include the maximum matching degree or the matching degree being greater than the target threshold.
[0088] For each level of the tree structure, for example, first, the horse features of the horse to be verified are matched one by one with the horse representative features of the base feature cluster corresponding to each node to be compared at the level Li. The base feature cluster Gd whose matching degree with the horse features of the horse to be verified meets the first target condition is determined from the base feature clusters corresponding to all the nodes to be compared at the level Li. Li To determine the base database feature cluster Gc corresponding to the node to be compared at the next level L(i+1) of the level Li L(i+1) Among them, the base library feature cluster Gd Li It is the base feature cluster Gc selected in the level Li that has the largest matching degree with the horse feature of the horse to be verified or the matching degree is greater than the target threshold. Optionally, the target threshold can be reasonably set based on experience and is not limited here. L2 Includes the base feature clusters corresponding to all nodes in the next highest level L2. Base feature cluster Gc L(i+1) It is the next level L(i+1) and belongs to the bottom database feature cluster Gd Li In the feature cluster of the tree structure, the registered horse with the base database feature that has the greatest matching degree or a matching degree greater than the target threshold value is determined among the base database features corresponding to the node to be compared in the leaf node of the tree structure. The identity of the horse to be verified is the determined registered horse.
[0089] It can be understood that the representative feature of the horse in the base feature cluster can be the average result of the horse features in the feature cluster, any horse feature in the feature cluster, or a specific horse feature in the feature cluster, etc.
[0090] See again Figure 5 First, the horse features of the horses to be verified are compared one by one with the two second feature clusters Gc in the second level L2 (i.e., the second highest level). L2 For example, the horse characteristics of the horse to be verified are respectively calculated and compared with the horse characteristics of the randomly selected horse from different second feature clusters Gc L2 The similarity between the two horse features in is used to determine the second feature cluster where the horse features corresponding to the higher similarity are located, for example Figure 5The second feature cluster A in is used to determine the base feature cluster Gd of the nodes to be compared in the third level L3. L1 Based on this, the third feature clusters A, B, and C belonging to the second feature cluster A are determined to be the base database feature cluster Gc corresponding to the node to be compared at the third level L3. L3 Then, the horse features of the horse to be verified are compared with the representative horse features in the third feature clusters A, B, and C. For example, the similarities between the horse features of the horse to be verified and three randomly selected horse features from different third feature clusters A, B, and C are calculated respectively, and the third feature cluster to which the horse features corresponding to the highest similarity belong is selected, for example Figure 5 The third feature cluster B in the fourth level is determined as the base feature cluster Gd for determining the nodes to be compared in the fourth level. L3 . Through a similar method, the base database feature of the horse in the fourth level with the highest similarity to the horse feature of the horse to be verified can be finally selected, and then the registered horse corresponding to the base database feature in the fourth level can be determined. Therefore, it is considered that the identity of the horse to be verified is the determined registered horse, thereby realizing the identity verification of the horse to be verified.
[0091] In this way, the horses to be verified can be queried locally in the database in a hierarchical manner, and the horse features compared at each level are greatly reduced, which speeds up the horse identity verification and improves the user experience.
[0092] Exemplarily, matching the horse features of the horse to be verified with the representative features of the base feature cluster corresponding to the node to be compared at the level may include: for the representative features of the base feature cluster corresponding to each node to be compared at the level, inputting the horse features of the horse to be verified and the representative features of the base feature cluster corresponding to the node to be compared into a classification model, so that the classification model outputs the similarity between the horse to be verified and the compared representative features, so as to determine whether the registered horses corresponding to the node to be compared include the horse to be verified based on the output similarity.
[0093] Similar to the aforementioned step S242, the horse features of the horse to be verified and the base database features of a registered horse in the registration database can be used as two inputs and input into the classification model to output a classification result. The classification result can indicate whether the horse to be verified and the compared registered horse are the same horse.
[0094] Alternatively, the horse features of the horse to be verified and the base database features of multiple registered horses in the registration database can be used as inputs and input into the classification model to output a classification result. The classification result can indicate which horse among the compared registered horses is the same horse as the horse to be verified.
[0095] Therefore, the above classification model can be used to finally realize the identity verification of the horse to be verified. In particular, the identity verification result of the classification model after the above training is more accurate. In this solution, the accuracy and reliability of the identity verification result can be improved by training the classification model.
[0096] Alternatively, matching the horse features of the horse to be verified with the representative features of the base feature cluster corresponding to the node to be compared at the level may include: calculating the similarity between the horse features of the horse to be verified and the representative features of the base feature cluster corresponding to each node to be compared at the level; and determining the node to be compared to which the horse to be verified belongs based on the similarity.
[0097] Exemplarily, the similarity between the horse features of the horse to be verified and the representative features of the bottom library feature cluster corresponding to each node to be compared at the level can be calculated in the following manner. For example, the cosine similarity or mean square error similarity between the horse features of the horse to be verified and the representative features of the bottom library feature cluster corresponding to each node to be compared at the level is calculated. Among them, the horse features of the horse to be verified and the representative features of the bottom library feature cluster corresponding to each node to be compared at the level can be represented by vectors respectively. The cosine similarity of the two can be estimated by calculating the cosine value of the angle between the two vectors. First, the representative feature with the highest cosine similarity with the horse features of the horse to be verified is determined in the level, and then it is determined whether the cosine similarity is higher than a similarity threshold, thereby determining whether the horse to be verified belongs to the bottom library feature cluster where the representative feature is located, that is, determining the node to be compared to which the horse to be verified belongs. When the cosine similarity is higher than the similarity threshold, the horse to be verified belongs to the node to be compared, otherwise it does not belong. The similarity threshold may be set to any reasonable value between 70% and 90%, for example.
[0098] Similarly, the identity verification of the horse can also be achieved by calculating the mean square error similarity between the horse features of the horse to be verified and the representative features of the underlying feature cluster corresponding to each node to be compared at this level. Similarly, first determine the representative feature with the highest mean square error similarity with the horse features of the horse to be verified in this level, and then determine whether the mean square error similarity is higher than a similarity threshold, so as to determine whether the horse to be verified belongs to the underlying feature cluster where the representative feature is located, that is, determine the node to be compared to which the horse to be verified belongs. When the mean square error similarity is higher than the similarity threshold, the horse to be verified belongs to the node to be compared, otherwise it does not. The similarity threshold can be set to any reasonable value between 70% and 90%, for example.
[0099] Using cosine similarity or mean square error similarity can more accurately determine which horse in the database the horse to be verified is, and the calculation amount is small and the calculation speed is fast, avoiding complex operations such as model training.
[0100] Optionally, the above identity verification method also includes the step of building a registration database. Figure 6 FIG. 1 shows a schematic flow chart of building a registration database according to an embodiment of the present application. By way of example and not limitation, the steps include: Figure 6 The 4 sub-steps are shown.
[0101] Step S261, for each registered horse, one or more groups of registered images at different angles are obtained. It can be understood that in order to enable the registration database to provide more detailed data, in this step, preferably more groups of registered images are obtained, such as images of different parts of the horse in different scenes and under different lighting conditions. In this way, the accuracy of the subsequent horse identity verification based on the registration database can be guaranteed.
[0102] Step S262 , detecting the acquired registered images respectively to determine and identify the area where the target part of the registered horse is located in each registered image.
[0103] Step S263, inputting all the registered horse images respectively identifying the areas where the target parts of the registered horses are located into the feature extraction model to obtain the base database features of the registered horses output by the feature extraction model.
[0104] A person skilled in the art can understand the specific implementation process of steps S261 - S263 by reading the above detailed description of step S210 , step S230 and step S250 , which will not be described here for the sake of brevity.
[0105] Step S264, constructing a registration database using at least the base database features and horse identities of the registered horses.
[0106] The horse identity can be represented by horse identifiers such as horse number, registration image, etc. The base database features and corresponding horse identity of each registered horse obtained through the above three steps are used as a data entry in the registration database to build a registration database with one horse and one file.
[0107] The above scheme can be implemented by machine, avoiding the phenomenon of using human eyes to identify horse characteristics for horse registration and database building in the existing technology, greatly reducing the waste of human resources, and ensuring the accuracy and reliability of the data in the built registration database.
[0108] For example, step S264 may also utilize the attribute information of the registered horses when constructing the registration database. The attribute information of the horses may include information such as the breed, origin, and age of the horses. Figure 1The input device 106 shown inputs attribute information of the registered horse and combines the attribute information with the horse characteristics and the horse identity to construct a data entry in the registration database.
[0109] The above technical solution can increase the amount of data in the registration database, provide more data for horse identity verification, and improve the generalization of identity verification. For example, when verifying the identity of a horse, the database can be searched first based on the attribute information of the horse to be verified, thereby narrowing the range of horses to be compared in the registration database. In turn, the amount of data processed for horse identity verification is reduced and the processing speed is accelerated.
[0110] For an already established registration database, horses can be added thereto, thereby updating the registration database. For example, through the above-mentioned identity verification process, there may be a result of identity verification failure, that is, the horse to be verified does not exist in the current registration database. If the horse identity verification fails, the horse can be regarded as a newly added horse and added to the current registration database. In addition, the newly added horse can also include horses added to the registration database manually. Figure 7 FIG. 1 is a schematic flow chart showing the steps of updating the registration database according to an embodiment of the present application. Figure 7 As shown, the step of updating the registration database may include the following four sub-steps.
[0111] Step S281, for each newly added horse, obtain one or more groups of newly added images at different angles.
[0112] Step S282, detecting the acquired newly added images respectively to determine and identify the area where the target part of the newly added horse in each newly added image is located.
[0113] Step S283, inputting all newly added horse images that respectively identify the areas where the target parts of the newly added horses are located into the feature extraction model to obtain the horse features of the newly added horses output by the feature extraction model.
[0114] Step S284, adding the newly added horse to the registration database based on the horse characteristics and horse identity of the newly added horse.
[0115] A person skilled in the art may understand the specific implementation method of updating the registration database by reading the above descriptions on building the registration database and verifying the identity of the horse, which will not be described here for the sake of brevity.
[0116] By means of the above operation of updating the registration database, the data in the registration database can be kept up to date, thereby more ideally meeting the needs of users.
[0117] Preferably, the following steps can be first performed after step S283: searching the registration database based on the attribute information of the newly added horse, and when attribute information matching the attribute information of the newly added horse is retrieved, adding the horse characteristics of the newly added horse to the horse characteristics of the horse to which the retrieved attribute information belongs. It can be understood that in this embodiment, the aforementioned step S284 is only performed when attribute information matching the attribute information of the newly added horse is not retrieved. As mentioned above, the attribute information of the horse may include information such as breed and origin. For the newly added horse, the user can use Figure 1 The input device 106 shown is used to input the attribute information of the newly added horse and search the registration database. When the registration database contains attribute information matching the attribute information of the newly added horse, the horse features extracted in the above step S283 are added to the horse features of the horse corresponding to the matching attribute information to update the registration database.
[0118] In this solution, the attribute information of the newly added horse can be used to directly search and match in the registration database and update the registration database accordingly. As a result, the time required to update the registration database is greatly reduced. In addition, the operation is simple, convenient and fast, which effectively improves the efficiency of updating the registration database.
[0119] Exemplarily, the registration database may also include a second database. For each newly added horse, the horse features of the newly added horse are obtained and stored in the second database. When the number of newly added horses in the second database meets the second target condition, for each level from the second lowest level to the second highest level of the tree structure, the horse features of the newly added horse are compared with the bottom database feature clusters corresponding to all the nodes of the level in order from the low level to the high level, until the node to which the horse features of the newly added horse belong in the level is determined according to the comparison result, so as to update the tree structure. When a lot of newly added horses are added to the second database, the horse features of the horses in the registration database can be reclassified to incorporate the newly added horses in the second database into the first database to achieve the update of the registration database. For example, when the number of newly added horses in the second database exceeds the target number threshold set by the second target condition or a specific proportion of the number of registered horses in the first database, starting from the second lowest level of the tree structure, for each newly added horse, the horse features of the newly added horse can be compared with the representative features of the bottom database feature clusters corresponding to all the nodes of the level. Exemplarily, the comparison result can be expressed by similarity. Based on all the comparison results, the node with the largest similarity value with the horse features of the newly added horse can be selected. If the similarity value between the representative feature of the bottom library feature cluster corresponding to the node and the horse features of the newly added horse is greater than or equal to a preset threshold, the horse features of the newly added horse are incorporated into the bottom library feature cluster corresponding to the node, and the comparison is terminated. If the similarity value between the representative feature of the bottom library feature cluster corresponding to the node and the horse features of the newly added horse is less than a preset threshold, the horse features of the newly added horse continue to be compared with the bottom library feature clusters corresponding to all nodes of the previous level of the next lower level, until the horse features of the newly added horse are incorporated into the bottom library feature cluster of a node of a certain level. Thus, the tree structure is updated.
[0120] For example, in the previous steps, Figure 5 If the horse features of the horses meeting the second target condition are added to the second database, the horse features of the newly added horses in the second database can be processed as above to be incorporated into the tree structure of the first database.
[0121] In the above scheme, the registration database includes not only the first database of tree structure, but also the second database of one horse and one file. When the second database meets certain conditions, it is merged into the first database in a reasonable way. Thus, the horse identity verification is ensured to be fast and accurate.
[0122] According to a second aspect of the present application, an identity verification device is provided. Figure 8A schematic block diagram of an identity verification device 800 according to an embodiment of the present application is shown.
[0123] As shown in the figure, the device 800 includes an image acquisition module, a detection module, a feature extraction module and a feature comparison module. Each module can respectively perform each step / function of the identity verification method described above. The following only describes the main functions of each component of the device 800, and omits the details described above.
[0124] The image acquisition module 810 is used to acquire a set of verification images of the object to be verified at different angles. The image acquisition module 810 may be composed of Figure 1 The image acquisition device 110 in the electronic device shown is used for implementation.
[0125] The detection module 820 is used to detect each acquired verification image respectively to determine and identify the area where the target part of the object to be verified in each verification image is located. The detection module 820 can be composed of Figure 1 The processor 102 in the electronic device shown executes program instructions stored in the storage device 104 to implement.
[0126] The feature extraction module 830 is used to input the images to be identified that respectively identify the target area of the object to be verified into the feature extraction model to obtain the object features of the object to be verified output by the feature extraction model. Figure 1 The processor 102 in the electronic device shown executes program instructions stored in the storage device 104 to implement.
[0127] The feature comparison module 840 is used to verify the identity of the object to be verified based on the object features of the object to be verified and the base database features of the registered objects in the registration database. Figure 1 The processor 102 in the electronic device shown executes program instructions stored in the storage device 104 to implement.
[0128] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0129] According to a third aspect of the present application, an electronic device is also provided. Fig. 9A schematic block diagram of an electronic device 900 according to an embodiment of the present application is shown. As shown in the figure, the system 900 includes a processor 910 and a memory 920.
[0130] The memory 920 stores computer program instructions, which are used by the processor 910 to execute the identity verification method 200 described above when executed.
[0131] The processor 910 is used to run computer program instructions stored in the memory 920 to execute the corresponding steps of the identity verification method 200 according to the embodiment of the present application, and is used for the image acquisition module 810, detection module 820, feature extraction module 830 and feature comparison module 840 in the identity verification device 800 according to the embodiment of the present application.
[0132] According to a fourth aspect of the present application, a storage medium is provided. Program instructions are stored on the storage medium, and the program instructions are used to execute the identity verification method as described above when running, and are used to implement the corresponding modules in the identity verification device according to the embodiment of the present application. The storage medium may include, for example, a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. The computer-readable storage medium may be any combination of one or more computer-readable storage media.
[0133] According to a fifth aspect of the present application, a computer program product is also provided, including program instructions. The program instructions are used to execute the identity verification method 200 described above when running.
[0134] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present application to this. Those of ordinary skill in the art may make various changes and modifications therein without departing from the scope and spirit of the present application. All these changes and modifications are intended to be included within the scope of the present application as required by the appended claims.
[0135] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0136] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.
[0137] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0138] Similarly, it should be understood that in order to streamline the present application and help understand one or more of the various application aspects, in the description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the method of the present application should not be interpreted as reflecting the following intention: the claimed application requires more features than the features clearly stated in each claim. More specifically, as reflected in the corresponding claims, the application point is that the corresponding technical problem can be solved with less than all the features of a single disclosed embodiment. Therefore, the claims following the specific embodiment are hereby explicitly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.
[0139] It will be understood by those skilled in the art that, except for mutually exclusive features, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this specification may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature that provides the same, equivalent or similar purpose.
[0140] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the claims, any one of the claimed embodiments can be used in any combination.
[0141] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the functions of some modules in the identity verification device according to the embodiment of the present application. The present application can also be implemented as a device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0142] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be constructed as a limitation to the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.
[0143] The above is only a specific implementation or description of a specific implementation of the present application, and the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. An identity verification method, in, The method comprises: Acquire a group of verification images of the object to be verified at different angles; wherein the object to be verified is an animal covered with fur all over its body; Detecting each of the verification images respectively to determine and identify the area where the target part of the object to be verified is located in each of the verification images; Inputting the images to be identified that respectively identify the target area of the object to be verified into the feature extraction model to obtain the object features of the object to be verified output by the feature extraction model; Performing identity verification on the object to be verified based on the object characteristics of the object to be verified and the base database characteristics of the registered objects in the registration database; Wherein, the registration database includes a first database, the bottom-stock features in the first database are stored in a tree structure with a depth greater than 2, each node of the tree structure corresponds to a bottom-stock feature cluster, the bottom-stock feature clusters corresponding to the leaf nodes of the tree structure are each bottom-stock feature, the bottom-stock feature clusters corresponding to the non-leaf nodes of the tree structure are generated by clustering the representative features of the bottom-stock feature clusters corresponding to the nodes at a level below the non-leaf nodes, and the representative features of the bottom-stock feature clusters are the average results of the bottom-stock features in the bottom-stock feature clusters, any bottom-stock feature in the bottom-stock feature clusters, or specific bottom-stock features in the bottom-stock feature clusters; The identity verification of the object to be verified based on the object characteristics of the object to be verified and the base database characteristics of the registered object in the registration database includes: According to the order from the high level to the low level of the tree structure, the object features of the object to be verified are respectively compared with the base database feature clusters corresponding to the nodes to be compared at each level of the tree structure; Among them, the nodes to be compared at the second highest level of the tree structure include all the nodes at the second highest level, and the nodes to be compared at the levels below the second highest level of the tree structure are determined by comparing the object characteristics of the object to be verified with the base database feature clusters corresponding to the nodes to be compared at the previous level of the level.
2. The identity verification method according to claim 1, in, The step of comparing the object features of the object to be verified with the base database feature clusters corresponding to the nodes to be compared at each level of the tree structure in order from the high level to the low level includes: For the nodes to be compared at each level other than the lowest level of the tree structure, the following operations are performed: Matching the object features of the object to be verified with the representative features of the base database feature cluster corresponding to the node to be compared at the level; The child nodes of the node to be compared corresponding to the representative feature whose matching degree meets the first target condition are determined as the nodes to be compared at the next level; wherein the first target condition includes the maximum matching degree or the matching degree is greater than the target threshold.
3. The identity verification method according to claim 1, in, The first database is generated by: The base database features of all registered objects are respectively used as leaf nodes of the tree structure; From the second lowest level to the second highest level of the tree structure, the base database feature cluster corresponding to each node of each level is determined in the following way: Cluster the representative features of the underlying feature clusters corresponding to each node in the next level; The base feature clusters corresponding to the representative features in each category obtained by clustering are respectively used as the base feature clusters corresponding to each node in the level.
4. The identity verification method as claimed in claim 2, in, The matching of the object features of the object to be verified with the representative features of the base database feature cluster corresponding to the nodes to be compared at the level includes: For the representative features of the underlying database feature cluster corresponding to each node to be compared at this level, the object features of the object to be verified and the representative features of the underlying database feature cluster corresponding to the node to be compared are input into the classification model, so that the classification model outputs the similarity between the object to be verified and the compared representative features, so as to determine whether the registered object corresponding to the node to be compared includes the object to be verified based on the output similarity.
5. The identity verification method as claimed in claim 2, in, The matching of the object features of the object to be verified with the representative features of the base database feature cluster corresponding to the nodes to be compared at the level includes: Calculating the similarity between the object feature of the object to be verified and the representative feature of the base database feature cluster corresponding to each node to be compared at the level; The node to be compared to which the object to be verified belongs is determined according to the similarity.
6. The identity verification method according to any one of claims 1 to 5, in, The registration database further includes a second database, and the method further includes: For each newly added object, obtaining and storing the object features of the newly added object in a second database; When the number of newly added objects in the second database meets the second target condition, for each level from the second lowest level to the second highest level of the tree structure, the object features of the newly added objects are compared with the bottom database feature clusters corresponding to all nodes of the level in order from the low level to the high level, until the node in the level to which the object features of the newly added objects belong is determined according to the comparison result, so as to update the tree structure.
7. An electronic device comprising a processor and a memory, in, The memory stores computer program instructions, which are used by the processor to execute the identity verification method as claimed in any one of claims 1 to 6 when executed.
8. A storage medium having program instructions stored thereon, wherein the program instructions are used to execute the identity verification method according to any one of claims 1 to 6 when running.
9. A computer program product, comprising program instructions, wherein the program instructions are used to execute the identity verification method according to any one of claims 1 to 6 when running.
Citation Information
Patent Citations
Image recognition device and image recognition method
JP2011192178A