Pet information display method, device, equipment and storage medium
By using nose print recognition to obtain information from pet facial images, this technology solves the problems of limited information and high maintenance costs in existing technologies, and enables efficient and personalized pet information display.
Patent Information
- Application Number
- CN202411630923.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-11-15
AI Technical Summary
In existing technologies, offline pet stores use QR codes or tags to display pet information, but the amount of information is limited and the maintenance cost is high.
By acquiring facial images of pets and performing nose print recognition, using a depth model to extract nose print features, pet information can be obtained and displayed, avoiding the use of QR codes or tags.
It reduces the maintenance cost of displaying pet information and enhances the user experience through personalized information display.
Smart Images

Figure CN119649400B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information display, and particularly relates to a pet information display method and device, equipment and a storage medium. BACKGROUND
[0002] At present, a pet store often uses a two-dimensional code or a simple label to introduce the information of a pet for sale. However, the area of the label is small, and detailed information cannot be recorded, so that the amount of information that a purchaser can obtain is low. Although the two-dimensional code can store a large amount of information, the two-dimensional code needs to be replaced once the corresponding pet is sold, and the maintenance cost is high. SUMMARY
[0003] The present application provides a pet information display method, device, equipment and storage medium, which can reduce the maintenance cost.
[0004] In a first aspect, a pet information display method provided by the present application includes the following steps.
[0005] Obtaining a face image of a target pet;
[0006] Performing noseprint recognition on the face image to obtain a noseprint feature of the target pet;
[0007] Obtaining pet information of the target pet based on the noseprint feature;
[0008] Displaying the pet information.
[0009] It can be seen that, in the method, the pet information is associated with the noseprint of the pet, so that a purchaser can directly obtain a face image of a target pet by shooting the face of the target pet, then perform noseprint recognition on the face image to obtain a noseprint feature of the target pet, and then obtain pet information corresponding to the target pet through the noseprint feature. Therefore, the pet information does not need to be displayed in the form of a label or a two-dimensional code, and the maintenance cost is reduced.
[0010] In combination with the first aspect, in a possible implementation manner, the face image includes a plurality of continuous face image frames, and based on this, the noseprint recognition on the face image to obtain the noseprint feature of the target pet includes the following steps.
[0011] Performing image segmentation on each face image frame to obtain a plurality of noseprint image frames, wherein the plurality of noseprint image frames correspond to the plurality of face image frames one by one;
[0012] input the plurality of noseprint image frames into a depth model to obtain a plurality of depth image frames, wherein the depth model is obtained by training an original model based on a luminance difference factor and a coordinate difference factor, and the plurality of depth image frames correspond to the plurality of noseprint image frames one by one;
[0013] obtain a noseprint feature of the nose of the target pet based on the plurality of depth image frames and a shooting parameter, wherein the shooting parameter is a parameter used when the face image is shot.
[0014] With reference to the first aspect, in a possible implementation manner, the depth model is obtained by the following training manner:
[0015] input a plurality of sample image frame sets and a plurality of sample shooting parameters into the original model to determine a first loss and a second loss, wherein each sample image frame set includes at least a first sample noseprint image and a second sample noseprint image, the first sample noseprint image is obtained earlier than the second sample noseprint image, the plurality of sample shooting parameters correspond to the plurality of sample image frame sets one by one, each sample shooting parameter is a parameter used when a sample noseprint image in a corresponding sample image frame set is shot, the first loss is used to represent a luminance difference between image frames, and the second loss is used to represent a coordinate difference between image frames.
[0016] determine a training loss based on the first loss and the second loss.
[0017] adjust model parameters of the original model based on the training loss to obtain the depth model.
[0018] With reference to the first aspect, in a possible implementation manner, the first loss is determined by the following manner:
[0019] for each sample image frame set, perform volume rendering based on the first sample noseprint image and a sample shooting parameter corresponding to the each sample image frame set to obtain a first reconstructed image corresponding to the each sample image frame set.
[0020] determine the first loss based on a luminance difference between the first sample noseprint image corresponding to each sample image frame set and the first reconstructed image corresponding to the each sample image frame set.
[0021] With reference to the first aspect, in a possible implementation manner, the second loss is determined by the following manner:
[0022] determine a first coordinate of a target pixel point in the first sample noseprint image, the target pixel point being any pixel point in the first sample noseprint image.
[0023] determine a second coordinate of the target pixel in the second sample noseprint image based on optical flow tracking;
[0024] determine the second loss based on a coordinate difference between the first coordinate and the second coordinate.
[0025] With reference to the first aspect, in a possible implementation, the obtaining of the noseprint feature of the nose of the target pet based on the plurality of depth image frames and the shooting parameter comprises:
[0026] obtaining depth information contained in each depth image frame;
[0027] generating point cloud data of the nose of the target pet based on the plurality of depth information and the shooting parameter, wherein the point cloud data comprises point cloud features of each pixel in each noseprint image frame in a three-dimensional space;
[0028] constructing a three-dimensional model of the nose of the target pet based on the point cloud data;
[0029] performing feature extraction on the three-dimensional model to obtain the noseprint feature of the nose of the target pet.
[0030] With reference to the first aspect, in a possible implementation, the displaying of the pet information comprises:
[0031] obtaining identity information and preference information of a user;
[0032] performing layout on the pet information based on the identity information and the preference information;
[0033] displaying the pet information after the layout.
[0034] A second aspect provides a pet information display device, and the pet information display device comprises:
[0035] an obtaining module configured to obtain a face image of a target pet;
[0036] an identifying module configured to perform noseprint identification on the face image to obtain a noseprint feature of the target pet;
[0037] the obtaining module is further configured to obtain pet information of the target pet based on the noseprint feature;
[0038] a display module configured to display the pet information.
[0039] A third aspect provides an electronic device, and the electronic device comprises a processor, a memory, and a computer program or instruction stored in the memory, wherein the processor executes the computer program or instruction to implement steps in the method designed in the first aspect.
[0040] A fourth aspect provides a computer readable storage medium for an embodiment of the present application, wherein the computer readable storage medium stores computer programs or instructions, and the computer programs or instructions are executed to implement the steps of the method of the first aspect. For example, the computer programs or instructions are executed by a processor.
[0041] A fifth aspect provides a computer program product for an embodiment of the present application, comprising computer programs or instructions, and the computer programs or instructions are executed to implement the steps of the method of the first aspect. For example, the computer programs or instructions are executed by a processor.
[0042] The beneficial effects brought by the technical solutions of the second aspect to the fifth aspect can refer to the technical effects brought by the technical solutions of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced. Obviously, the drawings in the following description only illustrate some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0044] Figure 1 is a schematic diagram of a pet information display system according to an embodiment of the present application;
[0045] Figure 2 is a schematic diagram of an application scenario of a pet information display method according to an embodiment of the present application;
[0046] Figure 3 is a terminal interface diagram of a pet information display method according to an embodiment of the present application;
[0047] Figure 4 is a flow diagram of a pet information display method according to an embodiment of the present application;
[0048] Figure 5 is a functional module composition block diagram of a pet information display device according to an embodiment of the present application;
[0049] Figure 6 is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0050] It should be understood that the terms "first", "second" and the like in the description and in the claims of the present application are used for distinguishing between similar objects and not necessarily for describing a specific sequential or chronological order. The terms "comprises", "comprising", "includes", "including" and the like are to be construed open- ended, meaning that they include the listed steps or elements, but not excluding other steps or elements. Similarly, the terms "comprises", "comprising", "includes", "including" and the like are to be construed open- ended, meaning that they include the listed steps or elements, but not excluding other steps or elements.
[0051] "Embodiments" in the present application means that a specific feature, structure or characteristic described in connection with an embodiment can be included in at least one embodiment of the present application. The appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily independent or alternative to other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0052] "and / or" in the present application describes the association relationship of the associated objects, which means that there can be three relationships.
[0053] In the present application, the symbol " / " can represent a "or" relationship between the associated objects.
[0054] In the present application, "at least one" or similar expressions mean any combination of the items, including any combination of single item or multiple items, which means one or more, and multiple means two or more.
[0055] In the present application, "higher than" can be expressed as the same concept as "greater than", "lower than" can be expressed as the same concept as "less than", "not lower than" can be expressed as the same concept as "greater than or equal to" or "greater than or equal to", "not higher than" can be expressed as the same concept as "less than or equal to" or "less than or equal to". In the present application, "equal to" can be used with "less than" or "greater than", but not with both "less than" and "greater than" for the same scheme. When "equal to" is used with "less than", it is applicable to the technical scheme adopted by "less than". When "equal to" is used with "greater than", it is applicable to the technical scheme adopted by "greater than".
[0056] In the present application, "of", "corresponding / relevant", "corresponding", "indicated", "associated" and the like can be used interchangeably with each other.
[0057] The terms "associated with", "corresponding to", "corresponding", "is", "of", "for", "as", "as", "as" in the embodiments of the present application can be used interchangeably with each other.
[0058] In the embodiments of the present application, "connection" refers to various connection modes such as direct connection or indirect connection to realize communication between devices, and no limitation is made.
[0059] In the embodiments of the present application, "network" can be expressed as the same concept as "system", and the communication system is the communication network.
[0060] The related content, concepts, meanings, technical problems, technical solutions and beneficial effects involved in the embodiments of the present application will be described below.
[0061] First, refer to Figure 1 , Figure 1 is a schematic diagram of a pet information display system proposed in the embodiments of the present application. As Figure 1 shown, the pet information display system can include a terminal device, an identification device and a database.
[0062] In the present embodiment, the user captures or scans the facial image of the target pet through the terminal device, and the terminal device sends the facial image to the server after capturing the facial image of the target pet. After the server obtains the facial image, the facial image is subjected to noseprint recognition to obtain the noseprint feature of the target pet. Then, the server matches in the database based on the noseprint feature to obtain the pet information associated with the noseprint feature. Finally, the server sends the obtained pet information back to the terminal device to display to the user through the terminal device.
[0063] It can be understood that Figure 1 the form and number of the terminal device, the identification device and the database shown in
[0064] In the embodiment, the terminal device and the identification device can be a device with a communication function, which can be referred to as a terminal, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), an access terminal device, a vehicle-mounted terminal device, an industrial control terminal device, a UE unit, a UE station, a mobile station, a remote station, a remote terminal device, a mobile device, a UE terminal device, a wireless communication device, a UE agent, or a UE apparatus, etc. The terminal device can be fixed or mobile. It should be noted that the terminal device and the identification device can support at least one wireless communication technology, such as LTE, new radio (NR), wideband code division multiple access (WCDMA), etc. For example, the terminal device and the identification device can be a mobile phone, a pad, a desktop computer, a notebook computer, an all-in-one machine, a vehicle-mounted terminal, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with a wireless communication function, a computing device or other processing device connected to a wireless modem, a wearable device, a terminal device in a future mobile communication network, or a terminal device in a future evolved public land mobile network (PLMN), etc. In some embodiments of the present application, the terminal device and the identification device can also be a device with a transceiver function, such as a chip system. The chip system can include a chip and can also include other discrete devices.
[0065] In this embodiment, the terminal device and the identification device can also be a server, for example, can be a standalone server, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms, and the like, which are not specifically limited in the present application.
[0066] In this embodiment, the database can also be a server, or a memory providing data storage services, for example, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, which are not specifically limited in the present application.
[0067] In this embodiment, the database can also be a storage unit integrated in the terminal device and / or the identification device, which is a component of the terminal device and / or the identification device.
[0068] Secondly, referring to Figure 2 , Figure 2 is a schematic diagram of an application scenario of a pet information display method according to an embodiment of the present application. As shown in Figure 2 , the user can install a corresponding APP in the terminal device, or call a corresponding mini-program to open the interface shown in Figure 3 (a) to take or scan the face of the target pet. During the taking or scanning process, some prompt words can be displayed on the interface according to the current taking situation of the terminal device, such as the interface shown in Figure 3 (b), and the user can perform corresponding operations through the prompt words to complete the acquisition of the face image of the target pet.
[0069] In this embodiment, after the terminal device obtains the face image of the target pet, the face image can be sent to the recognition device for recognition. In this process, the terminal device can display an interface as shown in (c) of FIG. 10 to inform the user that the recognition is in progress. After receiving the pet information returned by the recognition device, the terminal device can display the pet information of the target pet to the user, as shown in (d) of FIG. 10. Figure 3 Figure 3
[0070] Referring to Figure 4 , Figure 4 FIG. 11 is a flowchart of a pet information display method according to an embodiment of the present application. The method is applied to the pet information display system shown in FIG. 10 and can be implemented by the recognition device in the pet information display system. As shown in FIG. 11, the method includes the following steps. Figure 1 Figure 4
[0071] S401: Obtain a face image of a target pet.
[0072] In this embodiment, the face image can include a plurality of continuous face image frames. The plurality of face image frames can be a set of image frames corresponding to a video obtained by the terminal device. For example, the video can be a video obtained by the terminal device by real-time shooting of the face of the target pet, or the video can also be a historical video containing the face region of the target pet, such as a video sent to the user by a merchant. The present application does not limit this.
[0073] In this embodiment, the plurality of face image frames can be all image frames corresponding to the video, or can also be image frames corresponding to a partial segment of the video containing the face of the target pet. In other words, the plurality of face image frames can be a plurality of continuous image frames or a plurality of discontinuous image frames, and the present application does not limit this.
[0074] S402: Perform noseprint recognition on the face image to obtain a noseprint feature of the target pet.
[0075] In this embodiment, after obtaining the face image containing the plurality of face image frames, the terminal device can first perform image segmentation on each face image frame to segment the nose region of the target pet in each face image frame to obtain a plurality of noseprint image frames. The plurality of noseprint image frames correspond to the plurality of face image frames one by one, that is, after segmentation of each face image frame, a noseprint image frame corresponding to the face image frame is obtained.
[0076] In this embodiment, the edge of the nose part in the facial image frame can be determined by using a method such as edge detection, and then the nose part is segmented from the facial image frame. Of course, other image segmentation methods in the art can also be used to segment the facial image frame, and the embodiments of the present application are not limited thereto.
[0077] After obtaining the plurality of noseprint image frames, the plurality of noseprint image frames can be input into the depth model to obtain a plurality of depth image frames. The plurality of depth image frames correspond one-to-one to the plurality of noseprint image frames, that is, for each noseprint image frame, a depth image frame corresponding to the noseprint image frame is obtained after inputting the depth model.
[0078] In this embodiment, the depth model is obtained by training the original model based on the luminance difference factor and the coordinate difference factor.
[0079] Specifically, in the training process, a plurality of sample image frame sets and a plurality of sample shooting parameters are input into the original model to determine the first loss and the second loss. Each sample image frame set in the plurality of sample image frame sets includes at least a first sample noseprint image and a second sample noseprint image in sequence, and the first sample noseprint image is obtained before the second sample noseprint image. The plurality of sample image frame sets correspond one-to-one to the plurality of sample shooting parameters, that is, each sample image frame set corresponds to a sample shooting parameter, which is the parameter used when shooting the sample noseprint image in the corresponding sample image frame set, for example: shooting device parameters and shooting environment parameters.
[0080] In this embodiment, the first loss is used to represent the luminance difference between the image frames. Specifically, for each sample image frame set, the original model performs volume rendering based on the first sample noseprint image in the sample image set and the sample shooting parameter corresponding to the set to obtain the first reconstructed image corresponding to the sample image set. The first loss corresponding to the sample image set is determined based on the luminance difference between the first sample noseprint image corresponding to the sample image set and the first reconstructed image corresponding to the sample image set. Thus, for each sample image frame set, a first loss can be obtained, and then the first loss of this training can be determined based on the first loss of the sample image set.
[0081] For example, the first loss of the sample image set can be averaged to obtain the first loss of this training; or the first loss of the sample image set is weighted and summed based on the weight of each sample image set to obtain the first loss of this training; or the median of the first loss of the sample image set is obtained to obtain the first loss of this training, and the embodiments of the present application are not limited thereto.
[0082] In the embodiment, the second loss is used to represent the coordinate difference between image frames. Specifically, a first coordinate of a target pixel point in the first sample noseprint image can be determined, the target pixel point being any one pixel point in the first sample noseprint image. Then, a second coordinate of the target pixel point in the second sample noseprint image is determined based on optical flow tracking. Finally, the second loss corresponding to the sample image set to which the first sample noseprint image belongs is determined based on the coordinate difference between the first coordinate and the second coordinate.
[0083] For example, the determination of the first coordinate and the second coordinate for each pixel point in the first sample noseprint image can be performed, and then the first coordinate of each pixel point is formed into a first coordinate matrix and the second coordinate of each pixel point is formed into a second coordinate matrix based on the position of each pixel point in the first sample noseprint image. Thus, the second loss corresponding to the sample image set to which the first sample noseprint image belongs can be determined based on the coordinate difference between the first coordinate matrix and the second coordinate matrix.
[0084] Similarly, the second losses of the sample image sets can be averaged to obtain the second loss of the current training, or the second losses of the sample image sets can be weighted and summed based on the weight of each sample image set to obtain the second loss of the current training, or the median of the second losses of the sample image sets can be obtained to obtain the second loss of the current training, which is not limited in the embodiments of the present application.
[0085] In the embodiment, after the first loss and the second loss of the current training are determined, the training loss of the current training can be determined based on the first loss and the second loss. Specifically, the first loss and the second loss can be averaged to obtain the training loss of the current training, or the first loss and the second loss can be weighted and summed based on the weight of the first loss and the second loss to obtain the second loss of the current training, which is not limited in the embodiments of the present application.
[0086] Finally, the model parameters of the original model can be adjusted based on the training loss to obtain a deep model. In the embodiment, N times of iterative training can be performed, and after each training is completed, the model obtained by the current training is verified by a verification set. If the verification fails, the next iterative training is performed based on the current training, until a model that can pass the verification is trained as the final deep model.
[0087] In this embodiment, after obtaining a plurality of depth image frames through the depth model, the noseprint feature of the nose of the target pet can be obtained based on the plurality of depth image frames and the shooting parameters. Specifically, the shooting parameters are parameters used when shooting the facial image of the target pet. For example, if the facial image of the target pet is obtained by real-time shooting through a mobile phone, the shooting parameters can be the parameters of the camera when shooting through the mobile phone, such as aperture parameter, focal length, sensitivity, etc., and the parameters of the shooting environment, such as illumination parameter. Each depth image frame contains the depth information of the noseprint image frame corresponding to the depth image frame, and then based on the plurality of depth information and the shooting parameters, the point cloud data of the nose of the target pet can be generated, which includes the point cloud feature of each pixel point in each noseprint image frame in three-dimensional space. Thus, the nose of the target pet can be reconstructed through three-dimensional point cloud to obtain the three-dimensional model of the nose of the target pet. Finally, the three-dimensional model can be feature extracted to obtain the noseprint feature of the nose of the target pet.
[0088] S403: obtaining pet information of the target pet based on the noseprint feature.
[0089] In this embodiment, the pet information is associated with the noseprint feature of the pet after being edited and stored in the database. When the noseprint feature of the target pet is obtained, the pet information corresponding to the matched noseprint feature can be obtained by matching the noseprint feature of the target pet in the database based on the noseprint feature of the target pet. For example, the similarity between the noseprint feature of the target pet and each noseprint feature stored in the database can be calculated, and then the noseprint feature with the highest similarity can be matched.
[0090] S404: displaying the pet information.
[0091] In this embodiment, the pet information can be sent to the terminal device or the preset display device for display to the user. Before sending the pet information to the terminal device or the display device, the pet information can be laid out according to the personal information and preference information of the user, and then the laid-out pet information can be sent to the terminal device or the display device for display to the user to improve the user experience.
[0092] Specifically, the personal information of the user can include the age, gender, and the like of the user, which can be authorized by the user when registering or logging in to the corresponding APP on the terminal device. Through the personal information of the user, the group to which the user belongs can be determined, for example: a young female group, an old male group, and the like, and then the group portrait of the group can be obtained. Through the group portrait, the interested information of the group on pets can be obtained, which can represent which factors the group is more interested in. For example: the young female group is more interested in the appearance, personality, and the like of the pet; the old male group is more interested in the price, breed, and the like of the pet.
[0093] Then, the factors contained in the interested information determined by the personal information can be sorted and supplemented according to the preference information of the user. Specifically, the preference information of the user can represent the user's preference for certain factors of the pet, which can be determined by analyzing the historical data of the user when browsing pet information using the APP. Specifically, by determining the time length and number of times that the user browses each factor of the pet information, as well as the average browsing time length and number of times of the factor, the user's preference for the factor can be determined.
[0094] Therefore, through the preference information of the user, the factors determined by the personal information can be sorted, and the related information of the factors that the user is more interested in can be placed in the front, while the factors that are not determined by the personal information are supplemented. Then, the pet information is arranged according to the order of the arranged factors, and the arranged pet information is sent to the terminal device for display. It should be noted that the arrangement process can also be performed by the terminal device, that is, after the terminal device obtains the pet information sent by the recognition device, the personal information and preference information of the user are obtained to arrange the pet information, and then the user is displayed.
[0095] In summary, by associating the pet information with the noseprint of the pet, the buyer can directly obtain the facial image of the target pet by photographing the face of the target pet, and then perform noseprint recognition on the facial image to obtain the noseprint feature of the target pet, and then obtain the pet information corresponding to the noseprint feature. Therefore, it is not necessary to display the pet information in the form of a label or a two-dimensional code, which reduces the maintenance cost. When displaying the information, the pet information can be arranged in combination with the personal information and preference information of the user, so that the information that the user likes or pays attention to is preferentially displayed to the user, which improves the user experience.
[0096] The above mainly introduces the scheme of the embodiments of the present application from the method side. It can be understood that, in order to realize the above functions, the training device comprises hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the examples described in the embodiments disclosed herein, the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is realized in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0097] The embodiments of the present application can divide the functional units of the terminal device according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated in one functional module. The above integrated module can be realized in the form of hardware or in the form of a software program module. It should be noted that the division of the module in the embodiments of the present application is illustrative, and is only a logical functional division, and actual implementation can have another division manner.
[0098] In the case of using an integrated module, Figure 5 is a functional module composition block diagram of a pet information display device proposed by the embodiments of the present application. The pet information display device 500 comprises an acquisition module 501, an identification module 502 and a display module 503.
[0099] In the embodiments, the acquisition module 501, the identification module 502 and the display module 503 can be a module for receiving and processing signals, information, etc. or determining a monitoring mechanism, which is not specifically limited.
[0100] In the embodiments, the pet information display device 500 can further comprise a storage module for computer program codes or instructions executed by the pet information display device 500. The storage module can be a memory.
[0101] In the embodiments, the pet information display device 500 can be a chip or a chip module.
[0102] In the embodiments, the acquisition module 501, the identification module 502 and the display module 503 can be integrated in a communication module. The communication module can be a communication interface, a transceiver, a transceiver circuit, etc.
[0103] In the embodiments, the acquisition module 501, the identification module 502 and the display module 503 can be integrated in a processor.
[0104] It should be noted that the processor can be a baseband processor, a baseband chip, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in combination with the disclosure. The processing module can also be a combination of computing functions, such as one or more microprocessor combinations, combinations of DSP and microprocessor, etc.
[0105] In the embodiment, the pet information display device 500 is configured to perform any step or the like performed by a terminal device / chip / chip module or the like in the method embodiments described above.
[0106] In specific implementation, the acquisition module 501, the identification module 502 and the display module 503 are configured to perform any step in the method embodiments described above, and when performing actions such as sending, other modules can be optionally called to complete the corresponding operations. Details are described below.
[0107] The acquisition module 501 is configured to acquire a face image of a target pet.
[0108] The identification module 502 is configured to perform noseprint identification on the face image to obtain a noseprint feature of the target pet.
[0109] The acquisition module 501 is further configured to acquire pet information of the target pet based on the noseprint feature.
[0110] The display module 503 is configured to display the pet information.
[0111] In the embodiment, the face image includes a plurality of continuous face image frames, and in the noseprint identification on the face image to obtain the noseprint feature of the target pet, the identification module 502 is specifically configured to:
[0112] perform image segmentation on each face image frame to obtain a plurality of noseprint image frames, wherein the plurality of noseprint image frames correspond to the plurality of face image frames one by one.
[0113] input the plurality of noseprint image frames into a depth model to obtain a plurality of depth image frames, wherein the depth model is obtained by training an original model based on a luminance difference factor and a coordinate difference factor, and the plurality of depth image frames correspond to the plurality of noseprint image frames one by one;
[0114] obtain a noseprint feature of the nose of the target pet based on the plurality of depth image frames and a shooting parameter, wherein the shooting parameter is a parameter used when the face image is shot.
[0115] In this embodiment, the pet information display device 500 further comprises a training module (not shown) configured to train the depth model by the following training manner:
[0116] input a plurality of sample image frame sets and a plurality of sample shooting parameters into the original model to determine a first loss and a second loss, wherein each sample image frame set comprises at least a first sample noseprint image and a second sample noseprint image, the first sample noseprint image is obtained before the second sample noseprint image, the plurality of sample shooting parameters correspond to the plurality of sample image frame sets one by one, each sample shooting parameter is a parameter used when a sample noseprint image in the corresponding sample image frame set is shot, the first loss is used to represent a luminance difference between image frames, and the second loss is used to represent a coordinate difference between image frames.
[0117] determine a training loss based on the first loss and the second loss;
[0118] adjust model parameters of the original model based on the training loss to obtain the depth model.
[0119] In this embodiment, in terms of determining the first loss, the training module is specifically configured to:
[0120] for each sample image frame set, perform volume rendering based on the first sample noseprint image and a sample shooting parameter corresponding to the each sample image frame set to obtain a first reconstructed image corresponding to the each sample image frame set.
[0121] determine the first loss based on a luminance difference between the first sample noseprint image corresponding to the each sample image frame set and the first reconstructed image corresponding to the each sample image frame set.
[0122] In this embodiment, in terms of determining the second loss, the training module is specifically configured to:
[0123] determine a first coordinate of a target pixel point in the first sample noseprint image, the target pixel point being any pixel point in the first sample noseprint image.
[0124] determine a second coordinate of the target pixel in the second sample noseprint image based on optical flow tracking;
[0125] determine the second loss based on a coordinate difference between the first coordinate and the second coordinate.
[0126] In the embodiment, in the aspect of obtaining the noseprint feature of the nose of the target pet based on the plurality of depth image frames and the shooting parameter, the identification module 502 is specifically used for:
[0127] obtain depth information contained in each depth image frame;
[0128] generate point cloud data of the nose of the target pet based on the plurality of depth information and the shooting parameter, wherein the point cloud data comprises point cloud features of each pixel in each noseprint image frame in a three-dimensional space;
[0129] construct a three-dimensional model of the nose of the target pet based on the point cloud data;
[0130] perform feature extraction on the three-dimensional model to obtain the noseprint feature of the nose of the target pet.
[0131] In the embodiment, in the aspect of displaying the pet information, the display module 503 is specifically used for:
[0132] obtain identity information and preference information of a user;
[0133] format the pet information based on the identity information and the preference information;
[0134] display the formatted pet information.
[0135] Referring to Figure 6 , Figure 6 is a structural schematic diagram of an electronic device according to an embodiment of the present application. The electronic device 600 can include a processor 610, a memory 620, and a communication bus for connecting the processor 610 and the memory 620.
[0136] Optionally, the memory 620 includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a compact disc read-only memory (CD-ROM). The memory 620 is used to store program codes executed by the electronic device 600 and transmitted data.
[0137] In this embodiment, the electronic device 600 further includes a communication interface, which is configured to receive and send data.
[0138] In this embodiment, the processor 610 can be one or more CPUs, and in the case that the processor 610 is one CPU, the CPU can be a single-core CPU or a multi-core CPU.
[0139] In this embodiment, the processor 610 can be a baseband chip, a chip, a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.
[0140] In a specific implementation, the processor 610 in the electronic device 600 is configured to execute the computer program or the instruction 621 stored in the memory 620, and perform the following operations:
[0141] obtain a face image of a target pet;
[0142] perform noseprint recognition on the face image to obtain a noseprint feature of the target pet;
[0143] obtain pet information of the target pet based on the noseprint feature;
[0144] display the pet information.
[0145] It should be noted that, Figure 6 The specific implementation of each operation in the embodiments can be found in the description of the method embodiments shown above, and will not be described in detail here.
[0146] The embodiments of the present application also provide a computer readable storage medium storing computer programs or instructions, which are executed to implement the steps described in the above method embodiments.
[0147] The embodiments of the present application also provide a computer program product including computer programs or instructions, which are executed to implement the steps described in the above method embodiments.
[0148] It should be noted that, for the above-mentioned various embodiments, in order to simply describe, they are all expressed as a series of action combinations. Those skilled in the art should know that the present application is not limited to the order of the actions described, because some steps in the embodiments of the present application can be performed in other order or simultaneously. In addition, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions, steps, modules or units involved are not necessarily the necessary of the embodiments of the present application.
[0149] In the above-described embodiments, the description of each of the embodiments of the present application has its own focus, and parts not described in detail in a certain embodiment can be seen in relation to the relevant description of the other embodiments.
[0150] The steps of a method or algorithm described in connection with the present application embodiments can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in RAM, flash memory, ROM, EPROM, electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium can be integral to the processor. The processor and the storage medium can reside in an ASIC. Alternatively, the processor and the storage medium can be external to the ASIC. In addition, in some embodiments, the processor and the storage medium can be combined in one or more ASICs. The ASIC can reside in a user terminal or in a management device for managing the user terminal.
[0151] Those skilled in the art will recognize that the present application embodiments can be implemented in a form of a computer program product that can be implemented on one or more computers. The computer program product can include one or more computer instructions stored on a computer readable storage medium. The computer instructions can be executed by a computer to produce the processes or functions described in the present application embodiments. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a server, or a data center to another website, computer, server, or data center through a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium or a set of media that is accessible by a computer or a data storage device such as a server, data center, etc. that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
[0152] The various modules / units included in the various apparatuses and products described in the above embodiments can be software modules / units or hardware modules / units, or partially software modules / units and partially hardware modules / units. For example, for the various apparatuses and products applied to or integrated in a chip, the various modules / units included therein can all be implemented in the form of hardware such as circuitry, or at least some of the modules / units can be implemented in the form of a software program running on a processor integrated in the chip, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuitry; for the various apparatuses and products applied to or integrated in a chip module, the various modules / units included therein can all be implemented in the form of hardware such as circuitry, and different modules / units can be located in the same component (e.g., a chip, a circuit module, etc.) or different components of the chip module, or at least some of the modules / units can be implemented in the form of a software program running on a processor integrated in the chip module, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuitry; for the various apparatuses and products applied to or integrated in a terminal device, the various modules / units included therein can all be implemented in the form of hardware such as circuitry, and different modules / units can be located in the same component (e.g., a chip, a circuit module, etc.) or different components of the terminal device, or at least some of the modules / units can be implemented in the form of a software program running on a processor integrated in the terminal device, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuitry.
[0153] The above detailed description sets forth embodiments of the application and the purposes, technical solutions, and beneficial effects thereof. It should be understood that the above description is merely specific embodiments of the application and is not intended to limit the protection scope of the application, and any modifications, equivalent replacements, improvements, and the like made on the basis of the technical solutions of the embodiments of the application shall fall within the scope of protection of the application.
Claims
1. A method for displaying pet information, characterized in that, The method includes: Obtain the facial image of the target pet; The facial image is subjected to nose print recognition to obtain the nose print features of the target pet; Pet information of the target pet is obtained based on the nose print features; Display the pet information; The facial image comprises multiple consecutive facial image frames. The step of performing nose print recognition on the facial image to obtain the nose print features of the target pet includes: Each facial image frame is segmented to obtain multiple nasal texture image frames, wherein each of the multiple nasal texture image frames corresponds one-to-one with the multiple facial image frames; The multiple nasal print image frames are input into a depth model to obtain multiple depth image frames. The depth model is obtained by training the original model based on brightness difference factors and coordinate difference factors. The multiple depth image frames correspond one-to-one with the multiple nasal print image frames. Based on the multiple depth image frames and shooting parameters, the nasal texture features of the target pet's nose are obtained, wherein the shooting parameters are the parameters used when shooting the facial image; The deep model is obtained through the following training method: Multiple sample image frame sets and multiple sample shooting parameters are input into the original model to determine a first loss and a second loss. Each sample image frame set includes at least a consecutive first sample nasal print image and a second sample nasal print image, with the first sample nasal print image acquired before the second sample nasal print image. The multiple sample shooting parameters correspond one-to-one with the multiple sample image frame sets, and each sample shooting parameter is a parameter used when capturing the sample nasal print image in the corresponding sample image frame set. The first loss is determined by volume rendering based on the first sample nasal print image and the sample shooting parameters corresponding to each sample image frame set, and is used to represent the brightness difference between image frames. The second loss is determined based on the optical flow tracing result of the first sample nasal print image and the second sample nasal print image, and is used to represent the coordinate difference between image frames. Based on the first loss and the second loss, determine the training loss; Based on the training loss, the model parameters of the original model are adjusted to obtain the deep model.
2. The method according to claim 1, characterized in that, The first loss is determined, including: For each set of sample image frames, volume rendering is performed based on the first sample nasal print image and the sample shooting parameters corresponding to each set of sample image frames to obtain the first reconstructed image corresponding to each set of sample image frames. The first loss is determined based on the brightness difference between the first sample nasal print image corresponding to each set of sample image frames and the first reconstructed image corresponding to each set of sample image frames.
3. The method according to claim 2, characterized in that, The second loss is determined, including: Determine the first coordinates of the target pixel in the first sample nasal print image, wherein the target pixel is any pixel in the first sample nasal print image; The second coordinates of the target pixel in the second sample nasal print image are determined based on optical flow tracing. The second loss is determined based on the coordinate difference between the first coordinate and the second coordinate.
4. The method according to claim 1, characterized in that, The step of obtaining the nasal print features of the target pet's nose based on the multiple depth image frames and shooting parameters includes: Obtain the depth information contained in each depth image frame; Based on multiple depth information and the shooting parameters, point cloud data of the nose of the target pet is generated, wherein the point cloud data includes the point cloud features of each pixel in each nose print image frame in three-dimensional space. A three-dimensional model of the target pet's nose is constructed based on the point cloud data; Feature extraction is performed on the three-dimensional model to obtain the nasal print features of the target pet's nose.
5. The method according to any one of claims 1-4, characterized in that, The display of the pet information includes: Obtaining user identity and preference information; The pet information is formatted based on the identity information and the preference information; Display the formatted pet information.
6. A pet information display device, characterized in that, The device includes: The acquisition module is used to acquire facial images of the target pet; The recognition module is used to perform nose print recognition on the facial image to obtain the nose print features of the target pet; The acquisition module is also used to acquire pet information of the target pet based on the nose print feature; The display module is used to display the pet information; The facial image comprises multiple consecutive facial image frames. In the process of performing nose print recognition on the facial image to obtain the nose print features of the target pet, the recognition module is specifically used for: Each facial image frame is segmented to obtain multiple nasal texture image frames, wherein each of the multiple nasal texture image frames corresponds one-to-one with the multiple facial image frames; The multiple nasal print image frames are input into a depth model to obtain multiple depth image frames. The depth model is obtained by training the original model based on brightness difference factors and coordinate difference factors. The multiple depth image frames correspond one-to-one with the multiple nasal print image frames. Based on the multiple depth image frames and shooting parameters, the nasal texture features of the target pet's nose are obtained, wherein the shooting parameters are the parameters used when shooting the facial image; The deep model is obtained through the following training method: Multiple sample image frame sets and multiple sample shooting parameters are input into the original model to determine a first loss and a second loss. Each sample image frame set includes at least a consecutive first sample nasal print image and a second sample nasal print image, with the first sample nasal print image acquired before the second sample nasal print image. The multiple sample shooting parameters correspond one-to-one with the multiple sample image frame sets, and each sample shooting parameter is a parameter used when capturing the sample nasal print image in the corresponding sample image frame set. The first loss is determined by volume rendering based on the first sample nasal print image and the sample shooting parameters corresponding to each sample image frame set, and is used to represent the brightness difference between image frames. The second loss is determined based on the optical flow tracing result of the first sample nasal print image and the second sample nasal print image, and is used to represent the coordinate difference between image frames. Based on the first loss and the second loss, determine the training loss; Based on the training loss, the model parameters of the original model are adjusted to obtain the deep model.
7. An electronic device comprising a processor, a memory, and a computer program or instructions stored in the memory, characterized in that, The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program or instructions, which, when executed, perform the steps of the method according to any one of claims 1-5.
Citation Information
Patent Citations
Pet information display method and device, computer equipment and storage medium
CN115050046A
Financial data display method and device, storage medium and electronic equipment
CN116881353A