A method and system for identifying the degree of stress during parturition in dairy cows

By constructing a leg posture recognition model and a childbirth stress determination model, using video data to extract leg posture characteristics during childbirth, the accuracy and real-time problems of monitoring the childbirth stress in the prior art are solved. It realizes accurate judgment of the degree of stress in childbirth and provides technical support for smart ranches.

CN117351404BActive Publication Date: 2024-11-08CHINA SHENGMU ORGANIC MILK LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311544982.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-20
Publication Date
2024-11-08
Estimated Expiration
2043-11-20

AI Technical Summary

Technical Problem

The prior art is difficult to accurately and in real time to monitor the degree of stress during childbirth. Traditional methods rely on manual observation and have problems such as high cost and poor real-time performance.

Method used

By obtaining cow video data, a leg posture recognition model and childbirth stress determination model were constructed, key characteristic parameters of leg posture were extracted, and precise judgment of childbirth stress determination was achieved using YOLOv5 neural network and random forest algorithm.

Benefits of technology

It realizes accurate identification of the degree of stress in childbirth, reduces manual intervention, improves monitoring accuracy and real-time, and provides technical support for smart ranches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117351404B_ABST
    Figure CN117351404B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for identifying the degree of stress during childbirth in dairy cows, and relates to the technical field of image processing and recognition. The present invention uses a leg posture recognition model to extract a leg posture image from dairy cow video data, and then extracts key characteristic parameters of the leg posture based on the leg posture image. Finally, the degree of stress during childbirth can be accurately identified based on the key characteristic parameters of the leg posture using a childbirth stress recognition model, which can provide technical support for smart ranches.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing and recognition technology, and in particular to a method and system for identifying the degree of stress during childbirth in dairy cows. Background Art

[0002] The delivery of dairy cows is an important part of their entire life cycle and production activities. The delivery process will have adverse effects on the animal's neuroendocrine system and behavior. Severe pain is its typical characteristic and is also the main cause of delivery stress. Pain behaviors during delivery are mainly manifested in frequent standing and lying down, lifting / kicking legs, etc. Based on these typical behaviors reflected in the changes in posture of different parts, observing and mastering the characteristics of these posture changes is conducive to quickly and accurately determining the difficulty of cow delivery, mastering the degree of delivery stress of cows, and improving the intelligence of dairy cow delivery management, so as to reduce the pain of dairy cows during delivery and improve the welfare level of dairy cows.

[0003] Stress is a painful manifestation of the delivery process of dairy cows and is also a normal physiological reaction, but excessive stress will cause dystocia. The assessment method for the difficulty of dairy cow delivery is generally divided into a 4-point system, with 1-4 points corresponding to the degree of stress of delivery without assistance, mild delivery, strong delivery and surgical delivery. Traditional assessment methods all use recording methods after delivery. At present, the delivery process of dairy cows is monitored in real time through behavior. Timely and accurate warnings of the difficulty of delivery and the degree of stress of dairy cows based on behavioral performance are generally performed manually by professionals. This method is not only time-consuming and labor-intensive, but also greatly affected by human subjectivity and ambient light, and accuracy cannot be guaranteed.

[0004] With the continuous deepening of the level of intelligence in the field of agriculture and animal husbandry, large-scale intelligent ranches have been born, and sensor technology and computer vision technology have been applied in animal behavior recognition and analysis. At present, the most widely used contact-type cow behavior recognition and tracking based on sensors is the cow smart collar, but this method is prone to cause stress reactions in cows and damage sensors. At the same time, in order to reduce the stress impact on cows during delivery, smart collars are usually not worn during delivery. Therefore, computer vision technology has become an important means to monitor the delivery process of cows in real time and accurately judge their stress level. Computer vision technology can collect video data of cow delivery without stress, contact, and low cost for researchers to observe and analyze carefully. However, traditional computer vision technology still requires expert experience and a large amount of manpower to label and analyze long-term behavior monitoring data. In addition, the current stress level of cow delivery is mostly judged only by blood stress indicators, which has the disadvantages of high cost and poor real-time performance. Based on this, it is urgent to establish a behavior perception technology based on machine vision to provide real-time feedback on the stress level of cow delivery and provide a basis for refined ranch management. Summary of the invention

[0005] The purpose of the present invention is to provide a method and system for identifying the degree of stress during parturition in dairy cows, which can accurately identify the degree of stress during parturition in dairy cows based on the leg posture of the dairy cows, and provide technical support for smart ranches.

[0006] To achieve the above object, the present invention provides the following solutions:

[0007] A method for identifying the degree of stress during parturition in dairy cows, comprising:

[0008] Obtain video data of cows to be identified;

[0009] Build a leg posture recognition model;

[0010] Inputting the cow video data into the leg posture recognition model to obtain a leg posture image;

[0011] Extracting key characteristic parameters of leg posture based on the leg posture image;

[0012] Construct a model for identifying the degree of labor stress;

[0013] The key characteristic parameters of the leg posture are input into the labor stress degree identification model to obtain the labor stress degree identification result.

[0014] Optionally, a leg posture recognition model is constructed, specifically including:

[0015] Get videos of cow birthing;

[0016] Processing the video of the cow's delivery process to obtain a processed image;

[0017] marking different leg postures in the processed image to obtain a labeled image;

[0018] Constructing a training set, a validation set, and a test set based on the labeled images;

[0019] Build a YOLOv5 neural network model;

[0020] Using the training set to train the YOLOv5 neural network model to obtain a trained YOLOv5 neural network model;

[0021] The trained YOLOv5 neural network model is verified and tested using the verification set and the test set until the trained YOLOv5 neural network model meets the verification and testing requirements;

[0022] The trained YOLOv5 neural network model that meets the verification and testing requirements is used as the leg posture recognition model.

[0023] Optionally, processing the video of the cow's delivery process to obtain a processed image specifically includes:

[0024] Converting the format of the video of the cow's delivery process;

[0025] The cow delivery process video after the format conversion is segmented and frame extraction is performed to obtain the processed image.

[0026] Optionally, based on the Python environment, the labelimg tool is used to mark different leg postures in the processed image to obtain the labeled image.

[0027] Optionally, extracting key characteristic parameters of leg posture based on the leg posture image specifically includes:

[0028] recognizing a contour of the leg posture image;

[0029] A contour function is used to filter and obtain a leg target image based on the contour;

[0030] Binarizing the leg target image to obtain a binary image;

[0031] Convert the binary image within an action cycle into a Numpy array; the action cycle refers to the lifting / pushing cycle from the phase of the cow's leg lifting / pushing off the ground to the phase of lifting / pushing back;

[0032] stacking the Numpy arrays, and obtaining a motion energy image within an action cycle based on the stacked Numpy arrays;

[0033] The leg posture characteristic parameters of the cow during the delivery process are extracted based on the motion energy image; the leg posture characteristic parameters include duration, average leg lifting / kicking height each time, average leg lifting / kicking rate, variability of leg posture characteristic parameter distribution, and homogeneity of leg posture characteristic parameter distribution.

[0034] Optionally, a labor stress degree identification model is constructed, specifically including:

[0035] Determining the birthing stress index of dairy cows with different birthing stress levels; the birthing stress index is a physiological index on the 0th day after birth;

[0036] Obtain the characteristic parameters of the cow's leg posture during delivery;

[0037] The Pearson method was used to analyze the correlation between the characteristic parameters of the leg posture during the delivery of dairy cows and the delivery stress index, so as to optimize the key characteristic parameters of the leg posture reflecting the degree of delivery stress;

[0038] The degree of labor stress and the key characteristic parameters of the leg posture corresponding to the degree of labor stress are used as training sample pairs to form a training sample data set;

[0039] Construct a recognition model;

[0040] Using the training sample data set to train the recognition model until the trained recognition model meets the set conditions;

[0041] The identification model that meets the set conditions is used as the labor stress degree identification model.

[0042] Optionally, a random forest algorithm is used to construct the recognition model.

[0043] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0044] The present invention adopts a leg posture recognition model to extract leg posture images from dairy cow video data, and then extracts key feature parameters of leg posture based on the leg posture images. Finally, a delivery stress degree identification model is adopted to accurately identify the delivery stress degree based on the key feature parameters of leg posture, thereby providing technical support for smart ranches.

[0045] Furthermore, the present invention also provides a system for identifying the degree of stress during parturition in dairy cows, the system comprising:

[0046] A camera for capturing video data of cows in the farrowing house;

[0047] The host computer is connected to the camera and is used to implement the above-mentioned method for identifying the degree of stress during parturition of dairy cows, so as to obtain a result of identifying the degree of stress during parturition based on the video data of the dairy cows.

[0048] Optionally, the host computer includes:

[0049] memory for storing computer programs and video images of cows giving birth;

[0050] A processor is connected to the memory and the camera, and is used to retrieve and execute the computer program to implement the above-mentioned method for identifying the degree of cow parturition stress.

[0051] Optionally, the processor includes:

[0052] A video data acquisition module, used to acquire video data of the cow to be identified;

[0053] A leg posture recognition model building module is used to build a leg posture recognition model;

[0054] A leg posture image extraction module, used for inputting the cow video data into the leg posture recognition model to obtain a leg posture image;

[0055] A leg posture key feature parameter extraction module, used for extracting the leg posture key feature parameters based on the leg posture image;

[0056] A labor stress degree identification model construction module is used to construct a labor stress degree identification model;

[0057] The labor stress degree identification module is used to input the key characteristic parameters of the leg posture into the labor stress degree identification model to obtain the labor stress degree identification result.

[0058] Since the technical effect achieved by the system provided by the present invention is the same as the technical effect achieved by the method for identifying the degree of stress during parturition in dairy cows provided by the present invention, it will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0060] Figure 1 A flow chart of a method for identifying the degree of stress during parturition in dairy cows provided in an embodiment of the present invention;

[0061] Figure 2 A schematic diagram of the structure of a leg posture recognition model provided by an embodiment of the present invention;

[0062] Figure 3 A schematic diagram of shooting angles provided by an embodiment of the present invention; wherein: Figure 3 (a) is a schematic diagram of the hip shooting angle. Figure 3 (b) is a schematic diagram of the abdominal shooting angle. Figure 3 (c) is a schematic diagram of the head shooting angle;

[0063] Figure 4 A Labelimg labeling result matrix diagram provided by an embodiment of the present invention;

[0064] Figure 5 A schematic diagram of the accuracy rate in the training results of the leg posture recognition model provided by an embodiment of the present invention;

[0065] Figure 6 A schematic diagram of loss values ​​in the training results of the leg posture recognition model provided by an embodiment of the present invention;

[0066] Figure 7 A schematic diagram of the recall rate in the training results of the leg posture recognition model provided by an embodiment of the present invention;

[0067] Figure 8 A schematic diagram of average precision values ​​in the training results of the leg posture recognition model provided by an embodiment of the present invention;

[0068] Fig. 9 A recognition effect matrix diagram of the leg posture recognition model provided by an embodiment of the present invention;

[0069] Fig.10 A schematic diagram of binary image extraction provided by an embodiment of the present invention;

[0070] Fig.11 An energy diagram of leg movements of a lying-down calving dairy cow provided by an embodiment of the present invention;

[0071] Fig.12 A flow chart of the cow parturition stress degree identification model provided in an embodiment of the present invention for identifying the parturition stress degree. DETAILED DESCRIPTION

[0072] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0073] The purpose of the present invention is to provide a method and system for identifying the degree of stress during parturition in dairy cows, which can accurately identify the degree of stress during parturition in dairy cows based on the leg posture of the dairy cows, and provide technical support for smart ranches.

[0074] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0075] During the delivery process, dairy cows exert force to deliver calves by pacing, frequently getting up and lying down, and lifting / kicking their legs while lying down, so that the degree of effort and the degree of delivery stress of dairy cows can be directly reflected by the leg posture. Based on this, the present invention provides a method for identifying the degree of delivery stress of dairy cows based on leg posture, such as Figure 1 As shown, the method includes:

[0076] Step 100: Obtain video data of the cow to be identified. In actual application, different angles are generally selected to collect videos in the farrowing house of a ranch. For example, the collected images are as follows: Figure 3 shown.

[0077] Step 101: constructing a leg posture recognition model. The process of constructing the leg posture recognition model used in the present invention may include:

[0078] Step 1011: Obtain videos of the cow's delivery process, including videos of primiparous and multiparous cows. In actual application, video can be collected from four angles in the farrowing house of the ranch, and the camera position can be fixed so that the camera angle can cover the entire farrowing bed. The captured video is transmitted to a mobile hard disk for storage at a fixed time, and the video is played back after the experiment to analyze the delivery behavior and posture.

[0079] Step 1012: Establish a data set of images of leg postures of cows in labor. In this process, in order to avoid recognition errors caused by problems such as mutual occlusion between cows, dim light, and standing angles, the image video of each cow can be converted into a format, segmented, and extracted by frames, so as to extract images from the video of the cow's labor process in frames to improve the effect of subsequent processing. After the images are extracted in frames, the leg postures of lying and laboring cows with raised / kicked legs, those without raised / kicked legs, and those of standing and laboring cows are marked to establish a data set of images of leg postures of cows in labor. A training set, a validation set, and a test set are constructed based on the established data set of images of leg postures of cows in labor. For example, the ratio of the training set, the validation set, and the test set is 7:2:1.

[0080] For example, the labelimg tool is used in the Python environment to label the images extracted by frame division, marking the leg postures of lying and giving birth cows with raised / kicked legs, no raised / kicked legs, and standing and giving birth. The image format is saved as txt, and the label classification definition is shown in Table 1. The number of labeled images is 15,408, among which some examples of completed labeling are as follows Figure 4 shown.

[0081] Table 1 Typical postures of the hind legs of dairy cows during delivery

[0082]

[0083] Step 1013: Use the YOLOv5 algorithm to build an initial leg posture recognition model. Figure 2 As shown, the initial leg posture recognition model can be composed of an input end (Input), a backbone network (Backbone), a neck network (Neck) and an output end (Prediction).

[0084] Step 1014: Train the initial leg posture recognition model to obtain a leg posture recognition model.

[0085] The process may include training the model, verifying the model, and testing the performance. The initial leg posture recognition model that meets the evaluation criteria after training, verification, and testing will be used as the final leg posture recognition model. During the training, verification, and testing process, the model performance can be evaluated by precision, recall, mean average precision, and loss to improve the generalization ability of the model. During the training process, the changes in precision, recall, mean average precision, and loss are shown in Figure 2. Figure 5-Figure 8 shown.

[0086] Step 102: Input the cow video data into the leg posture recognition model to obtain the leg posture image. Among them, the leg posture image obtained by the leg posture recognition model is as follows: Fig. 9 shown.

[0087] Step 103: extracting key characteristic parameters of leg posture based on the leg posture image. The implementation process of this step can be:

[0088] Step 1031: Identify the contour of the leg posture image.

[0089] Step 1032: Use the contour function to obtain a leg target image based on contour screening.

[0090] Step 1033: Binarize the leg target image to obtain a binary image. The specific implementation process of this step can be found in Fig.10 .

[0091] Step 1034: Convert the binary image within one action cycle into a Numpy array. The action cycle refers to the lifting / pushing cycle from the phase of the cow's leg lifting / pushing off the ground to the phase of lifting / pushing back.

[0092] Step 1035: stack the Numpy arrays, and obtain a motion energy image within an action cycle based on the stacked Numpy arrays, for example, Fig.11 The image of motion energy within one action cycle is shown.

[0093] Step 1036: Extract the leg posture characteristic parameters of the cow during the delivery process based on the motion energy image. The leg posture characteristic parameters include duration, average leg lifting / kicking height per time, average leg lifting / kicking rate, variability of the leg posture characteristic parameter distribution, and homogeneity of the leg posture characteristic parameter distribution. Among them, the variability of the leg posture characteristic parameter distribution and the homogeneity of the leg posture characteristic parameter distribution are defined by the uniformity of the obtained parameter distribution. Poor uniformity is defined as variability, indicating a small number, and strong uniformity is defined as homogeneity, indicating a large number.

[0094] Step 104: construct a labor stress degree identification model. The construction process of the labor stress degree identification model includes:

[0095] Step 1041: Determine the delivery stress index of dairy cows with different delivery stress levels. Delivery stress index is a physiological index on the 0th day after delivery, including: SOD (superoxide dismutase), MDA (malondialdehyde), T-AOC (total antioxidant capacity), CAT (catalase) and GSH-Px (glutathione peroxidase). The physiological index is determined by ELISA kit, and the specific operation method is: select 60 dairy cows with different delivery time, collect blood on the 0th day after delivery, centrifuge and take the supernatant, and measure the physiological indexes SOD, MDA, T-AOC, CAT, GSH-Px. Table 2 shows the average value results of physiological indexes of 60 dairy cows on the 0th day after delivery.

[0096] Table 2 Average results of key physiological antioxidant indicators of 60 dairy cows of different parities on day 0 of parturition

[0097]

[0098] Step 1042: Obtain characteristic parameters of the cow's leg posture during delivery. Specifically:

[0099] 1) Extract binary images of lying-down giving birth cows, specifically: input images of different leg postures during giving birth, process them using multi-level threshold mean filtering based on domain similarity, eight-directional gradient calculation, and canny contour extraction, perform contour recognition on images of cows lifting / kicking their legs during assisted giving birth and cows giving birth normally, filter the contour area using the contour function, accurately highlight the leg targets, perform image binarization, and extract binary images of cow legs.

[0100] 2) Extract the leg motion cycle energy graph based on the binary image extracted in step 1). One motion cycle refers to a complete leg lifting / pushing cycle, which includes the lifting / pushing off phase and the return phase of a leg.

[0101] The binary image within one action cycle is converted into a Numpy array, the Numpy arrays are stacked together to calculate the average value, and the motion energy image of one action cycle is obtained based on the average value.

[0102] 3) Construct a data set of leg posture characteristic parameters during the delivery process of dairy cows. Based on the process of extracting the energy diagram of the leg movement cycle in step 2), we can obtain indicators such as delivery duration, average leg lifting / kicking height per time, average leg lifting / kicking rate, variability of leg posture characteristic parameter distribution, and homogeneity of leg posture characteristic parameter distribution. These indicators are used as leg posture characteristic parameters during the delivery process of dairy cows to obtain a data set of leg posture characteristic parameters.

[0103] Step 1043: The Pearson method is used to analyze the correlation between the characteristic parameters of the leg posture during the delivery of dairy cows and the delivery stress index, indicating that the leg posture characteristics can reflect the degree of stress suffered by dairy cows during delivery, and further optimize the key characteristic parameters of the leg posture that can reflect the degree of delivery stress.

[0104] Step 1044: The labor stress degree and the optimized key feature parameters of the leg posture corresponding to the labor stress degree are used as training sample pairs to form a training sample data set.

[0105] Step 1045: Construct a recognition model.

[0106] Step 1046: Use the training sample data set to train the recognition model until the trained recognition model meets the set conditions. The training process of the recognition model essentially includes three operation processes: model training, model testing, and model verification. In actual application, the data set ratio can be 7:2:1, and the classification effect of the recognition model is evaluated with F1 score (F1-score) and accuracy (accuracy) as evaluation indicators to establish the classification recognition of the degree of cow parturition stress based on the random forest algorithm.

[0107] Step 1047: The identification model that meets the set conditions is used as the labor stress degree identification model.

[0108] Step 105: Input the key characteristic parameters of the leg posture into the labor stress degree identification model to obtain the labor stress degree identification result. Among them, labor stress is divided into normal and strong levels. The specific implementation process of this step is as follows Fig.12 shown.

[0109] Furthermore, the present invention also provides a cow delivery stress level identification system, which includes: a camera and a host computer. The camera is connected to the host computer, and the camera is set at the four corners of the delivery house so that the video data of the cow can be obtained in all directions. The host computer is used to implement the cow delivery stress level identification method provided above to obtain the delivery stress level identification result based on the cow video data.

[0110] In practical application, the host computer used in the present invention may include: a memory and a processor. The memory is used to store computer programs and video images of cow delivery. The processor is connected to the memory and the camera to retrieve and execute the computer program to implement the above-mentioned method for identifying the degree of stress of cow delivery.

[0111] Among them, the processor includes: a video data acquisition module, a leg posture recognition model construction module, a leg posture image extraction module, a leg posture key feature parameter extraction module, a labor stress degree identification model construction module and a labor stress degree identification module.

[0112] The video data acquisition module is used to acquire the video data of the cow to be identified.

[0113] The leg posture recognition model building module is used to build a leg posture recognition model.

[0114] The leg posture image extraction module is used to input the cow video data into the leg posture recognition model to obtain the leg posture image.

[0115] The leg posture key feature parameter extraction module is used to extract the leg posture key feature parameters based on the leg posture image.

[0116] The labor stress degree identification model construction module is used to construct a labor stress degree identification model.

[0117] The labor stress degree identification module is used to input the key characteristic parameters of the leg posture into the labor stress degree identification model to obtain the labor stress degree identification result.

[0118] In addition, when the computer program in the above-mentioned memory is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk.

[0119] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0120] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for identifying the degree of stress during parturition in dairy cows, characterized in that: include: Obtain video data of cows to be identified; Build a leg posture recognition model; Inputting the cow video data into the leg posture recognition model to obtain a leg posture image; Extracting key characteristic parameters of leg posture based on the leg posture image; Construct a model for identifying the degree of labor stress; Inputting the key characteristic parameters of the leg posture into the labor stress degree identification model to obtain a labor stress degree identification result; Extracting key feature parameters of leg posture based on the leg posture image specifically includes: recognizing a contour of the leg posture image; A contour function is used to filter and obtain a leg target image based on the contour; Binarizing the leg target image to obtain a binary image; Convert the binary image within an action cycle into a Numpy array; the action cycle refers to the lifting / pushing cycle from the phase of the cow's leg lifting / pushing off the ground to the phase of lifting / pushing back; stacking the Numpy arrays, and obtaining a motion energy image within an action cycle based on the stacked Numpy arrays; The leg posture characteristic parameters of the cow during the delivery process are extracted based on the motion energy image; the leg posture characteristic parameters include duration, average leg lifting / kicking height each time, average leg lifting / kicking rate, variability of leg posture characteristic parameter distribution, and homogeneity of leg posture characteristic parameter distribution.

2. The method for identifying the degree of stress during parturition in dairy cows according to claim 1, characterized in that: Build a leg posture recognition model, including: Get videos of cow birthing; Processing the video of the cow's delivery process to obtain a processed image; marking different leg postures in the processed image to obtain a labeled image; Constructing a training set, a validation set, and a test set based on the labeled images; Build a YOLOv5 neural network model; Using the training set to train the YOLOv5 neural network model to obtain a trained YOLOv5 neural network model; The trained YOLOv5 neural network model is verified and tested using the verification set and the test set until the trained YOLOv5 neural network model meets the verification and testing requirements; The trained YOLOv5 neural network model that meets the verification and testing requirements is used as the leg posture recognition model.

3. The method for identifying the degree of stress during parturition in dairy cows according to claim 2, characterized in that: The video of the cow's delivery process is processed to obtain a processed image, specifically including: Converting the format of the video of the cow's delivery process; The cow delivery process video after the format conversion is segmented and frame extraction is performed to obtain the processed image.

4. The method for identifying the degree of stress during parturition in dairy cows according to claim 2, characterized in that: Based on the Python environment, the labelimg tool is used to mark different leg postures in the processed image to obtain the labeled image.

5. The method for identifying the degree of stress during parturition in dairy cows according to claim 1, characterized in that: Construct a model for identifying the degree of labor stress, including: Determining the birthing stress index of dairy cows with different birthing stress levels; the birthing stress index is a physiological index on the 0th day after birth; Obtain the characteristic parameters of the cow's leg posture during delivery; The Pearson method was used to analyze the correlation between the characteristic parameters of the leg posture during the delivery of dairy cows and the delivery stress index, so as to optimize the key characteristic parameters of the leg posture reflecting the degree of delivery stress; The degree of labor stress and the key characteristic parameters of the leg posture corresponding to the degree of labor stress are used as training sample pairs to form a training sample data set; Construct a recognition model; Using the training sample data set to train the recognition model until the trained recognition model meets the set conditions; The identification model that meets the set conditions is used as the labor stress degree identification model.

6. The method for identifying the degree of stress during parturition in dairy cows according to claim 5, characterized in that: The random forest algorithm is used to construct the recognition model.

7. A system for identifying the degree of stress during parturition in dairy cows, characterized in that: include: A camera for capturing video data of cows in the farrowing house; A host computer is connected to the camera and is used to implement the method for identifying the degree of stress during parturition of a dairy cow as described in any one of claims 1 to 6, so as to obtain a result of identifying the degree of stress during parturition based on the video data of the dairy cow.

8. The cow parturition stress level identification system according to claim 7, characterized in that: The host computer comprises: memory for storing computer programs and video images of cows giving birth; A processor is connected to the memory and the camera, and is used to retrieve and execute the computer program to implement the method for identifying the degree of cow parturition stress as described in any one of claims 1 to 6.

9. The cow parturition stress level identification system according to claim 8, characterized in that: The processor comprises: A video data acquisition module, used to acquire video data of the cow to be identified; A leg posture recognition model building module is used to build a leg posture recognition model; A leg posture image extraction module, used for inputting the cow video data into the leg posture recognition model to obtain a leg posture image; A leg posture key feature parameter extraction module, used for extracting the leg posture key feature parameters based on the leg posture image; A labor stress degree identification model construction module is used to construct a labor stress degree identification model; The labor stress degree identification module is used to input the key characteristic parameters of the leg posture into the labor stress degree identification model to obtain the labor stress degree identification result.