Method and system for automatically evaluating body conditions of milk goats

Through the combination of video acquisition and YOLOv5 model, the body condition of dairy goats is automatically evaluated, which solves the subjectivity and time-consuming problems of traditional assessment methods, and achieves rapid and accurate body condition assessment, which is suitable for large-scale places.

CN119169669APending Publication Date: 2024-12-20INNER MONGOLIA AGRICULTURAL UNIVERSITY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411686800.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

There are subjective differences in body condition assessment of traditional dairy goats and time-consuming sheep constraints, which are difficult to effectively implement in a large-scale field.

Method used

Video acquisition and YOLOv5 model were used to analyze the back image of dairy goats, and their physical condition was automatically evaluated, including three categories: thin, medium and fat, avoiding manual assessment of subjectivity and constraint processes.

Benefits of technology

It realizes rapid and accurate automatic assessment of dairy goat body condition, significantly improving the evaluation efficiency and objectivity, and is suitable for large-scale dairy goat farms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169669A_ABST
    Figure CN119169669A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of animal body condition evaluation, and particularly relates to a milk goat body condition automatic evaluation method and system. The method comprises the following steps: firstly, performing video acquisition and analysis on the backs of goats in a milking channel scene of a large-scale milk goat farm, and constructing an original image data set of the backs of the goats; then feature analysis is carried out on the key area of the original sheep back image in the original sheep back image data set, finally, the sheep body condition is automatically evaluated according to a YOLOv5 model, and the sheep body condition automatic evaluation result comprises a slightly-thin body condition, a medium body condition and a slightly-fat body condition. According to the YOLOv5 model and system, in the actual application process, automatic, non-contact, zero-stress and subjective evaluation independent of evaluators is achieved, animals are not restrained, the body conditions of the sheep can be rapidly and accurately evaluated, and the application prospect of the YOLOv5 model and system in the agricultural field is wider.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of animal body condition assessment, and in particular relates to an automatic body condition assessment method and system for dairy goats. Background Art

[0002] Body condition scoring is also the body condition assessment of animals. In English, it is called Body Condition Scoring, abbreviated as BCS. BCS is a method to measure the storage status of fat tissue and muscle tissue in animal body tissues and monitor the energy balance of animals. It is an important tool for daily feeding and management on ranches. Many studies have shown that moderate body condition of animals at different physiological stages can better improve the health level of the body and exert production potential. As small dairy animals, dairy goats have different requirements for body fat reserves in adolescence, pregnancy, and lactation. By changing the supply of nutrients to regulate the fat reserves of dairy goats, it is helpful to reduce feeding costs and reduce the possibility of disease while fully exerting the production potential of dairy goats. Through continuous exploration and practice, BCS has gradually become a key detection tool for dairy goat farm breeding management.

[0003] The observation areas for the physical condition assessment of traditional dairy goats mainly include the shoulder area and the waist area; among them, the shoulder area includes the neck, chest, shoulders and the area above the elbow, and the visual assessment is made by manually touching the muscles and fat coverage of the sheep's sternum. The waist area includes the waist, buttocks, hip joints and sciatic joints, and the visual assessment is made by manually touching the spine, short ribs and muscles on the eye muscles and the degree of fat coverage of the sheep. Among them, the spine is mainly the spinous process of the vertebrae and the transverse process of the lumbar vertebrae. When assessing the physical condition of sheep, it is necessary to observe the sheep in a natural standing state and restrain the sheep, and the manual assessment is made by first observing the whole, then the part, first observing, and then touching. The problems with the physical condition assessment of sheep are: first, it requires very experienced assessors, the assessment is subjective, there are subjective differences, and it is not objective enough; second, the restraint of sheep is time-consuming and not easy to achieve in large-scale dairy goat farms. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a method for automatically assessing the body condition of dairy goats, which does not rely on the subjective assessment of the assessor, does not impose any constraints on the goats, and can quickly and accurately assess the body condition of the goats.

[0005] The purpose of the present invention is to provide a method for automatically assessing the body condition of dairy goats. First, video acquisition and analysis are performed on the backs of goats in a milking channel scene in a large-scale dairy goat farm to construct a data set of original images of the backs of goats; then, feature analysis is performed on key areas of the original images of the backs of goats in the data set of original images of the backs of goats; finally, the body condition of goats is automatically assessed based on a YOLOv5 model, and the automatic assessment results of the body condition of goats include three categories: thin body condition, medium body condition and fat body condition.

[0006] Preferably, the above-mentioned method for automatically assessing the body condition of dairy goats performs video acquisition and analysis on the backs of goats in the milking channel scene of a large-scale dairy goat farm, and the specific process of constructing a data set of original images of the backs of goats is: The back video of the sheep walking in the milking channel is collected to extract the back image of the sheep; Calibration: With the center line of the sheep's back image as a reference, when the extracted sheep's back image shows that the sheep's back body position offset angle ranges from -30° to 30°, the sheep's back image is rotated to make the sheep's back center line coincide with the center line of the sheep's back image before the rotation. When the sheep's back body position offset angle is 0, there is no need to rotate the sheep's back image. The set of all sheep back original images obtained after calibration is the sheep back original image dataset.

[0007] Preferably, in the above-mentioned method for automatically assessing the body condition of dairy goats, the width of the milking channel is 90 cm to 95 cm; and the video acquisition height is 2 m to 2.3 m.

[0008] Preferably, in the above-mentioned method for automatically assessing the body condition of dairy goats, the key area is the back area between the upper edge of the goat's shoulder blade and the connection between the lumbar vertebrae and the sacral vertebrae, or the back area between the connection between the lumbar vertebrae and the dorsal vertebrae and the connection between the lumbar vertebrae and the sacral vertebrae.

[0009] Preferably, the above-mentioned automatic assessment method of the body condition of dairy goats, performing feature analysis on key areas of the original images of the sheep's back in the original image data set of the sheep's back means: performing feature analysis on each original image of the sheep's back, obtaining a law of feature change, determining an upper limit threshold and a lower limit threshold based on the law of change, and then dividing the body condition of the sheep based on the upper limit threshold and the lower limit threshold.

[0010] Preferably, in the above-mentioned method for automatically assessing the body condition of dairy goats, the goats include dairy goats in the early lactation period, the peak lactation period, the middle lactation period and the late lactation period.

[0011] A system applicable to the automatic evaluation method of the body condition of dairy goats, comprising a data acquisition system and a data processing system; The data acquisition system includes a camera for video acquisition; The data processing system comprises: Processor; The processor includes a video acquisition module, an image extraction module and an automatic body condition assessment module. The video acquisition module is used to acquire a back video of a sheep walking in a milking channel scene. The image extraction module is used to extract an original image of the sheep's back from the back video of the sheep walking in the milking channel scene. The automatic body condition assessment module uses a trained YOLOv5 model to automatically assess the body condition of the sheep. Display, used to output the automatic evaluation results of the sheep's body condition; The memory stores information including a video of the back of a sheep walking in a milking channel, an original image of the sheep's back, and an automatic assessment result of the sheep's body condition.

[0012] Compared with the prior art, the present invention has the following beneficial effects: The present invention first performs video acquisition and analysis on the backs of goats in the milking channel scene of a large-scale dairy goat farm to construct a data set of original images of the backs of goats; then, feature analysis is performed on the key areas of the original images of the backs of goats in the data set of original images of the backs of goats; finally, the body condition of the goats is automatically assessed based on the YOLOv5 model, and the automatic assessment results of the body condition of the goats include thin body condition, medium body condition and fat body condition. The present invention is the first to apply computer vision technology including video acquisition and other operations to the automatic assessment of the body condition of goats. In actual application, the YOLOv5 model of the present invention does not rely on the subjective assessment of the assessor, nor does it impose constraints on the goats, and can automatically assess the body condition of the goats quickly and accurately. According to our verification results, the YOLOv5 model can significantly distinguish sheep with different body conditions, making its application prospects in the agricultural field broader. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 Schematic diagram of the principle of image acquisition of the present invention; A is a schematic diagram of sheep walking in a milking channel scene, and B is an example of an extracted image of a sheep's back.

[0014] Figure 2 It is a calibration principle diagram, where A is the offset angle of the sheep's back position of -30°, B is the offset angle of the sheep's back position of 0°, and C is the offset angle of the sheep's back position of 30°.

[0015] Figure 3 3 and 4. The diagrams are division diagrams of key areas of different embodiments and control examples, wherein A is a schematic division diagram, the upper back is also called the spine, the lower back is also called the waist, and B is a physical division diagram. DETAILED DESCRIPTION

[0016] In order to enable those skilled in the art to better understand and implement the technical solution of the present invention, the present invention is further described below in conjunction with specific embodiments and drawings.

[0017] In the description of the present invention, unless otherwise specified, all reagents used are commercially available and all methods used are conventional techniques in the art.

[0018] BCS can not only grade the nutritional status of the animals themselves, but also reflect the nutritional management level of the farm and the welfare level of the animals. However, the problems with the physical condition assessment of goats in traditional large-scale dairy goat farms are: first, it requires very experienced assessors, and the assessment is subjective, with subjective differences, and is not objective enough; second, during manual assessment, the restraint of the goats is time-consuming and not easy to achieve in large-scale dairy goat farms.

[0019] Based on the above reasons, the present invention proposes a method for automatically assessing the body condition of dairy goats. First, the backs of goats in the milking channel scene of large-scale dairy goat farms are video collected and analyzed to construct a data set of original images of the backs of goats. Then, the key areas of the original images of the backs of goats in the data set of original images of the backs of goats are feature analyzed. Finally, the body condition of goats is automatically assessed based on the YOLOv5 model. The automatic assessment results of the body condition of goats include thin body condition, medium body condition and fat body condition. This avoids the problem that manual assessment is affected by subjectivity and the assessment results vary from person to person. It also avoids the problem that "goat constraints are time-consuming and difficult to achieve in large-scale dairy goat farms".

[0020] Example 1 A method for automatically assessing the physical condition of a dairy goat comprises the following steps: S1, collect and analyze videos of the backs of goats in the milking channel of a large-scale dairy goat farm to construct a dataset of original images of the backs of goats.

[0021] Specifically, the experimental goats were dairy goats, including 120 dairy goats in the early lactation, peak lactation, mid-lactation and late lactation stages.

[0022] The video acquisition equipment mainly includes Hikvision cameras, shooting stands and computer processing systems. The video acquisition environment includes sunny days and cloudy days. The resolution of Hikvision cameras is 2560 pixels × 1440 pixels. The position of Hikvision cameras, i.e., the acquisition height, is 2.3m above the ground center point of the acquisition channel, and it is a bird's-eye view. The acquisition channel is 90cm wide. It should be noted that the milking channel is 90cm~95cm wide; the video acquisition height is 2m~2.3m. Any value within these numerical ranges can be used for video acquisition. These values ​​are for the purpose of acquiring a complete image of the sheep's back. This embodiment only exemplifies a specific value.

[0023] The specific steps of video acquisition are: use Hikvision cameras to capture the back video of sheep walking in the milking channel scene, then extract the back image of the sheep in the back video of the sheep walking in the milking channel scene, and use the center line of the back image of the sheep as a reference. The back position offset angle of the sheep displayed in 90% of the back images is in the range of -30°~30°. When the center line of the sheep's back coincides with the center line of the back image of the sheep it is in, the back position offset angle of the sheep is 0.

[0024] The calibration method is: the sheep back images are all rotated by angle, and the sheep back position rotates with the angle until the angle is rotated to the point where the center line of the sheep back coincides with the center line of the sheep back image before the angle rotation, and the first image data set is obtained; for the sheep back center line that has already coincided with the center line of the sheep back image before the angle rotation, no rotation is required, and the second image data set is obtained; the images in the first image data set and the second image data set are both used as the original images of the sheep back. It should be noted that the sheep back image and the original image of the sheep back are two different terms.

[0025] The set of all the original images of the back of the sheep obtained after calibration is the original image data set of the back of the sheep. The back video of the sheep walking in the milking channel scene and the original image of the back of the sheep are stored in the memory for standby use.

[0026] Figure 1 Schematic diagram of the principle of image acquisition of the present invention, Figure 1 A is a schematic diagram of sheep walking in a milking channel scene, and B is an example of an extracted sheep back image.

[0027] See the calibration schematic for Figure 2 , where A is the offset angle of the sheep's back position -30°, that is, compared with the center line of the sheep's back image, the sheep's back position is offset 30° to the left; B is the offset angle of the sheep's back position is 0, that is, the center line of the sheep's back in this position coincides with the center line of the sheep's back image; C is the offset angle of the sheep's back position 30°, that is, compared with the center line of the sheep's back image, the sheep's back position is offset 30° to the right. Figure 2 In A and C of FIG. 1 , the dotted line is the center line of the sheep's back image before rotation, and the dotted line is the center line of the sheep's back image before rotation.

[0028] The present invention combines the growth and development cycle of the sheep's body condition in a breeding environment to construct a dataset of original images of the sheep's backs under different body conditions and different video acquisition environment conditions.

[0029] S2, performing feature analysis on key areas of the original images of the sheep's back in the original image dataset of the sheep's back.

[0030] The details are as follows: The back area between the connection between the lumbar vertebrae and dorsal vertebrae and the connection between the lumbar vertebrae and sacral vertebrae of the sheep is taken as the key area, and this key area corresponds to the lower back of the sheep. ImageJ software and Avizo 9.0 software were used to extract the contour RGB image of the key area of ​​the original image of the sheep's back by applying the grayscale difference method between the target foreground and the background, and then converted into an 8-bit grayscale image, where R represents red, G represents green, and B represents blue. The 8-bit grayscale image is a 256-level grayscale image. The concave area index of the key area obtained from the 8-bit grayscale image was obtained, and the change pattern of the concave area index from small to large was obtained. The change pattern of the concave area index from small to large was obese body condition < medium body condition < thin body condition, and the difference was significant. P <0.05, and then determine the upper and lower limit thresholds of thin body condition, medium body condition and fat body condition according to the change law of the depression area index from small to large, and evaluate the sheep corresponding to the original image of the sheep's back according to the upper and lower limit thresholds, and get three categories of thin body condition, medium body condition and fat body condition.

[0031] In this embodiment, the upper limit threshold is 15%, and the lower limit threshold is 85%. The original images of the backs of sheep ranked before 15% in descending order of the concave area index correspond to sheep with a fat body condition, the original images of the backs of sheep ranked after 85% correspond to sheep with a thin body condition, and the original images of the backs of the remaining sheep correspond to sheep with a medium body condition.

[0032] S3, automatically assess the body condition of sheep based on the YOLOv5 model.

[0033] The details are as follows: The computer environment configuration used for model training is shown in Table 1. First, the original image of the sheep's back is preprocessed by mirroring, random brightness, noise, rotation and scaling to complete the amplification of the original image data set of the sheep's back. The amplified original image data set of the sheep's back is divided into a training set, a validation set and a test set. The YOLOv5 network model is used for training to obtain a trained YOLOv5 model, referred to as the YOLOv5 model. Finally, the body condition of the sheep is automatically assessed based on the YOLOv5 model. The automatic assessment results of the sheep's body condition include thin body condition, medium body condition and fat body condition. The automatic assessment results of the sheep's body condition are stored in the memory.

[0034] The YOLOv5 network model includes an input part, a feature extraction part, a feature fusion part, and an output part. The input part is used to input the training set into the YOLOv5 network model; the feature extraction part adopts the CSPDarknet53 structure to extract the semantic information of the key area; the feature fusion part uses the PAN structure to process the semantic information, fuse information of different scales, and enhance the expression of features; the output part includes 3 branches, and the feature map sizes of the 3 branches are 80 pixels × 80 pixels, 40 pixels × 40 pixels, and 20 pixels × 20 pixels, respectively. 80 pixels × 80 pixels, 40 pixels × 40 pixels, and 20 pixels × 20 pixels are used to identify the lean body condition, medium body condition, and fat body condition, respectively, and output the automatic assessment results of the sheep's body condition.

[0035] Table 1 Computer environment configuration used for model training

[0036] S4, Model Validation The original image of the sheep's back was input into the YOLOv5 model for model verification. Table 2 shows the verification results of the YOLOv5 model. It can be seen that the accuracy of the YOLOv5 model reached 0.758. The accuracy rates of the lean body condition, medium body condition, and fat body condition were 0.813, 0.76, and 0.701, respectively. The lean body condition had the highest accuracy, followed by the medium body condition.

[0037] Table 2. YOLO v5 model training results of sheep body condition

[0038] S5, independent sample verification 130 new mid-lactation dairy goats were randomly selected as independent sheep samples, and 5 professionals were hired to manually assess the body condition of the independent sheep samples, dividing them into thin body condition, medium body condition and fat body condition, and the total number of sheep in thin body condition, medium body condition and fat body condition was counted.

[0039] Specifically, during manual evaluation, the score of each sheep is first obtained according to the "Technical Specifications for Dairy Goat Breeding Part 1: Body Condition Scoring" DB15 / T 3332.1-2024, and then sheep with a score less than or equal to 2 are classified as thin, sheep with a score greater than 2 and less than 3 are classified as medium, and sheep with a score greater than or equal to 3 are classified as fat.

[0040] See Table 3 for some of the standards of "Technical Specifications for Dairy Goat Breeding Part 1: Body Condition Scoring" DB15 / T 3332.1-2024. It should be noted that in the actual scenario of large-scale dairy goat farms, sheep with scores below 1.5 points are rare, and sheep with scores above 3.5 points are also rare. The total number of sheep with scores less than 1.5 points and greater than 3.5 points accounts for less than 1% of the total number of sheep in the ranch, and they are generally identified as abnormal or sick individuals. Therefore, the actual operation scoring range that is beneficial to production is generally between 1.5 points and 3.5 points, so the present invention sets the corresponding relationship between the score and body condition in Table 3.

[0041] Table 3 Correspondence between scores and body condition

[0042] For independent sheep samples, the YOLOv5 model obtained by S3 is used to automatically assess the body condition of the sheep, and the results of automatic assessment of the body condition of the sheep are obtained.

[0043] The number of sheep in each body condition assessed manually was compared with the number of sheep in each body condition assessed automatically to further verify the accuracy of the automatic assessment method for the body condition of sheep in a large-scale sheep farm of the present invention.

[0044] The comparison results of the number of sheep in each body condition assessed manually and the number of sheep in each body condition assessed automatically are shown in Table 4. As can be seen from Table 4, for the number of sheep in thin body condition, the difference between the automatic and manual assessment of sheep body condition is small, with only two sheep; for the number of sheep in medium body condition, the number of sheep in automatic assessment of sheep body condition is less than that of manual assessment, and for the number of sheep in fat body condition, the number of sheep in automatic assessment of sheep body condition is higher than that of manual assessment; based on the total number of the three body conditions, the deviation number of the two assessment methods is 19, and the deviation rate is within 20%. The results also show that the two assessment methods of automatic and manual assessment of sheep body condition have large deviations in medium body condition and fat body condition, and small deviations in thin body condition, and the total number of the three body conditions has a certain deviation.

[0045] Table 4 Comparison results of body condition assessment

[0046] S6. Conclusion The sunken area index and changing pattern of the lower back of the sheep obtained in this embodiment show that the sunken area index of the thin body condition is 25.23%, which is higher than 16.18% of the medium body condition and 6.33% of the fat body condition, and there are significant differences among the groups. The thin body condition, the medium body condition and the fat body condition can be significantly distinguished, and the difference is not much from the manual evaluation result.

[0047] The model validation results show that the accuracy of the YOLOv5 model reaches 0.758. The accuracy of the thin body condition, medium body condition, and fat body condition are 0.813, 0.76, and 0.701 respectively. The thin body condition has the highest accuracy, followed by the medium body condition, proving that the YOLOv5 model has good accuracy.

[0048] Example 2 A method for automatically assessing the body condition of a dairy goat is substantially the same as the method of Example 1, except that: S2, feature analysis is performed on key areas of an original image of the goat's back in an original image data set of the goat's back.

[0049] S2 is as follows: The back area between the connection between the lumbar vertebrae and dorsal vertebrae and the connection between the lumbar vertebrae and sacral vertebrae of the sheep is the key area, and this key area corresponds to the lower back of the sheep. Using ImageJ software and Avizo 9.0 software, the grayscale difference method between the target foreground and background is applied to extract the contour RGB image of the key area of ​​the original image of the sheep's back, and convert it into the HSV color model to analyze its brightness. Among them, the Chinese name of the HSV color model is the hexagonal pyramid model, H represents hue, S represents saturation, and V represents brightness. The brightness of the key area is analyzed, and the change pattern of brightness from small to large is obtained. The change pattern of brightness from small to large is thin body condition < medium body condition < fat body condition, and the thin body condition is significantly distinguished from the medium body condition and fat body condition, and the difference is significant. P <0.05, there are also differences between medium body condition and fat body condition, but they are not significant. Then, the upper and lower limit thresholds of thin body condition, medium body condition and fat body condition are determined according to the change law of brightness from small to large. According to the upper and lower limit thresholds, the sheep corresponding to the original image of the sheep's back are evaluated, and three categories of thin body condition, medium body condition and fat body condition are obtained.

[0050] In this embodiment, the upper threshold is 19% and the lower threshold is 83%. The original images of the backs of sheep ranked before 19% in order of brightness are thin, the original images of the backs of sheep ranked after 83% are fat, and the original images of the backs of the remaining sheep are medium.

[0051] It has been verified that this embodiment has a high degree of accuracy and can significantly distinguish a thin body condition from other body conditions.

[0052] Example 3 A method for automatically assessing the body condition of a dairy goat is substantially the same as the method of Example 1, except that: S2, feature analysis is performed on key areas of an original image of the goat's back in an original image data set of the goat's back.

[0053] S2 is as follows: The back area between the connection between the lumbar vertebrae and dorsal vertebrae and the connection between the lumbar vertebrae and sacral vertebrae of the sheep is the key area, and this key area corresponds to the lower back of the sheep. ImageJ software and Avizo 9.0 software were used to extract the contour RGB image of the key area of ​​the original image of the sheep's back by applying the grayscale difference method between the target foreground and background, and the contour RGB image was converted into an 8-bit grayscale image. The grayscale mean of the key area obtained from the 8-bit grayscale image was analyzed to obtain the change pattern of the grayscale mean from small to large. The change pattern of the grayscale mean from small to large is lean body condition < medium body condition < fat body condition, and the lean body condition is significantly distinguished from the medium body condition and fat body condition, and the difference is significant. P <0.05, there are also differences between medium body condition and fat body condition, but they are not significant. Then, according to the change rule of grayscale mean from small to large, the upper and lower thresholds of thin body condition, medium body condition and fat body condition are determined, and the sheep corresponding to the original image of the sheep's back are evaluated according to the upper and lower thresholds, and three categories of thin body condition, medium body condition and fat body condition are obtained.

[0054] In this embodiment, the upper threshold is 19% and the lower threshold is 83%. The original images of the backs of sheep whose grayscale mean is ranked from small to large before 19% correspond to sheep with a thin body condition, the original images of the backs of sheep whose grayscale mean is ranked after 83% correspond to sheep with a fat body condition, and the original images of the backs of the remaining sheep correspond to sheep with a medium body condition.

[0055] It has been verified that this embodiment has a high degree of accuracy and can significantly separate the three categories of thin body condition, medium body condition and fat body condition, and there are significant differences between the three categories of body condition.

[0056] Example 4 A method for automatically assessing the body condition of a dairy goat is basically the same as the method in Example 1, except that the key area is changed to the back area between the upper edge of the goat's shoulder blade and the connection between the lumbar vertebrae and the sacral vertebrae, that is, the whole back of the goat.

[0057] In this embodiment, the concave area index of the entire back is extracted, and the remaining operations are the same as those in Embodiment 1.

[0058] It has been verified that this embodiment has a high degree of accuracy and can significantly separate the three categories of thin body condition, medium body condition and fat body condition, and there are significant differences between the three categories of body condition.

[0059] Example 5 A method for automatically assessing the body condition of a dairy goat is basically the same as the method in Example 2, except that the key area is changed to the back area between the upper edge of the goat's shoulder blade and the connection between the lumbar vertebrae and the sacral vertebrae, that is, the whole back of the goat.

[0060] This embodiment extracts the brightness of the entire back, and the remaining operations are the same as those in Embodiment 2.

[0061] It has been verified that this embodiment has a high degree of accuracy and can significantly distinguish a thin body condition from other body conditions.

[0062] Example 6 A method for automatically assessing the body condition of a dairy goat is basically the same as the method in Example 3, except that the key area is changed to the back area between the upper edge of the goat's shoulder blade and the connection between the lumbar vertebrae and the sacral vertebrae, that is, the whole back of the goat.

[0063] This embodiment extracts the grayscale mean of the entire back, and the remaining operations are the same as those in Embodiment 3.

[0064] It has been verified that this embodiment has a high degree of accuracy and can significantly distinguish a thin body condition from other body conditions.

[0065] Comparative Example 1 A method for automatically assessing the body condition of a dairy goat is basically the same as the method in Example 1, except that the key area is changed to the back area between the upper edge of the goat's shoulder blade and the connection between the lumbar vertebrae and the dorsal vertebrae, that is, the upper back area of ​​the goat.

[0066] Comparative Example 2 A method for automatically assessing the body condition of a dairy goat is basically the same as the method in Example 2, except that the key area is changed to the back area between the upper edge of the goat's shoulder blade and the connection between the lumbar vertebrae and the dorsal vertebrae, that is, the upper back area of ​​the goat.

[0067] Comparative Example 3 A method for automatically assessing the body condition of a dairy goat is basically the same as the method in Example 3, except that the key area is changed to the back area between the upper edge of the goat's shoulder blade and the connection between the lumbar vertebrae and the dorsal vertebrae, that is, the upper back area of ​​the goat.

[0068] After testing, it was found that the methods of control group 1 to control group 3 could not distinguish between thin body condition, medium body condition and fat body condition.

[0069] The above-mentioned embodiments and control examples discussed the influence of different back regions and different key regions of sheep on the division of body condition zones. Figure 3It is a division diagram of key areas of different embodiments and control examples, wherein A is a schematic division diagram, the upper back is also called the spine, the lower back is also called the waist, and B is a physical division diagram. The results show that the grayscale mean, brightness, and contour area of ​​the overall back of sheep in lean condition are significantly lower than those in medium condition and fat condition, and the aspect ratio and concavity are the highest. As the body condition of the sheep increases, the overall back color is brighter and whiter, and the concavity is smaller. In addition, under the same body condition, the grayscale mean and brightness of the lower back are lower than those of the upper back, and the concavity area index is higher than that of the upper back; the grayscale mean and concavity area index of the lower back in different body conditions are significantly different, wherein the concavity area index is thin condition>medium condition>fat condition, and the grayscale mean is the opposite; the lower back of dairy goats has obvious color and morphological characteristics, and as a key area, it plays a positive role in the study of the automatic assessment model of dairy goats.

[0070] In summary, using the lower back and the whole back of the sheep, combined with the original image and feature analysis of the sheep's back, the YOLOv5 model has high reliability and accuracy in automatically assessing the body condition of sheep.

[0071] Based on the same inventive concept, the present invention provides a system applicable to an automatic assessment method of the body condition of dairy goats, including a data acquisition system and a data processing system; The data acquisition system includes a camera for video acquisition; The data processing system comprises: Processor; The processor includes a video acquisition module, an image extraction module and an automatic body condition assessment module. The video acquisition module is used to acquire a back video of a sheep walking in a milking channel scene. The image extraction module is used to extract an original image of the sheep's back from the back video of the sheep walking in the milking channel scene. The automatic body condition assessment module uses a trained YOLOv5 model to automatically assess the body condition of the sheep. Display, used to output the automatic evaluation results of the sheep's body condition; The memory stores information including a video of the back of a sheep walking in a milking channel, an original image of the sheep's back, and an automatic assessment result of the sheep's body condition.

[0072] When the system is combined with the automatic assessment method of the body condition of dairy goats, it is easy to operate and reduces manual labor.

[0073] It should be noted that when the present invention involves a numerical range, it should be understood that the two endpoints of each numerical range and any value between the two endpoints can be selected. Since the steps and methods used are the same as those in the embodiments, in order to avoid redundancy, the present invention describes a preferred embodiment. Although the preferred embodiments of the present invention have been described, once those skilled in the art know the basic inventive concept, they can make other changes and modifications to these embodiments, and these changes and modifications all fall within the scope of the present invention.

[0074] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. If these modifications and variations of the present invention fall within the scope of the equivalent technology of the present invention, the present invention is also intended to include these modifications and variations.

Claims

1. A method for automatically assessing the body condition of dairy goats, characterized in that: Firstly, we collected and analyzed the videos of the backs of goats in the milking channel of large-scale dairy goat farms to construct a dataset of original images of the backs of goats. Then, we performed feature analysis on the key areas of the original images of the backs of goats in the dataset. Finally, we automatically assessed the body conditions of goats based on the YOLOv5 model. The results of the automatic assessment of the body conditions of goats include lean body condition, medium body condition and fat body condition. The key area is the back area between the upper edge of the sheep's shoulder blade and the junction of the lumbar vertebrae and the sacral vertebrae, or the back area between the junction of the lumbar vertebrae and the dorsal vertebrae and the junction of the lumbar vertebrae and the sacral vertebrae; Performing feature analysis on key areas of the original images of the sheep's back in the original image data set of the sheep's back refers to: performing feature analysis on each original image of the sheep's back, obtaining a change rule of the feature, determining an upper limit threshold and a lower limit threshold according to the change rule, and then dividing the body condition of the sheep according to the upper limit threshold and the lower limit threshold; The feature is the depression area index of the key area, and the change pattern of the depression area index from small to large; The feature is the brightness of the key area, and the change rule of brightness from small to large is lean body condition < medium body condition < fat body condition; Alternatively, the feature is a grayscale mean, and the grayscale mean changes from small to large in the following order: thin body condition < medium body condition < fat body condition.

2. The method for automatically assessing the physical condition of dairy goats according to claim 1, characterized in that: The specific process of collecting and analyzing the video of the back of the goats in the milking channel scene of a large-scale dairy goat farm and constructing the original image dataset of the back of the goats is as follows: The back video of the sheep walking in the milking channel is collected to extract the back image of the sheep; Calibration: With the center line of the sheep's back image as a reference, when the extracted sheep's back image shows that the sheep's back body position offset angle ranges from -30° to 30°, the sheep's back image is rotated to make the sheep's back center line coincide with the center line of the sheep's back image before the rotation. When the sheep's back body position offset angle is 0, there is no need to rotate the sheep's back image. The set of all sheep back original images obtained after calibration is the sheep back original image dataset.

3. The method for automatically assessing the physical condition of dairy goats according to claim 2, characterized in that: The width of the milking channel is 90cm~95cm; the video acquisition height is 2m~2.3m.

4. The method for automatically assessing the physical condition of dairy goats according to claim 1, characterized in that: The goats include dairy goats in the early lactation stage, the peak lactation stage, the middle lactation stage and the late lactation stage.

5. A system suitable for the method for automatically assessing the physical condition of dairy goats according to claim 1, characterized in that: Including data acquisition system and data processing system; The data acquisition system includes a camera for video acquisition; The data processing system comprises: Processor; The processor includes a video acquisition module, an image extraction module and an automatic body condition assessment module. The video acquisition module is used to acquire a back video of a sheep walking in a milking channel scene. The image extraction module is used to extract an original image of the sheep's back from the back video of the sheep walking in the milking channel scene. The automatic body condition assessment module uses a trained YOLOv5 model to automatically assess the body condition of the sheep. Display, used to output the automatic evaluation results of the sheep's body condition; The memory stores information including a video of the back of a sheep walking in a milking channel, an original image of the sheep's back, and an automatic assessment result of the sheep's body condition.

Citation Information

Patent Citations

  • Automatic cow body condition scoring method and scoring device

    CN105844534A

  • Data detection method and device, storage medium and equipment

    CN112084764A

  • Sheep body condition automatic scoring device and scoring method

    CN112257991A

  • Livestock body condition scoring method and device, electronic equipment and storage medium

    CN114266811A