| Literature DB >> 35565487 |
Yongfeng Li1,2, Hang Shu1,2, Jérôme Bindelle2, Beibei Xu1, Wenju Zhang1, Zhongming Jin1, Leifeng Guo1, Wensheng Wang1.
Abstract
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.Entities:
Keywords: behavior classification; inertial measurement units; machine learning; precision livestock farming
Year: 2022 PMID: 35565487 PMCID: PMC9104713 DOI: 10.3390/ani12091060
Source DB: PubMed Journal: Animals (Basel) ISSN: 2076-2615 Impact factor: 2.752
Figure 1Sensor internal structure and battery (a), The position of the sensor on the cow’s neck (b).
Description of unitary behaviors and detailed movements during feeding.
| Class | Description | |
|---|---|---|
| Unitary behaviors | Feeding | The animal puts its head into the stall and eats in the feeding rack |
| Standing | The animal stands without head movement and rumination | |
| Lying | The main body touches the cubicle floor without head movement and rumination | |
| Ruminating-standing | The animal regurgitates food bolus from the rumen, chews and swallows it while standing | |
| Ruminating- | The animal regurgitates food bolus from the rumen, chews, and swallows it while lying | |
| Walking | The animal moves in one direction for at least 30 s | |
| Movements during feeding | Feed tossing | The animal takes a mouthful of feed then throws the feed into the air or even over its back by twisting the neck |
| Rolling biting | The animal lowers its head and uses its tongue to roll feed into the mouth during feeding | |
| Chewing | The animal chews feed with its head up during feeding |
The number of segments, proportions, and total time for each behavior.
| Behavior | Number of Segments | % | Duration (HH:MM:SS) |
|---|---|---|---|
| Feeding | 76 | 27 | 21:19:15 |
| Standing | 87 | 11 | 08:26:28 |
| Lying | 90 | 19 | 15:06:13 |
| Ruminating-standing | 58 | 18 | 14:03:16 |
| Ruminating-lying | 54 | 23 | 17:57:04 |
| Walking | 35 | 2 | 01:44:22 |
| Total | 400 | 100 | 78:36:38 |
Figure 2Process of unitary behavior classification and movement analysis. KNN: K-nearest neighbors; RF: Random forest; XGBoost: Extreme boosting algorithm.
Figure 3Example of a sliding 5 s time window with a 50% overlap.
Sample size of unitary behavior when each time window (5 s, 10 s, 30 s, and 60 s) overlaps by 50%.
| Window Size | Sample |
|---|---|
| 5 s | 116,960 |
| 10 s | 58,474 |
| 30 s | 19,485 |
| 60 s | 9739 |
Figure 4Alternate occurrence of rolling biting and chewing on the feeding interval and feed tossing after rolling biting.
Precision (Pr) and sensitivity (Se) {%} for each unitary behavior (F: feeding; S: standing; L: lying; RS: ruminating-standing; RL: ruminating-lying; W: walking) and machine learning algorithms across four time windows. KNN: K-nearest neighbors; RF: Random forest; XGBoost: Extreme boosting algorithm.
| Machine Learning | Time Window | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Unitary | 5 s | 10 s | 30 s | 60 s | |||||
| Pr | Se | Pr | Se | Pr | Se | Pr | Se | ||
| KNN | F | 85 | 80 | 89 | 84 | 92 | 92 | 94 | 96 |
| S | 77 | 80 | 77 | 80 | 84 | 83 | 85 | 86 | |
| L | 85 | 84 | 88 | 83 | 89 | 87 | 91 | 84 | |
| RS | 70 | 73 | 74 | 78 | 81 | 84 | 87 | 86 | |
| RL | 80 | 81 | 83 | 86 | 90 | 90 | 87 | 92 | |
| W | 82 | 83 | 82 | 85 | 89 | 88 | 100 | 94 | |
| RF | F | 86 | 88 | 89 | 89 | 92 | 92 | 95 | 96 |
| S | 83 | 84 | 81 | 86 | 86 | 89 | 83 | 91 | |
| L | 94 | 90 | 93 | 90 | 91 | 92 | 95 | 90 | |
| RS | 82 | 81 | 84 | 82 | 86 | 83 | 92 | 86 | |
| RL | 89 | 91 | 90 | 93 | 92 | 93 | 91 | 95 | |
| W | 92 | 81 | 92 | 82 | 98 | 82 | 100 | 83 | |
| XGBoost | F | 88 | 89 | 91 | 91 | 94 | 94 | 96 | 96 |
| S | 84 | 85 | 82 | 86 | 88 | 91 | 85 | 93 | |
| L | 93 | 91 | 94 | 91 | 93 | 94 | 96 | 91 | |
| RS | 84 | 81 | 86 | 84 | 90 | 87 | 94 | 91 | |
| RL | 90 | 92 | 92 | 95 | 94 | 96 | 93 | 96 | |
| W | 91 | 83 | 91 | 87 | 97 | 88 | 100 | 89 | |
Figure 5Average F1 scores of the three algorithms across four time windows.
The number of in the actual observed and model predicted for three movements. Precision (Pr), sensitivity (Se), and F1 score (F1) (%) for three movements (FT: feed tossing; RB: rolling biting; C: chewing) were analyzed.
| Movement | Pr | Se | F1 | Actual Observed | Model Predicted | True Positive |
|---|---|---|---|---|---|---|
| FT | 69 | 89 | 78 | 127 | 184 | 114 |
| RB | 86 | 88 | 87 | 446 | 518 | 392 |
| C | 87 | 89 | 87 | 460 | 529 | 409 |