Pet identification method and device, electronic equipment and storage medium
By obtaining the pre-recorded pet facial feature library and using the pre-set pet identification model for feature extraction and similarity comparison, and combining Face ID for pet identity authentication, the problem of low network dependence and accuracy of pet identification in the prior art is solved, and efficient and accurate pet identity recognition is achieved.
Patent Information
- Application Number
- CN202510572114.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-12
AI Technical Summary
In the prior art, pet identification methods rely on RFID collars or network connections, and there are problems such as pets being unable to recognize, low recognition accuracy and strong network dependence, which affects user experience and reliability.
By obtaining the pre-recorded pet facial feature library, using the pre-set pet recognition model for feature extraction and similarity comparison, and combining Face ID for pet identity authentication to achieve localized identification.
It realizes efficient and accurate pet identity recognition, avoids network dependence, improves the accuracy and reliability of identification, and adapts to pet growth and changes.
Smart Images

Figure CN120472499A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of pet identification technology, and in particular to a pet identification method and its device, electronic device, and storage medium. Background Art
[0002] As people's living standards improve, pets are becoming increasingly important in the home, and more and more families are keeping pets. Related technologies primarily rely on traditional methods for pet identification. For example, RFID collars are used as a pet identification method, with chips embedded in the collars to store the pet's identity information. Other related technologies require uploading pet facial data to a cloud server, where algorithms are used for processing and identification, and then feeding the results back to the device to execute the corresponding action.
[0003] However, RFID collars require pets to wear them at all times. If the collar is lost or damaged, the pet cannot be identified. Traditional facial recognition technology relies on a network connection, requiring a real-time connection and relying on cloud servers for data processing and algorithm calculations. This means that the recognition function will not function properly in unstable or unavailable network environments, seriously affecting the user experience and reliability of the device. Therefore, finding more efficient ways to identify pets remains a pressing issue in the industry. Summary of the Invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a pet identification method and device, electronic device, and storage medium thereof, which can more efficiently and accurately identify the identity of a pet.
[0005] According to the first embodiment of the present application, the pet identification method is applied to a pet identification device, including:
[0006] Obtain a pre-recorded pet facial feature library; wherein the pre-recorded pet facial feature library includes pre-recorded pet facial features pre-stored for pre-recorded pets, each of the pre-recorded pet facial features is configured with a unique Face ID;
[0007] Capturing images of a target pet and performing pet face detection on the captured images to obtain a facial image of the target pet;
[0008] Calling a preset pet recognition model to perform feature extraction on the target pet facial image to obtain the target pet facial features;
[0009] Comparing the facial features of the target pet with those of the pre-recorded pets in the facial feature library for feature similarity, and obtaining feature similarity information corresponding to the target pet and the pre-recorded pets;
[0010] In response to the feature similarity information satisfying a preset identity authentication condition, the target pet is identified as the pre-recorded pet based on the Face ID corresponding to the pre-recorded pet.
[0011] According to some embodiments of the present application, before calling a preset pet recognition model to extract features from the target pet's facial image to obtain the target pet's facial features, the method further includes:
[0012] Performing an image quality detection on the target pet facial image to obtain a quality detection result corresponding to the target pet facial image;
[0013] The calling of a preset pet recognition model to extract features of the target pet's facial image to obtain facial features of the target pet includes:
[0014] In response to the quality detection result meeting the preset quality qualification condition, the pet recognition model is called to perform feature extraction on the target pet facial image to obtain the target pet facial features.
[0015] According to some embodiments of the present application, performing image quality detection on the target pet facial image to obtain a quality detection result corresponding to the target pet facial image includes:
[0016] Performing brightness calculation on the target pet's facial image to obtain target brightness detection data;
[0017] Calculating the sharpness of the target pet's facial image to obtain target sharpness detection data;
[0018] When the target brightness detection data satisfies a preset brightness detection condition and the target sharpness detection data satisfies a preset sharpness detection condition, performing pet face relative angle calculation on the target pet face image to obtain pet face relative angle data;
[0019] In response to the pet's facial relative angle data satisfying a preset facial relative angle detection condition, the quality detection result satisfying the quality qualification condition is obtained.
[0020] According to some embodiments of the present application, after identifying the target pet as the pre-recorded pet based on the Face ID corresponding to the pre-recorded pet, the method further includes:
[0021] determining, based on the facial features of the target pet, current pet features of the pre-recorded pet in the current growth period;
[0022] Based on the current pet features of the pre-recorded pet in the current growth period, the pre-recorded pet facial features matching the pre-recorded pet in the pre-recorded pet facial feature library are updated.
[0023] According to some embodiments of the present application, obtaining a pre-recorded pet facial feature library includes:
[0024] Acquire at least two groups of pre-recorded pet facial images of the pre-recorded pet; wherein each group of the pre-recorded pet facial images corresponds to an image acquisition angle;
[0025] For each group of the pre-recorded pet facial images, calling the pet recognition model to extract features from each of the pre-recorded pet facial images in turn to obtain a pre-recorded pet facial feature library;
[0026] In response to completing feature extraction for each group of the pre-recorded pet facial images, at least two pre-recorded pet facial feature libraries of the pre-recorded pets are obtained;
[0027] The step of collecting an image of a target pet and performing pet face detection on the collected image to obtain a facial image of the target pet includes:
[0028] The target pet is imaged from at least two image acquisition angles to obtain a facial image of the target pet.
[0029] According to some embodiments of the present application, the pet recognition model is deployed in the pet recognition device, and a pet face capture algorithm and a pet face recognition sub-model are encapsulated in the pet recognition model. The calling of the preset pet recognition model to extract features of the target pet face image to obtain the target pet facial features includes:
[0030] Invoking the pet face capture algorithm to capture the pet face region from the target pet face image;
[0031] The pet facial recognition sub-model is used to perform pet facial recognition on the pet facial region to obtain the target pet facial features.
[0032] According to some embodiments of the present application, the pet recognition model is deployed on a cloud server, and calling a preset pet recognition model to extract features of the target pet's facial image to obtain the target pet's facial features includes:
[0033] The target pet facial image is uploaded to the cloud server, and the target pet facial features are obtained by extracting features from the target pet facial image using the pet recognition model deployed on the cloud server.
[0034] According to the second embodiment of the present application, a pet identification device includes:
[0035] A feature library acquisition module is used to acquire a pre-recorded pet facial feature library, wherein the pre-recorded pet facial feature library contains pre-recorded pet facial features pre-stored for pre-recorded pets;
[0036] An image acquisition module is used to acquire images of a target pet and perform pet face detection on the acquired images to obtain a facial image of the target pet;
[0037] A feature extraction module is used to call a preset pet recognition model to extract features from the target pet's facial image to obtain facial features of the target pet;
[0038] A feature comparison module is used to compare the facial features of the target pet with the pre-recorded pet facial feature library to obtain feature similarity information corresponding to the target pet and the pre-recorded pet;
[0039] The identity recognition module is used to identify the target pet as the pre-recorded pet based on the Face ID corresponding to the pre-recorded pet in response to the feature similarity information satisfying a preset identity authentication condition.
[0040] In a third aspect, an embodiment of the present application provides an electronic device comprising: a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the pet identification method as described in any one of the embodiments of the first aspect of the present application.
[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the pet identification method as described in any one of the embodiments of the first aspect of the present application.
[0042] The pet identification method, device, electronic device, and storage medium according to the embodiments of the present application have at least the following beneficial effects:
[0043] According to the pet identification method of the embodiment of the present application, when applied to a pet identification device, it is necessary to first obtain a pre-recorded pet facial feature library; wherein the pre-recorded pet facial feature library contains pre-recorded pet facial features for pre-recorded pets, and each of the pre-recorded pet facial features is configured with a unique Face ID; an image of the target pet is captured and pet facial detection is performed on the captured image to obtain a target pet facial image; a preset pet identification model is called to extract features from the target pet facial image to obtain the target pet facial features; the target pet facial features are compared for feature similarity in the pre-recorded pet facial feature library to obtain feature similarity information corresponding to the target pet and the pre-recorded pet; in response to the feature similarity information meeting a preset identity authentication condition, the target pet is identified as the pre-recorded pet based on the Face ID corresponding to the pre-recorded pet. In this way, the entire identification process is completed based on feature similarity information, ensuring the accuracy and reliability of pet identification. This pet identification method can more efficiently and accurately identify the pet's identity.
[0044] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become obvious from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0046] Figure 1 A flowchart of a pet identification method provided in an embodiment of the present application;
[0047] Figure 2 Another schematic diagram of a process for identifying a pet provided in an embodiment of the present application;
[0048] Figure 3 Another schematic diagram of a process for identifying a pet provided in an embodiment of the present application;
[0049] Figure 4 Another schematic diagram of a process for identifying a pet provided in an embodiment of the present application;
[0050] Figure 5 Another schematic diagram of a process for identifying a pet provided in an embodiment of the present application;
[0051] Figure 6 Another schematic diagram of a process for identifying a pet provided in an embodiment of the present application;
[0052] Figure 7 Another schematic diagram of a process for identifying a pet provided in an embodiment of the present application;
[0053] Figure 8 Schematic diagram of the structure of a pet identification device provided in an embodiment of the present application;
[0054] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The following describes in detail embodiments of the present application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and are not to be construed as limiting the present application.
[0056] In the description of this application, "several" means one or more, "many" means more than two, "greater than," "less than," and "exceed" are understood to exclude the number itself, while "above," "below," and "within" are understood to include the number itself. The terms "first" and "second" are used solely to distinguish technical features and are not to be construed as indicating or implying relative importance, or as implicitly specifying the number or order of the technical features indicated.
[0057] In the description of this application, it should be understood that descriptions involving orientations, such as up, down, left, right, front, and back, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing this 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. Therefore, they cannot be understood as limitations on this application.
[0058] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0059] In the description of this application, it should be noted that, unless otherwise explicitly defined, terms such as "set," "install," and "connect" should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution. In addition, the identification of specific steps below does not represent a limitation on the order of steps and execution logic. The execution order and execution logic between each step should be understood and inferred with reference to the content described in the embodiments.
[0060] As people's living standards improve, pets are gaining more and more importance in the family, and more and more families are keeping pets. Related technologies primarily rely on traditional methods for pet identification. For example, using RFID collars as a pet identification method requires embedding a chip in the collar to store the pet's identity information. When identification is required, a specialized reader retrieves the data from the chip. Furthermore, some related technologies based on traditional facial recognition technology require uploading the pet's facial data to a cloud server, where algorithms are used for processing and identification, and then feeding the results back to the device for appropriate action.
[0061] However, RFID collars require pets to wear them all the time, which may not only cause discomfort or restraint to the pets and affect their normal activities, but also once the collar is lost or damaged, the pets will not be able to be identified, causing trouble and worry to pet owners.
[0062] In addition, traditional facial recognition technology has high requirements for shooting angles and distances. When the pet does not cooperate, it is difficult to obtain facial images that meet the requirements, resulting in a decrease in recognition accuracy and an inability to meet the needs of multi-pet families for refined management such as individual feeding of individual pets.
[0063] Furthermore, many recognition technologies rely on network connections, requiring real-time network connection and relying on cloud servers for data processing and algorithm calculations. This means that in an environment with unstable or no network, the recognition function will not be able to be used normally, seriously affecting the user experience and reliability of the device.
[0064] Therefore, how to identify the identity of pets more efficiently remains an issue that urgently needs improvement in the industry.
[0065] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a pet identification method and device, electronic device, and storage medium, which can more efficiently identify pets.
[0066] The following is a further explanation based on the accompanying drawings.
[0067] Reference Figure 1 According to an embodiment of the present application, the pet identification method, when applied to a pet identification device, may include:
[0068] Step S101, obtaining a pre-recorded pet facial feature library; wherein the pre-recorded pet facial feature library contains pre-recorded pet facial features pre-stored for pre-recorded pets, and each pre-recorded pet facial feature is configured with a unique Face ID;
[0069] Step S102, capturing an image of the target pet and performing pet face detection on the captured image to obtain a facial image of the target pet;
[0070] Step S103, calling a preset pet recognition model to extract features from the target pet's facial image to obtain the target pet's facial features;
[0071] Step S104, performing feature similarity comparison between the target pet's facial features and the pre-recorded pet's facial features to obtain feature similarity information corresponding to the target pet and the pre-recorded pet;
[0072] Step S105 , in response to the feature similarity information satisfying a preset identity authentication condition, the target pet is identified as the pre-recorded pet based on the Face ID of the corresponding pre-recorded pet.
[0073] According to the pet identification method of the embodiment of the present application, when applied to a pet identification device, it is necessary to first obtain a pre-recorded pet facial feature library; wherein the pre-recorded pet facial feature library contains pre-recorded pet facial features for pre-recorded pets, and each pre-recorded pet facial feature is configured with a unique Face ID; image capture is performed on the target pet and pet facial detection is performed on the captured image to obtain the target pet facial image; a preset pet identification model is called to extract features from the target pet facial image to obtain the target pet facial features; the target pet facial features are compared with the pre-recorded pet facial features for feature similarity to obtain feature similarity information corresponding to the target pet and the pre-recorded pet; in response to the feature similarity information meeting the preset identity authentication conditions, the target pet is identified as the pre-recorded pet based on the Face ID of the corresponding pre-recorded pet. In this way, the entire identification process is completed based on feature similarity information, ensuring the accuracy and reliability of pet identification. This pet identification method can more efficiently and accurately identify the pet's identity.
[0074] In some embodiments, step S101 is to obtain a pre-recorded pet facial feature library; wherein the pre-recorded pet facial feature library includes pre-recorded pet facial features pre-stored for pre-recorded pets, and each pre-recorded pet facial feature is configured with a unique FaceID;
[0075] It should be noted that step S101 of some embodiments obtains a pre-recorded pet facial feature library, which is the basic step of the entire pet identification method and provides key data support for subsequent pet identification. The pre-recorded pet facial feature library contains pre-recorded pet facial features for pre-recorded pets. The extracted facial features not only cover key information such as facial contours and facial features positions, but may also include subtle features such as hair texture and color distribution. These pre-recorded pet facial features are obtained through a preliminary image acquisition and processing process, aiming to provide a comprehensive and accurate pet feature database for the pet identification device. Each extracted pre-recorded pet facial feature is assigned a unique Face ID. This identifier plays a vital role in the pet identification process. It is like a digital identity certificate for the pet, ensuring that the corresponding pet identity information can be quickly and accurately matched in the subsequent identification process, providing a reliable basis for identification.
[0076] In the pet identification method of the embodiment of the present application, the core role of FaceID is to provide a unique identity for each pre-recorded pet, which is like the pet's "digital ID card" in the system. When the pet's facial features are extracted and stored in the pre-recorded pet facial feature library, each pre-recorded pet facial feature is associated with a specific Face ID. In this way, in the subsequent pet identification process, the embodiment of the present application can quickly determine the identity information corresponding to the target pet by comparing the facial features of the target pet with the data in the pre-recorded feature library. This uniqueness ensures the accuracy and reliability of the recognition results, avoids confusion that may be caused by similar facial features, and enables the pet identification device to accurately distinguish each pet in a multi-pet environment, providing pet owners with clear identification results, and facilitating targeted feeding, care and other operations.
[0077] In the process of establishing a pre-recorded pet facial feature library, some embodiments can first ensure the quality and diversity of image acquisition through some means, such as shooting under different lighting conditions, pet postures and expressions, so as to enrich the content of the feature library and improve its adaptability to various actual scenarios. After the collected images are pre-processed, such as resizing, cropping, denoising and other operations, they will be input into the pet recognition model. The pet recognition model is based on a deep learning algorithm and can automatically learn and recognize the key features of the pet's face. Through a large amount of training data, the pet recognition model continuously optimizes its parameters to improve the accuracy and robustness of feature extraction. After the feature extraction is completed, these feature data will be stored in the pre-recorded pet facial feature library and associated with the corresponding Face ID to form a structured database so that they can be efficiently queried and compared during pet recognition.
[0078] In some more specific embodiments, the establishment of a pre-recorded pet facial feature library is not just a static process, it also needs to have a certain dynamic update capability. As the pet grows, its facial features may change to a certain extent. For example, the facial features of a puppy will gradually become obvious and mature as it grows older. Therefore, it is necessary to regularly update and supplement the pre-recorded pet facial features. In the embodiment of the present application, new facial images can be regularly captured by the pet recognition device during the growth of the pet to update the data in the feature library. In this way, the feature library can always reflect the latest features of the pet, ensuring that the accuracy of recognition does not decrease over time. At the same time, this update mechanism also enables the pet recognition device to better adapt to the natural growth changes of the pet, reduce the recognition errors caused by the growth of the pet, and improve the reliability and practicality of the entire pet recognition system.
[0079] In practical applications, the pre-recorded pet facial feature library can be created by the pet owner when first using the pet identification device of this application. The pet owner can use a mobile phone app or dedicated equipment, following the instructions of the pet identification device of this application, to take images of the pet's face from different angles. The pet identification device of this application processes these images and extracts features to generate a pre-recorded pet facial feature library. This process not only provides basic data for pet identification but also provides important reference information for pet health management.
[0080] In step S102 of some embodiments, an image of a target pet is captured and pet face detection is performed on the captured image to obtain a facial image of the target pet;
[0081] It should be noted that step S102 involves capturing images of the target pet to obtain image data of the target pet. This process is a key link in the pet identification method and directly affects the accuracy and efficiency of subsequent pet identification. The quality and effect of image acquisition depend on multiple factors, including the performance of the image acquisition device, the conditions of the acquisition environment, and the operational details during the acquisition process. It should be pointed out that the collected image data needs to be effectively managed and stored. The image data can be stored in the local memory of the device or in a cloud server for subsequent processing and analysis. During the storage process, the image data needs to be properly organized and labeled, for example, classified and stored according to information such as the type, age, and gender of the pet.
[0082] It should be noted that image acquisition devices may include high-resolution cameras that are capable of capturing clear images of pets. To ensure image quality, the camera needs to have good low-light performance, autofocus function, and high dynamic range (HDR) shooting capabilities. In addition, some image acquisition devices may also be equipped with image stabilization technology to reduce image blur caused by pet movement or device shaking. During the image acquisition process, the device may use multiple shooting modes, such as continuous shooting, timed shooting, or motion-triggered shooting, to adapt to different pet behaviors and environmental conditions.
[0083] In addition, the environment and conditions of image acquisition have a significant impact on image quality. An ideal acquisition environment should have sufficient light to ensure image clarity and color accuracy. However, in actual applications, lighting conditions may not always be ideal, so the image acquisition device of the embodiment of the present application can be configured with some accessories to enhance adaptability. For example, the image acquisition device can automatically increase ISO sensitivity under low-light conditions or use a flash to compensate for insufficient light. In addition, the complexity of the background will also affect the effect of image acquisition. In a complex background, the features of the pet may be partially obscured or confused with the background, so the image acquisition device of the embodiment of the application can select a simple background or use image segmentation technology to highlight the features of the pet when acquiring the image.
[0084] In the process of collecting images of target pets, the capture quality and recognition accuracy of pet facial features can be effectively improved through carefully designed shooting angles and placement of visual modules.
[0085] During image capture, some embodiments utilize the left-right length of the horizontal angle by rotating the commonly used horizontal angle. This adjustment allows the camera to capture a wider viewing range, ranging from 65 to 70 degrees. This wide viewing range ensures that the pet's facial features can be effectively captured in various positions and postures. For example, when a pet moves or changes posture in front of the camera, the wide viewing range ensures that the pet's face is always within the capture range, thereby improving the success rate of image capture.
[0086] To further optimize the capture of pet facial features, the vision module is designed to tilt back slightly by 5 to 10 degrees. This adjustment, known as the pitch angle, allows the camera to better focus on the pet's face, especially when the pet is at different heights or positions. For example, when the pet is close to the camera, the tilt angle prevents excessive image distortion or distortion, ensuring the clarity and accuracy of facial features. This design not only improves image quality, but also enhances the adaptability and robustness of the pet recognition device in the embodiment of the present application.
[0087] It should be understood that by adjusting the shooting angle and the placement of the visual modules, the quality of capturing pet facial features and the accuracy of recognition can be effectively improved. This process not only improves the success rate of image acquisition, but also enhances the adaptability and robustness of the pet recognition device of the embodiment of the application, providing a solid foundation for accurate pet identification and management.
[0088] Reference Figure 2 According to some embodiments provided by this application, step S101 of obtaining a pre-recorded pet facial feature library may include:
[0089] Step S201, obtaining at least two groups of pre-recorded pet facial images of a pet; wherein each group of pre-recorded pet facial images corresponds to an image acquisition angle;
[0090] Step S202: for each set of pre-recorded pet facial images, calling a pet recognition model to extract features from each pre-recorded pet facial image in turn to obtain a pre-recorded pet facial feature library;
[0091] Step S203, in response to completing feature extraction for each set of pre-recorded pet facial images, obtaining at least two pre-recorded pet facial feature libraries of the pre-recorded pets;
[0092] In step S102, capturing an image of a target pet and performing pet face detection on the captured image to obtain a facial image of the target pet may include:
[0093] Step S204: Capture images of the target pet from at least two image acquisition angles to obtain a facial image of the target pet.
[0094] In step S201 of some embodiments, at least two sets of pre-recorded pet facial images of a pet are obtained; wherein each set of pre-recorded pet facial images corresponds to an image acquisition angle;
[0095] It should be noted that at least two sets of pre-recorded pet facial images are acquired, each corresponding to a different image acquisition angle. This is to comprehensively capture the pet's facial features from different perspectives, ensuring the accuracy of subsequent recognition. Multi-angle image acquisition enables the acquisition of facial information from various pet poses, laying the foundation for building a rich feature database.
[0096] In some more specific embodiments, the process of obtaining a pre-recorded pet facial feature library may include the following steps:
[0097] First, multi-angle image capture of the pre-recorded pet is required. This means capturing the pet's face from various angles to ensure that the pet's facial features are captured in a variety of poses and angles. For example, shots can be taken from the front, side, top, and bottom. The purpose of multi-angle capture is to build a comprehensive database of pet facial features, ensuring that during the actual recognition process, the pet recognition device can find a matching pre-recorded pet facial feature, regardless of the pet's pose or angle.
[0098] The images captured from the pre-recorded pets need to be processed and analyzed to extract the pet's facial features. This can involve using image processing techniques such as edge detection, grayscale conversion, and noise removal to enhance image quality and highlight facial features. A pre-built pet recognition model, such as a deep learning model, is then used to extract features from the processed images. These features may include information such as the shape, texture, and color of the pet's face, as well as specific facial landmarks such as the location of the eyes, nose, and mouth.
[0099] The extracted pre-recorded pet facial features need to be stored in a pet facial feature database for rapid comparison during subsequent recognition. This pet facial feature database can be stored locally or in the cloud, depending on the architecture and needs of the pet recognition device. When stored, the features can be associated with the pet's identity information to ensure accurate matching of the corresponding pet during the recognition process.
[0100] It should be understood that through multi-angle image acquisition and feature extraction, the pet recognition device of the present application is able to establish a comprehensive and accurate pet facial feature database. This pet facial feature database provides reliable data support for subsequent pet recognition, ensuring the efficient operation and accurate recognition of the pet recognition device of the present application.
[0101] In step S202 of some embodiments, for each set of pre-recorded pet facial images, a pet recognition model is called to extract features from each pre-recorded pet facial image in turn to obtain a pre-recorded pet facial feature library;
[0102] It should be noted that for each set of pre-recorded pet facial images, the pet recognition model is invoked to extract features from each pre-recorded pet facial image in turn, generating a pre-recorded pet facial feature library. The pet recognition model can be based on a deep learning algorithm, automatically learning and extracting key facial features of pets, such as the shape, position, and texture of the eyes, nose, and mouth, as well as fur. By sequentially processing each pre-recorded pet facial image, a comprehensive representation of the pet's features at specific angles is obtained, forming a pre-recorded pet facial feature library, providing detailed data support for subsequent feature comparisons.
[0103] In step S203 of some embodiments, in response to completing feature extraction for each set of pre-recorded pet facial images, at least two pre-recorded pet facial feature libraries are obtained for the pre-recorded pets;
[0104] It should be noted that feature extraction is performed for each set of pre-recorded pet facial images, resulting in at least two pre-recorded pet facial feature libraries for each pet. This means that pre-recorded pet facial images acquired from different angles undergo feature extraction, resulting in multiple pre-recorded pet facial feature libraries, each corresponding to a specific image acquisition angle. These pre-recorded pet facial feature libraries serve as reference data for pet identification and are stored in the database of the pet recognition device for subsequent comparison with the facial features of a target pet, ensuring that matching pre-recorded features can be found for identification regardless of the pet's angle.
[0105] In step S204 of some embodiments, images of the target pet are captured from at least two image capture angles to obtain a facial image of the target pet.
[0106] It should be noted that the target pet's facial image is acquired from at least two image acquisition angles. In practical applications, to accurately compare the multi-angle features with the pre-recorded pet facial feature library, the target pet can be photographed from at least two different image acquisition angles. This allows the target pet's facial features to be acquired from different perspectives, generating a facial image of the target pet that corresponds to the pre-recorded pet facial feature library. This provides the necessary data input for subsequent feature extraction and comparison, ensuring the comprehensiveness and accuracy of the recognition process.
[0107] In step S103 of some embodiments, a preset pet recognition model is called to perform feature extraction on the target pet's facial image to obtain the target pet's facial features;
[0108] It should be noted that step S103 involves calling a preset pet recognition model to extract features from the target pet's facial image, which is a key step in achieving accurate pet identification. The preset pet recognition model can be developed based on deep learning technology, which recognizes and extracts the facial features of pets by learning a large amount of pet image data. It should be understood that the extracted facial features of the target pet will be used to compare with the pet features in the pre-recorded pet facial feature library to determine the identity of the target pet. By comparing the similarity between the facial features of the target pet and the pre-recorded pet facial features, it can be determined whether the target pet is a pre-recorded pet. For example, if the similarity between the facial features of the target pet and the features of a pet in the pre-recorded pet facial feature library is higher than a preset threshold, it can be considered that the target pet is the pre-recorded pet, and the target pet is identified as a pre-recorded pet.
[0109] It should be noted that the preset pet recognition model is obtained by training on a large amount of pet image data. This image data covers pets of different breeds, ages, genders, and postures, ensuring that the pet recognition model can learn various facial features of pets. In the embodiment of this application, the training process of the pet recognition model may involve the following steps:
[0110] Collect a large number of pet images, including images from different angles such as the front, side, top, and bottom, and preprocess these images, such as resizing, cropping, and denoising. These preprocessing steps help improve image quality and make them more suitable for model training.
[0111] Extract key features from the image, such as the texture, shape, and color of the pet's face. These features will be used as learning objects for the model to identify pets.
[0112] The collected image data is trained using deep learning algorithms (such as convolutional neural networks). The model can learn how to map the input image to the corresponding pet features and continuously adjust the model parameters to improve recognition accuracy.
[0113] Optimize and validate the trained model to ensure it works stably in different environments and conditions. This may include cross-validation, hyperparameter tuning, and performance evaluation.
[0114] In the pet recognition device, after acquiring the target pet's facial image, the preset pet recognition model can be further called to extract features from the target pet's facial image to obtain the target pet's facial features. Specifically, the pet recognition model in some embodiments can perform the following operations on the input target pet's facial image:
[0115] The input target pet facial image is converted into a numerical matrix so that the pet recognition model can perform mathematical operations and processing. The pet recognition model can extract key features from the target pet facial image, such as the pet's facial outline, eyes, nose, mouth, etc. These features will serve as the pet recognition model's intermediate representation for subsequent similarity calculation and identity authentication. Furthermore, the extracted features are converted into a fixed-length feature vector, also known as an embedding. This feature vector captures the main facial features of the pet (i.e., the target pet's facial features) and has good comparability.
[0116] Reference Figure 3 According to some embodiments of the present application, before calling a preset pet recognition model to extract features from the target pet's facial image in step S103 to obtain the target pet's facial features, the following steps may also be included:
[0117] Step S301, performing image quality detection on the target pet facial image to obtain a quality detection result corresponding to the target pet facial image;
[0118] In step S103, calling a preset pet recognition model to extract features from the target pet's facial image to obtain the target pet's facial features may include:
[0119] Step S302: In response to the quality detection result meeting the preset quality qualification condition, the pet recognition model is called to extract features of the target pet's facial image to obtain the target pet's facial features.
[0120] In some embodiments, real-time quality monitoring and feedback may be required to ensure the quality of image acquisition. Image acquisition devices can be equipped with image quality assessment algorithms that can analyze image clarity, brightness, contrast, and other indicators in real time and issue prompts when image quality does not meet standards. For example, if the image is too blurry or overexposed, the device can automatically adjust the shooting parameters or prompt the user to retake the image. In addition, image enhancement techniques such as denoising and sharpening can be used during the image acquisition process to further improve image quality.
[0121] In step S301 of some embodiments, an image quality test is performed on a target pet facial image to obtain a quality test result corresponding to the target pet facial image;
[0122] It should be noted that image quality testing is a key step in ensuring the reliability and validity of image data. In the pet identification device of the present embodiment, image quality directly affects the feature extraction effect of the pet identification model and the ultimate recognition accuracy. Poor image quality may lead to inaccurate feature extraction, which in turn affects the pet's identity authentication. Therefore, it is necessary to perform quality testing on the target pet's facial image before feature extraction.
[0123] Reference Figure 4 According to some embodiments of the present application, step S301 performs image quality detection on the target pet facial image to obtain a quality detection result corresponding to the target pet facial image, which may include:
[0124] Step S401, performing brightness calculation on the target pet's facial image to obtain target brightness detection data;
[0125] Step S402, calculating the sharpness of the target pet's facial image to obtain target sharpness detection data;
[0126] Step S403: When the target brightness detection data satisfies a preset brightness detection condition and the target sharpness detection data satisfies a preset sharpness detection condition, performing pet face relative angle calculation on the target pet face image to obtain pet face relative angle data;
[0127] Step S404: In response to the pet's facial relative angle data satisfying a preset facial relative angle detection condition, a quality detection result satisfying a quality qualification condition is obtained.
[0128] In some embodiments, performing image quality testing on the target pet's facial image is a crucial step in ensuring that the image is suitable for subsequent feature extraction and pet recognition. Image quality testing evaluates multiple image attributes to ensure sufficient clarity, brightness, and correct facial angle, thereby improving the accuracy and reliability of pet recognition.
[0129] In step S401 of some embodiments, brightness calculation is performed on the target pet's facial image to obtain target brightness detection data;
[0130] It should be noted that the target brightness detection data is obtained by performing a brightness calculation on the target pet's facial image. Brightness is one of the important indicators of image quality, reflecting the overall brightness of the image. If the image is too dark or too bright, the pet's facial features may be unclear, affecting the effectiveness of feature extraction. Brightness calculation can be achieved by calculating the average brightness value of all pixels in the image. The preset brightness detection condition can be a reasonable brightness range. For example, the average brightness value should be within a certain range to ensure that the image is neither too dark nor too bright. If the target brightness detection data meets the preset brightness detection condition, it means that the image brightness is moderate and can be processed subsequently.
[0131] In step S402 of some embodiments, sharpness calculation is performed on the target pet facial image to obtain target sharpness detection data;
[0132] It should be noted that the target pet facial image is subjected to a sharpness calculation to obtain target sharpness detection data. Sharpness reflects the clarity of the image, particularly the clarity of the pet's facial details. Sharpness calculation can be achieved by calculating the clarity of edges and textures in the image. For example, the Laplacian operator or other edge detection algorithms can be used to evaluate image sharpness. The preset sharpness detection condition can be a sharpness threshold; only when the image sharpness exceeds this threshold is the image considered sufficiently sharp. If the target sharpness detection data meets the preset sharpness detection condition, it indicates that the image clarity meets the requirements and can be processed subsequently.
[0133] In step S403 of some embodiments, if the target brightness detection data satisfies a preset brightness detection condition and the target sharpness detection data satisfies a preset sharpness detection condition, performing pet face relative angle calculation on the target pet face image to obtain pet face relative angle data;
[0134] It should be noted that when both the target brightness detection data and the target sharpness detection data meet the preset conditions, the pet face relative angle calculation is performed on the target pet face image to obtain the pet face relative angle data. The pet face relative angle refers to the angle of the pet face relative to the image acquisition device. This parameter is crucial to ensure the correct extraction of the pet's facial features. If the pet's face angle is incorrect, it may lead to inaccurate feature extraction and affect subsequent recognition effects. The pet face relative angle calculation can be achieved by detecting key points on the pet's face (such as eyes, nose, and mouth) and calculating the relative positions between these points. The preset facial relative angle detection condition can be an angle range. For example, the angle of the pet's face relative to the image acquisition device should be within a certain range to ensure the correct extraction of facial features.
[0135] In step S404 of some embodiments, in response to the pet's facial relative angle data satisfying a preset facial relative angle detection condition, a quality detection result that meets a quality qualification condition is obtained.
[0136] It should be noted that, in response to the pet's facial relative angle data meeting the preset facial relative angle detection conditions, a quality inspection result that meets the quality requirements is obtained. This means that only when the target pet's facial image meets the preset conditions in terms of brightness, sharpness, and facial relative angles, the image is considered to be of qualified quality. The quality inspection result will serve as an important basis for subsequent feature extraction and pet identification. If the image quality is unsatisfactory, the pet identification device in the embodiment of the present application may prompt the user to recapture the image or perform image enhancement processing to improve its quality.
[0137] It should be understood that by calculating the brightness, sharpness, and relative angles of the target pet's facial image, the pet recognition device of the present embodiment can comprehensively assess the image quality and ensure that the image meets the preset quality requirements. This process not only improves the image's usability but also provides reliable data support for subsequent feature extraction and pet recognition. By ensuring image quality, the pet recognition device of the present embodiment can more accurately identify pets, improving the accuracy and safety of pet recognition.
[0138] In step S302 of some embodiments, in response to the quality detection result meeting a preset quality qualification condition, a pet recognition model is called to perform feature extraction on the target pet facial image to obtain the target pet facial features.
[0139] It should be noted that after completing the image quality test, the pet recognition device of the embodiment of the present application can determine whether the image meets the preset quality qualification conditions based on the test results. If the image quality is qualified, the pet recognition model can be called to extract features from the target pet's facial image to obtain the target pet's facial features.
[0140] In other embodiments, if the image quality is unsatisfactory, the embodiments of the present application may include but are not limited to taking the following measures:
[0141] Recapture the image and prompt the user to recapture the image to ensure that the image quality meets the requirements.
[0142] Image enhancement processing: enhance the image, such as adjusting brightness, contrast, denoising, etc., to improve image quality.
[0143] Record quality failure information and image quality failure information for subsequent analysis and improvement.
[0144] Reference Figure 5 According to some embodiments of the present application, after performing image quality detection on the target pet facial image in step S301 and obtaining a quality detection result corresponding to the target pet facial image, the following steps may also be included:
[0145] Step S501: in response to the quality detection result not meeting the quality qualification condition, re-capturing the image of the target pet to update the facial image of the target pet;
[0146] Step S502, performing image quality detection on the updated target pet facial image to obtain an updated quality detection result;
[0147] Step S503 , in response to the updated quality inspection result meeting the quality qualification condition, calling the pet recognition model to extract features of the updated target pet facial image to obtain the target pet facial features.
[0148] In some embodiments, when the target pet facial image is subjected to image quality detection and is found to not meet quality requirements, the pet identification device of the embodiment of the present application can take a series of measures to ensure that a high-quality image is obtained for subsequent feature extraction and pet identification.
[0149] In step S501 of some embodiments, in response to the quality detection result not meeting the quality qualification condition, re-capturing the image of the target pet to update the facial image of the target pet;
[0150] It should be noted that if the quality test result of the target pet's facial image fails to meet the quality requirements, the pet identification device of the present embodiment can trigger a re-image capture operation. This step is critical to ensuring image quality, as low-quality images can lead to inaccurate feature extraction, which in turn affects the pet's identity verification. Re-capturing the image can improve image clarity, brightness, and facial angle accuracy, thereby increasing the success rate of subsequent recognition.
[0151] In some more specific embodiments, the process of re-capturing an image may include the following steps:
[0152] The pet recognition device of the embodiment of the present application can perform a pet attraction operation again to attract the target pet to the pet recognition device. This can be achieved by means of sound, light, toy or food smell, etc., to ensure that the pet remains stable within the image acquisition area.
[0153] The pet identification device of the embodiment of the present application can detect whether the target pet enters a preset image acquisition area. If the pet enters the area, the pet identification device of the embodiment of the present application can immediately start the camera to collect images.
[0154] The pet recognition device of the embodiment of the present application can capture an image of the image capture area to obtain a new facial image of the target pet. During the capture process, the pet recognition device of the embodiment of the present application can automatically adjust camera parameters such as focal length, aperture, and shutter speed to adapt to different lighting and distance conditions, ensuring the captured image is of high quality.
[0155] In step S502 of some embodiments, image quality detection is performed on the updated target pet facial image to obtain an updated quality detection result;
[0156] It should be noted that after re-capturing the image, the pet recognition device of the embodiment of the present application can perform an image quality test on the updated target pet facial image to ensure that the image meets the preset quality requirements. This process is the same as the previous image quality test, including steps such as brightness calculation, sharpness calculation, and calculation of the relative angle of the pet's face. If the updated image quality test result meets the quality requirements, the pet recognition device of the embodiment of the present application will proceed to the next step, namely, calling the pet recognition model to perform feature extraction.
[0157] In step S503 of some embodiments, in response to the updated quality detection result meeting the quality qualification condition, the pet recognition model is called to perform feature extraction on the updated target pet facial image to obtain the target pet facial features.
[0158] It should be noted that once the updated target pet facial image passes quality inspection, the pet recognition device in this embodiment can invoke a pre-set pet recognition model to extract features from the image and obtain the target pet's facial features. This process includes image preprocessing, feature extraction, and feature representation, ensuring that the extracted features are accurate and comparable.
[0159] It should be understood that by recapturing the image and performing another quality check when the image quality test fails, the pet identification device of the present application embodiment can ensure the acquisition of high-quality facial images of the target pet. This process not only improves the usability of the image but also provides reliable data support for subsequent feature extraction and pet identification. By continuously optimizing image quality, the pet identification device of the present application embodiment can improve the accuracy and reliability of pet identity authentication, thereby ensuring the accuracy and safety of pet food dispensing operations.
[0160] Reference Figure 6 According to some embodiments of the present application, the pet recognition model encapsulates a pet face capture algorithm and a pet face recognition sub-model. Step S103 calls the preset pet recognition model to extract features from the target pet's facial image to obtain the target pet's facial features, which may include:
[0161] Step S601, calling a pet face capture algorithm to capture the pet face region from a target pet face image;
[0162] Step S602: performing pet facial recognition on the pet facial region using the pet facial recognition sub-model to obtain target pet facial features.
[0163] In some embodiments of the pet recognition method, the pet recognition model encapsulates a pet face capture algorithm and a pet face recognition sub-model. This design enables the pet recognition device of the present embodiment to accurately locate the pet's facial region during the pet face recognition process, and then perform detailed feature extraction and recognition on this region.
[0164] In step S601 of some embodiments, a pet face capture algorithm is called to capture a pet face region from a target pet face image;
[0165] It's important to note that the pet face capture algorithm is a crucial component of the pet recognition model. Its primary task is to accurately locate the pet's facial region within the target pet's facial image. This process can involve the application of image processing and machine learning techniques. For example, the algorithm can use a convolutional neural network (CNN) to learn the characteristic patterns of a pet's face and detect the pet's facial location within the image using techniques such as sliding windows or a region proposal network (RPN). The success of the pet face capture algorithm directly impacts the subsequent performance of pet facial recognition.
[0166] In practical applications, pet face capture algorithms need to be adaptable to a variety of scenarios, such as varying lighting conditions, pet poses, and distances. For example, in low-light environments, the algorithm needs to effectively enhance image contrast and detect the outline of the pet's face. When the pet is in a non-frontal pose, the algorithm needs to accurately adjust the detection area to accommodate changes in the pet's face. Furthermore, the algorithm needs to be able to handle partial occlusion of the pet's face, such as accurately locating the facial area when the pet's face is obscured by hair or toys.
[0167] In step S602 of some embodiments, pet facial recognition is performed on the pet facial region using a pet facial recognition sub-model to obtain target pet facial features.
[0168] It should be noted that the pet facial recognition sub-model is a key component for in-depth analysis and identification of the pet's facial region. After the pet's facial region is accurately captured, the sub-model further processes it to extract features that represent the pet's identity. These features may include information such as the texture, shape, color, and location of key points on the pet's face. The pet facial recognition sub-model uses deep learning methods, such as a deep convolutional neural network (CNN), to learn how to represent these features and generate a feature vector. This feature vector serves as the target pet facial feature for subsequent identity verification. Training the pet facial recognition sub-model requires a large amount of pet facial image data to ensure it can recognize pets of various breeds, ages, and genders.
[0169] It's worth noting that the pet face capture algorithm and the pet face recognition sub-model work in tandem. First, the pet face capture algorithm locates the pet's facial region from the target pet's facial image, then passes this region to the pet face recognition sub-model for further analysis and processing. During this process, the two modules work closely together to ensure accurate extraction and recognition of the pet's facial features. For example, if the pet face capture algorithm fails to accurately locate the pet's facial region, the pet face recognition sub-model will be unable to extract sufficient feature information, resulting in recognition failure. Conversely, if the pet face capture algorithm can accurately locate the facial region, the pet face recognition sub-model will be able to more effectively extract features, improving recognition accuracy.
[0170] In practical applications, the collaborative work of these two modules is also reflected in the real-time tracking and recognition of pet faces. For example, as the pet moves, the pet face capture algorithm can adjust the detection area in real time to ensure that the pet's face is always within the recognition range. At the same time, the pet face recognition sub-model can quickly identify and update the features of the captured facial area in real time to adapt to the pet's dynamic changes.
[0171] It should be understood that the pet facial capture algorithm and pet facial recognition sub-model encapsulated in the pet recognition model are key technologies for achieving accurate pet recognition. The pet facial capture algorithm is responsible for accurately locating the pet's facial area from the target pet's facial image, while the pet facial recognition sub-model performs in-depth feature extraction and recognition of this area. The collaborative operation of these two modules ensures the accuracy and robustness of pet facial recognition, thereby improving the performance and reliability of the pet recognition device in the embodiment of this application. By continuously optimizing the algorithm and model, the accuracy and efficiency of pet recognition can be further improved, providing better support for intelligent pet management and feeding.
[0172] According to some embodiments of the present application, the pet recognition model is deployed on a cloud server. Step S103 calls a preset pet recognition model to extract features from the target pet's facial image to obtain the target pet's facial features, which may include:
[0173] The target pet's facial image is uploaded to the cloud server, and the pet recognition model deployed on the cloud server is used to extract features of the target pet's facial image to obtain the target pet's facial features.
[0174] It should be noted that in some embodiments, the pet recognition model is deployed on a cloud server. This allows the pet recognition device to connect to the cloud server via a network, leveraging the cloud's powerful computing power and storage resources to perform pet recognition. Specifically, when feature extraction is required for a target pet's facial image, the pet recognition device can upload the image to the cloud server, where it is processed by the pet recognition model deployed there. This process not only fully utilizes the cloud's high-performance computing resources, but also ensures accurate and efficient pet recognition.
[0175] First, after capturing the target pet's facial image, the pet recognition device uploads the image data to a cloud server via the network. This process may involve data compression and encryption to ensure the security and integrity of the image data during transmission. Data compression reduces transmission time and bandwidth, while encryption prevents image data from being intercepted and tampered with during transmission. After receiving the image data, the cloud server decompresses and decrypts it to restore the original image data for subsequent feature extraction.
[0176] Furthermore, after receiving the target pet's facial image, the cloud server can use the pet recognition model deployed on it to extract features from the image. The pet recognition model can include a pet face capture algorithm and a pet face recognition sub-model. These algorithms and models have been optimized with a large amount of training data and can accurately identify pet facial features.
[0177] It should be understood that by deploying the pet identification model on a cloud server, the pet identification device can fully utilize the cloud's powerful computing power and storage resources to achieve efficient and accurate pet identification. This process not only improves the accuracy and efficiency of pet identification, but also ensures data security and the scalability of the pet identification device of the present embodiment. With the continuous development of cloud computing technology, the pet identification model deployed in the cloud will provide a more reliable and convenient solution for the pet identification device of the present embodiment.
[0178] In step S104 of some embodiments, facial features of the target pet are compared with facial features of pre-recorded pets for feature similarity, to obtain feature similarity information corresponding to the target pet and the pre-recorded pets;
[0179] It should be noted that step S104 involves comparing the target pet's facial features with the facial features of each pre-recorded pet for similarity. This is a critical step in the entire recognition process and determines whether the pet recognition device of this application can accurately identify the target pet. By comparing the feature similarities, the pet recognition device of this application can determine the degree of match between the target pet and the pre-recorded pets, and further determine whether to identify the target pet as a pre-recorded pet.
[0180] It should be noted that after the pre-recorded pet facial features and the target pet facial features are converted into feature vectors respectively, they are compared using the above-mentioned similarity measurement method to obtain a similarity value. This value will serve as one of the bases for judging whether the target pet matches the pre-recorded pet. Feature similarity comparison needs to be based on certain mathematical algorithms and metrics, which are intended to quantify the degree of similarity between two feature vectors. In some embodiments, similarity measurement methods may include Euclidean distance, cosine similarity, and Hamming distance. Among them, Euclidean distance calculates the straight-line distance between two vectors in space, and the smaller the value, the higher the similarity; cosine similarity calculates the cosine value of the angle between two vectors, and the closer the value is to 1, the higher the similarity; Hamming distance is applicable to binary feature vectors, which represents the number of different elements in corresponding positions in the two vectors.
[0181] In some embodiments of the present application, because the target pet may be in different postures or angles during image capture, it is necessary to perform feature similarity comparisons at each image capture angle. For example, when the target pet is facing the camera head-on, the present application's pet recognition device will compare the pre-recorded pet facial feature library for frontal angle features; when the target pet is facing the camera sideways, it will compare the pre-recorded pet facial feature library for side angle features. This ensures that no matter the pet's posture, the present application's pet recognition device can find the most matching pre-recorded features for comparison.
[0182] In step S105 of some embodiments, in response to the feature similarity information satisfying a preset identity authentication condition, the target pet is identified as the pre-recorded pet based on the Face ID of the corresponding pre-recorded pet.
[0183] It's important to note that the relationship between feature similarity information and pre-set authentication criteria, and how to identify the target pet based on these criteria and Face ID, is the core decision-making process of the entire recognition process. Accurate judgment and precise identification ensure the effective operation of the pet recognition device and provide a reliable and personalized service experience.
[0184] During the pet recognition process, feature similarity information is crucial for determining whether the target pet is a pre-recorded pet. After an image of the target pet is captured and facial features are extracted, these features are compared with data from a pre-recorded pet facial feature library to generate feature similarity information. This process utilizes similarity metrics between feature vectors, such as Euclidean distance and cosine similarity, to quantify the degree of feature match between the target pet and the pre-recorded pet. The pre-set authentication conditions establish a similarity threshold; successful recognition is only triggered when the feature similarity between the target pet and the pre-recorded pet meets or exceeds this threshold. This feature similarity-based judgment mechanism ensures the accuracy and reliability of recognition results, avoids misidentification issues that could result from similar appearances between pets, and ensures the high-precision performance of the pet recognition device.
[0185] When the feature similarity information meets the preset conditions, Face ID becomes the key identifier for identifying the target pet as a pre-recorded pet. Each pre-recorded pet facial feature is associated with a unique Face ID, which serves as the pet's digital identity in the entire pet identification device. When the facial features of the target pet successfully match the facial features of the pre-recorded pet, and the similarity meets the authentication conditions, the embodiment of the present application determines the specific identity of the target pet based on Face ID. Face ID not only ensures the accuracy and uniqueness of the recognition results, but also provides clear guidance for subsequent operations. For example, in a multi-pet household, Face ID can help pet owners quickly distinguish between different pets and achieve accurate feeding, care, and health monitoring operations. At the same time, the use of Face ID also improves the security and stability of the pet identification device, prevents unauthorized pets from obtaining specific resources or information, and ensures the orderliness of pet management and the protection of the interests of pet owners.
[0186] By combining feature similarity information and Face ID, the pet recognition device can trigger a series of personalized services and operations after confirming the identity of the target pet. In a smart home environment, when the target pet is identified as a pre-recorded pet, the embodiment of the present application can automatically adjust the feeding amount and food type of the pet feeder according to the pet's dietary preferences, health status and other information to achieve precise feeding. In addition, Face ID can also be associated with the pet's health record. When the pet is identified, the system can quickly call up its past health records, vaccination status, etc., and provide pet owners with detailed health advice and reminders to help them better manage their pets' health. This personalized service push based on Face ID not only improves the user experience of pet owners, but also enhances the practical application value of pet recognition technology, making the daily life and health management of pets more intelligent and convenient.
[0187] It should be noted that the preset identity authentication conditions are an important basis for the decision-making of the pet recognition device of this application. These conditions can be based on feature similarity information. For example, the similarity between the target pet's facial features and the pre-recorded pet's facial features at multiple image acquisition angles must meet a certain threshold. The setting of the threshold should take into account the recognition accuracy and the robustness of the pet recognition device of this application.
[0188] When performing identity authentication, the pet recognition device of the present application can comprehensively evaluate the similarity information between the facial features of the target pet and the facial features of each pre-recorded pet at each image acquisition angle. This means that the pet recognition device of the present application can not only consider the similarity at a single angle, but also integrate the similarity information at multiple angles to improve the accuracy and reliability of recognition. For example, even if the similarity of the target pet at a certain angle is slightly lower than the threshold, if the similarity at other angles is higher than the threshold, the pet recognition device of the present application may still determine that it is a pre-recorded pet. This multi-angle comprehensive evaluation method can effectively reduce recognition errors caused by factors such as pet posture and light.
[0189] When the feature similarity information of the target pet meets the preset identity authentication conditions, the pet identification device of the present application will identify the target pet as a pre-recorded pet.
[0190] Furthermore, if the target pet's feature similarity information doesn't meet the pre-set authentication criteria, the pet identification device will not identify the target pet as a pre-registered pet. In this case, the device may take some action, such as prompting the pet owner to manually intervene or recording the recognition failure for subsequent analysis. This mechanism effectively prevents non-pre-registered pets from accidentally ingesting pet food, ensuring accurate food placement.
[0191] Reference Figure 7 According to some embodiments provided by the present application, after identifying the target pet as a pre-recorded pet, the method further includes:
[0192] Step S701, determining the current pet features of the pre-recorded pet in the current growth period based on the facial features of the target pet;
[0193] Step S702 : Based on the current pet features of the pre-recorded pet in the current growth period, the pre-recorded pet facial features in the pre-recorded pet facial feature library that match the pre-recorded pet are updated.
[0194] In step S701 of some embodiments, current pet features of a pre-recorded pet at a current growth period are determined based on facial features of a target pet;
[0195] It should be noted that step S701 involves determining the characteristics of the target pet at its current stage of growth based on its current characteristics. This requires the pet identification device of this application to be able to analyze and understand the pet's physiological characteristics that change over time, such as facial features and body shape. For example, the facial features of a young pet may be more rounded, while those of an adult pet may be more sharply defined.
[0196] In some embodiments, the pet identification device of the present application can determine the current growth stage of the pet by comparing the current characteristics of the target pet with pre-recorded characteristic data of the pet at different growth stages.
[0197] In step S702 of some embodiments, based on the current pet features of the pre-recorded pet in the current growth period, the pre-recorded pet facial features library that match the pre-recorded pet are updated.
[0198] It should be noted that step S702 updates the corresponding features in the pre-recorded pet facial feature library based on the determined current pet features. This means that the pet recognition device of the present application will integrate the new feature information into the existing pet feature database, supplementing the new feature data or replacing the old feature data. For example, if the pet's fur color changes during growth, the pet recognition device of the present application will add the new fur color features to the pre-recorded pet facial feature library to enable more accurate identification of the pet in future recognition processes.
[0199] It should be understood that this update mechanism not only improves recognition accuracy but also enhances the self-learning capabilities of the pet identification device of this application. By continuously updating the pet's characteristic information, the pet identification device of this application can adapt to the pet's growth and changes, maintaining efficient and reliable recognition. This adaptive update mechanism is particularly important in multi-pet households because it reduces the workload of pet owners in manually updating pet information while ensuring that each pet can be accurately identified and managed.
[0200] In practical applications, this update mechanism can significantly improve the success rate of pet recognition. For example, as a pet's facial features change with age, the pet recognition device of this application can automatically update these changes, avoiding recognition failures due to feature mismatches. Furthermore, this mechanism can adapt to temporary changes in a pet's appearance due to seasonality, health status, or other factors, further improving the robustness and adaptability of the pet recognition device of this application.
[0201] In summary, step S701 and step S702 ensure the accuracy and adaptability of pet identification of the pet identification device of this application by dynamically updating the characteristic information of the pet, providing pet owners with a more convenient and efficient pet management solution.
[0202] Reference Figure 8According to an embodiment of the present application, a pet identification device may include:
[0203] The feature library acquisition module 801 is used to acquire a pre-recorded pet facial feature library, which contains pre-recorded pet facial features pre-stored for pre-recorded pets;
[0204] An image acquisition module 802 is configured to acquire an image of a target pet and perform pet face detection on the acquired image to obtain a facial image of the target pet;
[0205] The feature extraction module 803 is used to call a preset pet recognition model to extract features from the target pet's facial image to obtain the target pet's facial features;
[0206] The feature comparison module 804 is used to compare the facial features of the target pet with the facial features of the pre-recorded pet to obtain feature similarity information corresponding to the target pet and the pre-recorded pet;
[0207] The identity recognition module 805 is configured to identify the target pet as the pre-recorded pet based on the Face ID of the corresponding pre-recorded pet in response to the feature similarity information satisfying a preset identity authentication condition.
[0208] It can be seen that the contents of the above-mentioned pet identification method embodiment are all applicable to the embodiment of the present pet identification device. The functions specifically implemented by the present pet identification device embodiment are the same as those of the above-mentioned pet identification method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned pet identification method embodiment.
[0209] Reference Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is shown. The electronic device may include:
[0210] The processor 901 may be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0211] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program codes are stored in the memory 902 and are called by the processor 901 to execute the pet identification method of the embodiments of this application.
[0212] Input / output interface 903, used to implement information input and output;
[0213] Communication interface 904, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0214] Bus 905 , which transmits information between various components of the device (e.g., processor 901 , memory 902 , input / output interface 903 , and communication interface 904 );
[0215] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0216] The embodiment of the present application further provides a computer program product, which includes a computer program. A processor of a computer device reads and executes the computer program, so that the computer device executes and implements the above-mentioned pet identification method.
[0217] The terms "first," "second," "third," "fourth," and the like (if any) in the specification of the present disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present disclosure described herein, for example, can be implemented in orders other than those illustrated or described herein. In addition, the terms "comprises" and "comprising," and any variations thereof, are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or apparatus.
[0218] It should be understood that in the present disclosure, "at least one (item)" refers to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, and may include any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0219] It should be understood that in the description of the embodiments of the present application, multiple (or multiple items) means more than two, greater than, less than, exceed, etc. are understood to exclude the number itself, and above, below, within, etc. are understood to include the number itself.
[0220] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0221] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0222] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0223] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or partly contributed to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium and can include several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium may include: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. Various media that can store program code. It should also be understood that the various implementation methods provided in the embodiments of the present application can be arbitrarily combined to achieve different technical effects. The above is a specific description of the implementation methods of the present disclosure, but the present disclosure is not limited to the above implementation methods. Those skilled in the art can also make various equivalent modifications or replacements without violating the spirit of the present disclosure. These equivalent modifications or replacements are all included in the scope defined by the claims of the present disclosure.
Claims
1. A pet identification method, characterized in that: Applied to pet identification devices, including: Obtain a pre-recorded pet facial feature library; wherein the pre-recorded pet facial feature library includes pre-recorded pet facial features pre-stored for pre-recorded pets, each of the pre-recorded pet facial features is configured with a unique Face ID; Capturing images of a target pet and performing pet face detection on the captured images to obtain a facial image of the target pet; Calling a preset pet recognition model to perform feature extraction on the target pet facial image to obtain the target pet facial features; Comparing the facial features of the target pet with the facial features of the pre-recorded pet to obtain feature similarity information corresponding to the target pet and the pre-recorded pet; In response to the feature similarity information satisfying a preset identity authentication condition, the target pet is identified as the pre-recorded pet based on the FaceID corresponding to the pre-recorded pet.
2. The method according to claim 1, characterized in that Before calling the preset pet recognition model to extract features from the target pet's facial image to obtain the target pet's facial features, the method further includes: Performing an image quality detection on the target pet facial image to obtain a quality detection result corresponding to the target pet facial image; The calling of a preset pet recognition model to extract features of the target pet's facial image to obtain facial features of the target pet includes: In response to the quality detection result meeting the preset quality qualification condition, the pet recognition model is called to perform feature extraction on the target pet facial image to obtain the target pet facial features.
3. The method according to claim 2, characterized in that The performing of image quality detection on the target pet facial image to obtain a quality detection result corresponding to the target pet facial image includes: Performing brightness calculation on the target pet's facial image to obtain target brightness detection data; Calculating the sharpness of the target pet's facial image to obtain target sharpness detection data; When the target brightness detection data satisfies a preset brightness detection condition and the target sharpness detection data satisfies a preset sharpness detection condition, performing pet face relative angle calculation on the target pet face image to obtain pet face relative angle data; In response to the pet's facial relative angle data satisfying a preset facial relative angle detection condition, the quality detection result satisfying the quality qualification condition is obtained.
4. The method according to claim 1, wherein After identifying the target pet as the pre-recorded pet based on the Face ID corresponding to the pre-recorded pet, the method further includes: determining, based on the facial features of the target pet, current pet features of the pre-recorded pet in the current growth period; Based on the current pet features of the pre-recorded pet in the current growth period, the pre-recorded pet facial features matching the pre-recorded pet in the pre-recorded pet facial feature library are updated.
5. The method according to any one of claims 1 to 4, characterized in that The step of obtaining a pre-recorded pet facial feature library includes: Acquire at least two groups of pre-recorded pet facial images of the pre-recorded pet; wherein each group of the pre-recorded pet facial images corresponds to an image acquisition angle; For each group of the pre-recorded pet facial images, calling the pet recognition model to extract features from each of the pre-recorded pet facial images in turn to obtain a pre-recorded pet facial feature library; In response to completing feature extraction for each group of the pre-recorded pet facial images, at least two pre-recorded pet facial feature libraries of the pre-recorded pets are obtained; The step of collecting an image of a target pet and performing pet face detection on the collected image to obtain a facial image of the target pet includes: The target pet is imaged from at least two image acquisition angles to obtain a facial image of the target pet.
6. The method according to claim 1, characterized in that The pet recognition model is deployed in the pet recognition device. The pet face capture algorithm and the pet face recognition sub-model are encapsulated in the pet recognition model. The calling of the preset pet recognition model to extract features of the target pet face image to obtain the target pet face features includes: Invoking the pet face capture algorithm to capture the pet face region from the target pet face image; The pet facial recognition sub-model is used to perform pet facial recognition on the pet facial region to obtain the target pet facial features.
7. The method according to claim 1, characterized in that The pet recognition model is deployed on a cloud server, and the calling of the preset pet recognition model to extract features of the target pet's facial image to obtain the target pet's facial features includes: The target pet facial image is uploaded to the cloud server, and the target pet facial features are obtained by extracting features from the target pet facial image using the pet recognition model deployed on the cloud server.
8. A pet identification device, characterized in that: include: A feature library acquisition module is used to acquire a pre-recorded pet facial feature library, wherein the pre-recorded pet facial feature library contains pre-recorded pet facial features pre-stored for pre-recorded pets; An image acquisition module is used to acquire images of a target pet and perform pet face detection on the acquired images to obtain a facial image of the target pet; A feature extraction module is used to call a preset pet recognition model to extract features from the target pet's facial image to obtain facial features of the target pet; A feature comparison module is used to compare the facial features of the target pet with the pre-recorded pet facial feature library to obtain feature similarity information corresponding to the target pet and the pre-recorded pet; The identity recognition module is used to identify the target pet as the pre-recorded pet based on the Face ID corresponding to the pre-recorded pet in response to the feature similarity information satisfying a preset identity authentication condition.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and the processor implements the pet identification method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that The storage medium stores a program, and the program is executed by a processor to implement the pet identification method according to any one of claims 1 to 7.