Livestock stereoscopic behavior detection method

By combining the RT-DETRv3 model with a multi-view camera system and a 3D convolutional neural network, the problems of accuracy and speed in livestock behavior detection are solved, achieving efficient and real-time three-dimensional behavior detection, which is suitable for various breeding environments.

CN119445615BActive Publication Date: 2026-02-06ANHUI AGRICULTURAL UNIVERSITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411471779.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2026-02-06
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

Existing technologies for livestock behavior detection suffer from problems such as insufficient detection accuracy and speed, difficulty in matching two-dimensional and three-dimensional images, slow detection speed, and high consumption of computing resources.

Method used

By employing the RT-DETRv3 model combined with a multi-view camera system and annotating data using SLEAP and LabelImg, a 3D convolutional neural network and adaptive attention mechanism are used to achieve stereoscopic detection of livestock behavior, including posture estimation, behavior classification, and management recommendations.

Benefits of technology

It achieves high-precision, real-time detection of livestock behavior, reduces computational resource consumption, is applicable to various breeding environments, and improves detection efficiency and applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119445615B_ABST
    Figure CN119445615B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of video processing, and discloses a livestock stereoscopic behavior detection method, comprising the following steps: step S1, a livestock stereoscopic behavior detection system is built, which is used for shooting livestock behavior videos; step S2, a livestock stereoscopic behavior real-time detection model, namely an RT-DETRv3 model, is constructed; step S3, according to the livestock shooting videos obtained by the behavior detection system, the real-time detection model is used to output different behaviors of the livestock for classification and analysis, and a visual livestock behavior statistical report is generated. By combining a multi-view camera system and a deep learning algorithm, especially by integrating a 3D convolutional neural network and an RT-DETRv3 Transformer, the present application can capture the stereoscopic behavior of livestock in real time. Compared with the prior art which only relies on two-dimensional monitoring of a single view, the present application can realize accurate identification of complex three-dimensional postures of livestock such as standing, lying and walking, greatly improving the accuracy and precision of detection. In addition, with the aid of posture key point detection and multi-target supervision mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of video processing, in particular to a livestock stereoscopic behavior detection method. BACKGROUND

[0002] Livestock plays a vital role in human society, not only as an important guarantee for food sources, but also has an irreplaceable position in agricultural production, ecological circulation, cultural heritage and economic development. Common livestock includes pigs, cows, sheep, etc. Conducting behavior detection on livestock to assess its health status, welfare level and production performance is of great practical significance to food safety, public health and agricultural sustainability.

[0003] The feeding, drinking, walking and resting behaviors of livestock are key indicators for assessing its health status. Abnormalities in these basic habits may suggest health problems or discomfort. By monitoring these behaviors, health problems can be detected early and addressed, reducing disease transmission and improving the production efficiency and living standards of livestock. Traditional manual detection methods for livestock behavior generally have high labor intensity, strong subjectivity, poor real-time performance, low efficiency and other problems. Artificial intelligence technology uses contact and non-contact monitoring methods to monitor and analyze the feeding, drinking, movement and resting behaviors of livestock, which can enhance automation, ensure accuracy and objectivity, monitor in real time and improve breeding efficiency, and has gradually become the mainstream method in the industry. For example, Pan Zixin et al. published in the Journal of Agricultural Engineering that the postpartum behavior recognition of sows based on wearable devices uses contact sensors to identify postpartum sow living habits. However, wearable devices are easy to lose, which brings inconvenience to subsequent tracking and management. Fu Chenfu et al. published in the Journal of Agricultural Machinery that the cow behavior recognition and tracking method based on improved YOLO v8 identifies standing, lying, feeding, drinking and licking behaviors of cows. However, this method has problems such as inaccurate positioning, difficulty in processing dense targets and only obtaining two-dimensional spatial information of cows. Geng Yanli et al. published in the Journal of Northeast Agricultural University that the group pig target detection algorithm based on Transformer and adaptive spatial feature fusion uses a method that improves detection accuracy and obtains spatial characteristics of group pigs, but the detection speed is still slow. Therefore, it is still challenging to effectively balance behavior detection accuracy and speed, accurately match two-dimensional and three-dimensional images of livestock, and comprehensively detect various livestock behaviors in a stereoscopic manner. 。 SUMMARY

[0004] To solve the technical problems proposed in the background art, the present application provides a livestock stereoscopic behavior detection method.

[0005] The present application adopts the following technical solution: A livestock stereoscopic behavior detection method, comprising the following steps:

[0006] Step S1, a livestock stereoscopic behavior detection system is built for shooting livestock behavior videos;

[0007] Step S2, a livestock stereoscopic behavior real-time detection model, i.e. RT-DETRv3 model, is constructed;

[0008] Step S3, according to the livestock shooting videos obtained by the behavior detection system, the real-time detection model is used to output different behaviors of the livestock for classification and analysis, and a visual livestock behavior statistical report is generated.

[0009] Preferably, the workflow of RT-DETRv3 in step S2 is as follows:

[0010] Collect livestock behavior video samples and send them to a computer; the video samples include video information at different angles of view, such as front view, oblique view and overhead view, and use Social LEAP Estimates Animal Poses (SLEAP) and LabelImg software to label livestock pose key point coordinates and livestock behavior rectangular frame respectively, and assign corresponding label categories, and store the labeled data as CSV files and TXT files respectively;

[0011] Import and fuse the labeled data; import the labeled SLEAP data (CSV file containing pose key points) and LabelImg labeled data (TXT file containing bounding box) into the computer, and perform feature fusion through an adaptive attention mechanism, dynamically adjust the video feature weight of each view, extract useful pose and behavior information from different camera views (front, side, overhead), improve the stereoscopic recognition effect of livestock behavior, and combine multi-view video streams to capture fine actions and overall behavior patterns of livestock through pose estimation and bounding box detection;

[0012] Feature processing; the fused features are processed using a 3D convolutional neural network (3D Convolutional Neural Network, 3D-CNN); the 3D convolutional neural network is used to analyze the behavior changes of livestock in time series, recognize their action patterns, and capture the dynamic changes of actions by performing convolution operations on the time dimension, which can extract continuous behavior features of livestock from multiple frames;

[0013] Stereoscopic behavior detection is performed using a real-time detection transformer v3 (RT-DETRv3), and based on the fusion of SLEAP and LabelImg data, the RT-DETRv3 is used to detect the three-dimensional behavior of livestock in an end-to-end manner. The one-to-many dense supervision mechanism of the RT-DETRv3 can simultaneously capture the posture changes and overall behavior information of the livestock, and the hierarchical convolutional network is used for efficient feature extraction, so as to ensure real-time detection under low computing resources.

[0014] Preferably, the different behavior classification analysis of the livestock in step 3 includes 3D posture estimation, stereoscopic behavior bounding box, behavior category and management suggestion of the livestock, and the management suggestion is, for example, livestock behavior abnormality alarm or management reminder of specific behavior frequency, which assists the user to intervene and manage.

[0015] Preferably, when the livestock behavior video samples are collected, front, side and overhead view cameras are simultaneously started; the collection frequency of the livestock behavior video samples is 30 frames per second, the recording video time length of each camera is 24 hours, and the samples include various behavior modes of the livestock; when the posture key points are labeled using SLEAP, the key joints (such as head, forelegs, hind legs, tail, etc.) of the livestock are labeled to ensure the accuracy of the posture estimation; each livestock posture information is saved in the form of 2D coordinates, and the 2D coordinates are converted into 3D coordinates by using multi-view labeling, and the process is realized by a triangulation method of multi-view geometry, and the calculation formula is as follows:

[0016] X 3D =Triangulate(x f ,x s ,x t ,P f ,P s ,P t )

[0017] In the formula, X 3D represents the position of the posture key point of the livestock in the 3D space; Triangulate represents a triangulation function; x f , x s and x t respectively represent the 2D posture key point coordinates of the livestock photographed from the front, side and overhead views; P f , P s and P t respectively represent the projection matrices of the front, side and overhead cameras.

[0018] Preferably, the LabelImg software is used to annotate the behavioral bounding boxes of livestock in the video, labeling the behavioral categories (such as eating, walking, resting, socializing, etc.). Each frame of data contains behavioral bounding boxes and label information. During the annotation process, it is ensured that the behavioral and posture information from each viewpoint is synchronized, and the video frame annotation frequency is strictly aligned with the timestamp. Multi-view fusion is used to integrate the three-view 2D behavioral bounding boxes of livestock into a complete 3D bounding box, and the calculation formula is as follows:

[0019] B 3D =Fuse(B f B s B t ,P f ,P s ,P t )

[0020] In the formula: B 3D Represents the final fused 3D bounding box of livestock behavior; Fuse represents the geometric (feature) fusion function; B f B s and B t The bounding box data representing livestock behavior from frontal, side, and top views are respectively calculated using the following formula:

[0021]

[0022] In the formula: This represents the 2D coordinates of the i-th corner point of the 2D bounding box of livestock behavior from a frontal viewpoint, where i = 1, 2, 3, 4; each corner point It contains two components, namely the horizontal coordinate on the image plane at the frontal viewpoint. and ordinate Similarly, the 2D bounding box data of livestock behavior from side and top views can be derived. s B t .

[0023] Preferably, an adaptive attention mechanism involving multi-view feature fusion and adaptive weight allocation is used. The adaptive convolutional feature fusion calculation formula is as follows:

[0024]

[0025] In the formula: F final This represents the final fused feature combining convolutional features from frontal, side, and top-down viewpoints; n = 1, 2, 3, representing frontal, side, and top-down viewpoints, respectively; α i Represents the adaptive attention weights from the corresponding viewpoint; Conv represents the convolution operation; I i Represents the input image or video frame from the corresponding viewpoint; W i This indicates the convolutional layer weights used to process the corresponding viewpoint;

[0026] Preferably, the 3D convolutional neural network is used to process time series features, extract the action changes of livestock at different time points, and the calculation formula is:

[0027]

[0028] In the formula: F t represents the 3D feature at time t; Conv3D represents the 3D convolution operation; V t:t+n represents n frames of video sequence starting from time t; W 3D represents the 3D convolution kernel weight; λ represents the adjustment parameter, which is used to balance the 3D convolution and the fusion feature

[0029] Preferably, in the process of using RT-DETRv3 for stereo behavior detection, a pose key point loss function is introduced to optimize the pose key points of the detected target livestock, so that the model can accurately locate each key point of the livestock in multi-view video, and the calculation formula is:

[0030]

[0031] In the formula: L keypoints represents the pose key point loss function; K represents the total number of pose key points; represents the predicted kth pose key point coordinate; represents the real kth pose key point coordinate

[0032] In the process of using RT-DETRv3 for stereo behavior detection, a 3D convolution network feature loss function is introduced to optimize the livestock spatio-temporal behavior features extracted by the 3D convolution network, and ensure that the model can learn accurate livestock 3D behavior features from multi-view time series data, and the calculation formula is:

[0033] L 3D-conv =||F 3D-pred -F 3D-true ||2

[0034] In the formula: L 3D-conv represents the 3D convolution network feature loss function; F 3D-pred represents the livestock 3D behavior feature predicted by the 3D convolution network; F 3D-true represents the real livestock 3D behavior feature.

[0035] The livestock stereoscopic behavior detection system includes a fixed support, a holder, three night-vision cameras, and a computer. The three night-vision cameras are respectively installed at the end of the upper part of the fixed support, and are used to simultaneously acquire videos of the livestock activity area. The front-view camera is used to directly face the livestock to shoot videos, observe expressions, facial movements, and social behaviors such as sniffing and interaction. The side-view camera is used to shoot videos of the side of the livestock, observe the body movements and walking postures of the livestock, and facilitate the capture of limb movements and interaction between the livestock. The overhead-view camera is used to shoot videos of the back of the livestock, observe the movement trajectories and behavior patterns of the livestock in a specific space, and facilitate the analysis of the behaviors and relative positions of the livestock group. The three cameras are all equipped with night-vision functions, and are connected with the computer to facilitate the acquisition of video data of the livestock throughout the day and the analysis of the stereoscopic behaviors of the livestock.

[0036] Compared with the prior art, the present application has the following advantages:

[0037] By combining a multi-view camera system and a deep learning algorithm, especially integrating a 3D convolutional neural network and an RT-DETRv3 Transformer, the present application can capture the stereoscopic behaviors of livestock in real time. Compared with the prior art which only relies on two-dimensional monitoring of a single view, the present application can accurately identify complex three-dimensional postures such as standing, lying, and walking of livestock, greatly improving the accuracy and precision of detection. In addition, with the help of posture key point detection and multi-target supervision mechanism, the present application can still maintain high detection accuracy in a group of multiple livestock, solving the detection problem caused by occlusion and overlap.

[0038] While maintaining high detection accuracy, the present application significantly reduces the consumption of computing resources through optimization of the algorithm structure. The optimized algorithm of RT-DETRv3 not only reduces computational redundancy during detection, but also improves inference speed. Compared with traditional detection methods, the present application does not require excessive post-processing steps, avoiding the computational burden of non-maximum suppression (NMS), and further improving the operating efficiency of the system. This optimization enables the present application to efficiently operate in low-power devices or resource-limited environments, reducing the dependence of farms on high-performance hardware and reducing hardware and operation and maintenance costs.

[0039] The multi-view system of the present application can be flexibly deployed according to different breeding environments and is suitable for real-time monitoring of various behaviors of livestock. Whether it is a large open breeding farm or a small closed shed, the system can stably operate. Through the adaptive attention mechanism, the present application can dynamically adjust the detection accuracy of different livestock behavior patterns, maintaining consistent detection effects in various environments, thereby improving the applicability and flexibility of the system. BRIEF DESCRIPTION OF DRAWINGS

[0040] Fig. 1A workflow diagram for livestock stereoscopic behavior;

[0041] Fig. 2 An installation distribution perspective view of a livestock stereoscopic behavior detection system;

[0042] Fig. 3 A three-view angle pose behavior fusion perspective view of livestock. DETAILED DESCRIPTION

[0043] The application will be further described below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments described below or technical features thereof can be combined with each other or other embodiments or technical features to form new embodiments without conflict.

[0044] Embodiment 1:

[0045] Reference Figs. 1-3 The present application provides a livestock stereoscopic behavior detection method, comprising the following steps:

[0046] Step S1, a livestock stereoscopic behavior detection system is built for shooting livestock behavior videos;

[0047] Step S2, a livestock stereoscopic behavior real-time detection model, i.e. RT-DETRv3 model, is constructed;

[0048] Step S3, according to the livestock shooting videos obtained by the behavior detection system, the real-time detection model is used to output different behaviors of livestock for classification and analysis, and a visual livestock behavior statistical report is generated.

[0049] In the present application, the working process of RT-DETRv3 in step S2 is as follows:

[0050] Collect livestock behavior video samples and send them to a computer; the video samples include video information under different view angles of front view angle, oblique view angle and overhead view angle, and the Social LEAP Estimates Animal Poses (SLEAP) and LabelImg software are used to label livestock pose key point coordinates and livestock behavior rectangular frames respectively, and assign corresponding label categories, and the labeled data are stored as CSV files and TXT files respectively;

[0051] Import and fuse the labeled data; import the labeled SLEAP data (CSV file containing pose key points) and LabelImg labeled data (TXT file containing bounding box) into the computer, and fuse the features through the adaptive attention mechanism, dynamically adjust the video feature weight of each view, extract useful posture and behavior information from different camera views (front, side, top), improve the stereoscopic recognition effect of livestock behavior, and combine multi-view video streams to capture the fine actions and overall behavior patterns of livestock through pose estimation and bounding box detection;

[0052] Feature processing; the fused features are processed by a 3D convolutional neural network (3D-CNN); the 3D convolutional neural network is used to analyze the behavior changes of livestock in time series, recognize their action patterns, and capture the dynamic changes of actions by performing convolution operations on the time dimension to extract the continuous behavior features of livestock from multiple frames;

[0053] It should be noted that the present scheme uses a real-time detection transformer v3 (RT-DETRv3) for stereoscopic behavior detection, and on the basis of fusing SLEAP and LabelImg data, the RT-DETRv3 is used to detect the three-dimensional behavior of livestock in an end-to-end manner, and the one-to-many dense supervision mechanism of the RT-DETRv3 can simultaneously capture the posture changes and overall behavior information of livestock, and perform efficient feature extraction through a hierarchical convolutional network to ensure real-time detection under low computing resources.

[0054] Specifically, the different behavior classification analysis of the livestock in step 3 includes 3D pose estimation, stereoscopic behavior bounding box, behavior category, and management suggestion of the livestock, and the management suggestion is, for example, livestock behavior abnormality alarm or specific behavior frequency management reminder, which assists users in intervention and management.

[0055] In the present scheme, when collecting the livestock behavior video samples, the front, side and top view cameras are turned on at the same time; the livestock behavior video sample collection frequency is 30 frames per second, and the recording video duration of each camera is 24 hours; the samples include various behavior patterns of livestock; when using SLEAP to label the pose key points, the key joints of the livestock (such as head, forelegs, hind legs, tail, etc.) are labeled to ensure the accuracy of the pose estimation; each livestock pose information is saved in the form of 2D coordinates, and the 2D coordinates are converted into 3D coordinates by using multi-view labeling, and the process is realized by the triangulation method of multi-view geometry, and the calculation formula is:

[0056] X 3D =Triangulate(xf ,x s ,x t ,P f ,P s ,P t

[0057] wherein X 3D represents the position of livestock posture key points in 3D space; Triangulate represents a triangulation function; x f , x s and x t represent 2D posture key point coordinates of livestock photographed from front, side and top view angles, respectively; P f , P s and P t represent projection matrices of front, side and top view cameras, respectively.

[0058] It is worth mentioning that the LabelImg software is used to label the behavior rectangular frame of livestock in the video, and the behavior category (such as eating, walking, resting, socializing, etc.) is labeled. Each frame of data contains behavior bounding box and label information; during the labeling process, the behavior and posture information of each view is ensured to be synchronized, and the video frame labeling frequency is strictly aligned with the timestamp; the livestock three-view 2D behavior rectangular frame is integrated into a complete 3D bounding box by using multi-view fusion, and the calculation formula is

[0059] B 3D = Fuse(B f , B s , B t , P f , P s , P t )

[0060] wherein B 3D represents the final fused livestock behavior 3D bounding box; Fuse represents a geometric (feature) fusion function; B f , B s and B t represent livestock behavior 2D bounding box data under front, side and top view angles, respectively, and the calculation formula is:

[0061]

[0062] wherein: represents the 2D coordinates of the i-th corner point of the livestock behavior 2D bounding box under the front view angle, i = 1, 2, 3, 4; each corner point contains two components, which are the horizontal coordinate and the vertical coordinate of the front view angle image plane; the livestock behavior 2D bounding box data B s ​、B t .

[0063] In this scheme, an adaptive attention mechanism involving multi-view feature fusion and adaptive weight allocation is used, and the adaptive convolution feature fusion calculation formula is:

[0064]

[0065] In the formula: F final represents the final fusion feature combining the front view, side view and overhead view convolution features; n = 1, 2, 3, respectively, representing the front view, side view and overhead view; α i represents the adaptive attention weight under the corresponding view; Conv represents the convolution operation; I i represents the input image or video frame under the corresponding view; W i represents the convolution layer weight used to process the corresponding view;

[0066] The 3D convolutional neural network is used to process the time series features, and the action changes of the livestock at different time points are extracted, and the calculation formula is:

[0067]

[0068] In the formula: F t represents the 3D feature at time t; Conv3D represents the 3D convolution operation; V t:t+n represents n frames of video sequence starting from time t; W 3D represents the 3D convolution kernel weight; λ represents the adjustment parameter, which is used to balance the 3D convolution and the fusion feature

[0069] In the process of using RT-DETRv3 for stereo behavior detection, a pose key point loss function is introduced to optimize the pose key points of the detected target livestock, so that the model can accurately locate the key points of the livestock in multi-view video, and the calculation formula is:

[0070]

[0071] In the formula: L keypoints represents the pose key point loss function; K represents the total number of pose key points; represents the predicted kth pose key point coordinate; represents the real kth pose key point coordinate

[0072] In the process of using RT-DETRv3 for stereo behavior detection, a 3D convolution network feature loss function is introduced to optimize the livestock spatio-temporal behavior features extracted by the 3D convolution network, and to ensure that the model can learn accurate livestock 3D behavior features from multi-view time series data, and the calculation formula is:

[0073] L3D-conv =||F 3D-pred -F 3D-true ||2

[0074] In the formula: L 3D-conv represents a 3D convolution network feature loss function; F 3D-pred represents the livestock 3D behavior feature predicted by the 3D convolution network; F 3D-true represents the real livestock 3D behavior feature.

[0075] The present application can capture the stereoscopic behavior of livestock in real time by combining a multi-view camera system and a deep learning algorithm, especially integrating a 3D convolutional neural network and an RT-DETRv3 Transformer. The optimization algorithm of RT-DETRv3 not only reduces computational redundancy in the detection process, but also improves inference speed.

[0076] The above embodiments are only preferred embodiments of the present application, and cannot be used to limit the scope of protection of the present application. Any non-essential changes and substitutions made by those skilled in the art on the basis of the present application shall fall within the scope of protection of the present application.

Claims

1. A method for detecting three-dimensional behavior of livestock, characterized in that, Includes the following steps: Step S1: Build a three-dimensional livestock behavior detection system to capture videos of livestock behavior; Step S2: Construct a real-time detection model for three-dimensional behavior of livestock, namely the RT-DETRv3 model; Step S3: Based on the livestock video footage acquired by the behavior detection system, classify and analyze the different behaviors of the livestock using a real-time detection model, and generate a visual statistical report on livestock behavior. The workflow of the RT-DETRv3 model in step S2 is as follows: Collect livestock behavior video samples and send them to a computer; the video samples include video information from different perspectives such as frontal view, oblique view and top view. Use social action estimation to estimate animal posture and LabelImg software to annotate the coordinates of key points of livestock posture and the bounding boxes of livestock behavior, and assign corresponding labels to them. Store the labeled data as CSV files and TXT files respectively. Import and fuse labeled data; import the labeled CSV file containing pose key points and the TXT file containing bounding boxes into the computer, and perform feature fusion through an adaptive attention mechanism to dynamically adjust the video feature weights of each viewpoint, extract useful pose and behavior information from different camera views, improve the stereo recognition effect of livestock behavior, combine multi-view video streams, and rely on pose estimation and bounding box detection to capture the fine movements and overall behavior patterns of livestock. Feature processing; A 3D convolutional neural network is used to process the fused features. The 3D convolutional neural network is used to analyze the behavioral changes of livestock over time and identify their action patterns. By performing convolution operations on the time dimension, it is possible to extract continuous behavioral features of livestock from multiple frames and capture the dynamic changes of their actions.

2. A method for detecting three-dimensional behavior of livestock as described in claim 1, characterized in that, The livestock behavior classification analysis in step S3 includes 3D posture estimation, three-dimensional behavior bounding box, behavior category, and management suggestions.

3. A method for detecting three-dimensional behavior of livestock as described in claim 1, characterized in that, When collecting livestock behavior video samples, the frontal, side, and top-view cameras in the detection system are simultaneously activated. The livestock behavior video sample collection frequency is 30 frames per second, and the recording duration of each camera is 24 hours. The samples include various livestock behavior patterns. When using SLEAP for posture keypoint annotation, key joints of the livestock are annotated to ensure the accuracy of posture estimation. Each livestock posture information is stored in 2D coordinate form, and the 2D coordinates are converted to 3D coordinates using multi-view annotation. This process is achieved through multi-view geometric triangulation, and the calculation formula is as follows: ; In the formula: Represents the location of key points in the posture of livestock in 3D space; Represents trigonometric functions; , and These represent the coordinates of key points in the 2D pose of livestock captured from frontal, side, and top-down viewpoints, respectively. , and These represent the projection moments of the camera viewed from the front, side, and top, respectively.

4. A method for detecting three-dimensional behavior of livestock as described in claim 1, characterized in that, The LabelImg software was used to annotate the bounding boxes of livestock behavior in the video, labeling the behavior categories. Each frame of data contained behavior bounding boxes and label information. During the annotation process, it was ensured that the behavior and posture information from each viewpoint were synchronized, and the video frame annotation frequency was strictly aligned with the timestamp. Multi-view fusion was used to integrate the three-view 2D behavior bounding boxes of livestock into complete 3D bounding boxes. The calculation formula is as follows: ; In the formula: The 3D bounding box representing the final merged livestock behavior; This represents a geometric feature fusion function; , and The bounding box data representing livestock behavior from frontal, side, and top views are respectively calculated using the following formula: ; In the formula: This represents the first 2D bounding box representing livestock behavior from a frontal viewpoint. 2D coordinates of the corner points =1, 2, 3, 4; each corner point It contains two components, namely the horizontal coordinate on the image plane at the frontal viewpoint. and ordinate Similarly, 2D bounding box data of livestock behavior from side and top views can be derived. , .

5. A method for detecting three-dimensional behavior of livestock as described in claim 1, characterized in that, Using an adaptive attention mechanism involving multi-view feature fusion and adaptive weight allocation, the adaptive convolutional feature fusion calculation formula is as follows: ; In the formula: This represents the final fused feature that combines convolutional features from frontal, side, and top-view perspectives; =1, 2, 3, representing the front, side, and top views, respectively; This represents the adaptive attention weights from the corresponding perspective; Indicates the convolution operation; This represents the input image or video frame from the corresponding viewpoint; This indicates the weights of the convolutional layer used to process the corresponding viewpoint.

6. A method for detecting three-dimensional behavior of livestock as described in claim 1, characterized in that, Using a 3D convolutional neural network to process time series features, the changes in livestock movements at different time points are extracted. The calculation formula is as follows: ; In the formula: express 3D features of time; Indicates 3D convolution operation; Indicates from The moment begins Frame video sequence; Indicates the weights of the 3D convolution kernel; This represents the adjustment parameter used to balance 3D convolution and fused features.

7. A method for detecting three-dimensional behavior of livestock as described in claim 1, characterized in that, When using RT-DETRv3, the attitude keypoint loss function is introduced, and its calculation formula is as follows: ; In the formula: Represents the attitude keypoint loss function; Indicates the total number of attitude keypoints; Indicates the predicted first Coordinates of key pose points; Representing the true first Coordinates of each attitude key point In the process of stereo behavior detection, the RT-DETRv3 model introduces a 3D convolutional network feature loss function to optimize the spatiotemporal behavioral features of livestock extracted by the 3D convolutional network. This ensures that the model can learn accurate 3D behavioral features of livestock from multi-view time-series data. The calculation formula is as follows: ; In the formula: This represents the feature loss function of a 3D convolutional network. This represents the 3D behavioral characteristics of livestock predicted by a 3D convolutional network. Represents the realistic 3D behavioral characteristics of livestock.

Citation Information

Patent Citations

  • Systems and methods for stereoscopic field of view of multiple animal behavioral characteristics

    CN102282570A

  • Group pig posture recognition method based on generative adversarial network

    CN115713780A