A beef cattle estrus state monitoring method based on dynamic gait analysis
By employing dynamic gait analysis and multi-dimensional data fusion monitoring methods, the problems of low accuracy and susceptibility to interference in estrus monitoring of beef cattle have been solved, achieving efficient and accurate estrus status identification and automated monitoring.
Patent Information
- Application Number
- CN202511244189.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2026-03-20
- Estimated Expiration
- 2045-09-02
AI Technical Summary
Current technologies for monitoring the estrus status of beef cattle are inefficient, inaccurate, and susceptible to interference. They cannot effectively distinguish between true and false estrus, are highly subjective, and have high rates of missed and false estrus.
A multi-dimensional data fusion monitoring method was adopted. Through dynamic gait analysis, combined with body temperature, behavior and living data, computer vision and machine learning technologies were used to build a large-scale model for estrus monitoring and identification. Multi-modal data fusion and iterative optimization were carried out to identify the estrus status of beef cattle.
It achieved an accuracy rate of 98% in identifying the estrus state of beef cattle, reduced the interference rate of life data to below 5%, reduced animal stress response, and realized all-weather automated monitoring.
Smart Images

Figure CN121010933B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of behavior feature recognition, and in particular to a beef cow estrus state monitoring method based on dynamic gait analysis. BACKGROUND
[0002] In large-scale beef cattle breeding, accurately identifying the estrus state of beef cattle is a key link to improve reproductive efficiency; traditional monitoring methods rely on manual observation (such as observing beef cattle's mounting behavior and vulva changes), which has the following defects:
[0003] 1. Low efficiency: a single feeder can only monitor 50-80 beef cattle per day, with a false negative rate of up to 25%-30% (referring to data from China Animal Husbandry Journal, Vol. 59, 2023);
[0004] 2. Strong subjectivity: the misjudgment rate of "false estrus" (such as abnormal behavior caused by stress) is over 15%;
[0005] 3. Single data: without combining dynamic physiological indicators such as gait and body temperature, the behavior change pattern of beef cattle during estrus cannot be quantified.
[0006] In the prior art, some solutions use a single sensor (such as a body temperature sensor or an activity meter) for monitoring, but there are limitations: only through body temperature fluctuations (estrus period body temperature rises by 0.3-0.5℃) for identification, the accuracy is less than 80%; only through activity level, it is easily disturbed by changes in feed and environment, with a misjudgment rate of over 20%.
[0007] Therefore, the present application proposes a multi-dimensional data fusion monitoring method, which quantifies dynamic gait features, repairs abnormal data, and iteratively optimizes the model to solve the problems of "low accuracy and weak anti-interference ability" in the prior art, achieving an estrus state recognition accuracy of ≥98% and a life data interference rate of ≤5%. SUMMARY
[0008] The purpose of the present application is to solve the problems in the prior art and to propose a beef cow estrus state monitoring method based on dynamic gait analysis.
[0009] In order to achieve the above purpose, the present application adopts the following technical scheme: a beef cow estrus state monitoring method based on dynamic gait analysis includes the following steps:
[0010] S1: Collecting beef cattle dynamic gait video and detecting beef cattle body temperature in real time to obtain body temperature data;
[0011] S2: Preprocessing the collected dynamic gait video, including video frame extraction, image denoising, target detection and tracking, to obtain a continuous gait image sequence of a single beef cattle and mark real-time body temperature data; analyzing the dynamic gait video through an analysis module to obtain beef cattle behavior data;
[0012] S3: extracting dynamic gait feature parameters of the beef cattle from the continuous gait image sequence, the dynamic gait feature parameters including step length, step frequency, step speed, joint angle change, and body center of gravity offset;
[0013] S4: obtaining life data by recording daily work and beef cattle diet data and body weight change;
[0014] S5: inputting the extracted dynamic gait feature parameters, behavior data, body temperature data and life data into an estrus monitoring and recognition large model for training;
[0015] S6: inputting the obtained dynamic gait feature parameters, behavior data, body temperature data and life data into the estrus monitoring and recognition large model for analysis by ear tag recognition of cattle identity information, to obtain an identification result of the estrus state of the beef cattle, the identification result including estrus, non-estrus and false estrus.
[0016] Preferably, the life data in S4 further includes beef cattle water drinking data.
[0017] Preferably, the specific process of extracting the joint angle change in S3 is: identifying key joint points of the beef cattle by a skeleton key point detection algorithm, calculating the angle change between the key joint points in adjacent frames, and obtaining joint angle change data.
[0018] Preferably, the dynamic gait video is a multi-angle video obtained by a plurality of fixed high-definition cameras and a plurality of movable mobile cameras arranged at different positions in a cowshed.
[0019] Preferably, the estrus monitoring and recognition large model includes a posture analysis module, a behavior analysis module, a life state analysis module and an integration module; wherein the posture analysis module receives the dynamic gait feature parameters of the beef cattle, analyzes the cattle posture and joint change information; the behavior analysis module receives the behavior data, analyzes the cattle behavior pattern information; the life state analysis module receives the life data, analyzes the beef cattle state according to the cattle diet and water drinking data and body weight change data; and the integration module integrates and analyzes the analysis results of the posture analysis module, the behavior analysis module and the life state analysis module, to avoid the influence of life data on the estrus state of beef cattle.
[0020] Preferably, the preprocessing of the dynamic gait video in S2 further includes an abnormal frame identification and repair step: constructing an abnormal frame detection model by a convolutional neural network (CNN), determining the blur degree and occlusion rate of the extracted video frames, and marking as an abnormal frame when the blur degree > 30% or the occlusion rate > 40%; using a step feature interpolation algorithm of adjacent 3 frames to repair the abnormal frame, generating a supplementary frame meeting the continuous gait logic, and replacing the original abnormal frame before target tracking.
[0021] Preferably, the estrus monitoring recognition large model further comprises an iterative optimization module: the module collects not less than 50 groups of complete data of verified estrus / non-estrus beef cattle per month, including dynamic gait feature parameters, behavior data, body temperature data and life data, and fine tunes the weight parameters of the posture analysis module and the behavior analysis module through the small batch gradient descent method; meanwhile, model misjudgment cases such as false estrus misjudged as estrus are recorded, the weight distribution rules of the integration module are corrected through attribution analysis, and the interference rate of life data on estrus determination is reduced to below 5%.
[0022] The beneficial effects of the present application are as follows:
[0023] 1. The present application has high precision through multi-modal fusion: it breaks through the limitations of single sensor monitoring, significantly improves the accuracy of estrus recognition through cross-validation of four-dimensional data of gait, behavior, body temperature and life, and effectively distinguishes between "true estrus" and "false estrus";
[0024] 2. The present application has small stress through non-contact monitoring: the computer vision-based analysis method does not require physical contact with the cattle, reduces the stress reaction of animals, and is more in line with animal welfare requirements;
[0025] 3. The present application is automated and intelligent: it realizes 24-hour all-weather unattended monitoring, greatly reduces labor costs, and makes the system have the ability of continuous evolution through the iterative optimization module. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1 The method flowchart of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical scheme and advantages of the present application clearer and more understandable, the present application will be further described in detail below in combination with the drawings. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0028] Please refer to Figure 1 , the present application provides a technical scheme: a beef cattle estrus state monitoring method based on dynamic gait analysis includes the following steps:
[0029] S1: collecting beef cattle dynamic gait video and detecting beef cattle body temperature in real time to obtain body temperature data;
[0030] 3-5 fixed point 4K high-definition cameras (frame rate 25fps, resolution 3840x2160) are arranged in the cowshed, and 2 mobile track cameras (moving speed 0.5m / s, covering the blind area of the cowshed) are configured to collect multi-angle videos of beef cattle walking, standing and moving;
[0031] Body temperature data collection: Ear tag wireless temperature sensor (measurement range 36-42℃, accuracy ±0.1℃, sampling frequency 1 / 5min) was used to obtain real-time beef cattle temperature data T(t), where t is the collection timestamp (unit: min);
[0032] S2: Pretreatment of the collected dynamic gait video, including video frame extraction, image denoising, target detection and tracking, to obtain continuous gait image sequence of individual beef cattle, and mark real-time temperature data; analysis of dynamic gait video by analysis module to obtain beef cattle behavior data;
[0033] Video frame extraction needs to realize "timestamp alignment + key frame selection" to ensure the time continuity and effectiveness of gait data, the formula is as follows:
[0034] Frame extraction time interval calculation
[0035] In order to balance the data volume and gait integrity, the extraction interval needs to be adjusted dynamically according to the moving speed of beef cattle, the formula is as follows:
[0036]
[0037] Frame extraction time interval (unit: s, default ≤0.05s, i.e. extraction frequency above 20fps);
[0038] F: camera original frame rate (30fps, fixed value);
[0039] S_min: minimum step length of beef cattle (adult beef cattle S_min=0.8m, through historical data statistics);
[0040] Safety factor (1.2, to avoid missing gait frames due to step length fluctuation);
[0041] Example: when F=30fps, S_min=0.8m, =1 / (30×0.8)×1.2=0.05s, i.e. extract 1 frame every 0.05s, ensure that at least 3 key frames are included in each step;
[0042] Timestamp alignment formula
[0043] The video collected by multiple cameras (fixed + dynamic) needs to be unified in time reference, UTC timestamp correction is adopted, the formula is as follows:
[0044]
[0045] Unified timestamp after synchronization (unit: s, accurate to millisecond level);
[0046] : Camera raw timestamp (with device clock bias)
[0047] : Time offset (calibrated by NTP, ≤10ms, ensure multi-view frame time difference <0.01s)
[0048] Image denoising (Gaussian noise and salt & pepper noise suppression)
[0049] For image noise caused by barn light changes (such as morning and evening light differences) and camera sensor interference, a combination of "Gaussian filtering + median filtering" denoising is used, as follows:
[0050] Gaussian filter denoising formula (suppress Gaussian noise)
[0051] Neighborhood weighted smoothing is performed on the extracted video frames, with the formula being:
[0052]
[0053] : Denoised (x, y) pixel grayscale value
[0054] : Original noise frame (x, y) pixel grayscale value (0-255)
[0055] k: Filter kernel size parameter (k=1, i.e. 3x3 filter kernel, balancing denoising effect and edge preservation)
[0056] : Gaussian function standard deviation (adaptively adjusted according to noise intensity, =1.2-1.8, barn scene default =1.5, the more serious the noise the greater)
[0057] : Gaussian weight coefficient (neighborhood pixels closer to the center, weight greater, to avoid edge blur)
[0058] Physical meaning: Through the Gaussian weighted average of neighborhood pixels, random distributed Gaussian noise (such as sensor thermal noise) is suppressed, and the noise variance after denoising is reduced to less than 15% of the original variance.
[0059] Median filter denoising formula (suppress salt & pepper noise)
[0060] Further processing of the salt & pepper noise (such as dust obstruction, light mutation causing black and white noise points) remaining after Gaussian filtering, with the formula being:
[0061]
[0062] : gray value of (x, y) pixel after final denoising;
[0063] : median calculation function (sort the gray values of 9 pixels in a 3x3 neighborhood, and take the middle value as the current pixel value);
[0064] : index range of 3x3 neighborhood (covering the current pixel and the surrounding 8 pixels);
[0065] Advantages: Compared with mean filtering, median filtering can remove salt and pepper noise (best effect when noise ratio ≤20%) while preserving the edge information of key gait features such as beef cattle outline and hoof, with edge clarity retention rate ≥90%.
[0066] Target detection and tracking (beef cattle individual identification and trajectory association)
[0067] Based on YOLOv8 target detection algorithm, beef cattle positioning is realized, combined with Kalman filter for multi-frame trajectory tracking to ensure the accuracy of continuous gait image sequence of single cattle, the formula is as follows:
[0068] YOLOv8 target detection confidence calculation (beef cattle region determination)
[0069] Beef cattle target detection is performed on the denoised image, and the confidence of the target region is output, the formula is:
[0070]
[0071] C: final confidence of target region (C≥0.7 is judged as effective beef cattle region to avoid false detection of background objects such as feed trough and fence);
[0072] : YOLOv8 model output "beef cattle" class confidence (initial confidence, range [0, 1]); M: matching number of target candidate box and real label box (M=3, taking the top 3 matching degree candidate boxes); IOU(m): intersection over union of the mth candidate box and the real label box (measuring target positioning accuracy,
[0073] , is the overlapping area, is the merged area, IOU(m)≥0.5 is considered as effective matching);
[0074] Example: if = 0.85, the IOU of the three candidate boxes is 0.6, 0.55, 0.5, then C = 0.85 x 0.6 = 0.51 (take the maximum product), because C < 0.7, it needs to be re-detected to ensure that the detection accuracy is greater than or equal to 98%;
[0075] Kalman filter tracking formula (trajectory prediction and association)
[0076] Trajectory tracking of beef cattle targets in consecutive frames, realizing the "detection-prediction-update" closed loop, the formula is divided into two steps:
[0077] (1) State prediction (predict the target position in the current frame based on the trajectory in the previous frame):
[0078]
[0079]
[0080] (2) State update (correct the predicted trajectory by combining the detection results of the current frame):
[0081]
[0082]
[0083]
[0084] Note:
[0085] : The predicted value of the target state in the current frame (k frame) (state vector , x, y are the center coordinates of the target, w, h are the width and height of the target box, is the moving speed in x, y direction);
[0086] : State transition matrix ( , Δt is the frame interval, which describes the change of state with time);
[0087] : The optimal estimate value of the target state in the previous frame (k-1 frame);
[0088] : Control input matrix ( = 0, there is no active control input in the beef shed scene, such as no external force to move the beef cattle);
[0089] : Control input vector ( = 0, omitted when there is no control input);
[0090] : Covariance matrix of current frame state prediction (measure the uncertainty of prediction, the initial Diagonal matrix, diagonal elements are position variance [5, 5, 2, 2, 1, 1], unit is pixel 2 , pixel 2 , pixel 2 , pixel 2 , (pixel / s) 2 , (pixel / s) 2 );
[0091] : Transpose of state transition matrix;
[0092] : Process noise covariance matrix ( = 0.01 x I, I is a 6-order identity matrix, control prediction error, avoid trajectory drift);
[0093] : Kalman gain (balance the reliability of prediction value and detection value, The larger, the more dependent on the detection value; The smaller, the more dependent on the prediction value);
[0094] : Observation matrix ( , 6-dimensional state vector is mapped to 4-dimensional observation vector, observation value only contains target position and size);
[0095] : Transpose of observation matrix;
[0096] : Observation value of target in current frame (i.e. target box coordinates detected by YOLOv8 );
[0097] : Observation noise covariance matrix ( = 0.1 x I, I is a 4-order identity matrix, reflects detection error, set according to YOLOv8 detection accuracy);
[0098] : Inverse of observation residual covariance matrix;
[0099] : Optimal estimation value of target state in current frame (position and velocity of final tracking trajectory);
[0100] I: Identity matrix (dimension consistent with state vector, 6-order);
[0101] : Covariance matrix of optimal estimation of current frame state (uncertainty is reduced after updating, ensure trajectory continuity);
[0102] Tracking effect: In the multi-cow scenario (20 beef cattle), the trajectory association accuracy is ≥95%, there is no identity confusion (combined with RFID ear tag ID for further calibration), and the tracking interruption rate is <1% (short-term interruption due to occlusion can be repaired by trajectory interpolation).
[0103] Behavior data extraction: Identify beef cattle behavior through a behavior classification model (based on CNN-LSTM architecture) and output behavior data , where b takes the value of "standing (0), walking (1), lying (2), and active (3)", and the time length proportion of each behavior is calculated (such as walking behavior proportion );
[0104] S3: Extract dynamic gait feature parameters of beef cattle from the continuous gait image sequence, including step length, step frequency, step speed, joint angle change, and body center of gravity offset;
[0105] Continuous gait image sequence extracts 5 core parameters:
[0106] Step length (L): Through cow hoof key point detection (using an improved version of OpenPose algorithm to identify cow hoof tip and hoof heel two key points), calculate the Euclidean distance between adjacent two-step hoof tips, formula as follows:
[0107]
[0108] Where ( , ) is the i-th step hoof tip coordinate, ( , ) is the i+1-th step hoof tip coordinate; take the average of the last 10 steps as the step length of a single cow ;
[0109] Step frequency (f): Calculate the number of steps per unit time, formula as follows:
[0110]
[0111] Where N is the number of steps in T time (T takes 5 min), unit is steps / min.
[0112] Step speed (v): Combine step length and step frequency, formula as follows:
[0113]
[0114] Unit is m / min (step length unit conversion to m).
[0115] Joint angle change ( ): Identify the three key joints of beef cattle, hip, knee, elbow, construct joint vectors (such as hip vector , knee vector ), calculate joint angle by vector dot product , formula as follows:
[0116]
[0117] The angle difference between adjacent frames is the joint angle change , take the average of 20 consecutive frames as .
[0118] Body center of gravity offset (D): Taking the beef cattle torso center as the reference point , calculate the Euclidean distance between each frame torso center and the reference point, formula as follows:
[0119]
[0120] Take the maximum offset of 15 consecutive frames as the center of gravity offset feature parameter.
[0121] S4: Record the beef cattle diet data and weight change through daily work to get life data;
[0122] Record beef cattle life data L=\{E,W,H\} through the management system of the farm:
[0123] Diet data (E): Record the average daily intake of single cattle (unit: kg) by automatic feeding system, formula as follows:
[0124]
[0125] Among them is the i-th intake, n is the average daily intake frequency (usually 3 times);
[0126] Weight change ( ): Measure the weight of beef cattle every week by weight scale , weight change formula as follows:
[0127]
[0128] Unit: kg;
[0129] Water consumption data (H): Record the average daily water consumption of single cattle (unit: L) by intelligent water dispenser , calculation method same as intake .
[0130] S5: input the extracted dynamic gait feature parameters, behavior data, body temperature data and life data into the estrus monitoring and recognition large model for training;
[0131] An estrus monitoring and recognition large model is constructed, and the model input is "dynamic gait feature parameters , behavior data B, body temperature data T(t), and life data L", and the output is the estrus state (estrus = 1, non-estrus = 0, false estrus = 2). The specific module design is as follows:
[0132] Posture analysis module: adopt a fully connected neural network (input layer 5 neurons, hidden layer 2 layers each 32 neurons, output layer 1 neuron), output posture score , the formula is as follows:
[0133]
[0134] Wherein is the weight matrix (optimized by training), is the bias term, is the Sigmoid activation function , > 0.8 indicates that the posture meets the estrus characteristics;
[0135] Behavior analysis module: adopt LSTM network to analyze behavior data B, output behavior score , the formula is as follows:
[0136]
[0137] Wherein is the time sequence feature output of the behavior sequence, , is the training parameter > 0.75 indicates that the behavior meets the estrus characteristics;
[0138] Life state analysis module: calculate the life data deviation D_L (measure the interference of life data on estrus judgment), the formula is as follows:
[0139]
[0140] Wherein is the average value of life data of beef cattle in non-estrus period (obtained by statistical analysis of 1000 beef cattle historical data), <0.1 indicates that the life data has no significant interference.
[0141] Integration module: integrate the outputs of the three modules to calculate the final estrus judgment score , the formula is as follows:
[0142]
[0143] wherein = 0.4, = 0.4, = 0.2 (initial weight, adjusted by iterative optimization); the determination rule is:
[0144] > 0.7: estrus;
[0145] 0.3 < 0.7: false estrus;
[0146] < 0.3: non-estrus.
[0147] Model training process: 8000 groups of beef cattle data (including 4000 groups of estrus data, 3500 groups of non-estrus data, and 500 groups of false estrus data) are used to optimize the parameters with cross-entropy loss function , and the formula is as follows:
[0148]
[0149] wherein is the true label (estrus = 1, non-estrus = 0, false estrus = 2, and one-hot encoding is used for multi-classification), the training iteration number is 100 rounds, the learning rate is 0.001, and the model accuracy after training reaches 97.5%;
[0150] S6: The obtained dynamic gait feature parameters, behavior data, body temperature data and life data are input into the estrus monitoring and recognition large model for analysis to obtain the recognition result of the corresponding beef cattle estrus state, and the recognition result includes estrus, non-estrus and false estrus.
[0151] Identity recognition: the ear tag RFID module reads the beef cattle identity information ID, and associates the historical data (such as non-estrus period gait mean value, life data mean value) of the cattle;
[0152] Real-time analysis: input the real-time collected G, B, T(t), L into the trained model, output , and obtain the estrus state result according to the determination rule, and push it to the breeder terminal through the breeding farm management platform.
[0153] As an embodiment of the present application, the life data in S4 further includes beef cattle drinking water data.
[0154] As an embodiment of the present application, the specific process of extracting the joint angle change in S3 is: the key joint points of beef cattle are recognized by a bone key point detection algorithm, the angle change between the key joint points in adjacent frames is calculated, and the joint angle change data is obtained.
[0155] As an embodiment of the present application, the dynamic gait video is obtained by a plurality of fixed points of high-definition cameras and a plurality of continuously movable positions of mobile cameras in a cowshed.
[0156] As an embodiment of the present application, the estrus monitoring recognition large model comprises a posture analysis module, a behavior analysis module, a living state analysis module, and an integration module; wherein the posture analysis module receives dynamic gait characteristic parameters of beef cattle, analyzes cow posture and joint change information; the behavior analysis module receives behavior data, analyzes cow behavior mode information; the living state analysis module receives living data, analyzes beef cattle state according to cow diet, drinking water and weight change data; the integration module integrates and analyzes the analysis results of the posture analysis module, the behavior analysis module and the living state analysis module to avoid the influence of living data on beef estrus.
[0157] As an embodiment of the present application, the preprocessing of the dynamic gait video in S2 further comprises an abnormal frame recognition and repair step: an abnormal frame detection model is constructed by a convolutional neural network (CNN), the extracted video frame is determined for blur degree and occlusion rate, when the blur degree is greater than 30% or the occlusion rate is greater than 40%, it is marked as an abnormal frame; the abnormal frame is repaired by using a gait feature interpolation algorithm of adjacent 3 frames, a supplementary frame meeting the continuous gait logic is generated, and after replacing the original abnormal frame, target tracking is performed again.
[0158] Abnormal frame recognition (blur degree + occlusion rate calculation)
[0159] Blur degree determination: the image definition is calculated by using Laplacian variance method, the formula is:
[0160]
[0161] MxN: image pixel size (such as 1920x1080);
[0162] : gray value of (x, y) pixel (0-255);
[0163] : Laplace operator, used to calculate the pixel gray change rate, ;
[0164] : blur quantization value (the smaller the value, the more blurred the image)
[0165] Determination threshold: when < 50, the blur degree is greater than 30%, and it is marked as an abnormal frame;
[0166] Occlusion rate determination: Based on the YOLOv8 target detection algorithm, the occlusion rate of beef cattle area is calculated, and the formula is:
[0167]
[0168] : Actual pixel area of beef cattle (through historical data statistics, adult beef cattle in 1080P image ≈20000 pixels);
[0169] : Pixel area of detected unoccluded beef cattle;
[0170] : Occlusion rate (percentage).
[0171] Determination threshold: When >40%, it is marked as an abnormal frame;
[0172] Abnormal frame repair (gait feature interpolation)
[0173] The adjacent 3 frames weighted interpolation method is used to repair the abnormal frame. Taking the step feature as an example, the repair formula is:
[0174]
[0175] : The repaired step of the kth frame (abnormal frame);
[0176] 、 : The measured step of the k-1th and k+1th frames (normal frames);
[0177] Weighting coefficient "2": highlights the reference value of the middle frame and reduces the repair error;
[0178] Application scope: The formula is also applicable to the repair of step frequency, joint angle and other gait features;
[0179] As an embodiment of the present application, the estrus monitoring and identification large model further comprises an iterative optimization module: the module collects complete data (including gait, behavior, body temperature, and living data) of not less than 50 groups of verified estrus / non-estrus beef cattle every month, and fine-tunes the weight parameters of the posture analysis module and the behavior analysis module through the small batch gradient descent method; At the same time, record the model misjudgment cases (such as false estrus misjudgment as estrus), and correct and integrate the weight distribution rules of the module through attribution analysis, so that the interference rate of living data on estrus determination is reduced to below 5%.
[0180] 50 groups of verified data (10 groups of estrus, 40 groups of non-estrus) are collected every month, and the module weight is updated by using the small batch gradient descent method, and the formula is:
[0181]
[0182] 、 : updated / previous weights;
[0183] η: learning rate (0.001, optimized by learning rate decay strategy);
[0184] L: cross-entropy loss function (measure the deviation between predicted value and true label):
[0185]
[0186] N: batch size (50 groups); : true label (1 = estrus, 0 = non-estrus); : model predicted score;
[0187] Interference rate control
[0188] The integrated module weight is corrected by attribution analysis, and the interference rate calculation formula is:
[0189]
[0190] : number of misjudgments caused by life data anomalies;
[0191] : total number of misjudgments;
[0192] Optimization goal: ≤ 5%.
[0193] The specific workflow is as follows:
[0194] First, multi-source data collection is performed. Multiple fixed-point high-definition network cameras are arranged in key areas such as the passageway, resting area, and drinking water area of the cowshed. At the same time, mobile cameras such as track robots or unmanned aerial vehicles can be equipped to continuously collect dynamic gait videos of beef cattle from multiple angles. At the same time, an intelligent ear tag with a built-in temperature sensor is worn on each cow to detect and wirelessly transmit body temperature data at a frequency of minutes. Then, video preprocessing and behavior data extraction are performed. The collected video stream is preprocessed: video frame extraction: the video stream is decomposed into continuous image frames at a specific frame rate; image denoising: Gaussian filtering, median filtering, and other algorithms are used to denoise the image and improve the image quality; target detection and tracking: YOLO, DeepSORT, and other target detection and tracking algorithms are used to identify each beef cattle in the video and assign a unique ID to each beef cattle, track its motion trajectory, and obtain the continuous gait image sequence of individual beef cattle;
[0195] Abnormal frame identification and repair: Through the pre-trained convolutional neural network (CNN) model, the quality of each frame is evaluated, and the blurring degree (such as image gradient value) and the occlusion rate (the area ratio of the target being occluded) are calculated; when the blurring degree > 30% or the occlusion rate > 40%, the frame is marked as an abnormal frame; the adjacent 3 frames of gait feature interpolation algorithm is used to repair the abnormal frame, generate a supplementary frame that meets the motion logic, replace the original abnormal frame, and ensure the continuity of subsequent analysis; the processed image sequence is associated and labeled with the body temperature data of the same timestamp.
[0196] Through the behavior analysis module, the video is analyzed, and behavior data such as the number of times of climbing, the number of times of being climbed, the amount of activity, social behavior, etc. are extracted;
[0197] Dynamic gait feature parameter extraction: From the high-quality continuous gait image sequence obtained in S2, dynamic gait feature parameters that can quantify the movement state of beef cattle are extracted, mainly including: step length: the distance between two consecutive landing points of the same hoof print; step frequency: the number of steps completed per unit time; step speed: the product of step length and step frequency, reflecting the movement speed; joint angle change: through the skeletal key point detection algorithm (such as HRNet), the shoulder, elbow, knee, hip, etc. key joints of beef cattle are identified, and the angle change sequence of these key joints between adjacent frames is calculated to form the joint angle change data. Estrus cattle often exhibit characteristic postures such as gait stiffness and hind leg opening, which can be captured through joint angle change; body center of gravity offset: through the key joint position, the movement trajectory of the body center of gravity is calculated, and its stability is analyzed. Estrus cattle may exhibit characteristics such as unstable center of gravity and left-right sway due to discomfort;
[0198] Then the beef cattle life data are recorded through the automatic feeding station, intelligent weighing bridge, water quantity sensor and the like equipment, and the beef cattle diet data (intake amount, intake time), drinking water data and body weight change data are recorded daily to form a life data set reflecting the physiological state; further, the estrus monitoring and identification large model is trained, and a multi-module estrus monitoring and identification large model is constructed, the dynamic gait feature parameters, behavior data, body temperature data and life data extracted from S2, S3 and S4 are used as multi-modal input, and a large number of labeled estrus / non-estrus sample data are used to train the model; the large model is an ensemble learning framework, and the core modules include: a posture analysis module that receives dynamic gait feature parameters and focuses on analyzing microscopic gait abnormalities and joint movement patterns of the cattle; a behavior analysis module that receives behavior data and focuses on analyzing macro behavior patterns (such as a surge in mounting behavior); a life state analysis module that receives life data, analyzes diet, drinking water and body weight change, is used for judging the health condition of the cattle, and is an important basis for identifying false estrus (for example, reduced appetite and abnormal activity caused by disease may be misjudged as estrus), and the body temperature of the beef cattle increases during estrus, and when the beef cattle are sick or due to a large number of beef cattle, the beef cattle need to be crowded to eat and drink water, which also causes the body temperature to rise, and for the beef cattle with less drinking water, when the water intake amount decreases, the body temperature rises, the change of the body temperature causes the estrus monitoring to be wrong, and the false estrus state is caused, and when a large number of beef cattle eat and are crowded, some climbing actions between the beef cattle for eating but not for estrus are caused, which also causes the estrus monitoring to be wrong, the present application considers that the life state of the beef cattle has an influence on the action behavior and body temperature, therefore, the life data are added to the monitoring, so that the false estrus judgment is increased on the basis of estrus and non-estrus, the judgment error of the estrus state is avoided, and the monitoring accuracy is improved.
[0199] An integration module that receives the outputs (such as feature vectors or probability values) of the above three modules, integrates and analyzes through weighted fusion or a more complex network (such as a fully connected layer), and finally outputs a comprehensive judgment result. The core role of this module is to weigh the contribution of each data source and avoid the interference of abnormal situations in life data on estrus judgment.
[0200] Iterative optimization module: The system has the ability of continuous learning. Every month, the system automatically collects no less than 50 groups of complete data of estrus / non-estrus cattle verified by artificial verification, fine-tunes the model parameters of the posture and behavior analysis module through small batch gradient descent method to adapt to the changes of the cattle herd. At the same time, the system records all misjudgment cases, traces the source of errors through attribution analysis, and accordingly modifies and integrates the weight distribution rules of the module, so as to continuously optimize the model, the goal is to reduce the interference rate of life data and other factors on estrus determination to below 5%; finally, estrus state recognition and output In the actual application stage, the system identifies the identity information of the cattle through intelligent ear tags, and inputs the dynamic gait characteristic parameters, behavior data, body temperature data and life data of the cattle into the trained estrus monitoring and recognition big model in real time or at regular intervals. After the model analyzes and calculates, the recognition result of the current estrus state of the beef cattle is output, the result is divided into three categories: estrus, non-estrus and false estrus. The system can immediately notify the feeders through sound and light alarm, mobile phone APP push, management software interface prompt and other ways.
Claims
1. A method for monitoring the estrus status of beef cattle based on dynamic gait analysis, characterized in that, Includes the following steps: S1: Collect dynamic gait videos of beef cattle and monitor their body temperature in real time to obtain body temperature data; S2: Preprocess the acquired dynamic gait video, including video frame extraction, image denoising, target detection and tracking, to obtain a continuous gait image sequence of a single beef cattle, and label the real-time body temperature data; Dynamic gait videos are analyzed using an analysis module to obtain beef cattle behavior data; S3: Extract dynamic gait feature parameters of beef cattle from the continuous gait image sequence. The dynamic gait feature parameters include stride length, stride frequency, stride speed, joint angle changes, and body center of gravity offset. S4: Obtain living data by recording the diet and weight changes of beef cattle in daily work; S5: Input the extracted dynamic gait feature parameters, behavioral data, body temperature data, and lifestyle data into the estrus monitoring and recognition model for training; S6: Identify cattle identity information through ear tags, input the acquired dynamic gait characteristic parameters, behavioral data, body temperature data and living data into the estrus monitoring and identification model for analysis, and obtain the identification results of the corresponding beef cattle estrus status. The identification results include estrus, no estrus and false estrus. The estrus monitoring and identification model includes a posture analysis module, a behavior analysis module, a living status analysis module, and an integration module. The posture analysis module receives dynamic gait characteristic parameters of beef cattle and analyzes the cattle's posture and joint changes. The behavior analysis module receives behavioral data and analyzes the cattle's behavioral patterns. The living condition analysis module receives living data and analyzes the condition of beef cattle based on their diet, water intake, and weight changes. The integration module integrates and analyzes the results of the posture analysis module, behavior analysis module, and living condition analysis module to avoid the living data affecting the estrus status of beef cattle. The estrus monitoring and identification model also includes an iterative optimization module: this module collects no less than 50 sets of complete data from verified estrus / non-estrus cattle each month, including dynamic gait characteristic parameters, behavioral data, body temperature data, and living data. It fine-tunes the weight parameters of the posture analysis module and behavior analysis module using the small-batch gradient descent method. At the same time, it records model misjudgment cases, including false estrus misjudged as estrus. It corrects the weight allocation rules of the integration module through attribution analysis, so that the interference rate of living data on estrus determination is reduced to below 5%.
2. The method for monitoring the estrus status of beef cattle based on dynamic gait analysis according to claim 1, characterized in that, The living data mentioned in S4 also includes data on cattle drinking water.
3. The method for monitoring the estrus status of beef cattle based on dynamic gait analysis according to claim 1, characterized in that, The specific process for extracting joint angle changes in S3 is as follows: key joint points of beef cattle are identified through a skeletal key point detection algorithm, the angle changes between key joint points in adjacent frames are calculated, and joint angle change data are obtained.
4. The method for monitoring the estrus status of beef cattle based on dynamic gait analysis according to claim 1, characterized in that, The dynamic gait video is obtained from multiple angles by setting up multiple fixed high-definition cameras and multiple mobile cameras that can be moved continuously in the cattle shed.
5. The method for monitoring the estrus status of beef cattle based on dynamic gait analysis according to claim 1, characterized in that, The preprocessing of dynamic gait video in S2 also includes abnormal frame identification and repair steps: an abnormal frame detection model is constructed by a convolutional neural network, and the extracted video frames are judged for blur and occlusion rate. When the blur is greater than 30% or the occlusion rate is greater than 40%, they are marked as abnormal frames. The abnormal frames are repaired by using a gait feature interpolation algorithm of three adjacent frames to generate supplementary frames that conform to the continuous gait logic, and the original abnormal frames are replaced before target tracking is performed.
Citation Information
Patent Citations
Beef cattle behavior identification method based on video spatial-temporal characteristics
CN116612409A
Multi-view beef cattle individual oestrus behavior monitoring method, system and equipment based on ReID and Yolov8
CN119832598A