Individual identification plays an important part in disease prevention and control, traceability of meat products, and improvement of agricultural false insurance claims. Automatic and accurate detection of cattle face is prior to individual identification and facial expression recognition based on image analysis technology. This paper evaluated the possibility of the cutting-edge object detection algorithm, RetinaNet, performing multi-view cattle face detection in housing farms with fluctuating illumination, overlapping, and occlusion. Seven different pretrained CNN models (ResNet 50, ResNet 101, ResNet 152, VGG 16, VGG 19, Densenet 121 and Densenet 169) were fine-tuned by transfer learning and re-trained on the dataset in the paper. Experimental results showed that RetinaNet incorporating the ResNet 50 was superior in accuracy and speed through performance evaluation, which yielded an average precision score of 99.8% and an average processing time of 0.0438 s per image. Compared with the typical competing algorithms, the proposed method was preferable for cattle face detection, especially in particularly challenging scenarios. This research work demonstrated the potential of artificial intelligence towards the incorporation of computer vision systems for individual identification and other animal welfare improvements.
The behavior of livestock on farms is the primary representation of animal welfare, health conditions, and social interactions to determine whether they are healthy or not. The objective of this study was to propose a framework based on inertial measurement unit (IMU) data from 10 dairy cows to classify unitary behaviors such as feeding, standing, lying, ruminating-standing, ruminating-lying, and walking, and identify movements during unitary behaviors. Classification performance was investigated for three machine learning algorithms (K-nearest neighbors (KNN), random forest (RF), and extreme boosting algorithm (XGBoost)) in four time windows (5, 10, 30, and 60 s). Furthermore, feed tossing, rolling biting, and chewing in the correctly classified feeding segments were analyzed by the magnitude of the acceleration. The results revealed that the XGBoost had the highest performance in the 60 s time window with an average F1 score of 94% for the six unitary behavior classes. The F1 score of movements is 78% (feed tossing), 87% (rolling biting), and 87% (chewing). This framework offers a possibility to explore more detailed movements based on the unitary behavior classification.
Behavior classification and recognition of sheep are useful for monitoring their health and productivity. The automatic behavior classification of sheep by using wearable devices based on IMU sensors is becoming more prevalent, but there is little consensus on data processing and classification methods. Most classification accuracy tests are conducted on extracted behavior segments, with only a few trained models applied to continuous behavior segments classification. The aim of this study was to evaluate the performance of multiple combinations of algorithms (extreme learning machine (ELM), AdaBoost, stacking), time windows (3, 5 and 11 s) and sensor data (three-axis accelerometer (T-acc), three-axis gyroscope (T-gyr), and T-acc and T-gyr) for grazing sheep behavior classification on continuous behavior segments. The optimal combination was a stacking model at the 3 s time window using T-acc and T-gyr data, which had an accuracy of 87.8% and a Kappa value of 0.836. It was applied to the behavior classification of three grazing sheep continuously for a total of 67.5 h on pasture with three different sward surface heights (SSH). The results revealed that the three sheep had the longest walking, grazing and resting times on the short, medium and tall SHH, respectively. These findings can be used to support grazing sheep management and the evaluation of production performance.
Standing and lying are the fundamental behaviours of quadrupedal animals, and the ratio of their durations is a significant indicator of calf health. In this study, we proposed a computer vision method for non-invasively monitoring of calves’ behaviours. Cameras were deployed at four viewpoints to monitor six calves on six consecutive days. YOLOv8n was trained to detect standing and lying calves. Daily behavioural budget was then summarised and analysed based on automatic inference on untrained data. The results show a mean average precision of 0.995 and an average inference speed of 333 frames per second. The maximum error in the estimated daily standing and lying time for a total of 8 calf-days is less than 14 min. Calves with diarrhoea had about 2 h more daily lying time (p < 0.002), 2.65 more daily lying bouts (p < 0.049), and 4.3 min less daily lying bout duration (p = 0.5) compared to healthy calves. The proposed method can help in understanding calves’ health status based on automatically measured standing and lying time, thereby improving their welfare and management on the farm.
Accurate recognition of each cattle in group environments is essential for modern precision livestock management. This study proposed a multi-object cattle recognition method based on deep learning, enabling precise recognition in feeding passages. A dataset comprising facial images from 135 cattle was constructed, and a data augmentation strategy tailored to cattle facial characteristics was designed to enhance model generalisation. The YOLOv8n network was selected from a comparative experiment and further optimised. For multi-object bounding box regression, the standard CIoU loss was replaced by the MPDIoU loss, improving the mAP50 by 5.4% through optimised corner distance computation. In addition, a coordinate attention mechanism was embedded within the C2F module to strengthen the model’s spatial perception of key facial regions such as the eyes and nose, resulting in a 5.8% improvement in recognition precision. A comparative experiment between image-level segmentation and cattle-level segmentation datasets was carried out, and the proposed method was further validated on an untrained external test set collected from actual feeding Passages. The results demonstrate that, even under challenging conditions such as occlusion and illumination variation, the improved model achieved a classification accuracy of 88% while maintaining an average inference speed of 96.9 frames per second. This non-invasive, real-time recognition approach provides a novel solution for precision feeding in group-housed environments and offers valuable insights for improving the efficiency of livestock monitoring and feeding management systems.