Low-yield laying hen detection system and method based on multi-object behavior tracking

Through the multi-objective behavior tracking system and the improved YOLOV11n and ByteTrack models, accurate detection of low-leaning hens is achieved, solving the problems of low efficiency and poor accuracy in traditional methods, improving the efficiency of breeding management and resource utilization, and providing intelligent decision-making support.

CN120052284BActive Publication Date: 2025-07-29ZHEJIANG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510555052.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-07-29
Estimated Expiration
2045-04-29

AI Technical Summary

Technical Problem

Traditional low-leaning hen detection methods rely on manual observation, which are inefficient and poorly accurate, making it difficult to meet the needs of modern breeding industries. The existing computer vision and machine learning methods have shortcomings in the accuracy of cage chicken behavior recognition and the effectiveness of classification models.

Method used

A low-leaning hen detection system based on multi-objective behavior tracking, including behavioral action devices and detection devices, combined with the improved YOLOV11n model and ByteTrack model, precise detection of low-leaning hens is achieved through behavioral video acquisition, preprocessing, behavior recognition and tracking.

Benefits of technology

It improves the accuracy and efficiency of breeding management, optimizes resource utilization, provides intelligent decision-making support, reduces artificial errors and labor intensity, and improves production efficiency and economic benefits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120052284B_ABST
    Figure CN120052284B_ABST
Patent Text Reader

Abstract

The present invention discloses a low - laying hen detection system and method based on multi - target behavior tracking. The low - laying hen detection system includes a behavior action device and a behavior detection device. Laying hens perform behavioral actions through the behavior action device, and obtain behavioral video frames of the laying hens' behavioral actions through the behavior action device which can be movably or fixedly installed. Then, after pre - processing the behavioral video frames, they are processed through a laying hen behavior recognition model and a laying hen behavior tracking model to obtain a laying hen behavior tracking data set. Then, the low - laying hens are detected after being processed by the laying hen behavior detection method in the host and displayed on the display. The present invention can improve the accuracy and efficiency of breeding management, optimize resource utilization and provide intelligent decision - making support, realizing an efficient and accurate low - laying hen detection method, which helps to improve the production efficiency of laying hens and promotes the automation and intelligence of the breeding industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a detection method for laying hens, belonging to the field of poultry breeding industry, and specifically relates to a low-yield laying hen detection system and method based on multi-object behavior tracking. Background Art

[0002] With the rapid development of the poultry breeding industry, the breeding scale of laying hens has been continuously expanding, putting forward higher requirements for the automation and refinement of breeding management. Traditional low-yield laying hen detection methods mainly rely on manual observation, which has problems such as low efficiency, poor accuracy, and causing stress to chickens, and it is difficult to meet the needs of modern breeding industry. In recent years, automated detection methods based on computer vision and machine learning have gradually received attention, but the existing technologies still have deficiencies in the accuracy of caged chicken behavior recognition and the effectiveness of classification models. Therefore, there is an urgent need for an automated detection method that can accurately identify and distinguish low-yield laying hens to improve the efficiency of breeding management. Summary of the Invention

[0003] In order to solve the problems existing in the background art, the present invention provides a low-yield laying hen detection system and method based on multi-object behavior tracking. The present invention can improve the efficiency of chicken coop management and resource optimization through automated and intelligent means.

[0004] The technical solution adopted by the present invention is as follows:

[0005] I. A low-yield laying hen detection system based on multi-object behavior tracking, comprising:

[0006] A number of behavior action devices, which are respectively installed in each chicken cage of the chicken coop and are used for each laying hen to perform behavior actions.

[0007] A behavior detection device, which is installed on the side of each chicken cage in the chicken coop in a movable or fixed manner, and is used to detect low-yield laying hens in a way of mobile patrol or fixed detection according to the behavior actions of each laying hen at the behavior action device. A low-yield laying hen specifically refers to a laying hen with a monthly egg production lower than a preset threshold.

[0008] The described behavior effect device includes a feeding trough and a drinking fountain. The feeding trough is installed at the lower outer side of the chicken coop with its trough opening facing upwards, and the drinking fountain is installed at the upper outer side of the chicken coop with its outlet facing downwards. A number of laying hens are placed in each chicken coop. The behavior detection device includes a high-definition camera, an LED lamp tube, a camera support, a chassis, a display, a switch, a hard disk video recorder, and a host. The chassis is movably or fixedly arranged on the ground between each chicken coop. The camera support is installed on the chassis, and the high-definition camera is installed at the top of the camera support and faces the positions of the feeding trough and the drinking fountain. The LED lamp tube is installed on the casing of the high-definition camera and its light source faces the positions of the feeding trough and the drinking fountain. Multiple high-definition cameras are electrically connected to the hard disk video recorder through network cables and switches. The hard disk video recorder, the host, and the display are interconnected. The switch, the hard disk video recorder, and the high-definition camera form a chicken behavior video acquisition platform. The switch and the hard disk video recorder are powered by direct current, and the high-definition camera is powered by POE (Power over Ethernet). The behavior video data stream is output from the hard disk video recorder to the chicken behavior tracking and statistics platform.

[0009] II. A method for detecting low-producing laying hens based on multi-object behavior tracking, including:

[0010] Step 1: Construct a behavior recognition model and a behavior tracking model and install them in the host.

[0011] Step 2: Use the high-definition camera to collect several behavior video frames of laying hens performing behavior actions in the behavior effect device, and then sequentially input them into the host through network cables, switches, and hard disk video recorders for preprocessing and behavior annotation processing to construct a cage-raised laying hen behavior data set. Use the cage-raised laying hen behavior data set to train the behavior recognition model and the behavior tracking model to obtain a trained laying hen behavior recognition model and a trained laying hen behavior tracking model.

[0012] Step 3: Use the high-definition camera to collect several behavior video frames of each laying hen in the chicken coop to be detected performing behavior actions in the behavior effect device. After performing the same preprocessing as in Step 2, input them into the laying hen behavior recognition model and the laying hen behavior tracking model in sequence for processing and output a laying hen behavior tracking map. Each laying hen behavior tracking map is constructed into a laying hen behavior tracking data set.

[0013] Step 4: Use the laying hen behavior detection method in the host to process the laying hen behavior tracking data set, detect low-producing laying hens, and display them on the display to complete the low-production detection.

[0014] In the above-mentioned step 1, the behavior recognition model adopts the improved object detection YOLOV11n ("You Only LookOnce 11n-oriented bounding box") model. The improved object detection YOLOV11n model connects and iterates the attention feature fusion iAFF (Iterative Attention Feature Fusion) module after each feature extraction C3k2 module in the backbone network and the detection head of the object detection YOLOV11n model, and thus is reconstructed into a feature extraction and fusion C3k2_iAFF composite module. The loss function of the improved object detection YOLOV11n model adopts the loss function WloU_v1 using a dynamic non-monotonic focusing mechanism. During training, until the loss function WloU_v1 converges, a trained laying hen behavior recognition model is obtained. The behavior tracking model adopts the multi-object tracking ByteTrack model.

[0015] In the above-mentioned step 2, the behavior actions of the laying hens in the behavior action device include the action of lowering the head to feed in the feeder and the action of raising the head to drink water using the waterer. For each behavior video frame, the behavior video frame is preprocessed. First, the behavior video frames with laying hens are screened out, then adjusted to a preset contrast and a preset size, and then normalized to obtain a normalized image to improve the image quality. Then, the behaviors of the laying hens in the normalized image are labeled using the Labelimg tool. When the head of the laying hen is in the feeder, it is marked as the feeding action. At this time, the lower edge of the chicken beak of the laying hen crosses the upper edge of the feeder and has an obvious downward movement trend. When the distance between the chicken beak of the laying hen and the outlet of the waterer is less than the preset pixel distance, it is marked as the drinking action. At this time, the distance between the chicken beak of the laying hen and the nipple waterer does not exceed 50 pixels and the chicken head has a tendency to move obliquely upward. Other actions other than feeding and drinking are marked as other actions, thus constructing a dataset containing rich characteristics and accurate annotation information, providing high-quality training and verification data for the automatic recognition of laying hen behaviors. The preprocessing process and the two models constitute a chicken behavior tracking and statistics platform.

[0016] The above-mentioned step 4 is as follows:

[0017] Step 4.1: For each laying hen in the consecutive N frames of the laying hen behavior tracking map within the preset total time period, use the laying hen behavior detection method for processing. Regard the feeding, drinking, and feeding-coupled-with-drinking behaviors of the laying hens as state detection behaviors. For each state detection behavior, first, according to the behavior trajectory in the consecutive N frames of the laying hen behavior tracking map, obtain the frame ratio of the state detection behavior of the laying hen, and obtain the average speed of the state detection behavior of the laying hen.

[0018] Step 4.2: Establish a comprehensive behavior intensity model, input the number of frames of the state detection behavior of the laying hens into the comprehensive behavior intensity model, and output the comprehensive behavior intensity index after processing.

[0019] Step 4.3: Establish a fusion detection model for low-producing laying hens. Normalize the proportion of the number of frames, average speed, and comprehensive behavior intensity index of the state detection behavior of the laying hens, and input them into the fusion detection model for low-producing laying hens. After processing, output the detection parameters for low-producing laying hens, and detect and realize the laying hens according to the detection parameters for low-producing laying hens.

[0020] In the above-mentioned step 4.1, the proportion of the number of frames of the state detection behavior of the laying hens is the proportion of the total number of frames of the laying hen behavior tracking diagram of the laying hens performing the feeding action in the continuous N number of frames of the laying hen behavior tracking diagram P e , the proportion of the total number of frames of the laying hen behavior tracking diagram of the laying hens performing the drinking action in the continuous N number of frames of the laying hen behavior tracking diagram P d , or the proportion of the feeding coupled with drinking action P c , P c = P e + P d .

[0021] In the above-mentioned step 4.1, when obtaining the average speed of the state detection behavior of the laying hens, first, based on the behavior trajectory in the continuous N number of frames of the laying hen behavior tracking diagram, obtain the instantaneous movement speed of the feeding or drinking behavior of the laying hens with each n frame as the unit time window, and obtain the average value of the instantaneous movement speeds of each feeding behavior, drinking behavior, or feeding coupled with drinking behavior of the laying hens within the preset total time period as the average speed; the instantaneous movement speed of the feeding coupled with drinking behavior includes the instantaneous movement speed of the feeding behavior and the instantaneous movement speed of the drinking behavior.

[0022] In the above-mentioned step 4.2, the comprehensive behavior intensity model is as follows:

[0023] S = λ h I h + λ m I m + λ l I l

[0024] I h = N h / N , T > T h

[0025] I m = N m / N , T l ≤ T ≤ T h

[0026] I l = N l / N , T < T l

[0027] Among them, S is the comprehensive behavior intensity index; I h , I m and I l are the high, medium, and low intensity weighting parameters respectively; I h , I m and I l are the high, medium, and low intensity time indices respectively; T is the duration of a single state detection behavior, T h and T l are the first and second duration thresholds respectively; N h , N m and N l are respectively the duration of a single state detection behavior higher than the first duration threshold T h within the preset total time period, between the first duration threshold T l and the second duration threshold T h and lower than the second duration threshold T lThe total number of frames.

[0028] In step 4.3 described above, the low egg production hen fusion detection model is as follows:

[0029] Q = w 1 P n + w 2 S n + w 3 V n

[0030] Wherein, Q is the low egg production hen detection parameter; w 1, w 2 and w 3 are the frame number weight, speed weight and intensity weight respectively; P n , S n and V n are the proportion of the frame number of the state detection behavior of the normalized laying hens, the comprehensive behavior intensity index and the average speed respectively.

[0031] Under the current state detection behavior, if the low egg production hen detection parameter is not lower than the preset threshold, it is judged as a non-low egg production hen, otherwise it is a low egg production hen.

[0032] The beneficial effects of the present invention are:

[0033] 1. The present invention can improve the accuracy and efficiency of breeding management: By combining an automated data collection platform, multi-target behavior tracking technology and a deep learning model, the present invention realizes the accurate detection of low egg production hens. Compared with traditional manual methods, the system significantly improves the accuracy and efficiency of breeding management, reduces human errors and labor intensity, and has a low detection cost and high detection efficiency.

[0034] 2. The present invention can optimize resource utilization: By intelligently identifying low egg production hens, the present invention can realize the early discovery and elimination of low production individuals, avoid resource waste, and optimize the structure and production efficiency of the chicken flock. Reduce the feed consumption, space occupation and environmental pressure of low egg production hens, improve the utilization efficiency of resources, and thus promote the development of the farm towards a more efficient, environmentally friendly and sustainable model.

[0035] 3. The present invention can provide intelligent decision-making support: The present invention provides intelligent decision-making support. The system can analyze the behavioral characteristics of low-producing laying hens in real time and automatically put forward management optimization suggestions according to the detection results. For example, after detecting low-producing laying hens, the system can automatically adjust management strategies such as feeding and feed delivery, optimize the production plan, and provide decision-making references for breeding personnel. The intelligent decision-making mechanism not only improves the management level of the farm but also enhances the scientificity and flexibility of breeding decisions, further improving production efficiency and economic benefits. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is a schematic structural diagram of the system of the present invention;

[0037] Figure 2 is a training result diagram of the behavior recognition model of the present invention;

[0038] Figure 3 is a flow block diagram of the behavior tracking model of the present invention;

[0039] Figure 4 is a general flow block diagram of the present invention;

[0040] Figure 5 is a flow chart of behavior statistics and output of the present invention;

[0041] In the figure: 1, chicken coop; 2, feeding trough; 3, drinking fountain; 4, high-definition camera; 5, LED lamp tube; 6, camera bracket; 7, chassis; 8, network cable; 9, display; 10, switch; 11, digital video recorder. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0042] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0043] As Figure 4 shown, the present invention first enters the platform construction and dataset establishment stage. As Figure 1As shown in the figure, a low-yield laying hen detection system based on multi-object behavior tracking including a chicken behavior video acquisition platform is built. The low-yield laying hen detection system includes a number of behavior action devices and behavior detection devices. Each behavior action device is installed in each chicken cage 1 in the chicken house and is used for each laying hen to perform behavior actions. The behavior detection device is installed movably or fixedly on the side of each chicken cage 1 in the chicken house, and detects low-yield laying hens in a way of mobile inspection or fixed detection according to the behavior actions of each laying hen at the behavior action device. The low-yield laying hen is specifically a laying hen with a monthly egg production lower than a preset threshold. The behavior action device includes a feeding trough 2 and a drinking fountain 3. The feeding trough 2 is installed at the lower part outside the chicken cage 1 with the trough opening facing upward, and the drinking fountain 3 is installed at the upper part outside the chicken cage 1 with the outlet facing downward. A number of laying hens are placed in each chicken cage 1. The behavior detection device includes a high-definition camera 4, an LED lamp tube 5, a camera bracket 6, a chassis 7, a display 9, a switch 10, a hard disk video recorder 11 and a host. The chassis 7 is arranged movably or fixedly on the ground between each chicken cage 1. The camera bracket 6 is installed on the chassis 7. The high-definition camera 4 is installed at the top of the camera bracket 6 and faces the positions of the feeding trough 2 and the drinking fountain 3. The LED lamp tube 5 is installed on the casing of the high-definition camera 4 and the light source faces the positions of the feeding trough 2 and the drinking fountain 3. A plurality of high-definition cameras 4 are electrically connected to the hard disk video recorder 11 through a network cable 8 and a switch 10. The hard disk video recorder 11, the host and the display 9 are connected to each other. The switch 10, the hard disk video recorder 11 and the high-definition camera 4 form a chicken behavior video acquisition platform. The switch 10 and the hard disk video recorder 11 are powered by direct current, and the high-definition camera 4 is powered by POE (Power over Ethernet). The behavior video data stream is output to the chicken behavior tracking and statistics platform through the hard disk video recorder 11. When installing the high-definition camera 4, if it is necessary to detect the laying hens in the second-layer chicken cage 1, first manually adjust the high-definition camera 4 to a suitable height according to the height of the second-layer chicken cage 1, and then adjust the field of view range to the best angle by changing the downward viewing angle of the high-definition camera 4. Use the preview function of the high-definition camera 4 to ensure that the chicken cage 1 is located in the center of the field of view, aligned with the feeding trough 2 and the drinking fountain 3, and the chicken head can be photographed when the laying hen eats. During the adjustment process, ensure that the feeding trough 2 in the picture remains horizontal and is parallel to the long axis of the picture to improve the accuracy and efficiency of image processing. Before collecting the video, debug the high-definition camera 4, set the video coding format to MJPG, the resolution aspect ratio to 3840×2160, and the frame rate to 20FPS to ensure the clarity and smoothness of the video. For the convenience of data storage, the video is compressed using the H.264 standard. The video data collected by the high-definition camera 4 is stored in the hard disk video recorder 11 through a high-definition multimedia interface HDMI cable, and the captured pictures can be browsed on the display 9 in the chicken house and video browsing software.

[0044] Based on the low - laying hen detection system, the present invention uses computer vision to focus on identifying two behaviors of laying hens, namely feeding and drinking. It monitors the feeding situation, drinking situation, and the combined feeding and drinking situation of 200 - day - old laying hens within 3 minutes after feeding. Finally, it compares the accuracy rates of three methods for identifying low - laying hens. The specific implementation of the low - laying hen detection method based on multi - target behavior tracking is as follows:

[0045] First, construct a behavior recognition model and install it in the host. The behavior recognition model uses the improved object detection YOLOV11n model. The improved object detection YOLOV11n model connects the backbone network and each feature extraction C3k2 module in the detection head, and then connects the iterative attention feature fusion iAFF module, thus reconstructing it into a feature extraction and fusion C3k2_iAFF composite module. The iterative attention feature fusion iAFF module includes two multi - scale channel attention modules. On the premise of retaining the original C3k2 basic structure, the C3k2_iAFF module embeds a dual - branch attention weight generation unit. The first branch uses a channel attention mechanism composed of global average pooling and a fully - connected layer to perform channel - dimension compression - activation operations on the input features, generating a channel enhancement coefficient matrix. The second branch extracts spatial context information through 3×3 depth - separable convolution and generates a spatial focus heat map in combination with the Sigmoid function. The attention weights output by the two branches are dynamically weighted and fused through a learnable scale factor to form a final feature selection mask. After this mask is element - by - element multiplied with the original features, it is input into the feature fusion gating unit, and is adaptively weighted and summed with the original path features through a residual connection. Further, the improved method deploys four groups of C3k2_iAFF modules in the feature pyramid construction stage of the backbone network, which act on the P3 - P5 level feature extraction paths respectively. The C3k2_iAFF modules are used in the 2nd, 4th, 6th, and 8th layers of the backbone network, and three groups of C3k2_iAFF modules are deployed in the multi - scale feature fusion stage of the detection head. Through the cascaded dynamic feature calibration mechanism, the network automatically optimizes the fusion ratio coefficient of cross - layer features, the channel - dimension feature enhancement coefficient matrix, and the spatial - dimension feature focus weight during the training process, so as to significantly improve the feature representation ability for occluded targets, small - scale targets, and complex background interference while maintaining the original network depth and parameter efficiency. The present invention also proposes an adaptive bounding box regression loss function WloU_v1 that fuses the distance and aspect - ratio decoupled attention mechanism to address the over - punishment problem of the existing loss function for high - quality samples. As the loss function WloU_v1 of the dynamic non - monotonic focusing mechanism of the improved object detection YOLOV11n model, it is as follows:

[0046] L WIoU =R WIoU L IoU

[0047] R WIoU = exp((x - x gt ) 2 + (y - y gt ) 2 ) / (W g 2 + H g 2 )

[0048] L IoU = 1 - IoU

[0049] Where L WIoU represents the loss function WloU_v1, R WIoU and L IoU represent the first and second calculated values respectively; exp( ) represents the exponential operation; x and x gt represent the abscissas of the predicted box and the ground truth box respectively, y and y gt represent the ordinates of the predicted box and the ground truth box respectively, W g and H g represent the length and width of the minimum bounding rectangle of the predicted box and the ground truth box respectively; IoU represents the Intersection over Union.

[0050] The loss function WloU_v1 first calculates the minimum enclosing size (W´, H´) of the predicted box and the target box, where W´ and H´ are the width and height of the enclosing size respectively, and separates it from the computational graph to eliminate gradient anomalies; subsequently, an exponential distance attention term exp[( △ x² + △ y²) / (W´ + H´)] is constructed based on the normalized center distance, △ x and △ y are the differences in the abscissa and ordinate respectively, △ x = x - x gt , △ y = y - y gt, and then dynamically adjust the geometric penalty weight: when the overlap between the anchor box and the target box is low, enhance the distance sensitivity to improve the positioning accuracy; when the overlap is high, weaken the geometric constraint to reduce the overfitting risk for high-quality samples. The loss function WloU_v1 realizes the differential learning strategy for different-quality samples by constructing a geometric constraint decoupler and a dynamic sensitivity regulator. The core modules include a geometric constraint decoupled attention generation unit, a dynamic loss sensitivity adjustment unit, and a gradient collaborative optimization mechanism. The geometric constraint decoupled attention generation unit includes a distance attention factor and an aspect ratio attention factor, and through the Intersection over Union (IOU) correlation truncation threshold, the aspect ratio penalty significantly decays at high IOU. The dynamic loss sensitivity adjustment unit constructs a dual attention gating weight G to dynamically fuse the distance and aspect ratio correlations. The gradient collaborative optimization mechanism designs a main optimization path and an auxiliary optimization path to ensure the dynamic stability of the attention mechanism.

[0051] During the training of the behavior recognition model until the loss function WloU_v1 converges, a trained laying hen behavior recognition model is obtained. When training the behavior recognition model, after preprocessing the collected images, the Labeling tool is used to carefully label the feeding and drinking behaviors of the laying hens. Then, the PyTorch deep learning framework and the Yolov11n model are used for training, and the model weights are updated through forward propagation and backward propagation to optimize the model performance. On the premise of retaining the original C3k2 basic structure, a dual-branch attention weight generation unit is embedded, and an adaptive bounding box regression loss function that fuses the distance and aspect ratio decoupled attention mechanism is used to improve the feature representation ability for occluded targets, small-scale targets, and complex background interference while maintaining the original network depth and parameter efficiency. Finally, the performance of the model is evaluated using various metrics of the training set and the validation set, including the loss curve, accuracy, recall rate, and the mean average precision at 50% Intersection over Union (mAP50), to ensure that the model reaches the expected accuracy level in the behavior recognition task.

[0052] To ensure the effectiveness of model training and good generalization ability, the collected dataset of 4,800 images is divided into a training set, a validation set, and a test set according to the ratio of 8:1:1. Declare the categories of the three behaviors in the category annotation file. There are a total of 29,334 annotation boxes, which are respectively marked as class0, class1, and class2 to support the recognition function of the model. Use the PyTorch deep learning framework based on Python and use YOLOV11n as the basic architecture to build an object detection and behavior recognition network model. Configure the model training environment, and then after initializing the model parameters, calculate the prediction output through forward propagation, and use the loss function to evaluate the difference between the prediction result and the true label. Subsequently, use the improved YOLOV11n model to adjust the model weights to improve the overall performance of the model. At the end of each training cycle, evaluate the performance of the model on the validation set, implement the early stopping strategy or save the model checkpoint, and dynamically adjust the learning rate and other hyperparameters according to the validation results to optimize the training process. During the training process, focus on monitoring the recognition accuracy of the feeding and drinking behaviors to ensure that the model has the ability to effectively distinguish various behaviors. After training is completed, use the test set to evaluate the generalization ability of the model and perform necessary fine-tuning to prevent the model from overfitting and improve the performance of the optimized model in practical applications. In addition, to ensure the stability and accuracy of the model in practical applications, it is necessary to monitor the training process throughout, prevent overfitting or underfitting, and flexibly adjust the training strategy according to the training feedback.

[0053] After the behavior recognition model is trained, to evaluate the model accuracy, it is necessary to conduct training and validation loss evaluations. During the model training process, record key indicators such as the bounding box loss, classification loss, and depth loss of the training set and the validation set, as Figure 2 shown, which are the training results of the model, namely the bounding box loss, classification loss, depth loss, accuracy, recall rate of the training set, and the bounding box loss, classification loss, depth loss, accuracy, and recall rate of the validation set. Then conduct an analysis of precision and recall rate to evaluate the accuracy and recall rate recall of the bounding boxes of the model on the training set and the validation set to measure the recognition accuracy and integrity of the model. It is also necessary to draw the mean average precision mAP curve, draw the mean average precision mAP50 (intersection over union IoU threshold is 0.5) and mean average precision mAP50-95 (intersection over union IoU threshold range is 0.5 to 0.95) curves of the model on the training set and the validation set to comprehensively evaluate the performance of the model under different IoU thresholds. Through the comprehensive analysis of the above indicators, a preliminary evaluation of the recognition performance of the model is carried out to ensure that it reaches the expected precision level in the behavior recognition task.

[0054] Then, build a behavior tracking model and install it in the host. The behavior tracking model uses the multi-object tracking ByteTrack model. Specifically, during implementation, the detection boxes with behavior labels output by the behavior recognition model are output to the ByteTrack model, and the behavior frames of each target are calculated and output. The ByteTrack model includes Kalman filter detection box prediction, IOU matching, Hungarian matching, and the creation, deletion, and merging of chicken tracks. The multi-object tracking ByteTrack model will divide the detection boxes output by the behavior model into high-score detection boxes (Pi > Thigh) and low-score detection boxes (Pi < Tlow) according to two confidence thresholds Thigh and Tlow. Then, use the Kalman filter to predict the motion state of the target and update it through the detection box to provide the accurate position and trajectory of the target. Then, calculate the overlap degree IOU between the current detection box and the target position box predicted by the Kalman filter. Then, complete the best matching through the Hungarian algorithm, and finally complete the creation, deletion, and merging of the track. As Figure 3 shown below:

[0055] 1.1. Before starting tracking, create a tracking trajectory for each target, and then predict the next frame bounding box of each tracking trajectory through the Kalman filter. Obtain the detection box B i of the target through the detector. Each detection box B i = (X i , Y i , W i , H i , P i ), where X i , Y i , W i , H i , P i represent the horizontal and vertical coordinates of the center point of the prediction box, the length and width of the detection box, and the confidence of the behavior classification respectively. According to the two confidence thresholds T high and T low , divide the detection boxes into high-score detection boxes (P i > T high ) and low-score detection boxes (P i < T low ), where high-score detection boxes are used for priority matching, and low-score detection boxes are used for supplementary matching. Detection boxes with a confidence between the confidence thresholds T low and T high are classified as low-score detection boxes and the background is filtered out.

[0056] First, for high-score bounding boxes, calculate the IOU between high-score bounding boxes and predicted bounding boxes, and use the Hungarian algorithm to match the IOU to obtain three results: the matched trajectories, the trajectories that failed to be matched successfully, and the detected bounding boxes that failed to be matched successfully. After successful matching, update the bounding boxes in the tracking trajectories to high-score detected bounding boxes, and update the matched trajectories to the active state. Then, for low-score bounding boxes, calculate the IOU between low-score bounding boxes and the predicted bounding boxes that were not matched in the previous step, and use the Hungarian algorithm to match the IOU to obtain three results: the matched detected bounding boxes and trajectories, the trajectories that failed to be matched successfully, and the low-score detected bounding boxes that failed to be matched successfully. After successful matching, update the bounding boxes in the tracking trajectories to detected bounding boxes. Finally, for the high-score detected bounding boxes that were not matched, match them with the trajectories in the inactive state to obtain three results: the matched trajectories, the unmatched trajectories, and the unmatched detected bounding boxes. For the matched ones, update the state. For the unmatched trajectories, mark them as deleted. For the unmatched detected bounding boxes, if the confidence is greater than the high threshold + 0.1, create a new tracking trajectory; otherwise, discard it.

[0057] 1.2. State Prediction and Update of Kalman Filter: The Kalman filter is used to predict the motion state of the target and update it through the detected bounding box to provide the accurate position and trajectory of the target.

[0058] 1.2.1. State Prediction: In each frame, the Kalman filter predicts the target state of the current frame based on the target state X of the previous frame k-1 and the state transition model.

[0059] 1.2.2. State Update: When the detected bounding box Z k is available, the Kalman filter corrects the predicted state.

[0060] 1.3. IOU Matching and Hungarian Matching Algorithm: Calculate the overlap degree IOU between the current detected bounding box and the target position box predicted by the Kalman filter as follows:

[0061] IOU ( B i , T j ) = ( B i ∩ T j ) / ( B i ∪ T j )

[0062] where B i represents the current detected bounding box, T j represents the target position box predicted by the Kalman filter, B i = ( w B, h B ) and T j = ( w T , h T ) respectively represent the set of boundary information of the current detection box and the predicted object detection box, w B and h B respectively represent the width and height of the current detection box, w T and h T respectively represent the width and height of the predicted object detection box.

[0063] The cost matrix is obtained through IOU matching C ij , that is, the detection box of the current frame B i and the object of the previous frame T j matching cost.

[0064] The Hungarian algorithm completes the matching by minimizing the total cost value, as follows:

[0065] min ∑ i=1 D ∑ j=1 J C ij · X ij

[0066] Among them, D represents the number of detection boxes in the current frame, that is, the total number of predicted objects generated by the Kalman filter currently; J represents the number of un-matched tracking trajectories in the previous frame, that is, the total number of existing tracking trajectories that need to be associated with the current detection box.

[0067] The constraint conditions are as follows:

[0068] ∑ j=1 T X ij = 1, indicating that each detection box can be paired with at most one trajectory

[0069] ∑ i=1 D X ij = 1, indicating that each trajectory can accept at most one prediction box

[0070] After the matching is completed, update the ID of the object and generate a new trajectory.

[0071] 1.3.1. First IOU Matching: Perform Kalman filter prediction on the trajectories \(t_s\) (the currently tracked trajectory) and \(l_s\) (the temporarily lost trajectory) in the trajectory pool to obtain the predicted positions of each trajectory in the current frame. Calculate the IOU matrix of the predicted trajectory bounding boxes and the high-confidence detection boxes, and use the Hungarian algorithm based on the IOU matrix to complete the matching of trajectories and detection boxes. Finally, update the trajectory status: For the trajectories with successful matching, update the bounding box position, status, and confidence score of the trajectory, and put the matched trajectories into \(a_s\) (the tracked trajectories in the active state) or \(r_s\) (the trajectories that did not match in the previous frame but match the target in the current frame); for the unmatched trajectories, put these trajectories into \(l_s\) (the missing trajectories) and wait for the next round of matching.

[0072] 1.3.2. Second IOU Matching: Calculate the IOU matrix of the trajectories that were not matched in the first matching T r and the low-confidence detection boxes D l Use \(T_{low}\) for filtering and then complete the matching through the Hungarian algorithm. Update the status and position of the successfully matched trajectories; directly delete the unmatched low-confidence detection boxes; mark the unmatched trajectories as Lost and add them to \(l_s\) (the missing trajectories).

[0073] 1.4. Trajectory Creation, Deletion, and Merging in the Tracking Model:

[0074] 1.4.1. Creating a New Trajectory: For the unmatched high-confidence detection boxes, if their confidence is higher than the threshold \(T_{high}\), call the trajectory activation activate method, initialize the unmatched high-confidence detection boxes as new trajectories, assign them unique trajectory IDs, add them to the tracking list, allocate new trajectory IDs, create new trajectories, and add them to the tracked trajectories in the active state.

[0075] 1.4.2. Trajectory Deletion: If the number of missing trajectories exceeds the maximum allowed value, call the trajectory removal mark_removed method, mark the trajectories that have not been matched for a long time as invalid, remove them from the tracking list, and remove the trajectories from the trajectory pool.

[0076] 1.4.3. Trajectory Merging: After all trajectory updates are completed, use the IOU threshold to determine whether there are duplicates between the tracked trajectories and the missing trajectories. If they are the same target, keep the trajectory with a longer duration and remove the shorter trajectory.

[0077] 1.4.4. Trajectory Output: Use the trajectories in the Tracked and active state as the output trajectories for the current frame, and return the bounding boxes and their corresponding IDs.

[0078] In specific implementation, a high-definition camera 4 is used to collect a number of behavioral video frames of laying hens performing behavioral actions in the behavior action device, including the action of lowering the head to feed in the feeder 2 and the action of raising the head to drink water using the waterer 3. Then, the frames are sequentially input into the host computer for preprocessing through the network cable 8, switch 10, and digital video recorder 11. For each behavioral video frame, first, the behavioral video frames with laying hens are screened out, then adjusted to a preset contrast and preset size, and then normalized to obtain a normalized image to improve the image quality. Then, the behaviors of the laying hens in the normalized image are labeled using the Labelimg tool. When the head of the laying hen is in the feeder 2, it is marked as the feeding action. At this time, the lower edge of the chicken beak of the laying hen crosses the upper edge of the feeder 2 and has an obvious downward movement trend. When the distance between the chicken beak of the laying hen and the outlet of the waterer 3 is less than the preset pixel distance, it is marked as the drinking action. At this time, the distance between the chicken beak of the laying hen and the nipple waterer 3 does not exceed 50 pixels and the chicken head has a tendency to move obliquely upward. Other actions other than feeding and drinking are marked as other actions, thus constructing a dataset containing rich characteristics and accurate annotation information, providing high-quality training and verification data for the automatic recognition of laying hen behaviors. The preprocessing process and two models form a chicken behavior tracking and statistics platform. After processing, a cage-raised laying hen behavior dataset is constructed. The cage-raised laying hen behavior dataset is used to train the behavior recognition model and behavior tracking model to obtain the trained laying hen behavior recognition model and laying hen behavior tracking model.

[0079] Then, a high-definition camera 4 is used to collect a number of behavioral video frames of each laying hen in the chicken cage 1 to be detected performing behavioral actions in the behavior action device. After performing the same preprocessing as in step 2, the frames are sequentially input into the laying hen behavior recognition model and the laying hen behavior tracking model for processing, and then a laying hen behavior tracking map is output. The behavior tracking model can finally obtain the behavior trajectory of the laying hen. Each laying hen behavior tracking map is constructed into a laying hen behavior tracking dataset.

[0080] As Figure 5 shown, finally, the behaviors of the laying hens are statistically analyzed and output. The laying hen behavior tracking dataset output by the chicken behavior tracking and statistics platform is further input into the low-yield laying hen detection platform based on behavior tracking for detection. In the host computer, the laying hen behavior detection method is used to process the laying hen behavior tracking dataset. For each laying hen in the continuous N frames of the laying hen behavior tracking map within the preset total time period, the laying hen behavior detection method is used for processing. The feeding, drinking, and feeding-coupled-with-drinking behaviors of the laying hens are all regarded as state detection behaviors. For each state detection behavior, first, according to the behavior trajectory in the continuous N frames of the laying hen behavior tracking map of the laying hen, the frame ratio of the state detection behavior of the laying hen is obtained. The frame ratio of the state detection behavior of the laying hen is the total number of frames of the laying hen behavior tracking map in which the laying hen performs the feeding action in the continuous NPercentage of Quantity in Laying Hen Behavior Tracking Diagram P e , the total number of frames of the laying hen behavior tracking diagram in which the laying hens perform drinking actions is continuous N Percentage of Quantity in Laying Hen Behavior Tracking Diagram P d , or the proportion of feeding coupled with drinking actions P c , P c = P e + P d ; and obtain the average speed of the state detection behavior of the laying hens. When obtaining the average speed of the behavior trajectory of the state detection behavior of the laying hens, first, according to the continuous N behavior trajectories in the laying hen behavior tracking diagram, obtain the instantaneous movement speed of the feeding or drinking behavior of the laying hens with each n frame as the unit time window, and obtain the average value of the instantaneous movement speeds of each feeding behavior, drinking behavior, or feeding-coupled drinking behavior of the laying hens within the preset total time period as the average speed; the instantaneous movement speed of the feeding-coupled drinking behavior includes the instantaneous movement speed of the feeding behavior and the instantaneous movement speed of the drinking behavior, and it is necessary to calculate the instantaneous movement speed during the feeding or drinking behavior through the coordinates of the center point of the chicken body output by the behavior tracking model, with every 10 frames as the time window, and respectively count the instantaneous speed sequences of the chickens during the feeding and drinking behaviors and calculate the average speed of the behavior within the 3-minute detection period.

[0081] Then establish a comprehensive behavior intensity model, specifically as follows:

[0082] S = λ h I h + λ m I m + λ l I l

[0083] I h = N h / N , T > T h

[0084] I m = N m / N , T l ≤ T ≤ T h

[0085] I l = N l / N , T < T l

[0086] Among them, S is the comprehensive behavior intensity index; I h , I m and I l are the high, medium and low intensity weighting parameters respectively; I h , I m and I l are the high, medium and low intensity time indexes respectively; T is the duration of a single state detection behavior, T h and T l are the first and second duration thresholds respectively; N h , N m and N l are respectively the total number of frames when the duration of a single state detection behavior within the preset total time period is higher than the first duration threshold T h , between the first duration threshold T l and the second duration threshold T h and lower than the second duration threshold T l That is, when the laying hens perform 3 high-intensity feeding behaviors exceeding 120s within the preset total time period, the total number of frames obtained for the three feeding behaviors is N h ; In specific implementation, λ h =0.6, λ m =0.3 ,λ l =0.1, Th = 120 s, T l = 60 s.

[0087] For the feeding and drinking behaviors, the duration T of a single behavior can be divided into high intensity I h , medium intensity I m and low intensity I l . For the feeding or drinking behaviors within each monitoring period, calculate the proportion of the number of frames in each intensity level respectively. Finally, use the weighted formula to fuse the proportions of the number of frames in different intensity levels, and input the number of frames of the state detection behavior of laying hens into the comprehensive behavior intensity model. After processing, output the comprehensive behavior intensity index S .

[0088] Finally, conduct behavioral feature comparison and recognition evaluation. Apply the data such as the proportion of the number of frames of behaviors calculated above to the groups of low-producing laying hens and normal laying hens respectively, conduct a comparative analysis of behavioral features, and calculate the accuracy rate of identifying low-producing laying hens. The specific steps are as follows:

[0089] 1. Behavioral feature fusion analysis: Compare the differences in behavioral features of low-producing laying hens and normal laying hens in three dimensions: the proportion of the number of frames in behaviors, comprehensive behavior intensity, and behavioral trajectory speed through statistical methods, and select the weights of each index w 1. w 2. w 3. Establish a fusion detection model for low-producing laying hens, as follows:

[0090] Q = w 1 P n + w 2 S n + w 3 V n

[0091] Among them, Q is the detection parameter for low-producing laying hens; w 1, w 2 and w 3 are the frame weight, speed weight, and intensity weight respectively; P n , S n and V nThe normalized frame ratio, comprehensive behavior intensity index and average speed of the laying hen’s state detection behavior are respectively used for data normalization calculation. The behavior frame ratio, comprehensive behavior intensity and average speed of the behavior trajectory are linearly normalized, and the values of the three indicators are normalized to [0,1].

[0092] The frame ratio, average speed and comprehensive behavior intensity index of the laying hen's state detection behavior are normalized and input into the low-laying laying hen fusion detection model, and the low-laying laying hen detection parameters are output after processing.

[0093] 2. Threshold setting: Laying hens are detected based on low-laying chicken detection parameters. Under the current state detection behavior, if the low-laying chicken detection parameters are not lower than the preset threshold, they are judged as non-low-laying chickens, otherwise they are low-laying chickens. Finally, low-laying chickens are detected and displayed on the display 9. Specifically, by analyzing the distribution of behavioral characteristics of low-laying and normal groups, combined with the receiver operating characteristic curve ROC (Receiver Operating Characteristic) optimization to maximize the classification accuracy, the judgment thresholds for feeding, drinking, and feeding coupled with drinking are set respectively. T e 、 T d and T c , compare the data after fusion analysis of different judgment thresholds and behavioral characteristics. The data greater than or equal to the judgment threshold are normal laying hens, and the data less than the judgment threshold are low-yielding laying hens, thus completing the low-yield detection.

[0094] 3. Application of identification methods: Three identification methods (such as single feeding behavior identification method, single drinking behavior identification method and feeding coupled drinking behavior identification method) were used to identify low-yielding and normal laying hens. A total of 4 cages with 3 chickens (1 low-yielding and 2 high-yielding) and 4 cages with 4 chickens (1 low-yielding and 3 high-yielding) were selected. A 3-minute video clip after feeding every day is taken to represent a data point. Feeding is done 4 times a day, and 1 chicken has 4 data points per day. A total of 28 chickens (8 low-yielding and 20 normal) have 112 data points per day. A total of 7 days of monitoring have been conducted, with a total of 784 data points. The final accuracy rate was obtained. A as follows:

[0095] A =( N lc + N nc ) / N

[0096] in, N lc and N ncrespectively represent the number of correctly determined low - laying hens and the number of correctly determined normal laying hens, K represents the total amount of test data, K = 784.

[0097] By comparing the method of the present invention with the existing methods, the overall monitoring results of the behaviors of caged laying hens are obtained, as shown in Table 1.

[0098] Table 1

[0099]

[0100] Among them, P and R respectively represent the accuracy rate and the recall rate.

[0101] It can be seen from Table 1 that the behavior recognition model constructed by the present invention has a high accuracy rate.

[0102] The present invention can also compare the accuracy rates of the detection results of identifying low - laying hens in the detection methods of feeding, drinking, and feeding - coupled - drinking according to the divided thresholds, as shown in Table 2.

[0103] Table 2

[0104]

[0105] It can be seen that the recognition accuracy rates of the three discrimination methods are all relatively high, and the recognition accuracy rate of the feeding - coupled - drinking behavior discrimination method is the highest.

[0106] The scenario application of the low - laying hen detection system of the present invention is as follows:

[0107] Model integration and automated detection: Integrate the trained model into the monitoring system of the farm to achieve real - time automated detection. The system can process the behavior data of laying hens collected by high - definition cameras in real time and output the detection results through the deep - learning model, including the behavior status of each laying hen and the identification and positioning of low - laying hens. This information will help farm management personnel discover low - laying hens in a timely manner and carry out targeted management.

[0108] Intelligent analysis and report generation: The system can automatically generate an analysis report of low - laying hens according to the detection results. The report content includes key indicators such as the number, distribution, behavior characteristics, and behavior change trends of low - laying hens. Through a user - friendly interface, farm personnel can conveniently view and query these analysis results, thereby providing data support for management decisions. In addition, the system can also regularly generate an analysis report on the overall health status of the farm to help farm personnel optimize management strategies.

[0109] System Performance and Scalability: The system design takes into account the stability, compatibility, and scalability of performance. It can support a variety of data acquisition devices (such as cameras and sensors of different brands) and data interfaces (such as application programming interfaces API (Application Programming Interface), database connections, etc.), and can adapt to the needs of farms of different scales and environmental conditions. The system has a flexible modular architecture and can adjust the system configuration or add more monitoring points according to the scale of the farm. At the same time, the system reserves expansion interfaces to support the subsequent introduction of new data sources, algorithms, or recognition methods to continuously improve the detection accuracy and efficiency.

[0110] Real-time Warning and Intelligent Decision-making Support: Based on the detection results of low-producing laying hens, the system can intelligently issue warning reminders. For example, when the behavior patterns of certain laying hens are abnormal or the number of low-producing laying hens exceeds the threshold, the system will automatically notify the farm management personnel. In addition, the system can also adjust the breeding strategy according to real-time data, such as optimizing the breeding environment and adjusting the feed delivery, so as to improve the overall production efficiency of laying hens.

[0111] The present invention deploys the trained laying hen behavior recognition model and laying hen behavior tracking model into the monitoring system of an actual farm to achieve real-time automatic detection. Ensure that the system can process the behavior data collected by the high-definition camera 4 in real time and output the detection results. The system generates an analysis report on the detection of low-producing laying hens, including key indicators such as the number, distribution, and behavior characteristics of low-producing laying hens. Provide query and display functions through a user-friendly interface to facilitate decision-making and management by farm management personnel. Ensure that the system has good performance stability, compatibility, and scalability, supports a variety of data acquisition devices and interfaces, and adapts to the needs of farms of different scales and environments. The system reserves expansion interfaces for subsequent introduction of new data sources and recognition methods to further improve the detection accuracy. Based on the detection results of low-producing laying hens, the system can intelligently issue intelligent warning reminders to provide intelligent decision-making for breeders.

[0112] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present application can be implemented in various computer languages. The present application is described according to the flowcharts of the methods, systems, and computer program products of the embodiments of the present application.

[0113] Although the preferred embodiments of the present application have been described, additional changes and modifications can be made to these embodiments by those skilled in the art once they learn of the basic inventive concept. Therefore, the present invention is intended to be construed as including the preferred embodiments as well as all changes and modifications that fall within the scope of the present application.

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

Claims

1. A detection method for low - laying hens based on multi - target behavior tracking, characterized in that, Including: Step 1: Construct a behavior recognition model and a behavior tracking model and install them in the host; Step 2: Use a high-definition camera (4) to collect several behavior video frames of laying hens performing behavior actions in the behavior action device, and then successively input them into the host through a network cable (8), a switch (10), and a digital video recorder (11) for preprocessing and behavior annotation processing, and then construct a cage-layer behavior dataset. Use the cage-layer behavior dataset to train the behavior recognition model and the behavior tracking model to obtain a trained laying hen behavior recognition model and a trained laying hen behavior tracking model; Step 3: Use a high-definition camera (4) to collect several behavior video frames of each laying hen in the chicken cage (1) to be detected performing behavior actions in the behavior action device. After performing the same preprocessing as in Step 2, input them into the laying hen behavior recognition model and the laying hen behavior tracking model in sequence for processing, and then output a laying hen behavior tracking map. Each laying hen behavior tracking map is constructed into a laying hen behavior tracking dataset; Step 4: Use a laying hen behavior detection method in the host to process the laying hen behavior tracking dataset, detect low-producing laying hens, and display them on a monitor (9) to complete low-production detection; In the above-mentioned Step 2, the behavior actions of the laying hens in the behavior action device include the action of lowering the head to feed in the feeding trough (2) and the action of raising the head to drink water using the drinking fountain (3); for each behavior video frame, perform preprocessing on the behavior video frame. First, screen out the behavior video frames with laying hens, then adjust them to a preset contrast and a preset size, then perform normalization processing to obtain a normalized image, and then perform behavior annotation on the normalized image for the laying hens. When the head of the laying hen is in the feeding trough (2), it is marked as a feeding action; when the beak of the laying hen is less than a preset pixel distance from the outlet of the drinking fountain (3), it is marked as a drinking action; other actions other than feeding and drinking are marked as other actions; Step 4.1: For each laying hen in the continuous N frames of the laying hen behavior tracking diagram within the preset total time period, use the laying hen behavior detection method for processing. Consider the feeding, drinking, and feeding-coupled-with-drinking behaviors of the laying hens as state detection behaviors. For each state detection behavior, first, based on the N behavior trajectories in the frames of the laying hen behavior tracking diagram, obtain the frame ratio of the state detection behavior of the laying hen and obtain the average speed of the state detection behavior of the laying hen; Step 4.2: Establish a comprehensive behavior intensity model, input the number of frames of the state detection behavior of the laying hens into the comprehensive behavior intensity model, and output a comprehensive behavior intensity index after processing; Step 4.3: Establish a low-producing laying hen fusion detection model, normalize the proportion of the number of frames of the state detection behavior of the laying hens, the average speed, and the comprehensive behavior intensity index, and then input them into the low-producing laying hen fusion detection model. After processing, output low-producing laying hen detection parameters, and detect and identify laying hens according to the low-producing laying hen detection parameters.

2. The low-producing laying hen detection method based on multi-object behavior tracking according to claim 1, characterized in that: In the above-mentioned Step 1, the host is located in the behavior detection device of the low-producing laying hen detection system based on multi-object behavior tracking. The low-producing laying hen detection system based on multi-object behavior tracking includes several behavior action devices respectively installed in each chicken cage (1) of the chicken house for each laying hen to perform behavior actions and a behavior detection device. The behavior detection device is movably or fixedly installed on the side of each chicken cage (1) in the chicken house and is used to detect low-producing laying hens in a mobile patrol or fixed detection manner according to the behavior actions of each laying hen at the behavior action device.

3. The low-yield laying hen detection method based on multi-object behavior tracking according to claim 2, characterized in that: The behavior action device includes a feeding trough (2) and a water dispenser (3). The feeding trough (2) is installed at the lower part outside the chicken coop (1) with the trough opening facing upwards, and the water dispenser (3) is installed at the upper part outside the chicken coop (1) with the outlet facing downwards. A number of laying hens are placed in each chicken coop (1); the behavior detection device includes a high-definition camera (4), an LED lamp tube (5), a camera bracket (6), a chassis (7), a display (9), a switch (10), a hard disk video recorder (11) and a host. The chassis (7) is movably or fixedly arranged on the ground between each chicken coop (1). The camera bracket (6) is installed on the chassis (7). The high-definition camera (4) is installed at the top of the camera bracket (6) and faces the positions of the feeding trough (2) and the water dispenser (3). The LED lamp tube (5) is installed on the casing of the high-definition camera (4) and the light source faces the positions of the feeding trough (2) and the water dispenser (3); the high-definition camera (4) is electrically connected to the hard disk video recorder (11) through a network cable (8) and a switch (10), and the hard disk video recorder (11), the host and the display (9) are connected to each other.

4. The low-yield laying hen detection method based on multi-object behavior tracking according to claim 1, characterized in that: In step 1, the behavior recognition model uses an improved object detection YOLOV11n model. The improved object detection YOLOV11n model connects each feature extraction C3k2 module in the backbone network and the detection head of the object detection YOLOV11n model and then connects the iterative attention feature fusion iAFF module, thereby reconstructing it into a feature extraction fusion C3k2_iAFF composite module; the loss function of the improved object detection YOLOV11n model uses a loss function with a dynamic non-monotonic focusing mechanism. During training, until the loss function converges, a trained laying hen behavior recognition model is obtained; the behavior tracking model uses a multi-object tracking ByteTrack model.

5. The low-yield laying hen detection method based on multi-object behavior tracking according to claim 1, wherein: In step 4.1, the frame ratio of the state detection behavior of laying hens is the ratio of the number of frames of the laying hen behavior tracking diagram in which the laying hens perform feeding actions to the total number of frames in N successive frames of the laying hen behavior tracking diagram P e , the ratio of the number of frames of the laying hen behavior tracking diagram in which the laying hens perform drinking actions to the total number of frames in N successive frames of the laying hen behavior tracking diagram P d , or the ratio of the feeding coupled with drinking actions P c . P c = P e + P d .

6. The low-yield laying hen detection method based on multi-target behavior tracking according to claim 1, wherein: In step 4.1 described above, when obtaining the average speed of the state detection behavior of laying hens, first, according to the behavior trajectories in the consecutive N frames of laying hen behavior tracking diagrams, the instantaneous movement speed of the feeding or drinking behavior of laying hens is obtained with each n frame as a unit time window, and the average value of the instantaneous movement speeds of each feeding behavior, drinking behavior, or feeding-coupled drinking behavior of laying hens within a preset total time period is used as the average speed.

7. The low-yield laying hen detection method based on multi-object behavior tracking according to claim 1, characterized in that: In step 4.2, the comprehensive behavior intensity model is as follows: S = λ h I h + λ m I m + λ l I l I h = N h / N , T > T h I m = N m / N , T l ≤ T ≤ T h I l = N l / N , T < T l Among them, S is the comprehensive behavior intensity index; I h , I m and I l are the high, medium, and low intensity weighting parameters respectively; I h , I m and I l are the high, medium, and low intensity time indices respectively; T is the duration of a single state detection behavior, T h and T l are the first and second duration thresholds respectively; N h , N m and N l are the total number of frames when the duration of a single state detection behavior is higher than the first duration threshold T h , between the first duration threshold T l and the second duration threshold T h and lower than the second duration threshold T l in a preset total time period.

8. The low-yield laying hen detection method based on multi-object behavior tracking according to claim 1, characterized in that: In step 4.3, the low-yield laying hen fusion detection model is as follows: Q = w 1 P n + w 2 S n + w 3 V n Among them, Q is the detection parameter of low egg-laying hens; w 1, w 2 and w 3 are the frame weight, speed weight, and intensity weight respectively; P n , S n and V n are the proportion of the number of frames of the state detection behavior of the normalized laying hens, the comprehensive behavior intensity index, and the average speed respectively; In the current state detection behavior, if the low-yield laying hen detection parameter is not lower than the preset threshold, it is judged as a non-low-yield laying hen, otherwise it is a low-yield laying hen.

Citation Information

Patent Citations

  • Hyperspectral detection method and system for low-yield laying hens

    CN119832602A