Posture detection method based on three-dimensional measurement of livestock

The three-dimensional point cloud data is acquired through the multi-view depth camera system and combined with the deep learning model, the accuracy and real-time problems of the existing two-dimensional image attitude detection method in complex environments are solved, and efficient and accurate livestock attitude monitoring and real-time alarm functions are realized.

CN119359783BActive Publication Date: 2025-04-25SHENZHEN YUNHUI MULIAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411920662.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-25
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

The existing two-dimensional image attitude detection methods have inaccurate detection results in complex environments, slow processing speed, unable to achieve real-time monitoring, and difficult to adapt to the changing farm environment, resulting in insufficient accuracy and real-time monitoring of livestock health status.

Method used

A multi-view depth camera system is used to obtain three-dimensional point cloud data, combined with a graph cutting algorithm and a multi-stage deep learning model, to achieve efficient and accurate identification of livestock poses, and to generate and send alarm data by real-time comparison of standard poses.

Benefits of technology

It improves the accuracy and real-time monitoring of livestock health status, ensures that users can detect and deal with abnormal postures in a timely manner, and ensures the health and production efficiency of livestock.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119359783B_ABST
    Figure CN119359783B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computers, and discloses a posture detection method based on three-dimensional measurement of livestock, including: using a multi-view depth camera system to obtain three-dimensional point cloud data of livestock to be detected, and extracting livestock contour point cloud data; inputting livestock contour point cloud data into a preliminary recognition model for screening, determining potential livestock posture data, identifying potential livestock posture data, and obtaining target livestock posture data; comparing the target livestock posture data with standard posture data, and constructing a body size three-dimensional model corresponding to the livestock based on the livestock contour point cloud data to determine whether the livestock to be detected is in a normal state, wherein the body size parameters of the body size three-dimensional model mainly include cross height, body oblique length, chest circumference, and abdominal circumference. If the livestock to be detected is in an abnormal posture, alarm data containing abnormal posture is generated, and the alarm data is sent to a user terminal in real time. The present application can improve the accuracy and real-time performance of livestock health monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computers, and in particular to a posture detection method based on three-dimensional measurement of livestock. Background Art

[0002] With the development of modern agriculture, monitoring the health of livestock has become increasingly important. Traditional methods of monitoring livestock health mainly rely on manual observation, which is time-consuming, labor-intensive and prone to omissions. In recent years, image-based livestock posture detection methods have gradually become a research hotspot.

[0003] However, the existing two-dimensional image posture detection methods have the following shortcomings: in complex environments, they are easily affected by factors such as lighting and shadows, resulting in inaccurate detection results; existing methods are slow when processing large amounts of image data and cannot achieve real-time monitoring; existing methods usually require calibration in specific environments and are difficult to adapt to the changing farm environment.

[0004] From the above, we can see that how to improve the accuracy and real-time performance of livestock health monitoring remains to be solved. Summary of the invention

[0005] In order to improve the accuracy and real-time performance of livestock health monitoring, the present application provides a posture detection method based on three-dimensional measurement of livestock.

[0006] In a first aspect, the present application provides a posture detection method based on three-dimensional measurement of livestock, which adopts the following technical solution:

[0007] A method for detecting a posture of livestock based on three-dimensional measurement, comprising: using a multi-view depth camera system to obtain three-dimensional point cloud data of a livestock to be detected, preprocessing the three-dimensional point cloud data, separating the livestock from other background objects in the preprocessed three-dimensional point cloud data by a segmentation method based on a graph cut algorithm, and extracting corresponding livestock contour point cloud data, wherein the multi-view depth camera system comprises at least three depth cameras with different view angles; calling a pre-trained preliminary recognition model, inputting the livestock contour point cloud data into the preliminary recognition model for screening, determining corresponding potential livestock posture data, calling a pre-trained depth recognition model, inputting the potential livestock posture data into the depth recognition model for recognition, and obtaining corresponding target livestock posture data; comparing the target livestock posture data with preset standard posture data to determine whether the livestock to be detected is in a normal state, and if the livestock to be detected is in an abnormal posture, generating alarm data containing the abnormal posture, and sending the alarm data to a user terminal in real time, wherein the alarm data contains a specific description of the abnormal posture, the time of occurrence and the location information.

[0008] By adopting the above technical solutions, high-precision 3D point cloud data is obtained through a multi-view depth camera system, and advanced graph cutting algorithms and multi-stage deep learning models are used to achieve efficient and accurate recognition of livestock postures. By comparing standard posture data in real time, abnormal postures can be quickly discovered and reported to ensure that users can take timely measures, thereby significantly improving the accuracy and real-time nature of livestock health monitoring.

[0009] Optionally, in the process of comparing the target livestock posture data with preset standard posture data to determine whether the livestock to be detected is in a normal state, the method also includes: extracting key feature data from the target livestock posture data to generate a key feature vector; calculating the similarity between the key feature vector and the standard feature vector in the preset standard posture data to obtain corresponding similarity data; calling a preset similarity threshold, comparing the similarity data with the similarity threshold, and if the similarity data is lower than the similarity threshold, determining that the livestock posture is abnormal.

[0010] By adopting the above technical solution, by extracting key feature data from the target livestock posture data and generating key feature vectors, the similarity between the key feature vectors and the standard feature vectors in the preset standard posture data is calculated. By comparing with the preset similarity threshold, it is possible to accurately determine whether the livestock posture is abnormal. This method improves the accuracy and reliability of posture recognition, ensures the timely detection and reporting of abnormal postures, and effectively improves the monitoring level of livestock health status.

[0011] Optionally, in the process of determining whether the livestock to be detected is in a normal state, the method further comprises:

[0012] When the livestock passes through the measurement channel, the corresponding livestock weight data is collected, and a corresponding three-dimensional body size model of the livestock is constructed based on the livestock contour point cloud data, wherein the body size parameters of the three-dimensional body size model include cross height, body oblique length, chest circumference, and abdominal circumference;

[0013] Retrieving the historical weight data corresponding to the livestock and the current stage and period of the livestock, inputting the historical weight data and the current stage and period of livestock weight data into the preliminary recognition model for recognition, identifying whether the livestock weight data is consistent with the weight data corresponding to the current stage and period, and generating a corresponding weight analysis report;

[0014] Retrieving a body size historical model corresponding to livestock, comparing the body size three-dimensional model with the body size historical model, and generating a corresponding body shape change trend report;

[0015] A score is determined based on the weight analysis report and the body shape change trend report to obtain a corresponding comprehensive health score. If the comprehensive health score is greater than a comprehensive health threshold, it is determined to be in a normal state.

[0016] By adopting the above technical solution, in the process of judging whether the livestock to be detected is in a normal state, not only posture recognition is performed based on three-dimensional point cloud data, but also a comprehensive analysis of weight and body size parameters is combined. Specifically, the weight data of the livestock is collected when it passes through the measurement channel, and a three-dimensional body size model is constructed based on the three-dimensional point cloud data to extract key body size parameters (such as cross height, body oblique length, chest circumference, and abdominal circumference). The system retrieves the historical weight data and current stage information of the livestock, inputs the preliminary recognition model to evaluate whether the current weight meets expectations, and generates a weight analysis report; at the same time, the current three-dimensional body size model is compared with the historical model to generate a body shape change trend report. Finally, the score is scored based on the weight analysis report and the body shape change trend report to obtain a comprehensive health score. If the score exceeds the set threshold, the livestock is judged to be in a normal state. This method comprehensively evaluates the changes in the weight and body shape of livestock, ensures the accuracy and reliability of health monitoring, promptly discovers potential health problems, and ensures the overall health of livestock.

[0017] Optionally, in the process of determining the corresponding potential livestock posture data, the method also includes: extracting corresponding feature points from the livestock contour point cloud data based on a feature point detection algorithm, and generating a corresponding feature descriptor from each of the feature points, wherein the feature descriptor contains local information around the feature point, gradient direction and color information; using a feature point matching algorithm to match the extracted feature points with predefined standard posture feature points to match the corresponding optimal feature point pairs; filtering out potential livestock posture data based on the optimal feature point pairs, and sorting and excluding all potential livestock posture data.

[0018] By adopting the above technical solution, feature points are extracted from livestock outline point cloud data and feature descriptors containing local information, gradient direction and color information are generated. The extracted feature points are matched with predefined standard posture feature points using a feature point matching algorithm to screen out the best feature point pairs. By sorting and excluding potential livestock posture data, the accuracy and reliability of the screened potential posture data are ensured, thereby improving the efficiency and accuracy of preliminary recognition and providing high-quality data support for subsequent deep recognition.

[0019] Optionally, in the process of inputting the potential livestock posture data into the deep recognition model for identification, the method also includes: collecting the previous and next three-dimensional point cloud data of the previous and next frames corresponding to the three-dimensional point cloud data, and forming time series data, extracting key features from the three-dimensional point cloud data of each frame in the time series data, and generating a feature vector for each frame; fusing the feature vectors corresponding to the previous and next frames with the feature vector of the current frame to form a context feature representation containing context information; when performing posture recognition, inputting the context feature representation into the deep recognition model for identification, and determining the corresponding potential livestock posture data.

[0020] By adopting the above technical solution, by collecting the 3D point cloud data of the previous and next frames and forming time series data, key features are extracted from each frame to generate feature vectors, and the feature vectors of the previous and next frames are fused with the feature vectors of the current frame to form a context feature representation containing context information. When performing posture recognition, the context feature representation is input into the deep recognition model, thereby improving the recognition ability and accuracy of complex postures, ensuring stable and reliable recognition of livestock postures in dynamic environments.

[0021] Optionally, in the process of using the multi-view depth camera system to obtain three-dimensional point cloud data of the livestock to be detected, the method also includes: determining corresponding livestock body shape data based on the livestock to be detected, adjusting the corresponding multi-view depth camera system based on the livestock body shape data, and obtaining corresponding three-dimensional point cloud data; judging whether there are hornless livestock among the livestock to be detected based on the three-dimensional point cloud data, obtaining corresponding judgment result data, and adjusting the parameters of the graph cut algorithm based on the judgment result data.

[0022] By adopting the above technical solution, the body shape data of the livestock to be detected is determined, and the multi-view depth camera system is adjusted to obtain high-quality three-dimensional point cloud data. Further, it is determined whether the livestock has horns based on the three-dimensional point cloud data, and the parameters of the graph cut algorithm are adjusted according to the judgment result. This process ensures that livestock and background objects can be separated more accurately between livestock of different body shapes and structures, and the accuracy and reliability of contour extraction can be improved.

[0023] Optionally, the method also includes: acquiring corresponding environmental condition data; wherein the environmental condition data includes light intensity, temperature, humidity, and air quality; evaluating the degree of impact on camera performance based on the environmental condition data; and adjusting camera parameters based on the degree of impact.

[0024] By adopting the above technical solution, we can obtain environmental condition data, evaluate the impact of these conditions on camera performance, and dynamically adjust camera parameters based on the evaluation results. This process ensures that the camera can always work stably under different environmental conditions and obtain high-quality 3D point cloud data, thereby improving the accuracy and reliability of the entire posture detection system.

[0025] In a second aspect, the present application provides a posture detection device based on three-dimensional measurement of livestock, which adopts the following technical solution:

[0026] A posture detection device based on three-dimensional measurement of livestock, comprising:

[0027] A livestock outline point cloud data extraction module, which uses a multi-view depth camera system to obtain three-dimensional point cloud data of the livestock to be detected, pre-processes the three-dimensional point cloud data, separates the livestock from other background objects in the pre-processed three-dimensional point cloud data based on a segmentation method of a graph cut algorithm, and uses it to extract corresponding livestock outline point cloud data, wherein the multi-view depth camera system includes at least three depth cameras with different view angles;

[0028] A target livestock posture data acquisition module is used to retrieve a pre-trained preliminary recognition model, input the livestock outline point cloud data into the preliminary recognition model for screening, determine the corresponding potential livestock posture data, retrieve a pre-trained deep recognition model, input the potential livestock posture data into the deep recognition model for recognition, and obtain the corresponding target livestock posture data;

[0029] The posture judgment module compares the posture data of the target livestock with the preset standard posture data to determine whether the livestock to be detected is in a normal state. If the livestock to be detected is in an abnormal posture, alarm data containing the abnormal posture is generated and sent to the user terminal in real time, wherein the alarm data contains a specific description of the abnormal posture, the time of occurrence and the location information.

[0030] In a third aspect, the present application provides a posture detection method based on three-dimensional measurement of livestock, which adopts the following technical solution:

[0031] A posture detection method based on three-dimensional measurement of livestock comprises a processor in which a program of the posture detection method based on three-dimensional measurement of livestock as described above is run.

[0032] In a fourth aspect, the present application provides a storage medium, which adopts the following technical solution:

[0033] A storage medium stores a program of the above-mentioned posture detection method based on three-dimensional measurement of livestock.

[0034] In summary, the present application includes at least one of the following beneficial technical effects: The posture detection method based on three-dimensional measurement of livestock significantly improves the accuracy and real-time performance of livestock health monitoring. Specifically, the combination of a multi-view depth camera system and a graph cutting algorithm ensures high-precision acquisition of three-dimensional point cloud data and accurate separation of livestock contours. Through a multi-stage deep learning model, from preliminary recognition to deep recognition, the posture data of livestock is gradually screened and confirmed, thereby improving the accuracy and robustness of posture recognition. Real-time comparison of standard posture data and dynamic adjustment of camera parameters ensure stable operation under different environmental conditions, and timely detection and reporting of abnormal postures. These technical means work together to ensure efficient and accurate monitoring of livestock health, enabling users to take quick measures to ensure livestock health and production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 The present invention is a flow chart showing a method for posture detection based on three-dimensional measurement of livestock according to an exemplary embodiment.

[0036] Figure 2 It is a structural block diagram of a posture detection device based on three-dimensional measurement of livestock according to an exemplary embodiment. DETAILED DESCRIPTION

[0037] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings.

[0038] In the description of this specification, the description with reference to the terms "certain embodiments", "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0039] The present application embodiment discloses a posture detection method based on three-dimensional measurement of livestock, referring to Figure 1 ,include:

[0040] S100, using a multi-view depth camera system to obtain three-dimensional point cloud data of the livestock to be detected, preprocessing the three-dimensional point cloud data, separating the livestock from other background objects in the preprocessed three-dimensional point cloud data based on a segmentation method of a graph cut algorithm, and extracting corresponding livestock contour point cloud data.

[0041] Among them, the multi-view depth camera system includes at least three depth cameras with different viewing angles, and uses at least three depth cameras with different viewing angles to simultaneously shoot the livestock to be detected from multiple angles. These cameras are usually installed in different positions to ensure that all sides of the livestock are covered. And the image data captured by the depth camera is processed to generate three-dimensional point cloud data, which contains the spatial coordinates (x, y, z) of each point and possible color information. At the same time, the acquired three-dimensional point cloud data needs to be pre-processed, including denoising, filtering, normalization and other operations to improve the quality of the data and the efficiency of subsequent processing.

[0042] In addition, the graph cut algorithm is a segmentation method based on energy minimization. It constructs a graph model and optimizes the energy function, where the energy function includes a data term and a smooth term. The data term measures the probability that each point belongs to the foreground (livestock) or the background, and the smooth term ensures that the labels of adjacent points are consistent.

[0043] The preprocessed three-dimensional point cloud data is segmented using a graph cut algorithm to generate livestock contour point cloud data. The graph cut algorithm can effectively separate livestock from the background, thereby ensuring the accuracy and completeness of the extracted livestock contour point cloud data.

[0044] S110, calling a pre-trained preliminary recognition model, inputting the livestock outline point cloud data into the preliminary recognition model for screening, determining corresponding potential livestock posture data, calling a pre-trained deep recognition model, inputting the potential livestock posture data into the deep recognition model for recognition, and obtaining corresponding target livestock posture data.

[0045] Among them, a pre-trained preliminary recognition model is used, which is usually a lightweight machine learning model, such as a decision tree, support vector machine (SVM) or shallow neural network; a pre-trained deep recognition model is used, which is usually a complex deep learning model, such as a convolutional neural network (CNN), recurrent neural network (RNN) or Transformer. Both the preliminary recognition model and the deep recognition model are applied after being trained and converged with a large amount of data in advance.

[0046] Key features such as joint position, posture angle, body contour, etc. are extracted from the livestock outline point cloud data, and then the extracted features are input into the preliminary recognition model. The preliminary recognition model outputs potential livestock posture data and screens out possible abnormal postures. The preliminary recognition model can quickly screen out potential abnormal posture data. Through preliminary screening, unnecessary calculations are reduced and the processing efficiency of the entire system is improved.

[0047] Then, the key features in the potential livestock posture data are fused to generate a high-dimensional feature vector, which is input into the deep recognition model. The model outputs the final target livestock posture data, including the specific posture category and confidence.

[0048] The deep recognition model can perform high-precision recognition of complex postures to ensure the accuracy and reliability of the results. Through feature fusion, the deep recognition model can make full use of multi-faceted information.

[0049] S120, comparing the target livestock posture data with preset standard posture data to determine whether the livestock to be detected is in a normal state. If the livestock to be detected is in an abnormal posture, generating alarm data containing the abnormal posture, and sending the alarm data to the user terminal in real time.

[0050] Among them, a series of standard posture data are preset, and the standard posture data include feature vectors of normal posture and various abnormal postures. Then the feature vectors in the target livestock posture data are compared with the standard posture data to calculate the similarity, and a similarity threshold needs to be set as a basis for judgment.

[0051] If an abnormal posture is detected, alarm data containing abnormal description, occurrence time and location information is generated, and the alarm data is sent in real time to user terminals such as mobile phones, computers, etc. Through real-time comparison and alarm mechanism, users can be ensured to discover and handle abnormal postures in a timely manner, improving the real-time nature of monitoring.

[0052] By executing the above steps S100 to S120, the multi-view depth camera system and the graph cutting algorithm ensure the high-precision acquisition of three-dimensional point cloud data and the accurate separation of livestock contours. The combination of the preliminary recognition model and the deep recognition model improves the accuracy and efficiency of posture recognition. Real-time comparison of standard posture data and dynamic adjustment of camera parameters ensure stable operation under different environmental conditions and timely detection and reporting of abnormal postures. These technical means work together to ensure efficient and accurate monitoring of livestock health, allowing users to take quick measures to ensure livestock health and production efficiency.

[0053] In the process of determining whether the livestock to be tested is in a normal state, the method further comprises:

[0054] S1201, extracting key feature data from the target livestock posture data to generate a key feature vector.

[0055] Among them, select the features that are crucial to posture recognition, such as joint position, posture angle, body contour, etc. These features can effectively characterize the posture of livestock, and then use feature extraction algorithms (such as PCA, LDA, HOG, etc.) to extract key features from the target livestock posture data. For example, PCA (principal component analysis) can be used to extract the main feature dimensions, LDA (linear discriminant analysis) can be used to extract discriminative features, and HOG (histogram of oriented gradients) can be used to extract edge and texture features. Finally, the extracted features are combined into a high-dimensional feature vector, which contains comprehensive information about the livestock posture.

[0056] S1202, calculating the similarity between the key feature vector and the standard feature vector in the preset standard posture data, and obtaining corresponding similarity data.

[0057] First, a large amount of 3D point cloud data of livestock in different states, including normal postures and various abnormal postures, is collected, and then the same feature extraction algorithm is used to generate standard feature vectors from the standard posture data. It is necessary to select a suitable distance measurement method (such as Euclidean distance, cosine similarity, Mahalanobis distance, etc.) to calculate the similarity between the feature vector of the target livestock and the standard feature vector, that is, to generate a similarity matrix to record the similarity data between the feature vector of the target livestock and all standard feature vectors.

[0058] S1203, calling a preset similarity threshold, comparing the similarity data with the similarity threshold, and if the similarity data is lower than the similarity threshold, determining that the posture of the livestock is abnormal.

[0059] Among them, a reasonable similarity threshold is set according to the actual application scenario and experimental data. The similarity threshold is used to distinguish normal posture from abnormal posture. The calculated similarity data is compared with the preset similarity threshold. If the similarity data is lower than the similarity threshold, it is judged as an abnormal posture; otherwise, it is judged as a normal posture. If an abnormal posture is detected, alarm data containing abnormal description, occurrence time and location information is generated.

[0060] By executing the above steps S1201 to S1203, in the process of judging whether the livestock to be detected is in a normal state, high-precision and high-reliability posture recognition is achieved through steps such as feature extraction, similarity calculation and abnormality judgment, which can ensure efficient and accurate monitoring of the health status of livestock, allowing users to promptly discover and deal with abnormal postures, thereby taking quick measures to ensure the health and production efficiency of livestock.

[0061] In the process of determining whether the livestock to be detected is in a normal state, the method further includes:

[0062] S1204, when the livestock passes through the measurement channel, corresponding livestock weight data is collected, and a corresponding body size three-dimensional model of the livestock is constructed based on the livestock contour point cloud data.

[0063] Among them, a measuring channel is set up in the livestock entry and exit area or on the daily activity path to ensure that the livestock can be automatically weighed every time it passes. High-precision electronic scales or other weighing equipment can be used to ensure that the collected weight data is accurate and reliable. The data of each weighing is recorded in real time and transmitted to the data center via a wireless network to ensure the timeliness and integrity of the data.

[0064] In addition, a multi-view depth camera system is used to obtain the 3D point cloud data of livestock, and pre-processing is performed, including denoising, filtering, normalization and other operations; key body size parameters are extracted from the 3D point cloud data, such as cross height (the distance from the ground to the highest point of the back), body oblique length (the distance from the shoulder to the hip), chest circumference (the circumference of the widest part of the chest), and abdominal circumference (the circumference of the widest part of the abdomen). It should be pointed out here that the key body size parameters are as follows:

[0065] 1. Header parameters:

[0066] Head length: the distance from the tip of the nose to the occipital bone; head width: the width of the head at the widest part; ear length and ear width: the length and width of the ear.

[0067] 2. Neck parameters:

[0068] Neck length: measured from the point of the shoulders to the base of the head.

[0069] Neck circumference: The circumference of the neck at its thickest part.

[0070] 3. Limb parameters:

[0071] Limb length: the distance from the hoof of the forelimb or hind limb to the shoulder or hip; limb circumference: the circumference of the thickest part of the limb; hoof circumference: the circumference of the widest part of the hoof.

[0072] 4. Back and waist parameters:

[0073] Back length: the distance from the top of the shoulder blade to the highest point of the hips; waist length: the distance from the end of the ribs to the highest point of the hips; back width and waist width: the width of the back and waist at the widest point.

[0074] 5. Chest and abdomen parameters:

[0075] Chest depth: the distance from the bottom of the shoulder blade to the bottom of the sternum; Chest thickness: the maximum thickness of the chest in the front-to-back direction; Abdominal depth: the distance from the last rib to the lowest point of the abdomen.

[0076] 6. Tail parameters:

[0077] Tail length: the distance from the base of the tail to the tip of the tail; Tail base width: the width of the tail at the widest part.

[0078] 7. Skinfold Thickness

[0079] Skinfold thickness measurement: The thickness of the skin and subcutaneous fat is measured at specific areas (such as shoulders, waist, hips) to assess fat distribution.

[0080] The extracted body size parameters are combined into a three-dimensional body size model, which can accurately represent the body shape characteristics of livestock; it can ensure a comprehensive description of the livestock's body shape and provide support for the analysis of body shape change trends.

[0081] S1205, retrieve the historical weight data corresponding to the livestock and the current stage period of the livestock, input the historical weight data and the current stage period of the livestock weight data into the preliminary recognition model for recognition, identify whether the livestock weight data is consistent with the weight data corresponding to the current stage period, and generate a corresponding weight analysis report.

[0082] Among them, for historical weight data, the weight data collected each time is stored in the database to form a historical weight data set; according to the growth stage of livestock (such as infancy, youth, and adulthood), the corresponding historical weight data is retrieved to form a time series.

[0083] In addition, livestock are divided into different growth stages according to their age and physiological characteristics; a reasonable expected weight range is set for each growth stage, and these standards are usually based on a large amount of experimental data and industry specifications.

[0084] A large amount of historical weight data and corresponding growth stage information are used to train the preliminary recognition model to ensure that the model can accurately predict weight changes at different growth stages; historical weight data and weight data for the current stage are input into the preliminary recognition model; the preliminary recognition model outputs whether the current weight of the livestock meets the expected weight standard and generates a detailed weight analysis report, which includes weight change trends, abnormal conditions, etc.

[0085] S1206, retrieve the body size history model corresponding to the livestock, compare the body size three-dimensional model with the body size history model, and generate a corresponding body shape change trend report.

[0086] The three-dimensional body size model constructed each time is stored in a database to form a body size historical model library; according to the growth stage of the livestock, the corresponding time series body size historical model is retrieved.

[0087] Then, a suitable distance measurement method (such as Euclidean distance, cosine similarity, etc.) is selected to calculate the similarity between the current body size three-dimensional model and the historical model. Based on the similarity calculation results, the change trend of body shape is analyzed, such as body size growth, shrinkage or stability.

[0088] In addition, a detailed body shape change trend report is generated, which includes the change trend of body shape parameters, abnormal conditions, etc., which can help managers understand the changes in livestock body shape and discover potential problems in time.

[0089] S1207, scoring is performed based on the weight analysis report and the body shape change trend report to obtain a corresponding comprehensive health score. If the comprehensive health score is greater than a comprehensive health threshold, it is determined to be in a normal state.

[0090] Among them, according to the importance of weight analysis report and body shape change trend report, set corresponding weights. For example, weight analysis may account for 60%, and body shape change trend accounts for 40%. Scoring standards need to be set for each indicator. For example, if the weight meets expectations, full marks will be awarded, slight deviations will be deducted, and severe deviations will not be awarded; if body shape parameters are stable, full marks will be awarded, slight changes will be deducted, and obvious changes will not be awarded.

[0091] According to the scoring rules, the comprehensive health score is calculated, and the score range can be 0 to 100 points. The higher the score, the better the health status. Then, a reasonable comprehensive health threshold is set according to the actual situation, such as 80 points. If the comprehensive health score is higher than the threshold, the livestock is judged to be in normal condition; otherwise, it is judged to have health problems.

[0092] If the comprehensive health score is higher than the threshold, the system determines that the livestock is in normal condition and generates a corresponding health report. If the comprehensive health score is lower than the threshold, the system generates an alarm message and sends it to the management personnel, indicating that further inspection and treatment are required.

[0093] By setting reasonable scoring rules, we ensure the scientificity and fairness of the scoring. At the same time, we calculate the comprehensive health score according to the scoring rules to ensure a comprehensive assessment of the health status of livestock. By comparing the comprehensive health score with the threshold, we can determine whether the livestock is in a normal state and promptly discover and deal with potential health problems.

[0094] Actual case analysis: dairy cow health monitoring system

[0095] A large dairy farm in northern China has hundreds of cows. In order to improve the health and production efficiency of dairy cows, the farm introduced a posture detection system based on 3D measurement of livestock. The system can not only monitor the behavior and posture of dairy cows in real time, but also comprehensively evaluate the health of dairy cows through changes in weight and body size parameters.

[0096] Multiple depth cameras are installed in the cowshed to continuously collect 3D point cloud data of cows from different angles. At the same time, automatic weighing channels are set up in the areas where cows enter and exit or on their daily activity paths to ensure that cows are automatically weighed by high-precision electronic scales every time they pass through. The weighing data is recorded in real time and transmitted to the data center via a wireless network to ensure the timeliness and integrity of the data. The data center and analysis system include modules such as data preprocessing, graph cut algorithm segmentation, preliminary recognition model, and depth recognition model, and are equipped with an alarm and management system that can send alarm information to user terminals such as mobile phones and computers in real time.

[0097] Case execution process

[0098] When a cow passes through the automatic weighing channel, the system automatically records its weight as 650 kg and obtains its 3D point cloud data through a multi-view depth camera system. These data are pre-processed (denoising, filtering, normalization) to extract key body size parameters such as cross height, body oblique length, chest circumference, abdominal circumference, and more detailed parameters such as head, neck, limbs, back, chest, abdomen, tail and skin fold thickness. These parameters are combined into a body size 3D model to accurately represent the body shape characteristics of the cow and provide support for subsequent body shape change trend analysis.

[0099] The data center stores the historical weight data of each cow in a time series. According to the growth stage of the cow (juvenile, adolescent, and adult), the corresponding historical weight data is retrieved. According to the age and physiological characteristics of the cow, it is divided into different growth stages, and a reasonable expected weight range is set for each stage. A large amount of historical weight data and corresponding growth stage information are used to train the preliminary recognition model to ensure that the model can accurately predict weight changes at different growth stages. The historical weight data and the weight data of the current stage are input into the preliminary recognition model. The model outputs whether the current weight of the cow meets the expected weight standard and generates a detailed weight analysis report, which includes weight change trends, abnormal conditions, etc.

[0100] The data center also stores the historical model library of the body size of each cow. According to the growth stage of the cow, the corresponding time series body size historical model is retrieved. The appropriate distance measurement method (such as Euclidean distance, cosine similarity) is selected to calculate the similarity between the current body size 3D model and the historical model. Based on the similarity calculation results, the trend of body shape changes is analyzed, such as body growth, shrinkage or stability. A detailed body shape change trend report is generated, which includes the trend of body shape parameters, abnormal conditions, etc., to help managers understand the changes in the cow's body shape and discover potential problems in a timely manner.

[0101] According to the importance of weight analysis report and body shape trend report, set corresponding weights, for example, weight analysis may account for 60% and body shape trend account for 40%. Set scoring criteria for each indicator, for example, full marks for weight that meets expectations, deductions for slight deviations, and no marks for severe deviations; full marks for stable body shape parameters, deductions for slight changes, and no marks for obvious changes. According to the scoring rules, calculate the comprehensive health score, which can range from 0 to 100 points, with higher scores indicating better health. Set a reasonable comprehensive health threshold, such as 80 points. If the comprehensive health score is higher than the threshold, the cow is judged to be in normal condition; otherwise, it is judged to have health problems. If the comprehensive health score is higher than the threshold, the system judges that the cow is in normal condition and generates a corresponding health report. If the comprehensive health score is lower than the threshold, the system generates an alarm message and sends it to the management personnel, prompting that further inspection and processing are required.

[0102] Actual effects and applications

[0103] Suppose that one morning, after the technician starts this health monitoring system, when a cow passes through the automatic weighing channel, the system automatically records its weight as 650 kg, and obtains its 3D point cloud data through the multi-view depth camera system to construct a 3D body model. The system retrieves the historical weight data of the cow and finds that its average weight in the past month is 645 kg, which is in line with the expected weight range of its current growth stage. The initial recognition model outputs that the weight change trend of the cow is stable and there is no significant abnormality, and generates a detailed weight analysis report. The system retrieves the body size historical model of the cow and compares the current body size 3D model with the historical model. The analysis results show that the body shape parameters of the cow have remained stable in the past month without significant changes, and a detailed body shape change trend report is generated. Based on the weight analysis report and the body shape change trend report, the system calculates the cow's comprehensive health score as 85 points, which is higher than the set threshold of 80 points. The system determines that the cow is in a normal state and generates a corresponding health report. After confirmation, the technician continues his daily work.

[0104] However, when another cow passed through the automatic weighing channel, the system detected that its weight had dropped significantly to 600 kg, far below the expected weight range, and the body parameters showed a decrease in chest circumference. The system immediately generated an alarm message, prompting the technician to conduct further inspection. Through real-time monitoring and timely intervention, the farm avoided production losses caused by cow diseases and improved overall production efficiency. The system continuously accumulates data, optimizes the preliminary recognition model and the deep recognition model, and improves the accuracy and reliability of recognition. Through this posture detection system based on three-dimensional measurement of livestock, the farm can not only detect and deal with health problems of dairy cows in a timely manner, but also continuously optimize the system through data accumulation to ensure the health and production efficiency of dairy cows.

[0105] In the process of determining the corresponding potential livestock posture data, the method further includes:

[0106] S111, extracting corresponding feature points from the livestock outline point cloud data based on a feature point detection algorithm, and generating a corresponding feature descriptor from each of the feature points.

[0107] Among them, a suitable feature point detection algorithm is selected, and then the feature point detection algorithm is applied to detect feature points from the livestock contour point cloud data. These feature points are usually key points on the contour, such as corner points, edge points, etc.; the above information is combined into a feature descriptor, which is usually a vector containing the local information, gradient direction and color information of the feature point.

[0108] Local information: Extract local information around each feature point, such as the point cloud distribution in the neighborhood.

[0109] Gradient direction: Calculate the gradient direction around the feature point to capture the direction information of the feature point.

[0110] Color information: If the point cloud data contains color information, extract the color information around the feature points.

[0111] S112, using a feature point matching algorithm to match the extracted feature points with predefined standard posture feature points, and matching corresponding optimal feature point pairs.

[0112] At the same time, it is necessary to predefine a set of standard posture feature points and their feature descriptors. These standard feature points are extracted from a large amount of normal posture data, and then the extracted feature points are matched with the predefined standard posture feature points using the feature point matching algorithm to calculate the similarity between the feature descriptors. It should be pointed out here that the best matching feature point pair is selected based on the similarity. Commonly used similarity measurement methods include Euclidean distance, Hamming distance, etc. By using the feature point matching algorithm, it can be ensured that the matched feature point pairs have high similarity, thereby improving the accuracy and reliability of matching.

[0113] S113, screening out the potential livestock posture data based on the optimal feature points, and sorting and excluding all the potential livestock posture data.

[0114] Among them, according to the matching results, the best feature point pair is selected, and based on the best feature point pair, potential livestock posture data is screened out, which usually contains parts that are highly similar to the standard posture feature points. In addition, the potential livestock posture data is sorted according to the matching similarity, and the data with high similarity is ranked first. By setting a threshold, the potential posture data with similarity lower than the threshold is excluded to ensure that the retained potential posture data has high credibility.

[0115] Through the above technical scheme, high-precision and high-efficiency preliminary recognition is achieved, feature points are extracted from livestock contour point cloud data, and feature descriptors containing local information, gradient direction and color information are generated to ensure the high stability and repeatability of feature points; the extracted feature points are matched with predefined standard posture feature points using a feature point matching algorithm, and the best matching feature point pairs are selected to ensure the accuracy and reliability of the matching; at the same time, based on the best feature point pairs, potential livestock posture data are screened out, and all potential livestock posture data are sorted and excluded to ensure that the retained potential posture data has high credibility and reduce misjudgments and redundant data.

[0116] The above process corresponds to increasing the accuracy in the process of preliminary identification. Further, in the process of inputting the potential livestock posture data into the deep recognition model for identification, in order to increase the accuracy of the solution, the method also includes:

[0117] S114, collecting the three-dimensional point cloud data of the previous and next frames corresponding to the three-dimensional point cloud data, and forming time series data, extracting key features from the three-dimensional point cloud data of each frame in the time series data, and generating a feature vector for each frame.

[0118] Among them, a multi-view depth camera system is used to continuously collect three-dimensional point cloud data of the livestock to be detected, ensuring that the time interval of each frame of data is consistent, and the collected previous and next frame data are arranged in chronological order to form time series data. For example, if the current frame is the tth frame, the previous frame is the t-1th frame, and the next frame is the t+1th frame. Then the corresponding feature extraction is performed, and the features that are crucial to posture recognition are selected, such as joint position, posture angle, body contour, etc.; it should be pointed out here that the extraction of key features is the same as the process mentioned in the above scheme, and then the extracted features are combined into a high-dimensional feature vector, and a feature vector is generated for each frame.

[0119] S115, merging the feature vectors corresponding to the previous and next frames with the feature vector of the current frame to form a context feature representation containing context information.

[0120] Among them, a suitable fusion method is selected, such as splicing, weighted averaging, convolution, etc. For example, the feature vectors of the previous and next frames can be spliced ​​with the feature vector of the current frame into a higher-dimensional feature vector; by fusing the feature vectors of the previous and next frames, a contextual feature representation containing contextual information is formed. It should be pointed out here that the contextual information can help the model better understand the posture changes of the current frame and improve the recognition accuracy.

[0121] S116, when performing posture recognition, inputting the context feature representation into the deep recognition model for recognition, and determining corresponding potential livestock posture data.

[0122] Among them, the fused context feature representation is input into the deep recognition model, and the deep recognition model outputs the potential livestock posture data of the current frame, which includes specific posture categories and confidence levels; according to the output of the deep recognition model, the potential livestock posture data of the current frame is determined to ensure the accuracy and reliability of the recognition results.

[0123] Through the above technical solution, when the potential livestock posture data is input into the deep recognition model for recognition, the integrity of the data and the high discrimination of the features are ensured by continuously collecting the three-dimensional point cloud data of the previous and next frames and generating feature vectors; by fusing the feature vectors of the previous and next frames, a context feature representation containing context information is formed to improve the model's ability to understand dynamic posture changes; finally, the context feature representation is input into the deep recognition model for high-precision and high-reliability posture recognition to ensure the accuracy and reliability of the recognition results. These technical means work together to improve the performance and reliability of the entire posture detection system, and can stably and reliably identify the posture of livestock in a dynamic environment, detect and report abnormal postures in a timely manner, and ensure the health of livestock.

[0124] In the process of using the multi-view depth camera system to obtain the three-dimensional point cloud data of the livestock to be detected, in order to ensure that the obtained three-dimensional point cloud data is accurate, the method further includes:

[0125] S101, determining corresponding livestock body shape data based on the livestock to be detected, adjusting a corresponding multi-view depth camera system based on the livestock body shape data, and acquiring corresponding three-dimensional point cloud data.

[0126] Among them, the body shape data of the livestock to be tested, including height, weight, body length, etc., are obtained through preprocessing or database query. According to the body shape data, the livestock are classified as large, medium or small. For example, cattle and horses are large livestock, and sheep and pigs are small and medium-sized livestock.

[0127] Adjust the configuration of the multi-view depth camera system according to the body size data of the livestock. For example, for large livestock, use a multi-view depth camera system with high resolution and high frame rate to obtain high-quality 3D point cloud data; for small and medium-sized livestock, use a multi-view depth camera system with medium resolution and high frame rate to increase processing speed. When adjusting the position and angle of the camera, it is necessary to ensure that the livestock's body is fully covered from multiple angles. For example, for large livestock, the camera may need to be installed at a higher position to cover a larger range; for small and medium-sized livestock, the camera can be installed at a lower position to obtain more detailed local information.

[0128] Using the adjusted multi-view depth camera system, the three-dimensional point cloud data of the livestock to be inspected is collected from multiple angles at the same time. The collected three-dimensional point cloud data also needs to be pre-processed, including denoising, filtering, normalization and other operations, to improve the data quality and the efficiency of subsequent processing.

[0129] S102, judging whether there are hornless livestock to be detected based on the three-dimensional point cloud data, obtaining corresponding judgment result data, and adjusting parameters of a graph cut algorithm based on the judgment result data.

[0130] Among them, key features are extracted from the 3D point cloud data, especially the features of the head area, such as the feature points of the corners, and specific detection algorithms (such as shape-based detection and deep learning-based detection) are used to determine whether the livestock has horns. For example, it can be determined by detecting whether the feature points in the head area have obvious corner features. And the judgment result data is generated, which needs to indicate whether the livestock has horns.

[0131] Then, according to the judgment result data, the appropriate graph cut algorithm parameters are selected. For example, for livestock with horns, the graph cut algorithm needs to pay special attention to the feature points of the corners to avoid misjudging the corners as background; for livestock without horns, the graph cut algorithm can pay more attention to the feature points of the body contour and limbs. According to the selected parameters, the energy function and segmentation strategy of the graph cut algorithm are adjusted to ensure that livestock and background objects can be accurately separated in different types of livestock.

[0132] Through the combined effect of the above steps, the efficiency and accuracy of data collection are ensured, the performance and reliability of the entire posture detection system are improved, and high-quality 3D point cloud data can be stably and reliably acquired in different types of livestock, providing a solid foundation for subsequent posture recognition.

[0133] Finally, it will have a certain impact on the environment, so the methods also include:

[0134] S103, obtaining corresponding environmental condition data.

[0135] Among them, the environmental condition data type is:

[0136] 1. Light intensity: Use light-sensitive sensors (such as photodiodes and photoresistors) to measure the light intensity in the environment.

[0137] 2. Temperature: Use temperature sensors (such as thermocouples, thermistors) to measure the temperature in the environment.

[0138] 3. Humidity: Use humidity sensors (such as capacitive humidity sensors, resistive humidity sensors) to measure the humidity in the environment.

[0139] 4. Air quality: Use air quality sensors (such as PM2.5 sensors, CO2 sensors) to measure the air quality in the environment.

[0140] It is necessary to arrange various environmental sensors in the livestock shed to ensure coverage of the main areas and set a suitable data collection frequency, such as collecting data every minute or every 5 minutes.

[0141] S104: Evaluate the impact on camera performance based on the environmental condition data.

[0142] Among them, an evaluation model is established, which can predict the impact of environmental condition data on camera performance. It should be pointed out that the evaluation model is trained using historical data to ensure that the model can accurately predict camera performance under different environmental conditions.

[0143] The environmental condition data collected in real time is input into the evaluation model to evaluate the impact of the model output on camera performance, such as the impact of light intensity on image brightness, the impact of temperature on camera thermal stability, etc.

[0144] S105: Adjust camera parameters based on the degree of influence.

[0145] According to the impact of the evaluation model output, the appropriate parameter adjustment strategy is selected. For example, when the light intensity is weak, the exposure time is increased or the ISO sensitivity is increased; when the temperature is high, the cooling system is started; when the humidity is high, the lens anti-fog function is enabled. The camera parameters can be automatically adjusted through the control system to ensure that the camera can work stably under different environmental conditions; in some special cases, the camera parameters can be manually adjusted to cope with extreme environmental conditions.

[0146] Through the combined effect of the above steps S103 to S105, the efficiency and accuracy of data acquisition are ensured, the performance and reliability of the entire posture detection system are improved, and high-quality three-dimensional point cloud data can be stably and reliably acquired under different environmental conditions.

[0147] The following is a practical example of applying the above solution, taking the cow health monitoring system as an example, to explain in detail how to apply the posture detection method based on livestock 3D measurement.

[0148] A large dairy farm in northern China has hundreds of cows. In order to improve the health and production efficiency of dairy cows, the farm decided to introduce a posture detection system based on 3D measurement of livestock. This system can monitor the behavior and posture of dairy cows in real time, and detect abnormal conditions such as lameness and lying down for too long in time, so as to help managers take quick measures.

[0149] Execution steps:

[0150] Multiple depth cameras simultaneously photograph cows from different angles to generate three-dimensional point cloud data. The camera system covers all sides of the cow to ensure the comprehensiveness and accuracy of the data. The collected three-dimensional point cloud data undergoes pre-processing operations such as denoising, filtering, and normalization, and a graph cut algorithm is used to separate the cow from the background in the pre-processed three-dimensional point cloud data to generate cow contour point cloud data.

[0151] The cow contour point cloud data is input into the pre-trained preliminary recognition model. At this time, the preliminary recognition model quickly screens out potential abnormal posture data, such as lameness or long-term lying of the cow, and the preliminary recognition model can quickly filter out normal walking and standing postures to reduce unnecessary calculations; the potential abnormal posture data is input into the pre-trained deep recognition model. At this time, the deep recognition model performs high-precision recognition of complex postures and outputs specific posture categories and confidence levels. For example, the model recognizes that a cow has a slight lameness in its left hind leg with a confidence level of 95%.

[0152] The identified cow posture data is compared with the preset standard posture data, and the similarity between the key feature vector and the standard feature vector is calculated to determine whether the cow is in a normal state. If an abnormal posture is detected, the system generates alarm data containing the abnormal description, occurrence time and location information, and sends it to the technician's mobile phone and computer in real time.

[0153] The present application embodiment discloses a posture detection device based on three-dimensional measurement of livestock, referring to Figure 2 , the devices include but are not limited to:

[0154] The livestock outline point cloud data extraction module 200 uses a multi-view depth camera system to obtain three-dimensional point cloud data of the livestock to be detected, pre-processes the three-dimensional point cloud data, separates the livestock from other background objects in the pre-processed three-dimensional point cloud data based on a segmentation method of a graph cut algorithm, and uses the data to extract corresponding livestock outline point cloud data, wherein the multi-view depth camera system includes at least three depth cameras with different view angles;

[0155] The target livestock posture data acquisition module 210 retrieves a pre-trained preliminary recognition model, inputs the livestock outline point cloud data into the preliminary recognition model for screening, determines corresponding potential livestock posture data, retrieves a pre-trained deep recognition model, inputs the potential livestock posture data into the deep recognition model for recognition, and is used to obtain corresponding target livestock posture data;

[0156] The posture judgment module 220 compares the target livestock posture data with the preset standard posture data to determine whether the livestock to be detected is in a normal state. If the livestock to be detected is in an abnormal posture, alarm data containing the abnormal posture is generated and sent to the user terminal in real time, wherein the alarm data contains a specific description of the abnormal posture, the time of occurrence and the location information.

[0157] Furthermore, the device includes but is not limited to:

[0158] A key feature vector generation module extracts key feature data from the target livestock posture data to generate a key feature vector;

[0159] A similarity data acquisition module calculates the similarity between the key feature vector and the standard feature vector in the preset standard posture data to obtain the corresponding similarity data;

[0160] The posture abnormality determination module retrieves a preset similarity threshold, compares the similarity data with the similarity threshold, and is used to determine that the posture of the livestock is abnormal if the similarity data is lower than the similarity threshold.

[0161] Furthermore, the device includes but is not limited to:

[0162] A feature descriptor generation module, which extracts corresponding feature points from the livestock outline point cloud data based on a feature point detection algorithm, and is used to generate a corresponding feature descriptor from each of the feature points, wherein the feature descriptor includes local information around the feature point, gradient direction, and color information;

[0163] A matching module uses a feature point matching algorithm to match the extracted feature points with predefined standard posture feature points to match the corresponding optimal feature point pairs;

[0164] The sorting module is used to sort and exclude all the potential livestock posture data based on the selected potential livestock posture data based on the optimal feature points.

[0165] Furthermore, the device includes but is not limited to:

[0166] A time series data forming module collects the three-dimensional point cloud data of the previous and next frames corresponding to the three-dimensional point cloud data, and uses it to form the time series data, extracts key features from the three-dimensional point cloud data of each frame in the time series data, and generates a feature vector for each frame;

[0167] A fusion module is used to fuse the feature vectors corresponding to the previous and next frames with the feature vector of the current frame to form a context feature representation containing context information;

[0168] When performing posture recognition, the context feature representation is input into the deep recognition model for recognition, and the corresponding potential livestock posture data is determined.

[0169] Furthermore, the device includes but is not limited to:

[0170] A livestock body shape data determination module, which is used to determine corresponding livestock body shape data based on the livestock to be detected, adjust the corresponding multi-view depth camera system based on the livestock body shape data, and obtain corresponding three-dimensional point cloud data;

[0171] The judgment result data acquisition module judges whether there are hornless livestock to be detected based on the three-dimensional point cloud data, is used to obtain corresponding judgment result data, and adjusts the parameters of the graph cut algorithm based on the judgment result data.

[0172] Furthermore, the device includes but is not limited to:

[0173] An environmental condition data acquisition module is used to acquire corresponding environmental condition data; wherein the environmental condition data includes light intensity, temperature, humidity, and air quality;

[0174] An impact assessment module, used to assess the impact on camera performance based on the environmental condition data;

[0175] The camera parameter adjustment module is used to adjust the camera parameters based on the influence degree.

[0176] The embodiment of the present application further discloses a posture detection method based on three-dimensional measurement of livestock, including a processor, in which a program of the posture detection method based on three-dimensional measurement of livestock described above is run.

[0177] The embodiment of the present application also discloses a storage medium storing a program of the posture detection method based on three-dimensional measurement of livestock as described above.

[0178] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A posture detection method based on three-dimensional measurement of livestock, characterized in that: include: Using a multi-view depth camera system to obtain three-dimensional point cloud data of the livestock to be detected, preprocessing the three-dimensional point cloud data, separating the livestock from other background objects in the preprocessed three-dimensional point cloud data using a segmentation method based on a graph cut algorithm, and extracting corresponding livestock contour point cloud data, wherein the multi-view depth camera system includes at least three depth cameras with different view angles; Retrieving a pre-trained preliminary recognition model, inputting the livestock outline point cloud data into the preliminary recognition model for screening, determining corresponding potential livestock posture data, retrieving a pre-trained deep recognition model, inputting the potential livestock posture data into the deep recognition model for recognition, and obtaining corresponding target livestock posture data; wherein the method further comprises: extracting key features from the livestock outline point cloud data, inputting the extracted key features into the preliminary recognition model, the preliminary recognition model outputs the potential livestock posture data, and then fusing the key features in the potential livestock posture data to generate a high-dimensional feature vector, inputting the high-dimensional feature vector into the deep recognition model, and the deep recognition model outputs the final target livestock posture data, wherein the target livestock posture data includes a specific posture category and a confidence level; In the process of fusing the key features in the potential livestock posture data to generate a high-dimensional feature vector, the method also includes: collecting the previous and next three-dimensional point cloud data of the previous and next frames corresponding to the three-dimensional point cloud data, and forming time series data, extracting key features from the three-dimensional point cloud data of each frame in the time series data, and generating a feature vector of each frame; fusing the feature vectors corresponding to the previous and next frames with the feature vector of the current frame to form a context feature representation containing context information; when performing posture recognition, inputting the context feature representation into the deep recognition model for recognition, and determining the corresponding potential livestock posture data; The target livestock posture data is compared with the preset standard posture data to determine whether the livestock to be detected is in a normal state. If the livestock to be detected is in an abnormal posture, alarm data containing the abnormal posture is generated and sent to the user terminal in real time, wherein the alarm data contains a specific description of the abnormal posture, the time of occurrence and the location information.

2. The method for detecting the posture of livestock based on three-dimensional measurement according to claim 1, characterized in that: In the process of comparing the target livestock posture data with the preset standard posture data to determine whether the livestock to be detected is in a normal state, the method further includes: Extract key feature data from target livestock posture data and generate key feature vectors; Calculate the similarity between the key feature vector and the standard feature vector in the preset standard posture data, and obtain the corresponding similarity data; A preset similarity threshold is retrieved, and the similarity data is compared with the similarity threshold. If the similarity data is lower than the similarity threshold, it is determined that the posture of the livestock is abnormal.

3. The method for detecting the posture of livestock based on three-dimensional measurement according to claim 2, characterized in that: In the process of determining whether the livestock to be detected is in a normal state, the method further includes: When the livestock passes through the measurement channel, the corresponding livestock weight data is collected, and a corresponding three-dimensional body size model of the livestock is constructed based on the livestock contour point cloud data, wherein the body size parameters of the three-dimensional body size model include cross height, body oblique length, chest circumference, and abdominal circumference; Retrieving the historical weight data corresponding to the livestock and the current stage and period of the livestock, inputting the historical weight data and the current stage and period of livestock weight data into the preliminary recognition model for recognition, identifying whether the livestock weight data is consistent with the weight data corresponding to the current stage and period, and generating a corresponding weight analysis report; Retrieving a body size historical model corresponding to livestock, comparing the body size three-dimensional model with the body size historical model, and generating a corresponding body shape change trend report; A score is determined based on the weight analysis report and the body shape change trend report to obtain a corresponding comprehensive health score. If the comprehensive health score is greater than a comprehensive health threshold, it is determined to be in a normal state.

4. The method for detecting the posture of livestock based on three-dimensional measurement according to claim 3, characterized in that: In the process of determining the corresponding potential livestock posture data, the method further includes: Extracting corresponding feature points from the livestock outline point cloud data based on a feature point detection algorithm, and generating corresponding feature descriptors from each of the feature points, wherein the feature descriptors include local information around the feature points, gradient direction, and color information; Use feature point matching algorithm to match the extracted feature points with predefined standard posture feature points to match the corresponding best feature point pairs; The potential livestock posture data are screened out based on the optimal feature points, and all the potential livestock posture data are sorted and excluded.

5. The method for detecting the posture of livestock based on three-dimensional measurement according to claim 1, characterized in that: In the process of acquiring three-dimensional point cloud data of the livestock to be detected using the multi-view depth camera system, the method further includes: Determine corresponding livestock body shape data based on the livestock to be detected, adjust the corresponding multi-view depth camera system based on the livestock body shape data, and obtain corresponding three-dimensional point cloud data; Based on the three-dimensional point cloud data, it is determined whether the livestock to be detected is hornless livestock, corresponding determination result data is obtained, and parameters of the graph cut algorithm are adjusted based on the determination result data.

6. The method for detecting the posture of livestock based on three-dimensional measurement according to claim 1, characterized in that: The method also includes: Acquire corresponding environmental condition data; wherein the environmental condition data includes light intensity, temperature, humidity, and air quality; Evaluate the degree of impact on camera performance based on the environmental condition data; The camera parameters are adjusted based on the degree of influence.

7. A posture detection device based on three-dimensional measurement of livestock, characterized in that: include: A livestock outline point cloud data extraction module, which uses a multi-view depth camera system to obtain three-dimensional point cloud data of the livestock to be detected, pre-processes the three-dimensional point cloud data, separates the livestock from other background objects in the pre-processed three-dimensional point cloud data based on a segmentation method of a graph cut algorithm, and uses it to extract corresponding livestock outline point cloud data, wherein the multi-view depth camera system includes at least three depth cameras with different view angles; The target livestock posture data acquisition module calls the pre-trained preliminary recognition model, inputs the livestock contour point cloud data into the preliminary recognition model for screening, determines the corresponding potential livestock posture data, calls the pre-trained deep recognition model, inputs the potential livestock posture data into the deep recognition model for recognition, and is used to obtain the corresponding target livestock posture data; wherein, it also includes: extracting key features from the livestock contour point cloud data, inputting the extracted key features into the preliminary recognition model, the preliminary recognition model outputs the potential livestock posture data, and then fusing the key features in the potential livestock posture data to generate a high-dimensional feature vector, inputting the high-dimensional feature vector into the deep recognition model, and the deep recognition model outputs the final target livestock posture data, and the target livestock posture data includes a specific posture category and confidence level; In the process of fusing the key features in the potential livestock posture data to generate a high-dimensional feature vector, the method also includes: collecting the previous and next three-dimensional point cloud data of the previous and next frames corresponding to the three-dimensional point cloud data, and forming time series data, extracting key features from the three-dimensional point cloud data of each frame in the time series data, and generating a feature vector of each frame; fusing the feature vectors corresponding to the previous and next frames with the feature vector of the current frame to form a context feature representation containing context information; when performing posture recognition, inputting the context feature representation into the deep recognition model for recognition, and determining the corresponding potential livestock posture data; The posture judgment module compares the posture data of the target livestock with the preset standard posture data to determine whether the livestock to be detected is in a normal state. If the livestock to be detected is in an abnormal posture, alarm data containing the abnormal posture is generated and sent to the user terminal in real time, wherein the alarm data contains a specific description of the abnormal posture, the time of occurrence and the location information.

8. A method for detecting the posture of livestock based on three-dimensional measurement, characterized in that: It comprises a processor, in which runs a program of a posture detection method based on three-dimensional measurement of livestock as described in any one of claims 1 to 6.

9. A storage medium, characterized in that: A program for storing a posture detection method based on three-dimensional measurement of livestock as described in any one of claims 1 to 6 is stored.

Citation Information

Patent Citations

  • Livestock three-dimensional measurement-based attitude detection method and system and storage medium

    CN111353416A

  • Development state judgment method, terminal and computer storage medium

    CN113516072A