Sort:
Open Access Issue
Posture standardization of pig point cloud based on skeleton extraction and transformation
International Journal of Agricultural and Biological Engineering 2025, 18(2): 63-74
Published: 30 April 2025
Abstract PDF (3.9 MB) Collect
Downloads:22

Pig body measurement is an important evaluation criterion for breeding and production management. Automatic measurement algorithms for pig body sizes exhibit sensitivity to the point cloud posture, but non-standard pig postures may result in inaccurate joint point localization in body measurement, further affecting measurement accuracy and the commercial application of these algorithms. To address this challenge, this paper proposed a pig point cloud posture transformation method based on pig’s skeleton model to adjust non-standard postures before conducting body size measurements. The method utilized an improved L1-median skeleton model to extract the three-dimensional skeleton of the pig point cloud, capturing the skeleton joint points on the target pig’s head, body, and limbs. By binding the skeleton joint points with the local point cloud and using rotation matrices, non-standard postures were adjusted to standard ones, enabling accurate body size measurements. The experimental results demonstrated that the average relative errors between the transferred posture and the original standard posture were reduced to 0.89% in body length, 0.76% in body width (front), 1% in body width (back), 0.89% in body height (front), 1.7% in body height (back), 2.03% in thoracic circumference, 3.37% in abdominal circumference, and 1.89% in rump circumference. To conclude, the posture standardization transfer method can significantly reduce errors in important body size parameters such as body length, body height, and body width. The method displays a greater stability and robustness compared to existing posture normalization and regression adjustment methods, providing both guidance and insight for future research in intelligent agriculture.

Issue
Multimodal recognition of pig behavior using vision and sensors
Transactions of the Chinese Society of Agricultural Engineering 2025, 41(8): 194-203
Published: 30 April 2025
Abstract PDF (3 MB) Collect
Downloads:15

Pig behavior monitoring was demonstrated to be crucial in precision livestock farming, as behavioral changes not only reflected health status but also influenced production performance, reproductive efficiency, and meat quality. Breeders could adjust feeding strategies promptly to enhance production efficiency and establish an effective disease early-warning mechanism, thereby ensuring pig welfare and achieving optimal economic benefits by monitoring the behavior of pigs. However, manually observing and identifying the behavior of pig herds continuously was time-consuming, laborious, and difficult to implement. Consequently, intelligent recognition of pig behaviors emerged as a research focus, primarily employing two approaches: visual technology and sensors technology. Visual recognition methods offered cost-effectiveness and easy deployment, however their accuracy was compromised by illumination variations and occlusions, along with limited individual identification capabilities. Sensor-based techniques required animals to wear sensing nodes with higher costs and demonstrated lower accuracy in distinguishing subtle behavioral differences. To overcome the limitations of single-technology recognition and improve behavioral identification accuracy in complex scenarios, this study proposed a multimodal pig behavior recognition method that adopted different processing strategies for various scenarios by integrating visual and sensors technologies. Three distinct data scenarios were defined: insufficient light, adequate light with severe occlusion, and adequate light without occlusion (including slight occlusion). For insufficient light conditions, a sensor single-layer classification method was implemented. This method initially segmented ear tag acceleration signals into multiple time windows and extracted 49 motion features from each window. Subsequently, random forest classifiers evaluated feature importance to select key features, followed by behavioral recognition using five machine learning models: Baseline, Logit, Random Forest, SVM, and KNN. In scenarios with adequate light but severe occlusion, a video sensor dual-layer classification approach was employed. The methodology first utilized the YOLOv8 model for pig posture classification in video data, then conducted detailed behavioral classification using ear tag acceleration data based on posture recognition results. For unobstructed scenarios with sufficient light, a video FE-TSM (feature extension-temporal shift module) model was developed. This architecture integrated CBAM (convolutional block attention module) for feature enhancement with temporal shift networks, enabling the model to focus on critical feature regions while preserving essential temporal information that might otherwise be lost through excessive shifting. The experiment used visual technology, sensor technology, and multimodal methods to analyze the video and sensor data of eight Landrace pigs, each with 7-day data. The pig behaviors were classified into five categories: lying on the side, crouching, half-sitting, eating, and sporting. The results showed that the average accuracy of behavior recognition using only sensor data was 68.60%, while visual data alone achieved 78.78%. In contrast, the multimodal method integrating sensor and video data demonstrated a significantly higher average recognition accuracy of 88.82%. This indicated that the multimodal approach substantially improved the precision of pig behavior recognition and analysis in complex scenarios. By combining visual and sensors technologies, the method addressed the limitations of individual modalities, enhanced the differentiation accuracy of the five behaviors, and thereby increased the reliability of pig behavior recognition under challenging environmental conditions.

Issue
Recognizing sow parturition using lightweight model with edge computing
Transactions of the Chinese Society of Agricultural Engineering 2024, 40(17): 205-215
Published: 15 September 2024
Abstract PDF (3.7 MB) Collect
Downloads:26

The reproductive performance of sows can play a critical role in animal breeding, particularly in the efficiency and effectiveness of selection. However, manual recordings of piglet births and their survival rates cannot fully meet the large-scale production in recent years. The high precision is often required to capture more nuanced data, such as the intervals between births. The advanced technologies can be expected to enhance both the accuracy and efficiency of animal breeding programs. In this study, a lightweight network was developed to rapidly and accurately monitor the sow birthing in real time. Specifically, essential birthing metrics were engineered to analyze, such as the number of piglets born and the precise intervals between each birth. The lightweight network was tailored for the real-time monitoring of sow birthing activities. The critical birthing parameters were obtained to significantly enhance the efficiency and accuracy of breeding programs. Initially, the efficacy of different monitoring views—specifically, single versus double-column views—were evaluated on the accuracy of the improved model. A single-column view was significantly improved to accurately monitor the birthing events. The real-time decision-making and direct implications were obtained from the breeding outcomes. Advanced video processing techniques were incorporated, such as horizontal and vertical flipping. Some challenges were remained on the dynamic changes in the sow posture and varying camera perspectives during monitoring. Moreover, different lighting conditions were adapted to capture the inherent motion blur of active piglets during birth. Color jittering and Gaussian blur were then employed to significantly enhance the robustness of the model. The reliable performance was obtained under diverse operational conditions. Further advancements were achieved through a comparative analysis of classification networks. The results revealed that ResNet50 was greatly contributed to the recognition accuracy. MobileNetV3-S was performed the best with the compact model size and superior processing speed of 505.14 frames per second, indicating the optimal operational efficiency. Furthermore, MobileNetV3-S was refined to apply with the masked generative distillation—a sophisticated technique that was effectively enhanced the network's ability to capture and interpret essential birthing features. ResNet50 was utilized as the teacher model in the practical application, while MobileNetV3-S as the student model. The training was conducted using masked generative distillation followed by dependency graph pruning. The tests were carried out on a DELL OptiPlex microcomputer. An impressive detection speed of 83.10 frames per second was achieved with a test accuracy in a single-column field of view of 91.48%. Although there was a slight decrease in the accuracy of 0.98 percentage points, the detection speed was improved by 67.13 frames per second. This improved model was then deployed at the edge for testing. The better performance was achieved in the managed farrowing intervals with a detection error of just 0.31 seconds and the duration of piglet birth events with a mere 0.02-second error. Highly efficient and exceptionally precise real-time monitoring was obtained to promote the management practices of breeding activities in complex farm environments. In conclusion, the advanced computational techniques were integrated for the transformative potential to the monitoring of sow birthing. Real-time data was acquired to combine the image processing and machine learning. Some standards can be offered for the accuracy and efficiency in livestock management. The reproductive dynamics can greatly contribute to the sustainable and scientifically-informed animal husbandry.

Issue
Pig Back Transformer: Automatic 3D Pig Body Measurement Model
Smart Agriculture 2024, 6(4): 76-90
Published: 30 July 2024
Abstract PDF (22.8 MB) Collect
Downloads:146
Objective

Nowadays most no contact body size measurement studies are based on point cloud segmentation method, they use a trained point cloud segmentation neural network to segment point cloud of pigs, then locate measurement points based on them. But point cloud segmentation neural network always need a larger graphics processing unit (GPU) memory, moreover, the result of the measurement key point still has room of improvement. This study aims to design a key point generating neural network to extract measurement key points from pig's point cloud. Reducing the GPU memory usage and improve the result of measurement points at the same time, improve both the efficiency and accuracy of the body size measurement.

Methods

A neural network model was proposed using improved Transformer attention mechanic called Pig Back Transformer for generating key points and back orientation points which were related to pig body dimensions. In the first part of the network, it was introduced an embedding structure for initial feature extraction and a Transformer encoder structure with edge attention which was a self-attention mechanic improved from Transformer's encoder. The embedding structure using two shared multilayer perceptron (MLP) and a distance embedding algorithm, it takes a set of points from the edge of pig back's point cloud as input and then extract information from the edge points set. In the encoder part, information about the offset distances between edge points and mass point which were their feature that extracted by the embedding structure mentioned before incorporated. Additionally, an extraction algorithm for back edge point was designed for extracting edge points to generate the input of the neural network model. In the second part of the network, it was proposed a Transformer encoder with improved self-attention called back attention. In the design of back attention, it also had an embedding structure before the encoder structure, this embedding structure extracted features from offset values, these offset values were calculated by the points which are none-edge and down sampled by farthest point sampling (FPS) to both the relative centroid point and model generated global key point from the first part that introduced before. Then these offset values were processed with max pooling with attention generated by the extracted features of the points' axis to extract more information that the original Transformer encoder couldn't extract with the same number of parameters. The output part of the model was designed to generate a set of offsets of the key points and points for back direction fitting, than add the set offset to the global key point to get points for pig body measurements. At last, it was introduced the methods for calculating body dimensions which were length, height, shoulder width, abdomen width, hip width, chest circumference and abdomen circumference using key points and back direction fitting points.

Results and Discussions

In the task of generating key points and points for back direction fitting, the improved Pig Back Transformer performed the best in the accuracy wise in the models tested with the same size of parameters, and the back orientation points generated by the model were evenly distributed which was a good preparation for a better body length calculation. A melting test for edge detection part with two attention mechanic and edge trim method both introduced above had being done, when the edge detection and the attention mechanic got cut off, the result had been highly impact, it made the model couldn't perform as well as before, when the edge trim method of preprocessing part had been cut off, there's a moderate impact on the trained model, but it made the loss of the model more inconsistence while training than before. When comparing the body measurement algorithm with human handy results, the relative error in length was 0.63%, which was an improvement compared to other models. On the other hand, the relative error of shoulder width, abdomen width and hip width had edged other models a little but there was no significant improvement so the performance of these measurement accuracy could be considered negligible, the relative error of chest circumference and abdomen circumference were a little bit behind by the other methods existed, it's because the calculate method of circumferences were not complicated enough to cover the edge case in the dataset which were those point cloud that have big holes in the bottom of abdomen and chest, it impacted the result a lot.

Conclusions

The improved Pig Back Transformer demonstrates higher accuracy in generating key points and is more resource-efficient, enabling the calculation of more accurate pig body measurements. And provides a new perspective for non-contact livestock body size measurements.

Total 4