| Literature DB >> 35327847 |
Javier Cabezas1, Roberto Yubero1, Beatriz Visitación1, Jorge Navarro-García1, María Jesús Algar1, Emilio L Cano1,2, Felipe Ortega1.
Abstract
In this paper, a method to classify behavioural patterns of cattle on farms is presented. Animals were equipped with low-cost 3-D accelerometers and GPS sensors, embedded in a commercial device attached to the neck. Accelerometer signals were sampled at 10 Hz, and data from each axis was independently processed to extract 108 features in the time and frequency domains. A total of 238 activity patterns, corresponding to four different classes (grazing, ruminating, laying and steady standing), with duration ranging from few seconds to several minutes, were recorded on video and matched to accelerometer raw data to train a random forest machine learning classifier. GPS location was sampled every 5 min, to reduce battery consumption, and analysed via the k-medoids unsupervised machine learning algorithm to track location and spatial scatter of herds. Results indicate good accuracy for classification from accelerometer records, with best accuracy (0.93) for grazing. The complementary application of both methods to monitor activities of interest, such as sustainable pasture consumption in small and mid-size farms, and to detect anomalous events is also explored. Results encourage replicating the experiment in other farms, to consolidate the proposed strategy.Entities:
Keywords: GPS sensor; accelerometer sensor; animal behaviour; anomaly detection; clustering; pattern recognition; spectral analysis
Year: 2022 PMID: 35327847 PMCID: PMC8947510 DOI: 10.3390/e24030336
Source DB: PubMed Journal: Entropy (Basel) ISSN: 1099-4300 Impact factor: 2.524
Figure 1Monitoring device with 3-D accelerometer and GPS sensors. Coordinate axes represent movement directions tracked by the accelerometer.
Figure 2A Fleckvieh breed cow wearing the monitoring device, attached with a neckband.
Figure 3Raw signals recorded by the 3-D accelerometer for each coordinate axis.
Behavioural ethogram describing frequent activities observed by operators in the experiment, ordered by total duration of recorded video evidence.
| Behaviour | Code | Total Durat. (sec.) | Description |
|---|---|---|---|
| Grazing |
| 12,056 | Regularly lowering and raising its head to eat pasture, while standing or walking slowly |
| Ruminating |
| 4429 | Ruminating previously eaten food, while standing or laying |
| Laying |
| 1940 | Laying on the ground without performing any other relevant activity |
| Steady standing |
| 1011 | Standing almost still without performing any other relevant activity |
| Walking |
| 509 | Walking at normal pace with calm steps |
| Licking |
| 414 | Noticeably turning its neck to lick itself |
| Scratching |
| 159 | Raising one leg to scratch its head or body (also specified if scratching against a tree) |
| Running |
| 94 | Moving at high pace with quick steps |
| Drinking |
| 93 | Lowering its head to drink water |
| Calf nursing |
| 30 | Steady while nursing a calf |
Figure 4Proportion of observed behaviours of cows on the field, annotated by scientists.
Figure 5Overview of the proposed procedure for accelerometer data processing.
Figure 6Time windows extracted from original signal generated by the accelerometer and their corresponding components. (a) Raw time signal divided in 4 windows. (b) Time-domain signal and components extracted from Window 2 in Figure 6a.
Figure 7Pipeline performed within the accelerometer signal processing stage.
Features extracted from each input generated after preprocessing the accelerometer signal.
| Data Input | Feature | Description |
|---|---|---|
| Raw accelerometer axis (X,Y,Z) | Mean | Average value of signal |
| Max | Maximum value of signal | |
| Min | Minimum value of signal | |
| Q5 | 5th percentile of signal values | |
| Q95 | 95th percentile of signal values | |
| AC component (time domain) | Mean | Average value |
| STD | Standard deviation of values distribution | |
| Kurtosis | Kurtosis of values distribution | |
| Skewness | Skewness of values distribution | |
| Max | Maximum value | |
| Q5 | 5th percentile of values | |
| Q95 | 95th percentile of values | |
| AC component (freq. domain) | RMS | Root mean square spectral density |
| STD | Standard deviation spectral density | |
| Min | Minimum value spectral density | |
| Max | Maximum value spectral density |
Figure 8Detection of the scattering limits for a herd. The farthest animal assigned to that group determines the scattering radius r.
Identified animal behaviours, top-5 features used by trained RF models to classify them and their importance (MDI), averaged over the 5 RF models.
| Behaviour | Rank | Feature | Avg. MDI |
|---|---|---|---|
| Grazing | 1 | Z_AC_Q5 | 0.06798 |
| 2 | Z_AC_STD | 0.06274 | |
| 3 | Z_2Hz_RMS | 0.06189 | |
| 4 | Z_AC_Q95 | 0.06115 | |
| 5 | Z_1Hz_RMS | 0.06007 | |
| Laying | 1 | Y_Q95 | 0.06129 |
| 2 | Z_AC_Q5 | 0.05319 | |
| 3 | Y_MAX | 0.04246 | |
| 4 | Y_AC_Q95 | 0.03975 | |
| 5 | Y_MEAN | 0.03601 | |
| Ruminating | 1 | Z_AC_Q5 | 0.06787 |
| 2 | Z_AC_Q95 | 0.04863 | |
| 3 | X_Q5 | 0.04849 | |
| 4 | Z_AC_STD | 0.03537 | |
| 5 | Y_Q_95 | 0.03486 | |
| Steady standing | 1 | X_1Hz_MIN | 0.06075 |
| 2 | X_5Hz_MIN | 0.04870 | |
| 3 | X_3Hz_MIN | 0.04429 | |
| 4 | X_2Hz_MIN | 0.04194 | |
| 5 | X_AC_KURT | 0.04022 |
Performance metrics for the RF classification model. All metrics are average values over the 5 folds.
| Behaviour | Accuracy | Recall | AUC |
|---|---|---|---|
| Grazing | 0.93 | 0.945 | 0.974 |
| Laying | 0.907 | 0.611 | 0.894 |
| Ruminating | 0.881 | 0.893 | 0.967 |
| Steady standing | 0.922 | 0.58 | 0.912 |
Figure 9Example of automated detection of location and scattering of two different herds in one of the farms, near Ávila (Spain).
Examples of anomalous/interesting activities and how analysis of accelerometer and GPS data can be applied to detect them.
| Activity of Interest | Accelerometer Data | GPS Data |
|---|---|---|
| Predator attacks | Vertical axis with no movement | Quick displacement to alternative location; possible successive relocations |
| Pasture land use | Detection of grazing behaviour | Mapping of areas under use (presence longer than a certain time threshold) |
| Disease transmission | Detection of steady-standing or laying behaviours | Erratic movements; very slow transitions to alternative areas |