Method for performing identification of animal, and computer program
The method employs a deep distance learning model to identify animals using images of their backs, addressing the challenge of obtaining high-resolution facial images by calculating embedding vector distances, facilitating accurate identification of cows, pigs, dogs, and cats.
Patent Information
- Application Number
- JP2024021659
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-02-16
- Publication Date
- 2025-08-28
AI Technical Summary
Conventional animal identification methods require high-resolution facial images, which are difficult to obtain due to the movement of animals, especially in the case of cows and pigs, necessitating a technology that can perform individual identification using alternative features.
A method utilizing a deep distance learning model to acquire embedding vectors from images of the animal's back, calculating distances between these vectors and registered embedding vectors to determine individual identity.
Enables accurate individual identification of animals using images captured from their backs, overcoming the limitations of high-resolution facial image requirements and animal movement, with potential applications in cow, pig, dog, and cat identification.
Smart Images

Figure 2025125621000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a method and a computer program for identifying individuals of animals. [Background technology]
[0002] Patent Document 1 discloses a technology for matching cow muzzle print images. In this conventional technology, a muzzle print image is extracted from an image of the cow's face, a feature vector of the muzzle print image is obtained using a neural network for classifying muzzle print images, and the muzzle print image is matched by calculating the similarity between the feature vector and a known feature vector. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2022-48464 Summary of the Invention [Problem to be solved by the invention]
[0004] However, conventional techniques require high-resolution facial images that can identify the fine structure of a muzzle print, and there is a problem in that it is difficult to obtain such facial images. For example, it is difficult to stop the movement of a cow that is walking continuously in order to photograph it. This problem is not limited to cows, but is also common to the individual identification of other animals such as pigs. Therefore, there is a need for technology that can perform individual identification using features other than muzzle prints. [Means for solving the problem]
[0005] According to a first aspect of the present disclosure, there is provided a method for identifying an individual of an animal to be identified, the method including: (a) acquiring a target image of the back of the animal to be identified, (b) obtaining an embedding vector from the target image using a deep distance learning model, (c) calculating a distance between the registered embedding vector and the embedding vector using registration data including registered embedding vectors previously generated for each of a plurality of registered individuals, and (d) determining which of the plurality of registered individuals the animal to be identified is, using the distance.
[0006] According to a second aspect of the present disclosure, there is provided a computer program for causing a processor to execute a process for identifying an individual of an animal to be identified. The computer program causes the processor to execute the following processes: (a) acquiring a target image of the back of the animal to be identified, (b) obtaining an embedding vector from the target image using a deep distance learning model, (c) calculating a distance between a registered embedding vector and an embedding vector using registration data including registered embedding vectors previously generated for each of a plurality of registered individuals, and (d) determining which of the plurality of registered individuals the animal to be identified is, using the distance. [Brief explanation of the drawings]
[0007] [Figure 1] FIG. 1 is a block diagram showing the configuration of an individual identification system. [Figure 2] 1 is a flowchart showing the steps for training a deep metric learning model and creating enrollment data. [Figure 3] 10 is a flowchart showing the detailed procedure of step S10. [Figure 4] FIG. 4 is an explanatory diagram showing the contents of the target image generation process in step S10. [Figure 5] 4 is a flowchart showing the procedure of an individual identification process in the first embodiment. [Figure 6] 10 is a flowchart showing the detailed procedure of step S140 in the first embodiment. [Figure 7] FIG. 4 is an explanatory diagram showing the processing content of step S140 in the first embodiment. [Figure 8] 10 is a flowchart showing the procedure of a registration update process. [Figure 9] 10 is a flowchart showing the detailed procedure of step S140 in the second embodiment. [Figure 10] FIG. 10 is an explanatory diagram showing the processing content of step S140 in the second embodiment. [Figure 11] 10 is a flowchart showing the procedure of an individual identification process in the third embodiment. [Figure 12] FIG. 11 is an explanatory diagram showing the details of distance calculation in the third embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0008] A. First embodiment: 1 is an explanatory diagram showing the configuration of an individual identification system in a first embodiment. This individual identification system includes an information processing device 300 and a camera 400. In this embodiment, the subject of individual identification processing is a cow CW. However, other animals such as pigs, dogs, and cats may be processed instead of cows.
[0009] The camera 400 is used to capture images of the cow CW, which is the subject of the individual identification process. The camera 400 is installed so as to capture an image of the back of the cow CW from above the cow CW. As the camera 400, a video camera that captures moving images, or a still image camera that captures still images, may be used. The camera 400 is preferably a depth camera that captures depth images. However, a camera that captures RGB images instead of depth images may also be used. In this embodiment, a camera 400 that captures depth images is used to capture a moving image of the back of the cow CW. Depth images are less susceptible to the effects of lighting conditions and dirt than RGB images, and are therefore preferable in that they allow for more accurate individual identification of the cow CW.
[0010] The information processing device 300 performs individual identification of the cow CW using an image of the back of the cow CW captured by the camera 400. The information processing device 300 has a processor 310, a memory 320, an interface circuit 330, and an input device 340 and a display device 350 connected to the interface circuit 330. The camera 400 is also connected to the interface circuit 330. The processor 310 not only has the function of executing the processes described in detail below, but also has the function of displaying data obtained by the processes and data generated in the process of the processes on the display device 350. The information processing device 300 can be realized by a computer such as a personal computer.
[0011] The processor 310 has the functions of a target image acquisition unit 510, a learning unit 520, and an individual identification unit 530. The target image acquisition unit 510 acquires multiple target images from the rear image captured by the camera 400. The learning unit 520 performs metric learning for the deep metric learning model 620. The individual identification unit 530 performs individual identification of the cow CW using the trained deep metric learning model 620. The functions of each of these units are realized by the processor 310 executing a computer program stored in the memory 320. However, some of these functions may be realized by hardware circuits. The term "processor" in the present disclosure also includes such hardware circuits. Furthermore, one or more processors that perform various processes may be processors included in one or more remote computers connected via a network.
[0012] The memory 320 stores an object recognition model 610, a deep metric learning model 620, and enrollment data 630. The object recognition model 610 is a machine learning model that receives an image of a cow CW as input and outputs a plurality of key points that are shape feature points of the cow CW. In this embodiment, it is assumed that the object recognition model 610 has already been trained. The object recognition model 610 can also be called a "feature recognition model."
[0013] The deep metric learning model 620 is a machine learning model that takes an image of a cow CW as input and outputs an embedding vector. The embedding vector is also called a "feature vector." The deep metric learning model 620 can be configured using, for example, FaceNet.
[0014] The registered data 630 is a database in which, for each of a plurality of registered individuals, the individual ID of the cow CW and a plurality of embedding vectors obtained using the deep metric learning model 620 are registered. The embedding vectors registered in the registered data 630 are called "registered embedding vectors."
[0015] 2 is a flowchart showing the procedure for training the deep metric learning model 620 and creating the registration data 630. In the following explanation, it is assumed that n registration target cattle are registered in the registration data 630, where n is an integer equal to or greater than 2. In this embodiment, the n registration target cattle are of the same breed.
[0016] In step S10, the target image acquisition unit 510 acquires multiple target images of the back of each of n registered target cows and k training target cows. Here, n and k are integers equal to or greater than 2. The "training target cow" refers to the cow used to create the training data for the deep metric learning model 620. In deep metric learning, from the viewpoint of robustness, it is desirable to train the neural network using training data different from the registered data 630. It is also desirable to create training data that includes more data than the registered data 630. Therefore, it is preferable to set k to a number greater than n. However, some of the training target cows may include registered target cows. Alternatively, n = k, and the same cow may be used as both the training target cow and the registered target cow. The number of target images acquired from each cow may be set to a constant value N, or may be set to a different number for each individual cow. Here, N is an integer equal to or greater than 1, but is preferably equal to or greater than 2. For example, it is preferable to set N to a value in the range of 5 to 30.
[0017] Fig. 3 is a flowchart showing the detailed procedure of step S10, and Fig. 4 is an explanatory diagram showing the processing content thereof. Some of the step numbers of Fig. 3 are assigned to Fig. 4.
[0018] In step S11, the target image acquisition unit 510 uses the camera 400 to capture multiple rear images BG of the rear of each individual cow. This capture can be performed, for example, as each cow passes sequentially below the camera 400. If a video is captured, multiple frame images are selected from the video as the rear images BG. This selection can be performed, for example, by using an annotation tool to automatically select frame images that include the rear part of the cow to be registered. Alternatively, the selection can be performed manually by an operator.
[0019] The rear image BG shown in Figure 4 includes the rear part of the cow CW, including the hip angle and the base of the tail. Because the shape of the rear part of an individual cow CW is characteristic, it is preferable that the rear image BG include the rear part of the cow CW, including the hip angle and the base of the tail.
[0020] In step S12, the target image acquisition unit 510 selects one cow as the processing target from among the n registered target cows and the k training target cows. In step S13, the target image acquisition unit 510 selects one back image BG as the processing target from among the multiple back images BG. In step S14, the target image acquisition unit 510 performs a gradation conversion process on the back image BG to create a feature detection image CG. This gradation conversion process extracts a gradation range from all the gradations in the back image BG that makes it easy to detect the cow's contour and converts it into an image with a predetermined number of gradations. For example, if the back image BG, which is a depth image, has 2400 gradations, the feature detection image CG may be created by extracting 512 intermediate gradations and compressing them to 256 gradations. However, step S14 can be omitted.
[0021] In step S15, the target image acquisition unit 510 detects multiple key points from the feature detection image CG using the object recognition model 610. In the example of FIG. 4, two key points KP1 and KP2 are detected at the positions of the cow CW's hip angles, and one key point KP3 is detected at the base of the tail. These key points KP1 to KP3 are feature points present on the outline of the cow CW. The object recognition model 610 is a machine learning model that receives the feature detection image CG as input and outputs multiple key points KP1 to KP3. However, the object recognition model 610 may be configured to recognize key points indicating other positions. The object recognition model 610 can be configured using, for example, deep learning models such as DeepLabCut and ResNet. The object recognition model 610 may also be configured using other machine learning models.
[0022] In step S16, the target image acquisition unit 510 determines whether a predetermined number of key points KP1-KP3 have been detected. If the predetermined number of key points KP1-KP3 have not been detected, the process returns to step S13, a new back image BG is selected as the processing target, and the processes from step S14 onward are executed again. If the predetermined number of key points KP1-KP3 have been detected, the process proceeds to step S17.
[0023] In step S17, the target image acquisition unit 510 cuts out a target image TG from the back image BG using multiple key points KP1 to KP3 as references. The target image TG is an image containing characteristic parts of the back of the cow. In the example of FIG. 4, the back image BG shows a state in which a cutout frame CF is set based on the key points KP1 to KP3, and a target image TG cut out in accordance with the cutout frame CF. At this time, it is preferable to rotate and resize the target image TG so that the direction and size of the hip angle of the cow CW in the target image TG are set to desired values. In addition, the pixel values of the target image TG may be normalized. This normalization is, for example, a process of normalizing the pixel value of the minimum depth value to 1.0 and the pixel value of the maximum depth value to 0, and further converting pixel values in the range of 0 to 1.0 to a gradation of 0 to 255. Note that steps S14 to S17 may be omitted, and the back image BG may be used as the target image TG as is.
[0024] In step S18, the target image acquisition unit 510 determines whether or not N target images TG have been created for one cow. If N target images TG have not been created, the process returns to step S13, a new back image BG is selected as the processing target, and the processes from step S14 onward are executed again. If N target images TG have been created, the process proceeds to step S19.
[0025] In step S19, the target image acquisition unit 510 determines whether processing has been completed for all of the n registration target cows and k learning target cows. If processing has not been completed for all cows, the process returns to step S12, a new cow is selected as the processing target, and the processing from step S13 onwards is executed again. If processing has been completed for all cows, the processing of step S10 ends.
[0026] In step S20 of FIG. 2, the learning unit 520 creates distance learning data for deep distance learning by associating the N target images TG acquired for each training target cow with individual IDs. In step S30, the learning unit 520 uses the distance learning data to perform distance learning for the deep distance learning model 620. This distance learning is a process of adjusting the internal parameters of the deep distance learning model 620 for the embedding vectors output from the deep distance learning model 620 so that the distance between the same individual is close and the distance between different individuals is long. As the distance between the embedding vectors, for example, the Euclidean distance between vectors or the angle between the vectors may be used.
[0027] In step S40, the learning unit 520 sequentially inputs N target images TG for each registered target cow into the trained deep metric learning model 620 and finds an embedding vector for each target image TG. As a result, N embedding vectors are obtained for each registered target cow. In step S50, the learning unit 520 creates registration data 630 by associating the N embedding vectors with individual IDs for each of the n registered target cows.
[0028] By performing the learning process shown in Figure 2, a trained deep metric learning model 620 and registration data 630 for n target cattle are obtained. In the following description, the target cattle are referred to as "registered individuals." The embedding vectors registered in the registration data 630 are referred to as "registered embedding vectors."
[0029] 5 is a flowchart showing the procedure of the individual identification process. The individual identification process is preferably carried out periodically, for example, with all cattle raised in the same breeding farm as cattle to be identified.
[0030] In step S110, the individual identification unit 530 acquires N1 target images TG of the back of one cattle to be identified. Here, N1 is an integer greater than or equal to 1. The value of N1 may be set equal to or different from the number of registered embedding vectors for each registered individual in the registration data 630. Furthermore, N1 may not be a preset value, but may be the number of target images TG that have been acquired at that time for the cattle to be identified. In the following description, the number of registered embedding vectors for each registered individual is referred to as "N2" to distinguish it from the number N1 of target images TG of the cattle to be identified. N1 and N2 are each integers greater than or equal to 1. However, it is preferable that N1 and N2 are each greater than or equal to 2. The specific processing content of step S110 is the same as the method of creating target images TG for registered cattle described in Figures 3 and 4.
[0031] In step S120, the individual identification unit 530 obtains an embedding vector for each target image TG using the trained deep metric learning model 620. Since there are N1 target images TG, N1 embedding vectors are obtained.
[0032] In step S130, the individual identification unit 530 calculates the distances between the N1 embedding vectors and the N2 registered embedding vectors for each registered individual. As a result, N1 × N2 distances are calculated for each registered individual. Since there are n registered individuals, n × N1 × N2 distances are calculated overall for one cattle to be identified.
[0033] In step S140, the individual identification unit 530 determines the individual ID of the cattle to be identified from the calculated distance.
[0034] FIG. 6 is a flowchart showing the detailed procedure of step S140 in the first embodiment. In step S141, the individual identification unit 530 selects M distances from the N1×N2 distances calculated for each registered individual, in ascending order of distance. Here, M is an integer greater than or equal to 2 and less than N1×N2. The value of M may be set directly by the user, or the value of M may be substantially set by specifying the ratio of M to N1×N2. When M is 2 or greater, it is preferable to set the integers N1 and N2 so that N1×N2 is 3 or greater. When N1×N2=1, only one distance is calculated for each registered individual, and therefore step S141 can be omitted.
[0035] FIG. 7 is an explanatory diagram showing the processing content of step S140 in the first embodiment. Here, an example is shown in which n=3, N1=1, N2=10, and M=3 in the embedding vector space. ID1 to ID3 are individual IDs for three registered individuals, and the circles included in the area surrounded by dashed lines indicate the position of the registered embedding vector Vr for each registered individual. Furthermore, the rectangles indicate the position of the embedding vector Vt obtained for the cattle to be identified. The hatched circles indicate M registered embedding vectors Vr with smallest distances from the embedding vector Vt of the cattle to be identified. In this example, M=3, so the three smallest distances are selected for each registered individual.
[0036] In step S142, the individual identification unit 530 calculates the average value of M distances for each of the n registered individuals. In step S143, the individual identification unit 530 determines that the registered individual with the smallest average distance is the individual of the cattle to be identified. As a result, the individual ID of that registered individual is determined to be the individual ID of the cattle to be identified. In the example of Figure 7, the average distance value for the registered individual with ID3 is smallest, so the individual ID of the cattle to be identified is determined to be ID3.
[0037] According to the processes of FIGS. 6 and 7 described above, the individual cattle to be identified can be identified from the average value of the smallest M distances among the N1×N2 distances relating to the individual registered cattle.
[0038] 8 is a flowchart showing the procedure of the registration update process. This registration update process is preferably executed periodically, for example, once a day.
[0039] In step S210, the individual identification unit 530 updates the registration data 630 using the embedding vectors Vt obtained for the cattle to be identified in the process of Figure 6. For example, if N1 = N2 = N, that is, if the number N1 of embedding vectors Vt obtained for the cattle to be identified is equal to the number N2 of registered embedding vectors Vr for each registered individual in the registration data 630, the registration data 630 may be updated so that the N registered embedding vectors Vr are replaced with N new embedding vectors Vt. Alternatively, the registration data 630 may be updated so that the N1 embedded vectors Vt obtained for the cattle to be identified are added without discarding the old registered embedding vectors Vr.
[0040] Furthermore, when the number N2 of registered embedding vectors Vr is equal to q×N1, where q is an integer greater than or equal to 2, the registered data 630 may be updated by discarding the oldest N1 registered embedding vectors Vr and adding the newly obtained N1 embedding vectors Vt for the cattle to be identified. In this way, the registered data 630 can be updated to always include the most recent q×N1 registered embedding vectors Vr. Also, instead of updating the registered data 630 by adding the same number of registered embedding vectors Vr each time, the registered data 630 may be updated by adding a different number of registered embedding vectors Vr each time. In other words, the number of registrations may be counted, and the registered data 630 may be updated to always include q registered embedding vectors Vr.
[0041] In step S220, the individual identification unit 530 determines whether or not a newly registered individual exists. A newly registered individual is an individual that has not yet been registered in the registration data 630. Whether or not a newly registered individual exists is specified by the user. Alternatively, it may be automatically determined that a newly registered individual exists if the minimum value of the distances calculated for the cattle to be identified is equal to or greater than a predetermined threshold. At this time, the individual ID of the newly registered individual may be input by the user. That is, the individual identification unit 530 may notify the user that a new individual will be registered and prompt them to input the individual ID. If a newly registered individual does not exist, the process proceeds to step S240, which will be described later. On the other hand, if a newly registered individual exists, the process proceeds to step S230, where the individual identification unit 530 calculates N embedding vectors for the newly registered individual, associates them with the individual IDs, and registers them in the registration data 630. Here, N may be a value equal to N1, the number of embedding vectors Vt for the cattle to be identified used in step S210, or N2, the number of registered embedding vectors Vr for each registered individual in the registered data 630. The processing in step S230 is almost the same as the processing in steps S10, S40, and S50 in Figure 2 described above.
[0042] In step S240, the individual identification unit 530 determines whether or not there is an individual that should be deleted from the registration data 630. Whether or not there is an individual that should be deleted is specified by the user. If there is no individual that should be deleted, the processing of FIG. 8 ends. On the other hand, if there is an individual that should be deleted, the processing proceeds to step S250, where the individual identification unit 530 deletes the data of that individual from the registration data 630. By performing the processing of FIG. 8, it is possible to keep the registration data 630 up to date.
[0043] According to the first embodiment described above, the deep distance learning model 620 can be used to obtain an embedding vector Vt from the target image TG relating to the back of the cow to be identified, and the individual can be identified using the distance between this embedding vector Vt and the registered embedding vector Vr.
[0044] B. Second embodiment: Fig. 9 is a flowchart showing the detailed procedure of step S140 in the second embodiment. The configuration of the device in the second embodiment and the processing contents in Figs. 2, 3, 5, and 8 are the same as those in the first embodiment. The only difference between the second embodiment and the first embodiment is the detailed procedure of step S140 in Fig. 5.
[0045] 9, the individual identification unit 530 selects M distances in ascending order from the n×N1×N2 distances calculated for the n registered individuals. Here, M is an integer greater than or equal to 2 and less than n×N1×N2. In this case, it is preferable to set the integers n, N1, and N2 so that n×N1×N2 is greater than or equal to 3.
[0046] Figure 10 shows the processing content of step S140 in the second embodiment, showing an example where n = 3, N1 = 1, N2 = 10, and M = 3. The rectangle indicates the position of the embedding vector Vt obtained for the cattle to be identified, and the hatched circles indicate the M registered embedding vectors Vr that are close to the embedding vector Vt of the cattle to be identified. In this example, M = 3, so the three smallest distances are selected from the n × N1 × N2 distances.
[0047] In step S145, the individual identification unit 530 identifies M registered embedding vectors Vr corresponding to the M distances and their registered individuals. In the example of Fig. 10, the individual ID for two registered embedding vectors Vr corresponding to two distances is ID3, and the individual ID for one registered embedding vector Vr corresponding to one distance is ID2.
[0048] In step S146, the individual identification unit 530 determines that the registered individual with the largest number of associations with the M registered embedding vectors Vr is the individual of the cattle to be identified. In the example of Figure 10, the registered individual with the individual ID ID3 is determined to be the individual of the cattle to be identified.
[0049] The second embodiment also has substantially the same effects as the first embodiment. Furthermore, according to the processes in Figures 9 and 10 described above, the individual cattle to be identified can be identified using the smallest M distances among the n × N1 × N2 distances related to the n registered individuals.
[0050] C. Third embodiment: Fig. 11 is a flowchart showing the procedure of individual identification processing in the third embodiment. The configuration of the device of the third embodiment and the processing contents of Fig. 2 and Fig. 3 are the same as those of the first embodiment. In the processing procedure of Fig. 11, steps S130 and S140 of Fig. 5 are replaced with steps S130a and S140a, and the other steps are the same as those of the first embodiment.
[0051] In step S130a of Fig. 11, the individual identification unit 530 calculates N1 distances between the N1 embedding vectors obtained for the cattle to be identified and the average registered embedding vector for each registered individual. The "average registered embedding vector" is the average vector of the registered embedding vectors Vr of each registered individual registered in the registration data 630.
[0052] Figure 12 shows the details of distance calculation in the third embodiment. Diamonds indicate the average registered embedding vector Vrave for each registered individual. The average registered embedding vector Vrave can be calculated in advance before executing step S140a. Since N1 embedding vectors are obtained for the cattle to be identified, n × N1 distances are calculated for the n registered individuals in step S140a.
[0053] In step S140a, the individual identification unit 530 determines the individual ID of the cattle to be identified from the calculated n × N1 distances. Specifically, for example, the registered individual showing the smallest value of the n × N1 distances can be determined to be the individual cattle to be identified. According to this identification method, the number of distance calculations is less than in the first and second embodiments, and therefore processing can be speeded up.
[0054] Instead of determining that the registered individual with the smallest value among the n × N1 distances is the cattle to be identified, the cattle may be identified according to the procedure of step S140 in the first embodiment shown in Figure 6. That is, M distances may be selected in ascending order from the N1 distances calculated for each registered individual, the average value of the M distances for each registered individual may be calculated, and the registered individual with the smallest average distance may be determined to be the cattle to be identified. In this case, M is an integer less than N1.
[0055] Alternatively, the individual may be identified according to the procedure of step S140 in the second embodiment shown in Figure 9. That is, M distances are selected in ascending order from the n x N1 distances calculated for the n registered individuals, M average registered embedding vectors corresponding to the M distances and their registered individuals are identified, and the registered individual with the greatest number of associations with the M average registered embedding vectors is identified as the individual of the cattle to be identified. In this case, M is an integer less than n x N1.
[0056] The third embodiment also provides substantially the same effects as the first embodiment. Furthermore, according to the processes of Figures 11 and 12 described above, the number of distance calculations is reduced, so that the processing speed can be increased.
[0057] Other forms: The present disclosure is not limited to the above-described embodiments and can be realized in various forms without departing from the spirit thereof. For example, the present disclosure can also be realized in the following aspects. The technical features in the above embodiments corresponding to the technical features in each aspect described below can be appropriately replaced or combined to solve some or all of the problems of the present disclosure or to achieve some or all of the effects of the present disclosure. Furthermore, if a technical feature is not described as essential in this specification, it can be appropriately deleted.
[0058] (1) According to a first aspect of the present disclosure, there is provided a method for identifying an individual of an animal to be identified, the method including: (a) acquiring a target image of the back of the animal to be identified, (b) using a deep distance learning model to obtain an embedding vector from the target image, (c) using registration data including registered embedding vectors previously generated for each of a plurality of registered individuals, calculating a distance between the registered embedding vector and the embedding vector, and (d) using the distance to determine which of the plurality of registered individuals the animal to be identified is. According to this method, a deep distance learning model can be used to obtain an embedding vector from a target image of the back of the animal to be identified, and the individual can be identified using the distance between this embedding vector and the registered embedding vector.
[0059] (2) In the above method, the step (a) may include: (a1) acquiring a rear image of the rear surface of the animal to be identified; (a2) detecting a plurality of key points from the rear image using an object recognition model; and (a3) generating the target image by extracting characteristic portions of the rear surface from the rear image based on the positions of the plurality of key points. This method allows for the acquisition of an image of the target that includes the backside features.
[0060] (3) In the above method, when N1 and N2 are each an integer greater than or equal to 1, step (b) may include a step of determining N1 embedding vectors for the N1 target images, step (c) may include a step of calculating N1×N2 distances between the N2 registered embedding vectors for each of the plurality of registered individuals and the N1 embedding vectors, and step (d) may include a step of determining which of the plurality of registered individuals the animal to be identified is from the N1×N2 distances for each of the plurality of registered individuals. According to this method, it is possible to determine which of a plurality of registered individuals the animal to be identified is, using the N1×N2 distances for each of a plurality of registered individuals.
[0061] (4) In the above method, when M is an integer greater than or equal to 2 and less than N1 × N2, step (d) may include: (d1) calculating the average value of M distances selected from the N1 × N2 distances in order of smallest to largest for each of the plurality of registered individuals; and (d2) determining that the registered individual with the smallest average value among the plurality of registered individuals is the individual of the animal to be identified. According to this method, the individual animal to be identified can be determined from the average value of the smallest M distances among the N1×N2 distances for each registered individual.
[0062] (5) In the above method, when n is the number of the registered individuals and M is an integer greater than or equal to 2 and less than n×N1×N2, step (d) may include: (d1) selecting M distances from the n×N1×N2 distances obtained for the n registered individuals in order of smallest to largest; (d2) identifying M registered embedding vectors corresponding to the M distances and identifying the registered individuals associated with each of the M registered embedding vectors; and (d3) determining that the registered individual among the n registered individuals that has the largest number of associations with the M registered embedding vectors is an individual of the animal to be identified. According to this method, the individual animals to be identified can be identified using the smallest M distances among the n×N1×N2 distances relating to the n registered individuals.
[0063] (6) In the above method, when N1 is an integer greater than or equal to 1, step (b) may include a step of determining N1 embedding vectors for the N1 target images, step (c) may include a step of calculating N1 distances between an average registered embedding vector, which is the average of the registered embedding vectors for each of the registered individuals, and the N1 embedding vectors, and step (d) may include a step of determining which of the registered individuals the animal to be identified is from the N1 distances for each of the registered individuals. This method reduces the number of distance calculations required, thereby speeding up processing.
[0064] (7) According to a second aspect of the present disclosure, there is provided a computer program for causing a processor to execute a process for identifying an individual of an animal to be identified. The computer program causes the processor to execute the following processes: (a) acquiring a target image of the back side of the animal to be identified, (b) using a deep distance learning model to obtain an embedding vector from the target image, (c) using registration data including registered embedding vectors previously generated for each of a plurality of registered individuals, calculating a distance between the registered embedding vector and the embedding vector, and (d) using the distance to determine which of the plurality of registered individuals the animal to be identified is.
[0065] The present disclosure may be realized in various forms other than those described above, such as a device that performs individual identification processing, a non-transitory storage medium that stores a computer program, or the like. [Explanation of symbols]
[0066] 300...information processing device, 310...processor, 320...memory, 330...interface circuit, 340...input device, 350...display device, 400...camera, 510...target image acquisition unit, 520...learning unit, 530...individual identification unit, 610...object recognition model, 620...deep metric learning model, 630...registered data
Claims
1. A method for identifying an individual animal to be identified, comprising: (a) acquiring a target image of the rear surface of the animal to be identified; (b) determining an embedding vector from the target image using a deep metric learning model; (c) calculating a distance between the registered embedding vector and the embedding vector using registered data including a registered embedding vector previously generated for each of a plurality of registered individuals; (d) determining which of the plurality of registered individuals the animal to be identified is based on the distance; A method comprising:
2. 10. The method of claim 1, The step (a) (a1) acquiring a dorsal image of the dorsal surface of the animal to be identified; (a2) detecting a plurality of key points from the back image using an object recognition model; (a3) generating the target image by extracting a characteristic portion of the back surface from the back surface image based on the positions of the plurality of key points; A method comprising:
3. 10. The method of claim 1, When N1 and N2 are integers of 1 or more, The step (b) includes a step of obtaining N1 embedding vectors for the N1 target images; The step (c) includes a step of calculating N1×N2 distances between the N2 registered embedding vectors for each of the plurality of registered individuals and the N1 embedding vectors; The step (d) includes a step of determining which of the plurality of registered individuals the animal to be identified is from the N1 × N2 distances for each of the plurality of registered individuals. method.
4. 4. The method of claim 3, When M is an integer equal to or greater than 2 and less than N1 x N2, The step (d) (d1) calculating an average value of M distances selected in ascending order from the N1×N2 distances for each of the plurality of registered individuals; (d2) determining that the registered individual having the smallest average value among the plurality of registered individuals is the individual of the animal to be identified; A method comprising:
5. 4. The method of claim 3, When n is the number of the plurality of registered individuals and M is an integer equal to or greater than 2 and less than n × N1 × N2, The step (d) (d1) selecting M distances from the n×N1×N2 distances obtained for the n registered individuals in ascending order; (d2) identifying M registered embedding vectors corresponding to the M distances and identifying the registered individuals associated with each of the M registered embedding vectors; (d3) determining that the registered individual having the largest number of correspondences with the M registered embedding vectors among the n registered individuals is an individual of the animal to be identified; A method comprising:
6. 10. The method of claim 1, When N1 is an integer of 1 or more, The step (b) includes a step of obtaining N1 embedding vectors for the N1 target images; The step (c) includes a step of calculating N1 distances between an average registered embedding vector, which is an average of the registered embedding vectors for each of the registered individuals, and the N1 embedding vectors; The step (d) includes a step of determining which of the plurality of registered individuals the animal to be identified is from the N1 distances for each of the plurality of registered individuals. method.
7. A computer program that causes a processor to execute a process for identifying an individual animal to be identified, (a) acquiring a target image of the back of the animal to be identified; (b) calculating an embedding vector from the target image using a deep metric learning model; (c) calculating a distance between a plurality of registered embedding vectors and the embedding vectors using registered data including the registered embedding vectors generated in advance for each of the plurality of registered individuals; (d) determining which of the plurality of registered individuals the animal to be identified is, using the distance; A computer program that causes the processor to execute the above.
Citation Information
Patent Citations
Nose print collation device, method and program
JP2022048464A