| Literature DB >> 29515862 |
Emily Walton1, Christy Casey2, Jurgen Mitsch1,3, Jorge A Vázquez-Diosdado1, Juan Yan1,4, Tania Dottorini1,3, Keith A Ellis5, Anthony Winterlich2, Jasmeet Kaler1.
Abstract
Automated behavioural classification and identification through sensors has the potential to improve health and welfare of the animals. Position of a sensor, sampling frequency and window size of segmented signal data has a major impact on classification accuracy in activity recognition and energy needs for the sensor, yet, there are no studies in precision livestock farming that have evaluated the effect of all these factors simultaneously. The aim of this study was to evaluate the effects of position (ear and collar), sampling frequency (8, 16 and 32 Hz) of a triaxial accelerometer and gyroscope sensor and window size (3, 5 and 7 s) on the classification of important behaviours in sheep such as lying, standing and walking. Behaviours were classified using a random forest approach with 44 feature characteristics. The best performance for walking, standing and lying classification in sheep (accuracy 95%, F-score 91%-97%) was obtained using combination of 32 Hz, 7 s and 32 Hz, 5 s for both ear and collar sensors, although, results obtained with 16 Hz and 7 s window were comparable with accuracy of 91%-93% and F-score 88%-95%. Energy efficiency was best at a 7 s window. This suggests that sampling at 16 Hz with 7 s window will offer benefits in a real-time behavioural monitoring system for sheep due to reduced energy needs.Entities:
Keywords: accelerometer and gyroscope; classification algorithm; precision livestock monitoring; sensor; sheep behaviour; signal processing
Year: 2018 PMID: 29515862 PMCID: PMC5830751 DOI: 10.1098/rsos.171442
Source DB: PubMed Journal: R Soc Open Sci ISSN: 2054-5703 Impact factor: 2.963
Figure 1.Sensor orientation for ear and collar.
Datasets types. Number of successfully extracted datasets from six different sheep for ear and collar sensors according to sampling frequency.
| ear | collar | total | |
|---|---|---|---|
| 8 Hz | 5 | 5 | 10 |
| 16 Hz | 7 | 7 | 14 |
| 32 Hz | 3 | 3 | 6 |
Definition of sheep behaviours for classification. Different behaviours in sheep used in the classifier according to the ethogram developed.
| behaviour states | description |
|---|---|
| walking | sheep moves forward in a four beat motion for 2 s or more with the head up and orientated in the direction of movement |
| standing | sheep is standing on their four legs with or without jaw movement, head up or down |
| lying | sheep lying on ground in sternal or lateral recumbency with or without jaw movement, could be ruminating or in the process of regurgitating a bolus |
Percentage of non-mixed and mixed windows. Summary of the percentage of samples that are non-mixed or mixed for the three different sampling frequencies (8, 16 and 32 Hz) and for the three window sizes (3, 5 and 7 s).
| window size | ||||
|---|---|---|---|---|
| sampling frequency | type of sample | 3 s | 5 s | 7 s |
| 8 Hz | non-mixed | 97.99 | 96.85 | 95.96 |
| mixed | 2.01 | 3.15 | 4.04 | |
| 16 Hz | non-mixed | 97.87 | 96.72 | 95.55 |
| mixed | 2.13 | 3.28 | 4.45 | |
| 32 Hz | non-mixed | 99.40 | 99.07 | 98.78 |
| mixed | 0.60 | 0.93 | 1.22 | |
Feature characteristics. Feature characteristics computed for each individual window. Here f represents the signal and fs the sampling frequency.
| feature characteristics | description/formula |
|---|---|
| interquartile range | difference between the 75th percentile and the 25th percentile value of a window |
| kurtosis | kurtosis calculated from window values |
| mean | mean of all window values |
| standard deviation | standard deviation of all window values |
| minimum value | minimum value of all window values |
| maximum value | maximum value of all window value |
| number of zero crossings | number of zero crossings in a window after subtracting the window mean value from every window sample |
| spectral entropy | power spectral density: |
| PSD = | | |
| normalized PSD: | |
| spectral entropy: | |
| dominant frequency | after applying Fourier transformation, this is the frequency at which the signal has its highest power |
| signal area | signal area: |
| Mag—acceleration or gyroscope magnitude | |
| absolute signal area | absolute signal area: |
Figure 2.Representative examples of accelerometer and gyroscope data. Accelerometer (a) and gyroscope (b) data collected for collar and ear mounted sensors with lameness score 0. Colours red, blue and yellow represent walking, standing and lying respectively. Acceleration is in g (9.81 m s−2) units.
Overall accuracy. Summary of the overall accuracy metric (in %) for sheep activity classification using both the ear-mounted and collar-mounted sensors, with window sizes of 3, 5 and 7 s with sampling frequencies of 8, 16 and 32 Hz. In bold are the overall accuracies with the highest values when comparing across window sizes. In italics are the overall accuracies with the highest values when comparing only across different sample frequencies.
| overall accuracy (%) | ||||
|---|---|---|---|---|
| window size | ||||
| sensor position | sampling frequency | 3 s | 5 s | 7 s |
| ear | 8 | 89 | ||
| 16 | 88 | 90 | ||
| 32 | ||||
| collar | 8 | 89 | 90 | |
| 16 | 90 | 91 | ||
| 32 | ||||
Weighted Cohen's κ measure. Summary of the weighted Cohen's κ to measure the level of agreement of the classification between ear and collar data for each combination of sampling frequency and window size. Values between 0.61 and 0.80 represent a substantial agreement whereas values between 0.81 and 0.99 represent an almost perfect alignment.
| Cohen's | |||
|---|---|---|---|
| window size | |||
| sampling frequency | 3 s | 5 s | 7 s |
| 8 Hz | 0.799 | 0.84 | 0.84 |
| 16 Hz | 0.883 | 0.866 | 0.892 |
| 32 Hz | 0.882 | 0.911 | 0.903 |
Performance metrics of the classification algorithm. Summary of the precision, recall, F-score and specificity metrics for sheep activity classification using both the ear-mounted and collar-mounted sensors with window sizes of 3, 5 and 7 s with sampling frequencies of 8, 16 and 32 Hz. In bold are the highest values for precision, recall, F-score and specificity when comparing across window sizes. In italics are the highest values for precision, recall, F-score and specificity when comparing only across different sample frequencies.
| window size | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| precision | recall | specificity | ||||||||||||
| sensor position | behaviour | sampling frequency | 3 s | 5 s | 7 s | 3 s | 5 s | 7 s | 3 s | 5 s | 7 s | 3 s | 5 s | 7 s |
| ear | walking | 8 Hz | 86 | 88 | 80 | 83 | 83 | 86 | ||||||
| 16 Hz | 85 | 86 | 83 | 86 | 96 | 96 | 84 | 86 | ||||||
| 32 Hz | ||||||||||||||
| standing | 8 Hz | 81 | 83 | 82 | 85 | 94 | 95 | 82 | 84 | |||||
| 16 Hz | 86 | 88 | 85 | 86 | 93 | 94 | 86 | 87 | ||||||
| 32 Hz | ||||||||||||||
| lying | 8 Hz | 94 | 94 | 93 | 93 | |||||||||
| 16 Hz | 92 | 93 | 93 | 94 | 94 | 92 | ||||||||
| 32 Hz | ||||||||||||||
| collar | walking | 8 Hz | 81 | 86 | 81 | 95 | 96 | 81 | ||||||
| 16 Hz | 85 | 88 | 89 | 88 | 96 | 87 | 88 | |||||||
| 32 Hz | ||||||||||||||
| standing | 8 Hz | 81 | 83 | 79 | 94 | 80 | 83 | |||||||
| 16 Hz | 89 | 89 | 87 | 90 | 95 | 88 | 90 | |||||||
| 32 Hz | ||||||||||||||
| lying | 8 Hz | 96 | 94 | |||||||||||
| 16 Hz | 93 | 95 | 93 | 94 | 95 | 96 | 93 | 94 | ||||||
| 32 Hz | ||||||||||||||
Energy consumption for data acquisition during classification and written to flash. Measurements of energy are express in µA h (microampere hour). Measurements were provided by Intel®.
| window size | |||
|---|---|---|---|
| measure | 3 s | 5 s | 7 s |
| no. samples/window | 48 | 80 | 112 |
| no. bytes/window | 672 | 1120 | 1568 |
| no. sample acquisition/h | 1200 | 720 | 514 |
| µA h energy (sample acquisitions/h) | 333 | 200 | 143 |
| no. bytes/h sampled | 806 400 | 806 400 | 806 400 |
| µA h energy (data processing/h) | 1000 | 1000 | 1000 |
| SRAM buffer size in bytes | 256 | 256 | 256 |
| classification record size in bytes | 8 | 8 | 8 |
| no. seconds before buffer is full and write to flash is executed | 96 | 160 | 224 |
| no. writes per hour | 38 | 23 | 16 |
| µA h energy (writes to flash) | 10 | 6 | 4 |