1. Introduction
Daily activity levels of pigs serve as a key indicator for analysing their health status. Pig daily behaviours exhibit regular fluctuations, and irregular changes in behaviour often signal problems such as disease, improper nutrition, or environmental stress [
1]. However, in pig farming operations, disease prevention and control still rely mainly on manual monitoring of health status changes, which is time-consuming, labour-intensive, subjective, inefficient, and costly [
2]. For major swine diseases such as African swine fever (ASF), relying solely on the manual recognition of mild clinical symptoms for passive detection often leads to a delay of several weeks before the pathogen can be identified in large-scale pig farms, allowing the pathogen to spread and cause substantial losses. Several studies have shown that the direct and indirect economic costs of a single outbreak or ongoing epidemic can range from tens of millions to several billions of USD, depending on the country, region, and specific disease [
3,
4,
5,
6,
7]. Early detection and real-time monitoring systems can significantly reduce these losses. With the continuous advancement of deep learning technology, it is now possible to non-invasively and with minimal stress employ computer vision methods to efficiently and accurately collect each pig’s daily behavioural data. This enables real-time monitoring of both behaviour and the health status of group-housed pigs, which plays a crucial role in managing herd health in pig farms.
In recent years, with the rapid development of computer vision technology, multi-object tracking (MOT) methods have been applied to livestock identification and tracking [
8,
9,
10,
11,
12,
13]. For example, Huang et al. proposed an improved model combining YOLOv5 and DeepSORT for pig tracking and counting, which achieved a Multiple Object Tracking Accuracy (MOTA) of 85.32% [
8]. To address the issues of missed and false detections caused by complex environments in cattle detection and tracking, Zheng et al. introduced an enhanced MOT method named YOLO-BYTE. Compared to the original algorithm, their method improved the High-Order Tracking Accuracy (HOTA) by 4.4%, the Multiple Object Tracking Accuracy (MOTA) by 6.1%, the Identification F1 Score (IDF1) by 3.8%, and reduced identity switches (IDs) by 37.5% [
9]. Cao et al. developed a model integrating an improved YOLOv5x with DeepSORT for tracking and counting sheep. Experimental results indicated a test accuracy of 97.10%, with a dynamic counting error rate of 5% [
10]. Wu et al. proposed a model combining YOLOv5x with an enhanced DeepSORT algorithm to track and count four species of migratory fish. The model achieved an average counting accuracy of 75.5% across the four species [
11]. Tu et al. introduced an MOT method for pigs called RpTrack, which effectively addresses challenges such as uneven lighting and irregular pig movements [
12]. Li et al. proposed a method, DYTB, for multi-object pig tracking, achieving a pig detection accuracy of 98.3%, along with tracking accuracies of 95.3% and 97.1% [
13]. The above works have demonstrated the feasibility of individual tracking in group-housed environments. However, these methods focus solely on identification and tracking, lacking deeper investigation into areas such as applying MOT technology for detailed behavioural analysis and further developing automated health assessment frameworks based on these behavioural patterns.
Moreover, in the field of pig target tracking, many studies have further explored the recognition and tracking of pig behaviours [
14,
15,
16,
17,
18]. For example, Alameer et al. proposed a feeding behaviour recognition method based on grayscale video frames and an enhanced GoogleNet (Inception V3) architecture, achieving a high accuracy of 99.4% in identifying feeding-related behaviours [
14]. Huang et al. introduced HE-YOLO for the real-time recognition of postures and behaviours in group-housed pigs. The model achieved a mean average precision (mAP) ranging from 94.43% to 99.25% across four posture categories [
15]. Odo et al. developed a deep learning-based video analysis approach for the automatic quantification of pig ear-biting behaviour. DeepSORT and centroid tracking algorithms were used to quantify the behaviour [
16]. Taiwo et al. proposed a method for dynamically recognising aggressive behaviours in pigs using a Vision Transformer, which achieved an accuracy of 82.8% and an F1 score of 82.7% [
17]. Luo et al. presented a lightweight multi-behaviour recognition algorithm (PBR-YOLO) for piglets. It achieved an accuracy of 82.7% and an mAP of 78.5% [
18]. However, many of these studies have remained focused on behaviour recognition and tracking, without further extending these techniques to health assessment applications. This presents a valuable opportunity for future research to integrate behaviour-based insights into intelligent animal health monitoring systems.
As a further extension of pig behaviour recognition and tracking, current research on pig health assessment predominantly relies on wearable sensors such as Bluetooth Low-Energy (BLE) devices and Radio-Frequency Identification (RFID) systems to record behavioural data and monitor health status [
19,
20,
21,
22]. For instance, de Bruijn et al. used RFID to collect feeding and drinking behaviour data and developed a model for the early detection of potential health issues in pigs [
19]. Lee et al. proposed a pig monitoring and identification system that integrates BLE tags with WBLCX antennas to support individual recognition and counting in real-time [
20]. Huang et al. introduced an analytical method based on electronic ear tag data, employing machine learning techniques to identify differences in activity levels and temperature changes between healthy and unhealthy pigs [
21]. Similarly, Yin et al. proposed a method combining statistical analysis and machine learning to differentiate activity levels between healthy and unhealthy pigs [
22]. Their approach demonstrated the feasibility of using hourly activity data to predict health problems, providing valuable insights for pig health assessments. However, wearable sensor-based solutions in large-scale pig farming face several limitations, including the risk of device detachment, high equipment costs, and difficulties in maintaining reliable monitoring accuracy.
In contrast, using pig behaviour tracking for health assessments in large-scale pig farms offers a cost-effective and device-free alternative to wearable sensors [
23,
24]. These approaches effectively reduce equipment costs and eliminate issues related to device detachment. For example, Bhujel et al. proposed a computer vision-based automatic detection approach to investigate the effects of varying greenhouse gas concentrations on pig health [
23]. Xu et al. introduced an automatic evaluation method that combines the YOLOv5s model with XGBoost to quantify the activity level of group-housed pigs. Their findings suggest that the collective activity level of pigs serves as an indirect indicator of health status, enabling health assessment through motion quantification [
24]. Despite these promising advances, few studies have leveraged MOT results to further analyse and assess the health status of pigs. This highlights a critical research gap and presents opportunities for integrating long-term behaviour tracking results with intelligent health monitoring systems for health assessment application in precision livestock farming.
To address the challenges, this study proposes a pig health assessment framework based on multi-object behaviour tracking and analysis results. The framework contains three modules: a multi-object tracking (MOT) module, a behaviour statistics and analysis module, and a health assessment module. The MOT module employs an improved ByteTrack to track the ‘lie’, ‘stand’, ‘eat’, and ‘other’ behaviour in pigs. The behaviour statistics and analysis module analyses the long-term tracking data to calculate the time proportion that each pig spends on the identified behaviour. The health assessment module assesses the health status of pigs based on the results of the behavioural statistics and analysis module and expert guidance.
The main contributions of this study are summarised as follows.
- (1)
We propose a pig health assessment framework to analyse and evaluate the health status of individual pigs in an intelligent monitoring environment.
- (2)
An improved ByteTrack algorithm is employed to enhance behaviour recognition and MOT performance in large-scale pig farming.
- (3)
Based on the pig ID and behaviour categories information from MOT, we develop a behaviour statistics and analysis module to complete long-term (24 h) behavioural analysis for pigs.
- (4)
To assess the health status of group-housed pigs, we implement a health assessment module and validate it in two video datasets including both healthy and unhealthy pigs.
4. Discussion
The four behaviours (‘lie’, ‘eat’, ‘stand’, and ‘other’) are important indicators of a pig’s health status. Among these, lie behaviour has the greatest impact, as healthy pigs typically allocate a substantial portion of their daily time budget to lying. However, during illness, they further increase lying behaviour as a postural strategy to conserve the heat and metabolic energy required to cope with an infection [
25,
28,
31,
32,
37,
38]. In particular, infections such as streptococcal disease have been associated with solitary lying and reduced activity, which is consistent with the clinical signs observed in our unhealthy pigs [
39]. Eat behaviour is the second most important, as the length of eat time may reflect their appetite and digestive health. Stand behaviour may be related to physical activity and energy levels, while ‘other’ behaviours may reflect psychological states. In summary, pig behaviours are closely linked to health status. However, few studies have analysed MOT results in depth to assess pig health.
With the development of pig behaviour tracking technologies, it has become increasingly feasible to perform health assessments based on tracking results. For example, Li et al. proposed a multi-behaviour detection method for group-housed pigs that integrates a YOLOX-based object detection module with an SCTS-SlowFast behaviour recognition module. This method effectively detects standing, lying, feeding, and walking behaviours [
40]. In our previous work [
27], we explored a YOLOv5-ByteTrack-based method for multi-object pig behaviour tracking, which accurately tracks and analyses pig behaviours over time. However, this work did not systematically assess pig health based on behaviour tracking and statistical analysis results.
To address this challenge, we propose a health assessment framework based on multi-object behaviour tracking and analysis. In this framework, the four primary behaviours are assigned specific weights to reflect their relative importance in evaluating pig health. The observed behaviours are then translated into corresponding scores to quantify the behaviours of pigs and assess their health status.
The health assessment results of this study show that, among the four behavioural categories observed within a 24 h period, healthy pigs spent on average 65.08% of their time lying, 16.68% eating, 10.62% standing, and 7.78% performing other behaviours. In contrast, pigs clinically diagnosed with a Streptococcus suis infection exhibited markedly different behavioural proportions, spending 95.10% of their time lying, 1% eating, 1.74% standing, and 1.66% on other behaviours. Evidently, the lying duration of unhealthy pigs increased significantly—by 30.02% compared with healthy pigs—whereas their eating time decreased sharply by 15.68%. These changes clearly indicate that unhealthy pigs typically display behavioural patterns characterised by prolonged lying, reduced feeding, and an overall decline in activity.
It is noteworthy that the typical clinical symptoms of an
S. suis infection—such as arthritis, loss of appetite, and lethargy—substantially impair the mobility of pigs, making them more inclined to lie down for extended periods to minimise energy expenditure [
39]. These clinical manifestations are highly consistent with the behavioural statistics observed in this study. Differences between healthy and unhealthy pigs are reflected not only in the proportional distribution of the four behavioural categories but also in their overall behavioural rhythms: healthy pigs show stable behaviour patterns with clear daily rhythms and normal fluctuations, whereas unhealthy pigs exhibit pathological behaviour characterised by reduced activity and diminished feed intake.
Although the present results successfully verify the feasibility of our approach, this study has certain limitations: (1) The behavioural data used for tracking were obtained through multi-timepoint video sampling, which may introduce a degree of error. (2) Our study was conducted on a dataset of limited size, especially regarding unhealthy pigs, due to the practical difficulties in data acquisition from unhealthy pigs. (3) Some factors such as management practices, feeding methods, and breed differences may have had some impact on the results. However, the aim of this work is to establish and validate a core analytical module and methodological framework for the automated monitoring and quantification of multiple behaviours to assess health status. The experimental data, which include lying, eating, standing, and other behaviours, were collected to validate the feasibility of our algorithmic modules and technical framework. These limitations do not affect the validity and feasibility of the algorithmic framework proposed in this paper and the alignment between our results and the actual data demonstrate the viability of the proposed method. In addition, our work is not an endpoint but a strategic first step. It establishes a cost-effective, scalable framework upon which a comprehensive multi-behaviour monitoring system (e.g., aggression and excretion patterns) can be built. For a deeper investigation into the behavioural characteristics of diseased pigs or a healthy diagnosis system, it is necessary to augment the dataset with pigs of the same breed, raised in identical environments, and under the same management. This will inform the direction of our future work.