Estimation device, estimation method, program, and estimation system

JP2024128284APending Publication Date: 2024-09-24UNIVERSITY OF MIYAZAKI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023037186
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-10
Publication Date
2024-09-24

AI Technical Summary

Benefits of technology

【0010】 本発明によれば、家畜の健康管理を効率よく行うことができる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024128284000001
    Figure 2024128284000001
Patent Text Reader

Abstract

To perform health control for a farm animal efficiently.SOLUTION: An estimation device includes data input means, position detection means, reference setting means, discrimination means, and estimation means. The data input means inputs imaging data obtained by imaging a farm animal in a feeding place from the front. The position detection means detects the position of the head of the farm animal on the basis of the imaging data. The reference line setting means sets a reference line involved in the eating of the farm animal in an image indicated by the imaging data. The discrimination means discriminates whether or not the farm animal is eating on the basis of the coordinates indicated by the position of the head and the coordinates indicated by the reference line. The estimation means estimates the eating time of the farm animal on the basis of the result of the discrimination by the discrimination means.SELECTED DRAWING: Figure 14
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an estimation device, an estimation method, a program, and an estimation system. [Background technology]

[0002] Conventionally, livestock farmers and the like who raise livestock have been managing the health of their livestock. In managing the health of livestock, the feeding behavior of livestock is an important source of information. Specifically, it is possible to detect illnesses and movement disorders of livestock at an early stage from changes in the time at which they eat. In recent years, livestock health management is sometimes carried out by equipping ear tags attached to livestock with sensors. As a related technology, a body temperature ear tag equipped with a temperature sensor for detecting the body temperature of livestock is known (see, for example, Patent Document 1). [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2004-298020 A Summary of the Invention [Problem to be solved by the invention]

[0004] However, with conventional technology, attaching sensors to livestock can cause stress to the animals, and it is difficult for livestock farmers to observe and manage the health of each animal. For this reason, conventional technology has the problem that it is not possible to efficiently manage the health of livestock.

[0005] The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a technique that enables efficient health management of livestock. [Means for solving the problem]

[0006] In order to solve the above-mentioned problems, one aspect of the present invention is an estimation device that comprises a data input means for inputting imaging data of livestock in a feeding area taken from the front, a position detection means for detecting the head position of the livestock based on the imaging data, a reference line setting means for setting a reference line for the eating of the livestock in the image represented by the imaging data, a discrimination means for discriminating whether the livestock are eating based on the coordinates indicated by the head position and the coordinates indicated by the reference line, and an estimation means for estimating the eating time of the livestock based on the discrimination result of the discrimination means.

[0007] In order to solve the above-mentioned problems, one aspect of the present invention is an estimation method characterized in that a computer of an estimation device executes processes including a data input process of inputting imaging data of livestock in a feeding area taken from the front, a position detection process of detecting the head position of the livestock based on the imaging data, a reference line setting process of setting a reference line for the eating of the livestock in the image represented by the imaging data, a discrimination process of determining whether the livestock are eating based on the coordinates indicated by the head position and the coordinates indicated by the reference line, and an estimation process of estimating the eating time of the livestock based on the discrimination result of the discrimination process.

[0008] Another aspect of the present invention is a program that causes a computer of an estimation device to function as: a data input means for inputting imaging data obtained by imaging livestock in a feeding area from the front; a position detection means for detecting the head position of the livestock based on the imaging data; a reference line setting means for setting a reference line for the eating of the livestock in the image represented by the imaging data; a discrimination means for determining whether the livestock are eating based on the coordinates indicated by the head position and the coordinates indicated by the reference line; and an estimation means for estimating the eating time of the livestock based on the discrimination result of the discrimination means.

[0009] Another aspect of the present invention is a system comprising an imaging device which images livestock in a feeding area from the front, and an estimation device, wherein the estimation device comprises a data input means for inputting imaging data of the livestock imaged from the front, a position detection means for detecting the head position of the livestock based on the imaging data, a reference line setting means for setting a reference line for the eating of the livestock in the image represented by the imaging data, a discrimination means for discriminating whether the livestock are eating based on the coordinates indicated by the head position and the coordinates indicated by the reference line, and an estimation means for estimating the eating time of the livestock based on the discrimination result of the discrimination means. Effect of the Invention

[0010] According to the present invention, the health management of livestock can be carried out efficiently. [Brief description of the drawings]

[0011] [Figure 1] FIG. 1 is an explanatory diagram showing an example of an eating time estimation system 1. [Diagram 2] FIG. 2 is an explanatory diagram showing an example of a hardware configuration of an estimation device 120. [Diagram 3] FIG. 2 is a block diagram showing an example of a functional configuration of an estimation device 120 according to the present embodiment. [Figure 4] 13 is a flowchart showing an example of a setting process performed prior to estimating eating time. [Diagram 5] 1 is a diagram showing an example of an input image indicated by imaging data input to a data input unit 151. FIG. [Figure 6] 1 is a diagram showing an example of the head position of a cow Bu detected by a position detection unit 152. FIG. [Figure 7] 1 is a diagram showing an example of a region of interest 700 set by a region of interest setting section 154. FIG. [Figure 8] 13 is a diagram showing an example of a detected straight line detected by a straight line detection unit 155. FIG. [Figure 9] 1 is a diagram showing an example of an eating reference line 900 set by the reference line setting unit 156. FIG. [Figure 10] FIG. 10 is a diagram showing an example of a divided region 1000 set by a divided region setting unit 157. [Figure 11] 13 is a flowchart showing an example of an eating time estimation process performed by the estimation device 120. [Figure 12] 13 is a flowchart showing an example of undetection processing performed by the estimation device 120. [Figure 13] 13 is a flowchart showing an example of a cow identification process performed by the estimation device 120. [Figure 14] 13 is a diagram showing an example of a determination result by a determination unit 159 as to whether or not eating has been performed. FIG. [Figure 15] 13 is a flowchart showing an example of a process of counting eating times performed by the estimation device 120. [Figure 16] FIG. 13 is a diagram showing an example of an output of a compilation result of eating time. [Figure 17] FIG. 13 is a diagram showing an example of an output of a compilation result of eating time. [Figure 18] FIG. 18 is a block diagram showing an example of the functional configuration of a livestock identification system 1800 according to the present embodiment. [Figure 19] FIG. 1 is an explanatory diagram showing an example of an outline of extracting and storing a face image of a cow Bu. [Figure 20] 2 is an explanatory diagram showing the configuration of a learning processing unit 221 and the configuration of a classification model M0. FIG. [Figure 21] 13 is a flowchart showing an example of storage control processing for a face image 320 performed by the estimation device 120. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] (Embodiment) FIG. 1 is an explanatory diagram showing an example of an eating time estimation system 1. The eating time estimation system 1 is an example of an estimation system. The eating time estimation system 1 is applied to, for example, a dairy farm managed by a livestock farmer. Dozens to hundreds of livestock are raised on the dairy farm. In this embodiment, the livestock are dairy cows (Bu cows). However, the livestock are not limited to Bu cows, and may be, for example, beef cattle, or animals other than cattle, such as pigs, goats, and chickens.

[0013] (About Feeding Station 10) The dairy farm includes a feeding area 10. The feeding area 10 is a place where the cows Bu eat the feed 30. The cows Bu move to the feeding area 10 at a set time every morning and evening, for example, and eat the feed 30. After the cows Bu finish eating, they leave the feeding area 10 and are replaced by other cows Bu that have not finished eating.

[0014] Various fixtures are provided in the feeding area 10. The various fixtures include a fence 20 (fence portion). The fence 20 is provided to separate a housing area 21 in which the cattle Bu are housed from an aisle 22 through which workers pass. By providing the fence 20, the cattle Bu are prevented from advancing to the aisle 22 side, that is, the cattle Bu are kept within the housing area 21.

[0015] Feed 30 for the cow Bu to eat is placed near the fence 20. Specifically, the feed 30 is placed on the passage 22 side of the fence 20 as seen from the cow Bu. A passage area through which the head of the cow Bu can pass is provided in the fence 20. The cow Bu exposes its head through the passage area of ​​the fence 20 and eats the feed 30 placed on the passage 22 side.

[0016] The fence 20 is of a type that allows the cow Bu to freely insert and remove its head, that is, of a type that does not restrict the movement of the head through the passing area. However, the fence 20 is not limited to this type, and may be of a type that does not allow the cow Bu to freely insert and remove its head, that is, of a type that locks the head so as to restrict the movement of the head through the passing area.

[0017] (Regarding the imaging device 100) The feeding time estimation system 1 includes an imaging device 100 and an estimation device 120. The imaging device 100 captures images of the cattle Buds housed in the feeding area 10. Specifically, the imaging device 100 is fixedly disposed in the feeding area 10 and captures images of each cattle Bud from the front. More specifically, the imaging device 100 is disposed at a position about 4 to 5 m away from the fence 20 and at a height of about 1.6 m so that the faces of multiple (for example, "5") cattle Buds are captured within the imaging range. In the figure, the number of cattle Buds captured by the imaging device 100 is shown as five. However, the number of cattle Buds to be captured is not limited to this, and may be, for example, six or more (for example, ten) or four or less.

[0018] The imaging device 100 captures, for example, 25 frames of images per second. The imaging device 100 outputs captured imaging data to the estimation device 120. The output mode of the imaging data is an output mode by wired or wireless transmission, but is not limited thereto, and the output mode may be an output mode in which the imaging data is stored in a storage medium (for example, a USB (Universal Serial Bus) memory, etc.).

[0019] The imaging device 100 is an RGB camera from the viewpoint of efficiently identifying each cow Bu. However, the imaging device 100 is not limited to an RGB camera, and may be a 3D camera, an infrared camera, or a monochrome camera. For example, a CCD (charge coupled device) camera or a CMOS (Complementary Metal Oxide Semiconductor) camera can be used as the imaging device 100.

[0020] In this embodiment, for the sake of simplicity, only one imaging device 100 is provided. However, it is also possible to provide a plurality of imaging devices 100 (for example, four). When providing a plurality of imaging devices 100, each imaging device 100 may be assigned an identifying number (camera number) so that imaging data captured by which imaging device 100 can be identified.

[0021] (Regarding the Estimation Device 120) The estimation device 120 is a computer device such as a personal computer, a notebook computer, a tablet device, or a smartphone. The estimation device 120 inputs the imaging data output by the imaging device 100. The imaging data may be input by wired or wireless reception, but is not limited to this, and may be input by reading from a storage medium. The estimation device 120 estimates the feeding time of each cow Bu based on the input imaging data.

[0022] (Hardware Configuration of Estimation Device 120) Next, the hardware configuration of the estimation device 120 will be described. Fig. 2 is an explanatory diagram showing an example of a hardware configuration of the estimation device 120. As shown in Fig. 2, the estimation device 120 includes a CPU 121 (Central Processing Unit), a memory 122, an operation unit 123, a microphone 124, a display 125, a speaker 126, and a communication I / F (interface). These can communicate with each other via a bus 130.

[0023] The CPU 121 is a central processing unit, and controls the operation of the estimation device 120 by reading and executing various programs stored in the memory 122. The various programs include an eating time estimation program, a learning program, and a livestock identification program according to this embodiment.

[0024] The memory 122 includes, for example, a read only memory (ROM), a random access memory (RAM), a hard disk, and a solid state drive (SSD). The ROM is a read only memory, and stores various information used by the CPU 121, including programs. The RAM is a readable and writable memory, and stores various information. For example, the RAM stores information acquired from the outside and information generated during processing. The memory 122 also includes a removable storage medium such as a USB memory, an optical disk, and the like.

[0025] The operation unit 123 is an operation input unit such as a touch panel display, a keyboard, and a mouse. The microphone 124 inputs sounds such as voice. The CPU 121 can also input various pieces of information by recognizing the voice input to the microphone 124.

[0026] The display 125 is a touch panel display, a monitor, or the like. The speaker 126 outputs sound. The communication I / F 127 is an interface for transmitting and receiving information to and from other devices. In addition, the estimation device 120 may also include a scanner for reading information and a printer for printing information on a medium.

[0027] (Functional configuration of the estimation device 120) Next, the functional configuration of the estimation device 120 will be described. Fig. 3 is a block diagram showing an example of a functional configuration of the estimation device 120 according to this embodiment. The functional configuration shown in Fig. 3 will be described below with reference to Figs.

[0028] 3, the estimation device 120 includes the following functional units: a data input unit 151, a position detection unit 152, a height detection unit 153, a region of interest setting unit 154, a straight line detection unit 155, a reference line setting unit 156, a divided region setting unit 157, a matrix generation unit 158, a discrimination unit 159, a classification unit 160, and an estimation unit 161. Each functional unit is realized by the CPU 121. That is, the CPU 121 executes an eating time estimation program stored in the memory 122 to realize each functional unit.

[0029] FIG. 4 is a flowchart showing an example of a setting process that is performed prior to estimating eating time. Step S401: The estimation device 120 judges whether or not to start the setting process. The setting process is started by, for example, receiving a predetermined operation input by an operator indicating the start of the setting process. If the imaging device 100 is fixedly disposed as in this embodiment, the positional relationship between the cow Bu and the imaging device 100 does not change. Therefore, by performing the setting process shown in FIG. 4 only once at the beginning, it is possible to use the set information from the next time onwards. If the positional relationship between the cow Bu and the imaging device 100 changes, such as when using a robot equipped with the imaging device 100, it is necessary to perform the setting process each time. The estimation device 120 waits until the setting process starts (step S401: YES).

[0030] (Data input section 151) Step S402: When the setting process starts (Step S401: YES), the data input unit 151 inputs imaging data of each cow Bu imaged by the imaging device 100. The imaging data is, for example, real-time data, but may also be recorded data. FIG. 5 is a diagram showing an example of an input image represented by imaging data input to the data input unit 151. As shown in FIG. 5, an input image (frame image) 500 represented by imaging data includes images of cows Bu (Bu-1 to Bu-5), a fence 20, a passage 22, feed 30, and a background 50. The fence 20 has a straight portion extending in the horizontal direction. This straight portion is a lower end extension portion 20a (a horizontal pipe at the lower end) that extends from the lower end of the fence 20, and an upper end extension portion 20b (a horizontal pipe at the upper end) that extends from the upper end of the fence 20. The lower end extension portion 20a is located above the position of the head of the cow Bu when eating. The upper end extension portion 20b restricts the head from moving upward through a passage area of ​​the fence 20.

[0031] (Position detection unit 152) Step S403: The position detection unit 152 detects the head position of the cow Bulb based on the imaging data. The position detection unit 152 detects the head position of the cow Bulb from the input image 500 by an image recognition function based on machine learning (for example, YOLO: You Only Look Once). Fig. 6 is a diagram showing an example of the head position of the cow Bu's head detected by the position detection unit 152. As shown in Fig. 6, a bounding box 600 (600a to 600e) indicates the head position of the cow Bu's head detected by the position detection unit 152. The detected head position includes the X coordinate and the Y coordinate for each side of the bounding box 600.

[0032] (Height detection unit 153) Step S404: The height detection unit 153 detects the maximum height of the head position of the cow Bu based on the head position detected by the position detection unit 152. The height detection unit 153 detects the maximum height from among the heights (Y coordinates) of the head positions of the multiple cows Bu in multiple frame images (frame images for a predetermined time). The height of the head position is represented, for example, by the Y coordinate of the upper side of the bounding box 600. The position detection unit 152 detects the maximum value from among the Y coordinates of the upper side of each bounding box 600 in the multiple frame images as the maximum height.

[0033] (Region of interest setting unit 154) Step S405: The region of interest setting unit 154 sets the region of interest. Specifically, the region of interest setting unit 154 sets the region of interest in the region indicated by the imaging data based on the maximum height detected by the height detection unit 153. Here, the upward movement of the head of the cow Bu is restricted by the upper end extension 20b. Therefore, the maximum height of the head position is at least lower than the height of the upper end extension 20b. Therefore, the region of interest setting unit 154 sets the region of interest by deleting the image above the maximum height from the input image 500 (FIG. 5). This makes it possible to delete the region corresponding to the upper end extension 20b from the input image 500 indicated by the imaging data.

[0034] Fig. 7 is a diagram showing an example of a region of interest 700 set by region of interest setting section 154. In Fig. 7, region of interest 700 shows a region obtained by deleting a region corresponding to upper end extension portion 20b from input image 500 (Fig. 5), that is, a region obtained by deleting a region including background image 550.

[0035] (Straight line detector 155) Step S406: Line detector 155 detects lines from the image in region of interest 700. Specifically, line detector 155 detects lines having a length equal to or greater than a preset length. More specifically, line detector 155 detects multiple lines in the image and the Y coordinates (heights) of the multiple lines using a Hough transform.

[0036] Fig. 8 is a diagram showing an example of detected straight lines detected by the straight line detection section 155. As shown in Fig. 8, a plurality of detected straight lines 800 (800a to 800d) are shown in the input image 500. The straight line detection section 155 associates an ID for identifying each detected straight line 800 with a Y coordinate.

[0037] The detection straight lines 800a to 800d will be described. Although the region of interest 700 is obtained by deleting the region corresponding to the upper end extension 20b from the input image 500, the upper end extension 20b is not necessarily deleted entirely. Therefore, the detection straight line 800a may be detected based on the image of the upper end extension 20b that has not been completely deleted. A detected straight line 800b indicates a straight line detected based on the image of the lower end extension portion 20a. The detected straight line 800c indicates a straight line detected based on an image showing the boundary between the storage area 21 and the passage 22. A detected straight line 800d indicates a straight line detected based on the image of the passage 22.

[0038] In addition, when there is a lot of bait 30, the lower end extension 20a may be hidden by the bait, and the detection straight line 800b may not be detected accurately. In view of this, the length of the straight line preset as the detection target may be made as short as possible.

[0039] (Reference line setting section 156) Step S407: The reference line setting unit 156 sets a reference line relating to the feeding of the cow Bu (hereinafter referred to as the "feeding reference line") in the image shown by the imaging data. The feeding reference line is a line used by the discrimination unit 159, which will be described later, to discriminate whether feeding has occurred. The reference line setting unit 156 sets the feeding reference line based on the detection line 800 detected by the line detection unit 155. As shown in FIG. 8, the detection line 800b is detected most frequently in the region of interest 700, that is, many lines are detected at the position corresponding to the lower end extension portion 20a. Therefore, the Y coordinate of the detection line 800b is the median value of each of the Y coordinates of the detected multiple detection lines 800a to 800d. Therefore, the reference line setting unit 156 sets the median value (the Y coordinate of the detection line 800b) as the feeding reference line.

[0040] Fig. 9 is a diagram showing an example of an eating reference line 900 set by the reference line setting unit 156. As shown in Fig. 9, the eating reference line 900 is set at a position corresponding to the detection line 800b (Fig. 8). This makes it possible to determine that the cow Bu has eaten when the Y coordinate of the bottom side of the bounding box 600 (Fig. 6) indicating the head of the cow Bu falls below the eating reference line 900.

[0041] In this embodiment, the eating reference line 900 is set automatically, but is not limited to this. For example, the eating reference line 900 may be set manually by receiving a Y coordinate specification from an operator. That is, the reference line setting unit 156 may set the eating reference line 900 based on a straight line (Y coordinate) input by the operator. Furthermore, even when the eating reference line 900 is set automatically, the estimation device 120 may receive adjustments of the set eating reference line 900 (such as fine adjustments of the Y coordinate) from the operator. This allows the eating reference line 900 to be set with high accuracy under the operator's confirmation.

[0042] In addition, in this embodiment, the feeding reference line can be set by using the average value or the mode of each Y coordinate instead of the median value of each Y coordinate. However, from the viewpoint of setting the feeding reference line at the lower end extension portion 20a with high accuracy, it is preferable to use the median value of each Y coordinate.

[0043] (Division area setting section 157) Step S407: The divided area setting unit 157 sets a plurality of divided areas corresponding to the plurality of cows Bu in the input image indicated by the imaging data input to the data input unit 151. Specifically, the divided area setting unit 157 sets divided areas for the maximum number of cows Bu in the region of interest 700. The divided area setting unit 157 sets the divided areas by equally dividing the region of interest 700 in the X-axis direction (horizontal direction). In this embodiment, the number of divisions is "5". The number of divisions is a number input by an operator. However, the number of divisions may be a number set in advance.

[0044] Fig. 10 is a diagram showing an example of divided regions 1000 set by the divided region setting unit 157. As shown in Fig. 10, the region of interest 700 is divided into five equal regions in the X-axis direction. Each divided region 1000 (first divided region 1000-1 to fifth divided region 1000-5) corresponds to an image of each cow Bu (Bu-1 to Bu-5), and is assigned a divided region number (1 to 5) that identifies the region.

[0045] The estimation device 120 also specifies in which divided region each cow Bu exists. Specifically, the estimation device 120 calculates the center X coordinate of the bounding box 600 based on the X coordinate of the bounding box 600 and the width of the bounding box 600. Furthermore, the estimation device 120 determines the divided region 1000 including the bounding box 600 based on the center X coordinate and the X coordinates (b1 to b4) of each region. As shown in the figure, if the center coordinate x is "b3≦x≦b4", the estimation device 120 determines that the bounding box 600 exists in the fourth divided region 1000-4.

[0046] (Matrix generation unit 158) Step S408: The matrix generating unit 158 ​​generates a matrix T corresponding to the divided area 1000 (divided area number). In this embodiment, the matrix T has 1 row and 5 columns (

[0000] ). Each column of the matrix T corresponds to the divided area number. Each element of the matrix T indicates a count value related to eating. Details will be described later, but when it is determined that each cow Bu in each area is eating for each frame image, "1" is added to the element of the matrix (eating count value). For example, when it is determined that cow Bu-2 is eating, "1" is added to the element of the matrix T corresponding to cow Bu-2 (divided area number=2), that is, the matrix T becomes

[1000] .

[0047] The setting process is completed by executing each process shown in steps S401 to S409 in FIG.

[0048] Next, the discrimination unit 159, the identification unit 160, and the estimation unit 161 shown in FIG. 3 will be described with reference to FIGS. FIG. 11 is a flowchart showing an example of an eating time estimation process performed by the estimation device 120.

[0049] Step S1101: The estimation device 120 judges whether to start estimating the feeding time. The setting process may be started by accepting manual input or by automatic input. The manual input is, for example, accepting a predetermined operation input by an operator indicating the start of feeding time estimation due to a change in cow Bu. The automatic input may be, for example, acquiring an instruction of completion of the setting process (FIG. 4) by completing the setting process (automatic start immediately after the setting process is completed). The estimation device 120 waits until it is time to start estimating the feeding time (Step S1101: NO).

[0050] Step S1102: When starting estimation of the feeding time (step S1101: YES), the data input unit 151 inputs frame images (imaging data) of each cow Bu captured by the imaging device 100. Step S1103: The estimating device 120 sets the divided area number N of the divided area 1000 of interest to “1”.

[0051] Step S1104: The position detection unit 152 judges whether or not the head position has been detected for the divided area indicated by the divided area number N. If the head position has been detected by the position detection unit 152 (step S1104: YES), the estimation device 120 proceeds to step S1106. At this time, the undetected count value P (count value when undetected), which will be described later, is reset (set to "0").

[0052] Step S1105: If the head position is not detected by the position detection unit 152 (step S1104: NO), the estimation device 120 confirms whether or not the cow Bu exists in the divided region 1000 by executing a non-detection process (FIG. 12). Step S1106: The identification unit 160 executes cow identification processing (FIG. 13) by machine learning to identify the cow ID of the cow Bu (individual identification).

[0053] (Discrimination unit 159) Step S1107: The discrimination unit 159 discriminates whether or not the cow Bu is eating based on the coordinates indicated by the head position and the coordinates indicated by the eating reference line 900. Specifically, the discrimination unit 159 discriminates whether or not the cow Bu is eating by discriminating whether or not the Y coordinate of the bottom side of the bounding box 600 (FIG. 6) indicating the head of the cow Bu is below the Y coordinate of the eating reference line 900. Note that the object of comparison with the eating reference line 900 is not limited to the bottom side of the bounding box 600, and may be the center position of the bounding box 600 or the top side position.

[0054] FIG. 14 is a diagram showing an example of a result of determination by the determination unit 159 regarding the presence or absence of eating. In FIG. 14, cow Bu-1 in the first divided area 1000-1 will be described as an example. The Y coordinate of the bottom side of the bounding box 600a is below the Y coordinate of the eating reference line 900. Therefore, the determination unit 159 determines that cow Bu-1 is eating. Similarly, the determination unit 159 determines that cows Bu-2 to Bu-4 are eating. On the other hand, for cow Bu-5, the Y coordinate of the bottom side of the bounding box 600e is not below the Y coordinate of the eating reference line 900. Therefore, the determination unit 159 determines that cow Bu-5 is not eating.

[0055] (Estimation Department 161) Step S1108: When the estimation unit 161 determines that the cow Bu is eating (step S1107: YES), it adds "1" to the matrix element (eating count value E) corresponding to the cow Bu. Note that, in step S1107, when the discrimination unit 159 does not determine that the cow Bu is eating (step S1107: NO), the estimation unit 161 does not add "1" to the eating count value E and proceeds to the process of step S1109.

[0056] Step S1109: The estimation unit 161 outputs an estimation result in which the cow ID identified by the identification unit 160 is associated with the feeding time. The feeding time is calculated based on the feeding count value E. In this embodiment, since the frame rate of the imaging data is 25 fps, the estimation unit 161 estimates that the feeding time is 1 second when the feeding count value E becomes "25". For example, when the feeding count value E becomes "2500", the estimation device 120 estimates that the feeding time is 100 seconds (1 minute 20 seconds).

[0057] Here, an example of output of the estimation result will be described. As shown in Fig. 14, the estimation result 1400 shows an image in which the identification result 1401 of the cow Bu and the feeding time 1402 are associated with the bounding box 600. The identification result 1401 shows the cow ID of the cow Bu that has been individually identified by the identification unit 160. The feeding time 1402 shows the total feeding time based on the feeding count value E. Note that the estimation unit 161 may output the feeding count value E instead of or in addition to the feeding time 1402.

[0058] Step S1110: The estimation device 120 determines whether or not feeding has been determined for all the cows Bu in one frame image. Specifically, the estimation device 120 determines whether or not the divided area number N of the divided area 1000 of interest is set to "5." Step S1111: If the divided area number N is not set to "5" (step S1108: NO), add "N+1" to the divided area number N and return to step S1104. As a result, for example, if N is set to "1", N can be set to "2", and it is possible to determine whether the cow Bu-2 in the second divided area 1000-2 has eaten or not.

[0059] Step S1112: The estimation device 120 judges whether or not to end the feeding time estimation process. The end of the estimation process is, for example, when the feeding of the cow Bu is completed and a predetermined operation input indicating the end of the estimation process is received from the operator. If the feeding time estimation process is not to be ended (step S1112: NO), the estimation device 120 returns to step S1102 and repeats the processes of steps S1102 to S1112. On the other hand, if the feeding time estimation process is to be ended (step S1112: YES), the estimation device 120 ends the series of processes.

[0060] (Regarding non-detection processing in step S1105) 12 is a flowchart showing an example of a non-detection process performed by the estimation device 120. In the non-detection process, the presence or absence of a cow Bu in the divided region 1000 is determined.

[0061] Step S1201: The estimation device 120 adds “1” to the undetected count value P. Step S1202: The estimation device 120 judges whether the undetected count value P is equal to the threshold value. In this embodiment, since the frame rate of the imaging data is 25 fps, by setting the threshold value to "2500 (=100 seconds)", if the head of the cow Bu is not detected for 100 seconds, it can be judged that the cow is not present (has left). If the undetected count value P is not equal to the threshold value (step S1202: NO), the estimation device 120 proceeds to step S1106 (FIG. 11).

[0062] Step S1203: If the undetected count value P is equal to the threshold value (step S1202: YES), the estimation device 120 determines that the cow Bu is not present in the divided region, resets the component (feeding count value E) of the divided region number N, and proceeds to step S1106 (FIG. 11). That is, if the head position is not detected by the position detection unit 152 for a predetermined time or longer, the estimation device 120 ends the estimation of the feeding time for the divided region.

[0063] (Regarding cow identification processing in step S1106) FIG. 13 is a flowchart showing an example of the cow identification process performed by the estimation device 120. Step S1301: The facial image extraction unit 232 (FIG. 20), which will be described later, extracts a facial image from the head position detected by the position detection unit 152. Note that the position detection unit 152 may have the function of the facial image extraction unit 232. In this case, step S1301 may be a process of acquiring a facial image from the position detection unit 152.

[0064] Step S1302: The identification unit 160 inputs the face image into a trained model for identifying the cow ID. The generation of the trained model will be described later.

[0065] Step S1303: The identification unit 160 derives an estimated value for each cow ID for the input face image, and selects the cow ID with the highest estimated value. The estimated value is expressed as a percentage indicating the possibility for each cow ID. Specifically, the possibility of cow ID "001" is expressed as 95%, the possibility of cow ID "002" is 2%, and the possibility of cow ID "003" is 1%. The identification unit 160 selects the cow ID with the highest possibility.

[0066] Step S1304: The classification unit 160 outputs the selected cow ID as the classification result 1401 (FIG. 14), and the process proceeds to step S1107 (FIG. 11).

[0067] (Regarding the counting process of eating time performed by the estimation device 120) Next, the eating time counting process performed by the estimation device 120 will be described. FIG. 15 is a flowchart showing an example of a process of counting eating times performed by the estimation device 120. Step S1501: The estimation device 120 judges whether to start counting the feeding time. The counting starts, for example, when the cow Bu is replaced (when it leaves). The timing when the cow Bu is replaced may be, for example, when the undetected count value P reaches a threshold value (step S1203), or when a predetermined operation to start counting is received from the operator when the cow Bu is replaced. The estimation device 120 waits until the counting of the feeding time starts (step S1501: NO).

[0068] Step S1502: When the counting of feeding times starts (Step S1501: YES), the estimation device 120 acquires feeding times during a period during which the cow Bulb was present in the focused divided region 1000. The period is a period from when the presence of the cow Bulb was detected to when the presence of the cow Bulb was no longer detected. Step S1503: The estimation device 120 identifies the cow ID in the divided region 1000 of interest. Specifically, the estimation device 120 determines as the final result the cow ID that was most frequently identified by the identification unit 160 during the period in which the cow Bu was present. This makes it possible to prevent the cow ID from being estimated as the feeding of the other cow Bu, even if it is mistakenly identified as being a different cow Bu in part on a frame image basis.

[0069] Step S1504: The estimation device 120 generates a counting result in which the cow ID of the determined cow Bu is associated with the feeding time acquired in step S1502. Step S1505: The estimation device 120 stores the counting result of the feeding time of the cow Bu indicated by the cow ID, and ends the series of processes. The estimation device 120 can output the stored counting result by receiving a predetermined operation from the operator.

[0070] Figures 16 and 17 are diagrams showing examples of output of the tabulation results of eating times. Tabulation results 1600 and 1700 shown in Figures 16 and 17 are displayed, for example, on the display 125. The tabulation results 1600 and 1700 may be printed on paper media or transmitted to another device.

[0071] In FIG. 16, the counting result 1600 shows the feeding time of each cow Bu in one feeding session (for example, morning) on ​​a certain day. This allows the operator to easily grasp the feeding time of each cow Bu. The estimation device 120 may notify the cow Bu of the feeding time that is short. Specifically, the estimation device 120 may display, in a specific display mode, the cow IDs whose feeding time is equal to or less than a threshold (small eaters) and the cow IDs whose feeding time is equal to or more than a threshold (overeaters) in the counting result 1600. This allows the operator to be prompted to check the symptoms of cows Bu that may be in poor health.

[0072] The counting result 1700 shown in FIG. 17 is a summary of the feeding time for each cow Bu. Specifically, the counting result 1700 includes the feeding time for each time period (morning / evening) for each cow Bu, the total feeding time for the month, the average feeding time per session, and the like. The estimation device 120 receives an input of a cow ID from an operator, and displays the counting result 1700 corresponding to the received cow ID. This allows the operator to grasp the feeding time for a specific cow Bu in detail. Furthermore, the estimation device 120 may display feeding times below a threshold (or above a threshold) in a specific display mode.

[0073] The display form of the tally results 1600, 1700 is not limited to that shown in the figure. For example, by accepting the designation of a cow ID, it is possible to tally and display the past year's data for the cow Bu indicated by the cow ID, or to display a specific period such as a period when the cow Bu had little time to eat. It is also possible to display a ranking of cow Bu with short eating times and cow Bu with long eating times. Furthermore, if the eating time is below a threshold with a certain frequency, it may be suggested that the cow Bu may have an abnormality in its health.

[0074] (About generating trained models) Next, the generation of the trained model will be described. The trained model described below is generated by the estimation device 120, but may be generated by other devices. The livestock identification system 1800 described below may be a part of the eating time estimation system 1, or may be a system separate from the eating time estimation system 1.

[0075] (Functional configuration of the livestock identification system 1800 and extraction of face images of cattle Bu) Fig. 18 is a block diagram showing an example of the functional configuration of a livestock identification system 1800 according to this embodiment. The functional configuration shown in Fig. 18 will be described below with reference to Fig. 19. FIG. 19 is an explanatory diagram showing an example of an outline of extracting and storing a face image of a cow Bu.

[0076] As shown in Fig. 18, the livestock identification system 1800 includes an imaging device 100 and an estimation device 120. The estimation device 120 includes a memory control device 200 and a learning device 220. The memory control device 200 includes functional units, an input unit 201, a setting unit 202, an extraction unit 203, a memory control unit 204, a detection unit 205, and a memory unit 210. The learning device 220 includes a functional unit, a learning processing unit 221. The estimation device 120 includes functional units, an imaging information input unit 231, a face image extraction unit 232, a classification unit 160, and an output unit 234.

[0077] The input unit 201 inputs imaging information (imaging data) from the imaging device 100. The imaging information is image information obtained by imaging the cows Bu (Bu1 to Bu4) from the front. The imaging information 300 includes moving images and still images. As shown in FIG. 19, the imaging information 300 includes a plurality of frame images 301. An imaging area 302 of each frame image 301 indicates that a plurality of cows Bu exist. Note that there may be cases where only one cow Bu exists in the imaging area 302.

[0078] The setting unit 202 sets regions of interest 310 (310a to 310d) in the imaging area 302 indicated by the imaging information 300. The regions of interest 310 are regions provided corresponding to the passage areas of the cow Bu or the fence 20, and each indicates an area where the head of the cow Bu can be present. Each of the regions of interest 310 is given corresponding identification information.

[0079] The extraction unit 203 extracts face images 320 (320a to 320d) of the cow Bud in the region of interest 310 based on the imaging information 300. The extraction unit 203 extracts the face images 320 by an object detection function using image recognition. The extraction unit 203 extracts the face images 320 every time a frame image 301 is input to the input unit 201.

[0080] The extracted face image 320 is normalized to, for example, 300×300 pixels. If the extracted face image 320 is 240 pixels wide by 300 pixels high, a plain (e.g., black) image is added to the portion that is less than 300 pixels wide to make it 300×300 pixels. In other words, if one of the vertical and horizontal dimensions of the extracted face image 320 is 300 pixels and the other is less than 300 pixels, a plain (e.g., black) image is added to the portion that is less than 300 pixels to make it 300×300 pixels.

[0081] Also, if the extracted face image 320 is not 300 pixels in either direction, it is enlarged or reduced at the same ratio in both directions so that the side with the larger number of pixels becomes 300 pixels. Then, a blank image is added to the other part that is less than 300 pixels. This makes it possible to make the face image 320 300 x 300 pixels even if it is not 300 pixels in either direction.

[0082] The storage control unit 204 classifies and stores the facial images 320 in the storage unit 210 for each piece of identification information assigned in correspondence with the region of interest 310. Specifically, every time a facial image 320 is extracted by the extraction unit 203, the storage control unit 204 classifies and stores the facial image 320 in a folder 330 (330a to 330d) provided in correspondence with each region of interest 310. The storage unit 210 stores a predetermined number of facial images 320 for each cow Bu. The predetermined number may be a number (for example, about 300) that allows a learned model to be created in a learning processing unit described later.

[0083] The folder 330 is assigned a folder ID (Identity) as identification information. The folder ID is associated with the cow ID. The cow ID may be the same as the folder ID, or may be a separate ID assigned by an operator of the estimation device 120 (e.g., a dairy farmer), or the name or number of the cow Bu. The storage control unit 204 stores the face image 320 for each cow ID (folder ID) in the storage unit 210. In the following description, the cow ID and the folder ID will be described as the same ID, and the folder ID will be described as the cow ID.

[0084] (Calculation of overlap rate) Here, the cow Bu eating feed at the feeding area 10 tends to stay there and continue eating for a predetermined time (for example, 5 minutes) after starting to eat, but when the food in front of it runs out, it may eat the food in front of the neighboring cow Bu. In such a case, or when the cow Bu does not stay there because its hunger is satisfied, the face image 320 of the cow Bu may fall outside the region of interest 310. The face image 320 that falls outside the region of interest 310 may, for example, show only half of the face, and therefore is not desirable to be used as an image for learning. Therefore, in this embodiment, the face image 320 is stored based on the overlap rate between the face image 320 and the region of interest 310.

[0085] More specifically, the storage control unit 204 stores the facial image 320 for each cow ID corresponding to the region of interest 310, based on the degree of overlap (overlap rate) between the region indicated by the facial image 320 and the region of interest 310. The overlap rate can be expressed as the ratio of the region indicated by the facial image 320 to the region of interest 310. For example, a facial image 320 with an overlap rate less than a threshold value may overlap with the region of interest 310 set for an adjacent cow Bu.

[0086] As an example, suppose that the face of cow Bu1 in Fig. 19 moves in front of the neighboring cow Bu2, and thus a facial image 320a of cow Bu1 is extracted from the region of interest 310a and the region of interest 310b. In this case, a low value is calculated as the overlap rate in the region of interest 310a for the facial image 320a of cow Bu1 extracted from the region of interest 310a. Similarly, a low value is calculated as the overlap rate in the region of interest 310b for the facial image 320a of cow Bu1 extracted from the region of interest 310b.

[0087] For this reason, in this embodiment, when the overlap rate is less than the threshold, the storage control unit 204 does not store the facial image 320 in the folder 330. On the other hand, when the overlap rate is equal to or greater than the threshold, the storage control unit 204 stores the facial image 320 in the folder 330 of the corresponding cow ID.

[0088] (Regarding setting of region of interest 310) 19, each cow Bu is shown eating food near the center of the region of interest 310. However, the cow Bu does not necessarily eat food while positioned at the center of the region of interest 310 in the imaging area 302. For this reason, in this embodiment, the region of interest 310 is set according to the movement range of the head of the cow Bu.

[0089] Specifically, the detection unit 205 detects the face area of ​​the cow in the imaging area 302 for each of the multiple frame images included in the imaging information 300 input to the input unit 201. The detection unit 205 detects the face by an object detection function. The face area is, for example, an area equivalent to the area indicated by the face image 320. However, the face area may be an area smaller or larger than the area indicated by the face image 320.

[0090] The setting unit 202 sets the region of interest 310 based on the face regions in the multiple frame images detected by the detection unit 205. Specifically, the setting unit 202 sets a predetermined region including the centers of the multiple face regions related to the same individual detected by the detection unit 205 as the region of interest 310. The individual is identified, for example, by regarding the multiple face regions appearing in the same frame image as different individuals, and regarding the face regions that are closest to each other in consecutive frame images as the same individual. The individual may also be identified by simply specifying the relative appearance position (e.g., second from the left).

[0091] The size and shape (rectangle) of the region of interest 310 may be determined in advance. In this case, the setting unit 202 sets the region of interest 310 by determining the arrangement position of the rectangle based on the position of the face region detected by the detection unit 205. In addition, when setting the region of interest 310, it is desirable to provide a gap between adjacent regions of interest 310. This is to make it difficult for each cow Bu to enter the region of interest 310 of the adjacent cow Bu.

[0092] If the rectangle is initially positioned based on the position of the face region to set the region of interest 310, there is a risk that the adjacent regions of interest 310 will overlap if the distance between adjacent cows Bu happens to be close. For this reason, the average position of the face region of each cow Bu may be detected within the first several tens of seconds, and the region of interest 310 may be set based on this position. The setting unit 202 may also set the region of interest 310 by reducing the rectangle or shortening its horizontal length so that adjacent regions of interest 310 do not overlap.

[0093] (About creating trained models) The learning processing unit 221 creates a trained model (discrimination model) for identifying the cow ID. More specifically, the learning processing unit 221 creates the trained model by using a training dataset. The training dataset is a training dataset in which the face image 320 stored by the memory control unit 204 is used as an input sample, and a one-hot vector indicating the class to which the face image 320 belongs among a plurality of classes is used as an output sample. The trained model is a trained model that outputs a vector indicating the posterior probability of the class to which the face image 320 belongs, in response to the input face image 320. The number of classes is the number of folders in the memory unit 210.

[0094] (Configuration of the learning processing unit 221 and configuration of the classification model M0) Here, the learning processing unit 221 will be specifically described with reference to FIG. Fig. 20 is an explanatory diagram showing the configuration of the learning processing unit 221 and the configuration of the classification model M0. Fig. 20(A) shows the configuration of the learning processing unit 221. The learning processing unit 221 includes functional units, namely, a classification model storage unit 11, a dataset acquisition unit 12, a learning unit 13, and an output unit 14.

[0095] The classification model storage unit 11 stores a classification model M0 configured by a convolutional neural network. As shown in Fig. 20(B), the classification model M0 includes an input unit M01, a feature amount calculation unit M02, a classification unit M03, and an output unit M04. The input unit M01 outputs the input face image 320 as a vector to the feature amount calculation unit M02. The input unit M01 forms an input layer of the neural network.

[0096] The feature calculation unit M02 and the classification unit M03 form the intermediate layer of the neural network. The output unit M04 forms the output layer of the neural network. The feature calculation unit M02 converts the vector input from the input unit M01 into a low-dimensional feature vector and outputs it to the classification unit M03. The classification unit M03 converts the feature vector input from the feature calculation unit M02 into a P-dimensional vector indicating the posterior probability of the cow ID represented by the feature vector. P is the number of cow IDs to be estimated.

[0097] The dataset acquisition unit 12 acquires a learning dataset that associates face images 320, which are input samples, with cow ID labels, which are output samples. The cow ID labels are represented by a P-dimensional one-hot vector, where P is the number of cow IDs in the dataset.

[0098] The learning unit 13 uses the learning dataset acquired by the dataset acquisition unit 12 to learn the parameters of the classification model M0 so that when a facial image 320 is input, a P-dimensional vector indicating the posterior probability of the cow ID corresponding to the facial image 320 is output.

[0099] Next, the learning method will be specifically described. The dataset acquisition unit 12 acquires a dataset prepared in advance. Then, the learning unit 13 uses the acquired dataset to learn parameters of the classification model M0 stored in the classification model storage unit 11. At this time, the learning unit 13 updates each parameter by the gradient descent method so as to minimize a loss function using the calculation results of the classification model M0.

[0100] The learning unit 13 updates parameters of the feature calculation unit M02 and the classification unit M03 in the classification model M0. For example, the loss function represents the cross-entropy error between the output value of the classification model M0 and the output sample of the dataset.

[0101] The learning unit 13 ends the learning process when the evaluation value of the loss function falls below a predetermined threshold value or when the learning process has been repeated a predetermined number of times. When the learning process by the learning unit 13 ends, the output unit 14 outputs the classification model M0 (trained model) trained by the learning unit 13 to the identification unit 160.

[0102] (Assignment of identification information) Here, at a stage where learning has not progressed, a cow Bu that has not been learned in the learned model may be mixed with a learned cow Bu. At this time, when the learned cow Bu finishes eating and replaces the unlearned cow Bu, it is necessary to prevent the face images of these two cows Bu from being stored in the same folder. To explain this in detail, the identification unit 160 identifies the cow ID by inputting the face image 320 extracted by the extraction unit 203 into the learned model. When the identification unit 160 does not identify the cow ID (when the probability is low) and there is a folder 330 to which the cow ID is assigned for the cow Bu, the storage control unit 204 stores the extracted face image 320 in the folder 330 corresponding to the cow ID.

[0103] Furthermore, a cow Bu that has just entered the feeding area 10 has not been assigned a cow ID (folder ID). For this reason, it is necessary to create a folder 330 by assigning a cow ID to the cow Bu that has just entered the feeding area 10. To explain this in more detail, when there is a cow Bu that has just entered the feeding area 10, specifically when the cow ID has not been identified (has not been learned) by the identification unit 160 and there is no folder 330 to which a cow ID has been assigned for the cow Bu, the storage control unit 204 assigns a new cow ID corresponding to the region of interest 310 and generates the folder 330.

[0104] In addition, in the case of cow Bu trained with a trained model, the cow ID is identified by the identification unit 160. In this case, the storage control unit 204 stores the face image 320 extracted by the extraction unit 203 in the folder 330 corresponding to the cow ID. In this case, the learning processing unit 221 can improve the learning accuracy by updating the trained model using the face image 320 stored in the folder 330. However, the storage control unit 204 may not store the extracted face image 320 in the storage unit 210.

[0105] In this way, the memory control unit 204 inputs the facial image 320 extracted by the extraction unit 203 to a discrimination model (for example, a trained model created by the learning processing unit 221) that outputs the cow ID of the known livestock and its accuracy when a facial image 320 of a known livestock is input. Then, if the accuracy is equal to or greater than a predetermined value, the memory control unit 204 classifies the facial image 320 into the discriminated cow ID. On the other hand, if the accuracy is less than the predetermined value, the memory control unit 204 classifies the facial image 320 into the cow ID corresponding to the region of interest 310. Note that the discrimination model is not limited to the trained model created by the learning processing unit 221, and may be a trained model created by another device.

[0106] (About cattle identification) The identification unit 160 can identify the cow ID of the cow Bu eating feed at the feeding area 10 in real time by using the trained model created by the learning processing unit 221. Specifically, the imaging information input unit 231 inputs imaging information of the cow Bu from the front from the imaging device 100. The face image extraction unit 232 extracts the face image 320 of the cow Bu based on the imaging information. The identification unit 160 inputs the real-time face image 320 extracted by the face image extraction unit 232 to the trained model trained by the learning device 220, thereby identifying the cow ID. More specifically, the identification unit 160 derives an estimate for each cow ID for the face image 320 input to the trained model, and selects (identifies) the cow ID with the high estimate value.

[0107] The output unit 234 outputs the cow ID indicating the result of the identification by the identification unit 160. The output unit 234 outputs the cow ID identified by the identification unit 160 and the face image 320. The output unit 234 associates the cow ID with the face image 320 (video) of the cow Bu and outputs it as the estimation result 1400 (FIG. 14). Note that the output mode by the output unit 234 is not limited to an output mode by display, and may include an output mode by sound and an output mode by transmission to an external device. When transmitting to an external device, the external device may display the cow ID and the face image 320.

[0108] The identification unit 160 identifies the cow ID from which the face image 320 is extracted by the face image extraction unit 232 for each frame image. The output unit 234 outputs the cow ID from which the cow ID is identified by the identification unit 160 for each frame image. Furthermore, the output unit 234 outputs the cow ID that is most frequently identified among the cow IDs identified by the identification unit 160 for a plurality of frame images as a final result. Specifically, the output unit 234 outputs the cow ID that is most frequently identified within a predetermined time as a final result. The predetermined time may be within the time that the cow Bu stays in place and eats food (for example, within 5 minutes). In this embodiment, the predetermined time is, for example, 3 minutes.

[0109] In this embodiment, the identification unit 160 identifies the cow ID of the face image 320 using the trained model created by the learning device 220, but the present invention is not limited to this. For example, the identification unit 160 may identify the cow ID using comparison data for comparing the feature amount of the face image 320 corresponding to each folder 330. To be more specific, the cow ID and the comparison feature amount extracted from the face image 320 for each cow Bu are stored in a database (not shown) in association with each other. The identification unit 160 may calculate the feature amount from the real-time face image 320 extracted by the face image extraction unit 232, and specify (identify) the cow ID corresponding to the feature amount having the highest similarity to the calculated feature amount.

[0110] In this embodiment, the storage control device 200 and the learning device 220 are included in the estimation device 120, but this is not limited to the above. For example, the estimation device 120, the storage control device 200, and the learning device 220 may each be separate devices. Furthermore, the estimation device 120 and the learning device 220 may be separate devices, and the learning device 220 may include the storage control device 200, or the estimation device 120 may include the storage control device 200.

[0111] Furthermore, the storage unit 210 is not limited to being provided in the storage control device 200, but may be provided in an external device such as an external server. The input unit 201 and the imaging information input unit 231 are not limited to being separate functional units, but may be provided as a single functional unit. Similarly, the extraction unit 203 and the face image extraction unit 232 are not limited to being separate functional units, but may be provided as a single functional unit.

[0112] Each functional unit shown in Fig. 18 and each functional unit shown in Fig. 20 are realized by the CPU 121. That is, the CPU 121 executes various programs, such as the learning program and the livestock identification program, stored in the memory 122, to realize each functional unit.

[0113] (An example of storage control process of face image 320 performed by estimation device 120) Fig. 21 is a flowchart showing an example of a storage control process of a face image 320 performed by the estimation device 120. In Fig. 21, the estimation device 120 determines whether to start learning by receiving a predetermined operation indicating the start of learning via the operation unit 123 (Fig. 5) (step S601). The estimation device 120 waits until learning starts (step S601: NO), and when learning starts (step S601: YES), it inputs imaging information 300 (one frame image 301) captured by the imaging device 100 (step S602).

[0114] Then, the estimation device 120 judges whether or not the region of interest 310 has been set (step S603). If the region of interest 310 has been set (step S603: YES), the estimation device 120 proceeds to step S605. If the region of interest 310 has not been set (step S603: NO), the estimation device 120 detects the face area of ​​the cow Bu, and sets multiple regions of interest 310 (310a to 310d) in the imaging area 302 based on the detection result (step S604).

[0115] Then, the estimation device 120 identifies one region of interest 310 from among the multiple regions of interest 310 (step S605). Next, the estimation device 120 extracts a face image 320 from the identified one region of interest 310 (step S606). Then, the estimation device 120 calculates an overlap rate based on the region of the extracted face image 320 and the region of interest 310 (step S607).

[0116] Next, the estimation device 120 determines whether the overlap rate is equal to or greater than a threshold (step S608). If the overlap rate is less than the threshold (step S608: NO), the estimation device 120 proceeds to step S614. If the overlap rate is equal to or greater than the threshold (step S608: YES), the estimation device 120 inputs the extracted face image 320 into the trained model (step S609).

[0117] The estimation device 120 judges whether or not a cow ID has been derived as a result of inputting the face image 320 into the trained model (step S610). Specifically, when the probability indicated by the highest-valued element among the output vectors of the trained model is equal to or greater than a threshold, the estimation device 120 judges that a cow ID corresponding to the element has been derived. On the other hand, when the probability indicated by the highest-valued element among the output vectors of the trained model is less than a threshold, the estimation device 120 judges that a cow ID has not been derived. When a cow ID has been derived (step S610: YES), that is, when a cow ID has been identified, the estimation device 120 proceeds to step S613. Note that when a cow ID has been derived, the cow ID may be displayed on the display 125. On the other hand, when a cow ID has not been derived (step S610: NO), the estimation device 120 judges whether or not a cow ID corresponding to the identified one region of interest 310 has been assigned (step S611).

[0118] If a cow ID corresponding to the one region of interest 310 is assigned (step S611: YES), the estimation device 120 proceeds to step S613. On the other hand, if a cow ID corresponding to the region of interest 310 is not assigned (step S611: NO), the estimation device 120 assigns a new cow ID corresponding to the region of interest 310, that is, generates a folder 330 with a new folder ID assigned (step S612).

[0119] Next, the estimation device 120 stores the face image 320 in the folder 330 corresponding to the one region of interest 310 (step S613). Then, the estimation device 120 determines whether or not all regions of interest 310 have been identified in the target frame image 301 (step S614). If all regions of interest 310 have not been identified (step S614: NO), the estimation device 120 returns to step S605 and performs extraction and storage of face images 320 for the other regions of interest 310 that have not been identified.

[0120] On the other hand, if all the regions of interest 310 have been identified (step S614: YES), the estimation device 120 determines whether a predetermined time (e.g., 5 minutes) that allows for obtaining a predetermined number of face images 320 from which a trained model can be created has elapsed (step S615). If the predetermined time has not elapsed (step S615: NO), the estimation device 120 returns to step S602 and inputs the next frame image 301.

[0121] On the other hand, if the predetermined time has elapsed (step S615: YES), the estimation device 120 creates a trained model for determining the cow ID using the face images 320 stored for each folder 330 (step S616). If a trained model has already been created, the estimation device 120 overwrites the trained model. Note that the predetermined time shown in step S615, which serves as a trigger for starting learning, can be arbitrarily changed. Furthermore, the trigger is not limited to being a predetermined time, and may be a predetermined number of frames or the number of stored face images 320.

[0122] When the creation of the trained model in step S616 is completed, the estimation device 120 releases the association between the region of interest 310 corresponding to the target cow ID of the trained model and the cow ID (step S617). Next, the estimation device 120 determines whether to end the learning by receiving a predetermined operation indicating the end of the learning from the operation unit 123 (see FIG. 4) (step S618).

[0123] If the learning is not to be ended (step S618: NO), the estimation device 120 returns to step S602 and inputs the next frame image 301. On the other hand, if the learning is to be ended (step S618: YES), the estimation device 120 ends the series of processes.

[0124] By the above-mentioned process, the estimation device 120 can store the face images 320 extracted from the regions of interest 310 in the folders 330 for each cow ID (each region of interest 310). Furthermore, the estimation device 120 can create a trained model using the face images 320 in each folder 330 as input samples. Furthermore, by repeatedly executing the above-mentioned process, the number of cows Bu that can be identified by the trained model can be gradually increased.

[0125] (Effects of the eating time estimation system 1) As described above, in this embodiment, the feeding time estimation system 1 (estimation device 120) detects the head position (bounding box 600: FIG. 6) of the cow Bu based on the imaging data obtained by imaging the cow Bu from the front, and sets the feeding reference line 900 (FIG. 9) in the image shown by the imaging data. Then, the feeding time estimation system 1 determines whether the cow Bu is eating based on the coordinates indicated by the detected head position and the coordinates indicated by the feeding reference line 900, and estimates the feeding time of the cow Bu based on the determination result. As a result, since no sensor or the like is attached to the cow Bu, the feeding time can be estimated easily and quickly without causing stress to the livestock. Therefore, the quality of livestock can be improved. In addition, it is possible to support early detection of diseases and movement disorders of the cow Bu, and to reduce the workload of livestock farmers related to health management. Therefore, according to this embodiment, the health management of the cow Bu can be efficiently performed.

[0126] In this embodiment, a fence 20 having a lower end extension 20a positioned above the head position of the cow Bu when eating is placed in the feeding area 10. The feeding time estimation system 1 sets an eating reference line 900 (FIG. 9) on the lower end extension 20a based on a detection straight line 800 (FIG. 8) obtained from an image represented by the imaging data. This allows the eating reference line 900 to be set easily (automatically). Also, since the presence or absence of eating can be determined based on the lower end extension 20a, the estimation accuracy of the feeding time can be improved.

[0127] In this embodiment, the fence 20 has an upper end extension 20b that restricts the upward movement of the head of the cow Bu. The feeding time estimation system 1 detects the maximum height of the head position, sets a region of interest 700 (FIG. 7) that excludes the region above the coordinates indicated by the detected maximum height from the region indicated by the imaging data, and detects a straight line from within the region of interest 700. This makes it possible to remove the upper end extension 20b from the input image 500 (FIG. 5) indicated by the imaging data, making it difficult for the straight line detection unit 155 to detect a straight line corresponding to the upper end extension 20b. In other words, it makes it easy for the straight line detection unit 155 to detect a straight line corresponding to the lower end extension 20a. Therefore, the feeding reference line 900 can be set accurately to the lower extension 20a, thereby improving the estimation accuracy of the feeding time.

[0128] In this embodiment, the feeding time estimation system 1 sets a plurality of divided areas 1000 (FIG. 10) corresponding to a plurality of livestock in the image shown by the imaging data, and determines whether or not each divided area 1000 has eaten to estimate the feeding time of the livestock. This makes it possible to efficiently determine whether or not each cow Bu in the divided area 1000 has eaten, and therefore to efficiently estimate the feeding time of each cow Bu. Even if the cows are not individually identified at the facility, the feeding time of each cow Bu can be efficiently obtained by associating each separately acquired cow ID with each feeding time. Note that separately obtaining the cow ID may mean, for example, receiving the cow ID corresponding to the cow Bu in each divided area 1000 from the operator, or obtaining the cow ID from a learned model generated during the estimation of the feeding time if a learned model has not been generated.

[0129] In addition, in this embodiment, the feeding time estimation system 1 identifies the cow Bu and outputs an estimation result in which the identified cow ID and the feeding time are associated with each other. This makes it possible to present the feeding time of each cow Bu to the operator. Therefore, the operator can easily understand the feeding time of each cow Bu.

[0130] (Effects of the Livestock Identification System 1800) Furthermore, the livestock identification system 1800 according to this embodiment extracts a face image 320 of the cow Bu in the region of interest 310 based on imaging information obtained by imaging the cow Bu from the front, and classifies and stores the face image 320 for each cow ID corresponding to the region of interest 310. This makes it possible to easily and accurately obtain the face image 320 of the cow Bu eating feed at the feeding area 10. Therefore, it is possible to identify the cow Bu based on the face image 320. Therefore, it is possible to easily identify the cow Bu with a simple configuration without having to attach a communication device to a part of the body of the cow Bu or install repeaters throughout the farm. This reduces the burden on dairy farmers involved in identifying the cow Bu.

[0131] In this embodiment, the livestock identification system 1800 (estimation device 120) stores a face image 320 for each cow ID corresponding to the region of interest 310, based on the degree of overlap between the region indicated by the face image 320 and the region of interest 310. This makes it possible to prevent a face image 320 in which the region showing the face of the cow Bu is small, that is, a face image 320 with low accuracy that is outside the region of interest 310, from being stored. For this reason, for example, it is possible to prevent a face image 320 with low accuracy from being used to create a trained model. This makes it possible to improve the accuracy of identifying cow IDs.

[0132] Furthermore, in this embodiment, the estimation device 120 detects the face area of ​​the cow Bulb in the image capturing area 302 based on the imaging information 300, and sets the region of interest 310 based on the detected face area. This makes it possible to set a suitable region of interest 310 according to the position of the cow Bulb. In other words, no matter where in the image capturing area 302 the cow Bulb eats food, the face image 320 can be suitably obtained.

[0133] Furthermore, in this embodiment, the estimation device 120 inputs the face image extracted by the extraction unit 203 to the discrimination model, and classifies the face image 320 into the discriminated cow ID if the accuracy is equal to or greater than a predetermined value, and classifies the face image 320 into the cow ID corresponding to the region of interest 310 if the accuracy is less than the predetermined value. This makes it possible to create a folder 330 with a cow ID attached even for a cow Bu that has just entered the feeding ground 10 (a cow Bu to which a cow ID has not been assigned), and to appropriately classify the face image 320.

[0134] In this embodiment, the estimation device 120 uses a learning data set in which the face image 320 stored for each cow ID is used as an input sample, and a one-hot vector indicating the class to which the face image 320 belongs among a plurality of classes is used as an output sample to create a trained model (discrimination model) so as to output a vector indicating the posterior probability of the class to which the face image 320 belongs, corresponding to the input face image 320. This makes it possible to automatically create a trained model in about a few minutes using the face image 320 of the cow Bu eating feed at the feeding ground 10. Therefore, it is possible to easily and quickly create a trained model, and to identify cow IDs with high accuracy.

[0135] Furthermore, in this embodiment, the estimation device 120 sets the discrimination model to the trained model created by the learning device 220. This allows the creation of a trained model by creating a folder 330 with a cow ID even for a cow Bu (a cow Bu to which a cow ID has not been assigned) that has just entered the feeding ground 10. This allows the creation of trained models for all cows Bu in the dairy farm in an easy and quick manner.

[0136] In this embodiment, the estimation device 120 inputs the face image 320 into the trained model trained by the learning device 220, thereby identifying the cow ID and outputting the identification result. This makes it possible to easily and accurately identify the cow Bu eating feed at the feeding area 10. Therefore, it becomes possible to suitably identify the cow Bu with a simple configuration.

[0137] Furthermore, in this embodiment, the estimation device 120 extracts the face image 320 from each of the imaging information 300 of a predetermined number of consecutive frame images, identifies the cow ID, and outputs it. This makes it possible to display the real-time identification result on the display 125 every time imaging information 300 (frame image) is input. Therefore, the identification result can be quickly presented to the operator.

[0138] Furthermore, in this embodiment, the estimation device 120 outputs the most frequently identified cow ID among the cow IDs identified in a predetermined number of frame images as the final result. As a result, although there is a possibility that the identification results may vary depending on the direction of the cow Bu's face, even if such variation occurs, the cow ID that is most frequently identified within a predetermined time can be the final result. Therefore, it is possible to identify cow IDs with higher accuracy.

[0139] (Modification of the embodiment) Modifications of the embodiment will be described below. Note that in the following modifications, the contents described in the above-mentioned embodiment will be omitted as appropriate. Also, the following modifications and the above-mentioned embodiment can be combined with each other.

[0140] (Modification) In the above embodiment, an example has been described in which a fence 20 is placed in the feeding area 10, and the feeding reference line 900 is set at the lower end extension part 20a that extends from the lower end. In the modified example, instead of or in addition to this configuration, an example will be described in which a feeding box is placed in the feeding area 10, and the feeding reference line 900 is set at the upper side of the feeding box.

[0141] In the feeding time estimation system 1 according to the modified example, a box-shaped feeding box is placed in the feeding area 10 instead of or in addition to the fence 20 as a fixture. The feeding box has a bottom plate and side plates (e.g., four side plates) that rise from the bottom plate. The feeding box has a storage area surrounded by the plates, and stores feed in the storage area. The cow Bu puts its head into the feeding box to eat the feed. The feeding box has upper edge portions of the side plates as straight parts extending laterally. The upper edge portions of the side plates are located above the position of the head of the cow Bu when it is eating.

[0142] In the modified example, the straight line detection unit 155 detects many straight lines on the upper edge portions of the side panels that form the feeding box. The reference line setting unit 156 sets the coordinates (Y coordinate) of the upper edge portions of the side panels as the eating reference line 900 based on the straight lines detected by the straight line detection unit 155. Note that, even in the modified example, the eating reference line 900 may be manually set by the operator. That is, the reference line setting unit 156 may set the eating reference line 900 based on the straight lines (Y coordinate) input by the operator.

[0143] By setting the eating reference line 900 in this manner, the discrimination unit 159 can determine that the cow Bu has eaten when the Y coordinate of the lower side of the bounding box 600 (FIG. 6) representing the head of the cow Bu falls below the eating reference line 900 (the upper side part of the side panel).

[0144] As described above, in the feeding time estimation system 1 according to the modified example, a feeding box having a side plate (upper edge) located above the head position of the Budgie when eating is placed in the feeding area 10. The feeding time estimation system 1 then sets an eating reference line 900 (FIG. 9) on the upper edge of the side plate. This makes it possible to easily (automatically) set the eating reference line 900 even when a feeding box is used. In addition, since it is possible to determine the presence or absence of eating based on the upper edge of the side plate, it is possible to improve the accuracy of estimating the eating time. Therefore, according to the modified example, the health of the Budgie can be managed efficiently.

[0145] Note that each of the functional units of the feeding time estimation system 1, the livestock identification system 1800, the estimation device 120, the storage control device 200, and the learning device 220 is not limited to being realized by a hardware processor such as the CPU 121 executing a program (software). For example, some or all of these functional units may be realized by hardware (including circuitry) such as an LSI (Large Scale Integration), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a GPU (Graphics Processing Unit), or may be realized by cooperation between software and hardware. The program may be stored in advance in a storage device (a storage device having a non-transient storage medium) such as an HDD (Hard Disk Drive) or a flash memory, or may be stored in a removable storage medium (a non-transient storage medium) such as a DVD or a CD-ROM, and installed by mounting the storage medium in a drive device.

[0146] Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These embodiments can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope of the invention and its equivalents described in the claims, as well as in the scope and spirit of the invention.

[0147] The programs for implementing the feeding time estimation system 1, the livestock identification system 1800, the estimation device 120, the storage control device 200, and the learning device 220 described above may be recorded in a computer-readable storage medium, and the programs may be read into a computer system and executed. The term "computer system" as used herein includes hardware such as an OS and peripheral devices. The term "computer-readable storage medium" refers to portable media such as flexible disks, optical magnetic disks, ROMs, and CD-ROMs, and storage devices such as hard disks built into a computer system. The term "computer-readable storage medium" also includes storage devices that hold a program for a certain period of time, such as volatile memory (RAM) inside a computer system that becomes a server or a client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. The above-mentioned program may be transmitted from a computer system that stores the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium. Here, the "transmission medium" that transmits the program refers to a medium that has a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line. The program may be for implementing some of the functions described above, or may be a so-called differential file (differential program) that can implement the functions described above in combination with a program already recorded in the computer system. [Explanation of symbols]

[0148] 1...Eating time estimation system, 100...Imaging device, 120...Estimation device, 121...CPU, 122...Memory, 123...Operation unit, 124...Microphone, 125...Display, 126...Speaker, 127...Communication I / F, 151...Data input unit, 152...Position detection unit, 153...Height detection unit, 154...Region of interest setting unit, 155...Straight line detection unit, 156...Reference line setting unit, 157...Division area Region setting unit, 158... matrix generation unit, 159... discrimination unit, 160... identification unit, 161... estimation unit, 200... memory control device, 201... input unit, 202... setting unit, 203... extraction unit, 204... memory control unit, 205... detection unit, 210... memory unit, 220... learning device, 221... learning processing unit, 231... imaging information input unit, 232... face image extraction unit, 234... output unit, 1800... livestock identification system,

Claims

1. a data input means for inputting imaging data obtained by imaging livestock in a feeding area from the front; a position detection means for detecting a head position of the livestock based on the imaging data; a reference line setting means for setting a reference line relating to feeding of the livestock in an image represented by the imaging data; A determination means for determining whether the livestock is eating based on the coordinates indicated by the head position and the coordinates indicated by the reference line; An estimation means for estimating the feeding time of the livestock based on the discrimination result of the discrimination means; An estimation device comprising:

2. A fixture having a straight portion extending laterally is disposed within the feeding area, The straight portion is located above the head position during eating, a straight line detection means for detecting a straight line from an image represented by the imaging data, The reference line setting means sets the reference line based on the straight line detected by the straight line detection means.

2. The estimation device according to claim 1 .

3. The equipment includes a fence section for keeping the livestock, The straight portion includes a lower extension portion that extends to a lower end of the fence portion, The reference line setting means sets the reference line on the lower extension portion based on the straight line detected by the straight line detection means.

3. The estimation device according to claim 2 .

4. The straight portion includes an upper end extension portion that extends to an upper end of the fence portion, The upper end extension portion restricts the head of the livestock from moving upward, a height detection unit that detects a maximum height of the head position based on the head position detected by the position detection means; a region of interest setting means for setting a region of interest from the region indicated by the imaging data, excluding a region above the coordinates indicated by the maximum height detected by the height detection unit; Equipped with The line detection means detects a line from within the region of interest set by the region of interest setting means.

4. The estimation device according to claim 3.

5. a division area setting means for setting a plurality of division areas corresponding to the plurality of livestock in an image represented by the imaging data obtained by simultaneously imaging the plurality of livestock from the front, The determining means determines whether or not eating has occurred for each of the plurality of divided regions, The estimation means estimates the feeding time of the livestock for each of the plurality of divided areas. The estimation device according to any one of claims 1 to 4.

6. an identification means for identifying the livestock based on the imaging data; The estimation means outputs an estimation result in which the livestock identified by the identification means is associated with the feeding time. The estimation device according to any one of claims 1 to 4.

7. The computer of the estimation device a data input step of inputting imaging data obtained by imaging livestock in a feeding area from the front; a position detection step of detecting a head position of the livestock based on the imaging data; a reference line setting step of setting a reference line related to feeding of the livestock in an image represented by the imaging data; a determination step of determining whether the livestock is eating based on the coordinates indicated by the head position and the coordinates indicated by the reference line; an estimation step of estimating the feeding time of the livestock based on the discrimination result of the discrimination step; The estimation method according to claim 1, further comprising the steps of:

8. A computer of the estimation device, A data input means for inputting image data obtained by photographing livestock in a feeding area from the front; a position detection means for detecting a head position of the livestock based on the imaging data; a reference line setting means for setting a reference line relating to feeding of the livestock in an image represented by the imaging data; a determination means for determining whether the livestock is eating based on the coordinates indicated by the head position and the coordinates indicated by the reference line; an estimation means for estimating the feeding time of the livestock based on the discrimination result of the discrimination means; A program characterized by causing the program to function as a

9. An estimation system including an imaging device that images livestock in a feeding area from the front and an estimation device, The estimation device comprises: A data input means for inputting imaging data obtained by imaging the livestock from the front; a position detection means for detecting a head position of the livestock based on the imaging data; a reference line setting means for setting a reference line relating to feeding of the livestock in an image represented by the imaging data; A determination means for determining whether the livestock is eating based on the coordinates indicated by the head position and the coordinates indicated by the reference line; An estimation means for estimating the feeding time of the livestock based on the discrimination result of the discrimination means; An estimation system comprising:

Citation Information

Patent Citations

  • Ear mark for measuring body temperature and body temperature controlling system for group feeding using the same and method for controlling body temperature for group feeding

    JP2004298020A