Pet identification method, device, server and computer-readable storage medium

By repairing the nose pattern of pet nose images, the problem of abnormal nose pattern after pet nose injury is solved, and the success rate and accuracy of pet nose pattern recognition are improved.

CN114299545BActive Publication Date: 2024-12-27NEW RUIPENG PET HEALTHCARE GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111645803.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2024-12-27
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

The existing pet nose pattern recognition technology causes abnormal nose pattern after pet nose injury, which is prone to failure in recognition, reducing the recognition success rate.

Method used

By performing nose patterns repair on pet nose images, including binarization, noise filtering, nose patterns completion and image quality enhancement, the repaired nose images are used to re-identify to improve the recognition success rate.

Benefits of technology

It effectively solves the problem of identification failure caused by abnormal pet nose patterns, improves the success rate of pet nose patterns recognition, and enhances the accuracy and reliability of pet identity recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114299545B_ABST
    Figure CN114299545B_ABST
Patent Text Reader

Abstract

The present application provides a pet identification method, device, server and computer-readable storage medium, the method comprising: obtaining a first pet nose image of a pet to be detected; performing nose print recognition on the first pet nose image to obtain a recognition result; if the recognition result is a recognition failure, performing nose print repair on the first pet nose image to obtain a repaired target pet nose image; based on the target pet nose image, identifying the pet's identity information. The embodiment of the present application solves the problem that the nose print of the pet cannot be recognized due to abnormal nose prints caused by injury to the pet nose by performing nose print repair on the pet nose image, thereby improving the success rate of nose print recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of pet nose print recognition, and in particular to a pet identity recognition method, device, server and computer-readable storage medium. Background Art

[0002] At present, more and more people in cities keep pets, mainly cats and dogs. There are often incidents of "pets lost, pets biting people", etc., making pet management gradually become a major problem in urban management. Verifying the identity of pets is an effective way to solve the problem of pet management.

[0003] Although there is currently a method of using nose print recognition to determine the identity of pets, since nose print recognition has high requirements for the nose print image, recognition failure often occurs.

[0004] Therefore, how to reduce the number of recognition failures and improve the recognition success rate is a technical problem that urgently needs to be solved in the field of pet nose print recognition technology. Summary of the invention

[0005] The present application provides a pet identity recognition method, device, server and computer-readable storage medium, aiming to solve the technical problem of how to reduce the number of recognition failures and improve the recognition success rate.

[0006] In one aspect, the present application provides a pet identification method, the method comprising:

[0007] Acquire a first pet nose image of the pet to be detected;

[0008] Performing nose print recognition on the first pet nose image to obtain a recognition result;

[0009] If the recognition result is recognition failure, performing nose print restoration on the first pet nose image to obtain a restored target pet nose image;

[0010] Based on the target pet nose image, the identity information of the pet is identified.

[0011] In a possible implementation of the present application, if the recognition result is a recognition failure, performing nose print repair on the first pet nose image to obtain a repaired target pet nose image includes:

[0012] Binarizing the first pet nose image to obtain a second pet nose image;

[0013] determining a third pet nose image based on the second pet nose image and the first pet nose image;

[0014] performing noise filtering on the third pet nose image to obtain a fourth pet nose image;

[0015] The fourth pet nose image is subjected to nose print completion processing to obtain a target pet nose image.

[0016] In a possible implementation of the present application, performing nose print completion processing on the fourth pet nose image to obtain a target pet nose image includes:

[0017] Performing grayscale processing on the fourth pet nose image to obtain a fifth pet nose image;

[0018] Traverse each line in the fifth pet nose image based on the connected domain to obtain a line set;

[0019] Extracting a center line corresponding to each texture in the texture set;

[0020] Based on the distance parameter and the slope relationship between the endpoints on the center line corresponding to any two lines in the line set, the microvessels in the fifth pet nose image are processed by nose pattern completion to obtain a target pet nose image.

[0021] In a possible implementation of the present application, the nose pattern completion processing is performed on the microvessels in the fifth pet nose image based on the distance parameter and the slope relationship between the endpoints on the center line corresponding to any two lines in the line set to obtain the target pet nose image, including:

[0022] Obtaining a distance parameter between endpoints on a center line corresponding to any two lines in the line set;

[0023] Obtaining the slope relationship between the endpoints on the center line corresponding to any two lines in the line set;

[0024] If the distance parameter is not greater than a preset distance parameter threshold, and the slope relationship between the endpoints on the center line corresponding to any two lines in the line set is the same;

[0025] Then, the endpoints on the center lines corresponding to the two lines are connected to perform nose pattern completion processing on the lines in the fifth pet nose image to obtain a target pet nose image.

[0026] In a possible implementation of the present application, if the recognition result is a recognition failure, the nose print repair is performed on the first pet nose image to obtain a repaired target pet nose image, and the method further includes:

[0027] The target pet nose image is subjected to image quality enhancement processing.

[0028] In a possible implementation of the present application, the pet is identified based on the key points of the pet's nose print to obtain an identification result, including:

[0029] Aligning the key points of the pet's nose print to a reference position to obtain an aligned pet nose image;

[0030] The pet nose print features are extracted based on the aligned pet nose images, and the extracted pet nose print features are compared to obtain the recognition results.

[0031] In a possible implementation of the present application, aligning the key points of the pet's nose print to a reference position to obtain an aligned pet nose image includes:

[0032] Calculating an affine matrix between the pet nose print key points and the pet nose print standard key points, wherein the coordinates of each key point in the training sample image marked with the pet nose print key points are averaged to obtain the coordinates of the pet nose print standard key points;

[0033] The pet nose print key points are affine transformed based on an affine matrix to align the pet nose print key points to a reference position, thereby obtaining an aligned pet nose image.

[0034] In a possible implementation of the present application, performing nose print recognition on the first pet nose image to obtain a recognition result includes:

[0035] The first pet nose image is input into a pre-trained nose print recognition model to obtain a recognition result.

[0036] In a possible implementation of the present application, performing nose print recognition on the first pet nose image to obtain a recognition result includes:

[0037] Matching the first pet nose image with nose print images in a preset nose print image database to obtain a matching result;

[0038] Based on the matching result, a recognition result is determined.

[0039] On the other hand, the present application provides a pet identification device, the device comprising:

[0040] A first acquisition unit, used for acquiring a first pet nose image of a pet to be detected;

[0041] A first recognition unit, configured to perform nose print recognition on the first pet nose image to obtain a recognition result;

[0042] A first restoration unit, configured to perform nose print restoration on the first pet nose image to obtain a restored target pet nose image if the recognition result is a recognition failure;

[0043] The second recognition unit is used to recognize the identity information of the pet based on the target pet nose image.

[0044] In a possible implementation of the present application, the first repair unit includes:

[0045] A first binarization processing unit, configured to perform binarization processing on the first pet nose image to obtain a second pet nose image;

[0046] A first determining unit, configured to determine a third pet nose image based on the second pet nose image and the first pet nose image;

[0047] a first noise filtering unit, configured to perform noise filtering on the third pet nose image to obtain a fourth pet nose image;

[0048] The first nose print completion processing unit is used to perform nose print completion processing on the fourth pet nose image to obtain a target pet nose image.

[0049] In a possible implementation of the present application, the first nose print completion processing unit includes:

[0050] a first grayscale processing unit, configured to perform grayscale processing on the fourth pet nose image to obtain a fifth pet nose image;

[0051] A second acquisition unit is used to traverse each line in the fifth pet nose image based on the connected domain to acquire a line set;

[0052] A first extraction unit, used to extract a center line corresponding to each texture in the texture set;

[0053] The second nose print completion processing unit is used to perform nose print completion processing on the microvessels in the fifth pet nose image based on the distance parameter and slope relationship between the endpoints on the center line corresponding to any two lines in the line set to obtain a target pet nose image.

[0054] In a possible implementation of the present application, the second nose print completion processing unit is specifically used to:

[0055] Obtaining a distance parameter between endpoints on a center line corresponding to any two lines in the line set;

[0056] Obtaining the slope relationship between the endpoints on the center line corresponding to any two lines in the line set;

[0057] If the distance parameter is not greater than a preset distance parameter threshold, and the slope relationship between the endpoints on the center line corresponding to any two lines in the line set is the same;

[0058] Then, the endpoints on the center lines corresponding to the two lines are connected to perform nose pattern completion processing on the lines in the fifth pet nose image to obtain a target pet nose image.

[0059] In a possible implementation of the present application, if the recognition result is a recognition failure, the first pet nose image is repaired with nose prints to obtain a repaired target pet nose image, and the device is further used to:

[0060] The target pet nose image is subjected to image quality enhancement processing.

[0061] In a possible implementation of the present application, the first identification unit includes:

[0062] A first alignment unit, used for aligning the key points of the pet's nose print to a reference position to obtain an aligned pet nose image;

[0063] The first feature extraction unit is used to extract pet nose print features based on the aligned pet nose image, and perform feature comparison on the extracted pet nose print features to obtain a recognition result.

[0064] In a possible implementation of the present application, the first alignment unit is specifically configured to:

[0065] Calculating an affine matrix between the pet nose print key points and the pet nose print standard key points, wherein the coordinates of each key point in the training sample image marked with the pet nose print key points are averaged to obtain the coordinates of the pet nose print standard key points;

[0066] The pet nose print key points are affine transformed based on an affine matrix to align the pet nose print key points to a reference position, thereby obtaining an aligned pet nose image.

[0067] In a possible implementation of the present application, the first identification unit is specifically configured to:

[0068] The first pet nose image is input into a pre-trained nose print recognition model to obtain a recognition result.

[0069] In a possible implementation of the present application, the first identification unit is specifically configured to:

[0070] Matching the first pet nose image with nose print images in a preset nose print image database to obtain a matching result;

[0071] Based on the matching result, a recognition result is determined.

[0072] On the other hand, the present application also provides a server, the server comprising:

[0073] one or more processors;

[0074] Memory; and

[0075] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the pet identification method.

[0076] On the other hand, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the steps in the pet identification method.

[0077] The present application provides a pet identification method, which includes: obtaining a first pet nose image of a pet to be detected; performing nose print recognition on the first pet nose image to obtain an identification result; if the identification result is an identification failure, performing nose print repair on the first pet nose image to obtain a repaired target pet nose image; and identifying the pet's identity information based on the target pet nose image. Compared with the existing pet identification method, when a pet's nose is injured, the nose print may be abnormal, resulting in a failure in nose print recognition. In this context, the present application creatively proposes that when the initial nose print recognition fails, the problem of being unable to perform nose print recognition due to abnormal nose prints caused by an injury to the pet's nose is solved by performing nose print repair on the pet nose image, thereby improving the success rate of nose print recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0079] Figure 1 is a schematic diagram of a scenario of a pet identification system provided in an embodiment of the present application;

[0080] Figure 2 It is a schematic diagram of an embodiment of a pet identification method provided in an embodiment of the present application;

[0081] Figure 3 is a flowchart of an embodiment of step 204 provided in the embodiments of the present application;

[0082] Figure 4 is a schematic diagram of the structure of an embodiment of a pet identification device provided in an embodiment of the present application;

[0083] Figure 5 is a schematic diagram of the structure of an embodiment of a server provided in an embodiment of the present application;

[0084] Figure 6 It is a schematic diagram of the before and after comparison of nose pattern repair provided in the embodiment of the present application. DETAILED DESCRIPTION

[0085] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0086] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the said features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0087] In this application, the word "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any technician in the field to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other instances, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.

[0088] The embodiments of the present application provide a pet identity recognition method, device, server, and computer-readable storage medium, which are described in detail below.

[0089] like Figure 1 As shown, Figure 11 is a schematic diagram of a pet identification system provided in an embodiment of the present application. The pet identification system may include multiple terminals 100 and a server 200. The terminals 100 and the server 200 are connected via a network. A pet identification device is integrated in the server 200. Figure 1 The terminal 100 can access the server 200.

[0090] In the embodiment of the present application, the server 200 is mainly used to obtain a first pet nose image of the pet to be detected; perform nose print recognition on the first pet nose image to obtain a recognition result; if the recognition result is a recognition failure, perform nose print repair on the first pet nose image to obtain a repaired target pet nose image; based on the target pet nose image, identify the pet's identity information.

[0091] In the embodiment of the present application, the server 200 can be an independent server, or a server network or server cluster composed of servers, such as the server 200 described in the embodiment of the present application, which includes but is not limited to a computer, a network terminal, a single network server, a plurality of network server sets or a cloud server composed of a plurality of servers. Wherein, the cloud server is composed of a large number of computers or network servers based on cloud computing (Cloud Computing). In the embodiment of the present application, communication between the server and the terminal can be achieved by any communication method, including but not limited to, mobile communication based on the third generation partnership project (3rd Generation Partnership Project, 3GPP), long term evolution (Long Term Evolution, LTE), Worldwide Interoperability for Microwave Access (Worldwide Interoperability for Microwave Access, WiMAX), or computer network communication based on TCP / IP protocol suite (TCP / IP Protocol Suite, TCP / IP), user datagram protocol (User Datagram Protocol, UDP), etc.

[0092] It is to be understood that the terminal 100 used in the embodiments of the present application may be a device including both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. Such a terminal may include: a cellular or other communication device having a single-line display or a multi-line display or a cellular or other communication device without a multi-line display. The specific terminal 100 may be a desktop terminal or a mobile terminal, and the terminal 100 may also be one of a mobile phone, a tablet computer, a laptop computer, etc.

[0093] Those skilled in the art will understand that Figure 1The application environment shown in the figure is only one application scenario of the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include Figure 1 More or fewer terminals, or server network connection relationships shown in, for example Figure 1 Only one server and two terminals are shown in FIG. It is understandable that the pet identification system may also include one or more other servers, and / or one or more terminals connected to the server network, which is not specifically limited here.

[0094] In addition, if Figure 1 As shown, the pet identification system may further include a memory 300 for storing data, such as a pet nose image of the pet to be detected and pet identification data, such as the pet identification data when the pet identification system is running.

[0095] It should be noted that Figure 1 The scenario diagram of the pet identification system shown is merely an example. The pet identification system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the pet identification system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is equally applicable to similar technical problems.

[0096] Next, the pet identification method provided in the embodiment of the present application is introduced.

[0097] In the embodiment of the pet identification method of the present application embodiment, a pet identification device is used as an execution subject. For the sake of simplicity and ease of description, the execution subject will be omitted in the subsequent method embodiments. The pet identification device is applied to a server. The method includes: obtaining a first pet nose image of the pet to be detected; performing nose print recognition on the first pet nose image to obtain a recognition result; if the recognition result is a recognition failure, performing nose print repair on the first pet nose image to obtain a repaired target pet nose image; based on the target pet nose image, identifying the pet's identity information.

[0098] See also Figures 2 to 6 , Figure 2 The following is a flow chart of an embodiment of a pet identification method provided in an embodiment of the present application. The pet identification method includes:

[0099] 201. Acquire a first pet nose image of a pet to be detected;

[0100] Specifically, the user may obtain the first pet nose image of the pet to be detected through a mobile device such as a mobile phone, and send the first pet nose image to the server.

[0101] The pet identification method of the embodiment of the present invention adopts the characteristic that the shape of the pet's nose print will not be affected by the passage of time and can become the unique identification mark of each dog. It adopts a non-contact method and uses the pet's nose print features in combination with computer vision technology to perform pet identity authentication, which can improve the accuracy, recall rate and operating efficiency of pet identification and facilitate implementation and promotion.

[0102] 202. Perform nose print recognition on the first pet nose image to obtain a recognition result.

[0103] In some embodiments of the present application, performing nose print recognition on the first pet nose image to obtain a recognition result includes: inputting the first pet nose image into a pre-trained nose print recognition model to obtain a recognition result.

[0104] In some embodiments of the present application, performing nose print recognition on the first pet nose image to obtain a recognition result includes: matching the first pet nose image with nose print images in a preset nose print image database to obtain a matching result; and determining a recognition result based on the matching result.

[0105] 203. If the recognition result is recognition failure, performing nose print restoration on the first pet nose image to obtain a restored target pet nose image;

[0106] Due to hardware conditions or the pet's own nose injury, the first pet nose image has uneven lighting, unclear image, weak contrast, blurred nose prints and other phenomena, resulting in failure of nose print recognition. Therefore, by repairing the nose prints of the first pet nose image, the above defects can be compensated and the repaired target pet nose image can be obtained. Figure 6 As shown, Figure 6 It is a schematic diagram of the before and after comparison of nose pattern repair provided in the embodiment of the present application.

[0107] Specifically, the following embodiments describe in detail how to perform nose print restoration on the first pet nose image to obtain a restored target pet nose image, which will not be described in detail here.

[0108] 204. Based on the target pet nose image, identify the pet's identity information.

[0109] In the embodiment of the present application, the restored target pet nose image is re-identified to identify the pet's identity information.

[0110] The present application provides a pet identification method, the method comprising: obtaining a first pet nose image of a pet to be detected; performing nose print recognition on the first pet nose image to obtain an identification result; if the identification result is an identification failure, performing nose print repair on the first pet nose image to obtain a repaired target pet nose image; and identifying the pet's identity information based on the target pet nose image. Compared with the existing pet identification method, when a pet's nose is injured, the nose print may be abnormal, resulting in a failure in nose print recognition. The present application creatively proposes that when the initial nose print recognition fails, the problem of being unable to perform nose print recognition due to abnormal nose prints caused by an injury to the pet's nose is solved by performing nose print repair on the pet nose image, thereby improving the success rate of nose print recognition.

[0111] In some embodiments of the present application, Figure 3 As shown, in step 204, if the recognition result is a recognition failure, the nose print repair is performed on the first pet nose image to obtain a repaired target pet nose image, including:

[0112] 301. Binarize the first pet nose image to obtain a second pet nose image;

[0113] 302. Determine a third pet nose image based on the second pet nose image and the first pet nose image;

[0114] Specifically, the third pet nose image can be obtained by finding the intersection of the second pet nose image and the first pet nose image, and assigning the color of the same position of the first pet nose image to the second pet nose image.

[0115] 303. Perform noise filtering on the third pet nose image to obtain a fourth pet nose image;

[0116] 304. Perform nose print completion processing on the fourth pet nose image to obtain a target pet nose image.

[0117] In some embodiments of the present application, nose print completion processing is performed on the fourth pet nose image to obtain a target pet nose image, including: grayscale processing of the fourth pet nose image to obtain a fifth pet nose image; traversing each line in the fifth pet nose image based on the connected domain to obtain a line set; extracting the center line corresponding to each line in the line set; based on the distance parameter and slope relationship between the endpoints on the center line corresponding to any two lines in the line set, performing nose print completion processing on the microvessels in the fifth pet nose image to obtain the target pet nose image.

[0118] In some embodiments of the present application, based on the distance parameter and slope relationship between the endpoints on the center line corresponding to any two lines in the line set, the microvessels in the fifth pet nose image are subjected to nose print completion processing to obtain a target pet nose image, including: obtaining the distance parameter between the endpoints on the center line corresponding to any two lines in the line set; obtaining the slope relationship between the endpoints on the center line corresponding to any two lines in the line set; if the distance parameter is not greater than a preset distance parameter threshold, and the slope relationship between the endpoints on the center line corresponding to any two lines in the line set is the same slope; then connecting the endpoints on the center line corresponding to the two lines to perform nose print completion processing on the lines in the fifth pet nose image to obtain the target pet nose image.

[0119] Among them, the endpoints on the center line corresponding to each line in the line set can be one or more. Therefore, the slopes of all endpoints in a single line can be calculated first, and then the slopes of all endpoints in a single line are compared with the slopes of all endpoints in another single line, thereby obtaining the slope relationship between the endpoints on the center line corresponding to any two lines in the line set. The preset distance parameter threshold can be a few pixel distances, for example, it can be 4 or 6 pixel distances. It can be understood that when the distance between the endpoints on the center line corresponding to the two lines is within the preset distance parameter threshold (such as 4 pixel distances). At the same time, the slopes between the endpoints are also the same. When the two endpoints on the center line corresponding to the two lines meet the distance requirements, the slopes of the two endpoints are calculated to be k respectively. mn , k ij , and k mn =k ij . It can be considered that the two lines are the same line, therefore, polynomial curve fitting can be used to connect the endpoints on the center lines corresponding to the two lines, so as to perform blood vessel completion processing on the lines in the fifth blood vessel segmentation image. It can be understood that the same line is blocked by other obstacles during the photo shooting, resulting in the same line being segmented into two lines.

[0120] In some embodiments of the present application, if the recognition result is recognition failure, the first pet nose image is repaired with nose prints to obtain a repaired target pet nose image, and the method further includes: performing image quality enhancement processing on the target pet nose image. Specifically, the image quality enhancement may be clarity enhancement or contrast enhancement.

[0121] In order to better implement the pet identification method in the embodiment of the present application, based on the pet identification method, a pet identification device is also provided in the embodiment of the present application, such as Figure 4 As shown, the pet identification device 400 includes a first acquisition unit 401, a first identification unit 402, a first repair unit 403 and a second identification unit 404:

[0122] A first acquisition unit 401 is used to acquire a first pet nose image of a pet to be detected;

[0123] A first recognition unit 402 is used to perform nose print recognition on the first pet nose image to obtain a recognition result;

[0124] The first restoration unit 403 is used to perform nose print restoration on the first pet nose image to obtain a restored target pet nose image if the recognition result is a recognition failure;

[0125] The second recognition unit 404 is used to recognize the identity information of the pet based on the target pet nose image.

[0126] In some embodiments of the present application, the first repair unit 403 includes:

[0127] A first binarization processing unit, used for performing binarization processing on the first pet nose image to obtain a second pet nose image;

[0128] A first determining unit, configured to determine a third pet nose image based on the second pet nose image and the first pet nose image;

[0129] a first noise filtering unit, configured to perform noise filtering on the third pet nose image to obtain a fourth pet nose image;

[0130] The first nose print completion processing unit is used to perform nose print completion processing on the fourth pet nose image to obtain a target pet nose image.

[0131] In some embodiments of the present application, the first nose print completion processing unit includes:

[0132] a first grayscale processing unit, configured to grayscale the fourth pet nose image to obtain a fifth pet nose image;

[0133] A second acquisition unit is used to traverse each line in the fifth pet nose image based on the connected domain to acquire a line set;

[0134] A first extraction unit, used to extract a center line corresponding to each texture in the texture set;

[0135] The second nose print completion processing unit is used to perform nose print completion processing on the microvessels in the fifth pet nose image based on the distance parameter and slope relationship between the endpoints on the center line corresponding to any two lines in the line set to obtain a target pet nose image.

[0136] In some embodiments of the present application, the second nose print completion processing unit is specifically used to:

[0137] Get the distance parameter between the endpoints on the center line corresponding to any two lines in the line set;

[0138] Obtain the slope relationship between the endpoints on the center line corresponding to any two lines in the line set;

[0139] If the distance parameter is not greater than the preset distance parameter threshold, and the slope relationship between the endpoints on the center line corresponding to any two lines in the pattern set is the same;

[0140] Then, the endpoints on the center lines corresponding to the two lines are connected to perform nose pattern completion processing on the lines in the fifth pet nose image to obtain the target pet nose image.

[0141] In some embodiments of the present application, if the recognition result is a recognition failure, the first pet nose image is repaired with nose prints, and after obtaining the repaired target pet nose image, the device is further used to:

[0142] Perform image quality enhancement on the target pet nose image.

[0143] In some embodiments of the present application, the first identification unit 402 includes:

[0144] A first alignment unit, used for aligning key points of the pet's nose print to a reference position to obtain an aligned pet nose image;

[0145] The first feature extraction unit is used to extract pet nose print features based on the aligned pet nose image, and perform feature comparison on the extracted pet nose print features to obtain a recognition result.

[0146] In some embodiments of the present application, the first alignment unit is specifically used to:

[0147] Calculating an affine matrix between pet nose print key points and pet nose print standard key points, wherein the coordinates of each key point in the training sample image labeled with the pet nose print key points are averaged to obtain the coordinates of the pet nose print standard key points;

[0148] The pet nose print key points are affine transformed based on the affine matrix to align the pet nose print key points to the reference position to obtain an aligned pet nose image.

[0149] In some embodiments of the present application, the first identification unit is specifically used to:

[0150] The first pet nose image is input into a pre-trained nose print recognition model to obtain a recognition result.

[0151] In some embodiments of the present application, the first identification unit is specifically used to:

[0152] Matching the first pet nose image with nose print images in a preset nose print image database to obtain a matching result;

[0153] Based on the matching result, a recognition result is determined.

[0154] The present application provides a pet identification device 400, which includes: a first acquisition unit 401, used to acquire a first pet nose image of a pet to be detected; a first identification unit 402, used to perform nose print identification on the first pet nose image to obtain an identification result; a first repair unit 403, used to repair the nose print of the first pet nose image if the identification result is an identification failure, to obtain a repaired target pet nose image; a second identification unit 404, used to identify the pet's identity information based on the target pet nose image. Compared with the existing pet identification device 400, when the pet's nose is injured, the nose print may be abnormal, and the nose print identification fails. In the context of this application, the present application creatively proposes that when the initial nose print identification fails, the nose print of the pet's nose image is repaired to solve the problem that the nose print of the pet cannot be identified due to the abnormal nose print caused by the injury of the pet's nose, thereby improving the success rate of nose print identification.

[0155] In addition to the above-mentioned pet identification method and device, the embodiment of the present application further provides a server, which integrates any pet identification device provided in the embodiment of the present application, and the server includes:

[0156] one or more processors;

[0157] Memory; and

[0158] One or more applications, wherein the one or more applications are stored in the memory and configured to execute, by the processor, the operations of any method in any of the above pet identification method embodiments.

[0159] The embodiment of the present application also provides a server, which integrates any pet identification device provided in the embodiment of the present application. Figure 5 , Figure 5 It is a schematic diagram of the structure of an embodiment of a server provided in an embodiment of the present application.

[0160] like Figure 5 As shown, it shows a schematic diagram of the structure of the pet identification device designed in the embodiment of the present application, specifically:

[0161] The pet identification device may include one or more processors 501 of processing cores, one or more computer-readable storage media storage units 502, a power supply 503, an input unit 504 and other components. Those skilled in the art will appreciate that Figure 5The pet identification device structure shown in the figure does not constitute a limitation on the pet identification device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0162] The processor 501 is the control center of the pet identification device. It uses various interfaces and lines to connect the various parts of the entire pet identification device. By running or executing the software programs and / or modules stored in the storage unit 502, and calling the data stored in the storage unit 502, it executes various functions of the pet identification device and processes data, thereby monitoring the pet identification device as a whole. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 501.

[0163] The storage unit 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the storage unit 502. The storage unit 502 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the pet identification device, etc. In addition, the storage unit 502 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the storage unit 502 can also include a memory controller to provide the processor 501 with access to the storage unit 502.

[0164] The pet identification device also includes a power supply 503 for supplying power to various components. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 503 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0165] The pet identification device may further include an input unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0166] Although not shown, the pet identification device may also include a display unit, etc., which will not be described in detail here. Specifically, in the embodiment of the present application, the processor 501 in the pet identification device will load the executable file corresponding to the process of one or more application programs into the storage unit 502 according to the following instructions, and the processor 501 will run the application program stored in the storage unit 502, thereby realizing various functions, as follows:

[0167] A first pet nose image of a pet to be detected is obtained; nose print recognition is performed on the first pet nose image to obtain a recognition result; if the recognition result is a recognition failure, nose print repair is performed on the first pet nose image to obtain a repaired target pet nose image; based on the target pet nose image, the identity information of the pet is identified.

[0168] The present application provides a pet identification method, which includes: obtaining a first pet nose image of a pet to be detected; performing nose print recognition on the first pet nose image to obtain an identification result; if the identification result is an identification failure, performing nose print repair on the first pet nose image to obtain a repaired target pet nose image; and identifying the pet's identity information based on the target pet nose image. Compared with the existing pet identification method, when a pet's nose is injured, the nose print may be abnormal, resulting in a failure in nose print recognition. In this context, the present application creatively proposes that when the initial nose print recognition fails, the problem of being unable to perform nose print recognition due to abnormal nose prints caused by an injury to the pet's nose is solved by performing nose print repair on the pet nose image, thereby improving the success rate of nose print recognition.

[0169] To this end, the embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. The computer-readable storage medium stores a plurality of instructions, which can be loaded by a processor to execute the steps of any pet identification method provided in the embodiment of the present application. For example, the instruction can execute the following steps:

[0170] A first pet nose image of a pet to be detected is obtained; nose print recognition is performed on the first pet nose image to obtain a recognition result; if the recognition result is a recognition failure, nose print repair is performed on the first pet nose image to obtain a repaired target pet nose image; based on the target pet nose image, the identity information of the pet is identified.

[0171] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0172] The above is a detailed introduction to a pet identity recognition method, device, server and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A pet identification method, characterized in that: The method comprises: Acquire a first pet nose image of the pet to be detected; Performing nose print recognition on the first pet nose image to obtain a recognition result; If the recognition result is recognition failure, performing nose print restoration on the first pet nose image to obtain a restored target pet nose image; Based on the target pet nose image, identifying the identity information of the pet; Wherein, if the recognition result is recognition failure, the nose print repair is performed on the first pet nose image to obtain a repaired target pet nose image, and the method further includes: Performing image quality enhancement processing on the target pet nose image; If the recognition result is a recognition failure, the first pet nose image is repaired with nose prints to obtain a repaired target pet nose image, including: Binarizing the first pet nose image to obtain a second pet nose image; determining a third pet nose image based on the second pet nose image and the first pet nose image; performing noise filtering on the third pet nose image to obtain a fourth pet nose image; Performing nose print completion processing on the fourth pet nose image to obtain a target pet nose image; The fourth pet nose image is subjected to nose print completion processing to obtain a target pet nose image, including: Performing grayscale processing on the fourth pet nose image to obtain a fifth pet nose image; Traverse each line in the fifth pet nose image based on the connected domain to obtain a line set; Extracting a center line corresponding to each texture in the texture set; Based on the distance parameter and the slope relationship between the endpoints on the center line corresponding to any two lines in the line set, the lines in the fifth pet nose image are processed by nose line completion to obtain a target pet nose image.

2. The pet identification method according to claim 1, characterized in that: The method of performing nose pattern completion processing on the patterns in the fifth pet nose image based on the distance parameter and the slope relationship between the endpoints on the center line corresponding to any two patterns in the pattern set to obtain the target pet nose image includes: Obtaining a distance parameter between endpoints on a center line corresponding to any two lines in the line set; Obtaining the slope relationship between the endpoints on the center line corresponding to any two lines in the line set; If the distance parameter is not greater than a preset distance parameter threshold, and the slope relationship between the endpoints on the center line corresponding to any two lines in the line set is the same; Then, the endpoints on the center lines corresponding to the two lines are connected to perform nose pattern completion processing on the lines in the fifth pet nose image to obtain a target pet nose image.

3. The pet identification method according to claim 1, characterized in that: The performing nose print recognition on the first pet nose image to obtain a recognition result includes: The first pet nose image is input into a pre-trained nose print recognition model to obtain a recognition result.

4. The pet identification method according to claim 1, characterized in that: The performing nose print recognition on the first pet nose image to obtain a recognition result includes: Matching the first pet nose image with nose print images in a preset nose print image database to obtain a matching result; Based on the matching result, a recognition result is determined.

5. A pet identification device, characterized in that: The device comprises: A first acquisition unit, used for acquiring a first pet nose image of a pet to be detected; A first recognition unit, configured to perform nose print recognition on the first pet nose image to obtain a recognition result; A first restoration unit, configured to perform nose print restoration on the first pet nose image to obtain a restored target pet nose image if the recognition result is a recognition failure; A second recognition unit, configured to recognize the identity information of the pet based on the target pet nose image; If the recognition result is a recognition failure, the nose print repair is performed on the first pet nose image to obtain a repaired target pet nose image, and the method further includes: Performing image quality enhancement processing on the target pet nose image; If the recognition result is a recognition failure, the first pet nose image is repaired with nose prints to obtain a repaired target pet nose image, including: Binarizing the first pet nose image to obtain a second pet nose image; determining a third pet nose image based on the second pet nose image and the first pet nose image; performing noise filtering on the third pet nose image to obtain a fourth pet nose image; Performing nose print completion processing on the fourth pet nose image to obtain a target pet nose image; The fourth pet nose image is subjected to nose print completion processing to obtain a target pet nose image, including: Performing grayscale processing on the fourth pet nose image to obtain a fifth pet nose image; Traverse each line in the fifth pet nose image based on the connected domain to obtain a line set; Extracting a center line corresponding to each texture in the texture set; Based on the distance parameter and the slope relationship between the endpoints on the center line corresponding to any two lines in the line set, the lines in the fifth pet nose image are processed by nose line completion to obtain a target pet nose image.

6. A server, characterized in that: The server comprises: one or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the processor to implement the pet identification method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the pet identification method according to any one of claims 1 to 4.