key: cord-0930546-rp07rtl7 authors: Vandermeulen, Joris; Bahr, Claudia; Johnston, Dayle; Earley, Bernadette; Tullo, Emanuela; Fontana, Ilaria; Guarino, Marcella; Exadaktylos, Vasileios; Berckmans, Daniel title: Early recognition of bovine respiratory disease in calves using automated continuous monitoring of cough sounds date: 2016-11-01 journal: Comput Electron Agric DOI: 10.1016/j.compag.2016.07.014 sha: 43b1ac395488dea68103db51bbc449285155d496 doc_id: 930546 cord_uid: rp07rtl7 Bovine respiratory disease (BRD) complex in calves impairs health and welfare and causes severe economic losses for the Stockperson. Early recognition of BRD should lead to earlier veterinary (antibiotic/anti-inflammatory) treatment interventions thereby reducing the severity of the disease and associated costs. Coughing is one of the clinical manifestations of BRD. It is believed that by automatically and continuously monitoring the sounds within calf houses, and analysing the coughing frequency, early recognition of BRD in calves is possible. Therefore, the objective of the present study was to develop an automated calf cough monitor and examine its potential as an early warning system for BRD in artificially reared dairy calves. The coughing sounds of 62 calves were continuously recorded by a microphone over a three-month period. A sound analysis algorithm was developed to distinguish calf coughs from other sounds (e.g. mechanical sounds). During the sound recording period the health of the calves was assessed and scored periodically per week by a trained human observer. Calves presenting with BRD received antibiotic and/or anti-inflammatory treatment and the dates of treatment were recorded. This treatment date reference served as a comparison for the investigation of whether an increase in coughing frequency could be related to calves developing BRD. The calf cough detection algorithm achieved 50.3% sensitivity, 99.2% specificity and 87.5% precision. Four out of five periods, where coughing frequency was observed to be increased, coincided with the development of BRD in more than one calf. This period of increased coughing frequency was always observed before the calves were treated. Therefore, the calf cough monitor has the potential to identify early onset of BRD in calves. Bovine respiratory disease (BRD) is a multifactorial disease in cattle caused by a variety of pathogens. It affects both the upper and lower respiratory tract and the lungs of cattle (Poulsen and McGuirk, 2009 ). BRD involves a wide variety of infectious agents. These include viruses such as bovine respiratory syncytial virus (BRSV), parainfluenza type 3 virus (PI3), bovine coronavirus, bovine viral diarrhoea virus and bovine herpes virus 1 (BHV-1), as well as bacteria such as Mannheimia haemolytica, Histophilus somni, Pasteurella multocida and Mycoplasma bovis. BRD is a significant cause of morbidity and mortality in calves (Busato et al., 1997; Dutil et al., 1999; Windeyer et al., 2014) . Busato et al. (1997) monitored 100 Swiss suckler beef herds from birth to wean-ing, in one generation of calves, and reported a pre-weaning calf mortality rate of five per cent. Over 50% of these mortalities were due to respiratory disease. Similarly, in a study of 467 suckler beef herds in Canada, Dutil et al. (1999) reported a pre-weaning calf mortality rate of 5.4% in herds with less than 40 females, and 5.6% in herds with 40 or more females. Of these recorded cases of mortality, 12.8-17.5% was due to respiratory disease. Windeyer et al. (2014) observed a case fatality risk for BRD of 7.1% in dairy heifer calves on commercial dairy farms in Minnesota and Ontario. In the Republic of Ireland, respiratory disease is the main cause of mortality in calves from one to three months of age. Almost 30% of calves between one and three months of age submitted to the Veterinary Laboratory Service in 2012 for necropsy died as a result of respiratory disease (All-Ireland Animal Disease Surveillance Report, 2012). Recognised risk factors for dairy calf mortality during the rearing period include calf birth weight, colostrum intake, milk feeding practices, housing, age at weaning and exposure to infectious disease (Brickell et al., 2009a, b; Sivula et al., 1996; Speicher and Hepp, 1973) . However, the impact of these risk factors on calf mortality is often inconsistent across studies (Brickell et al., 2009a,b) . The BRD complex causes major economic and welfare losses (Healy et al., 1993; Stanton et al., 2012) . There are substantial costs associated with mortality, antibiotics and/or anti-inflammatory treatment, and poor life-time performance of affected calves. An economic model from 2001 estimated the average loss for a typical Dutch farm with 60% of the heifers affected by BRD at €31.20 per animal (van der Fels-Klerx et al., 2001) . In general calves diagnosed with BRD are treated with antibiotics and/or anti-inflammatory drugs. Recovery following treatment depends on how early the disease is diagnosed and treated (Cusack et al., 2003) . Earlier recognition of BRD would reduce the severity of the disease and decrease the costs for the Stockperson. Currently, BRD is detected by means of clinical signs including increased rectal temperature, abnormal breathing patterns, reduced feed intake, coughing, nasal or eye discharge (Poulsen and McGuirk, 2009) . Treatment with antibiotics is normally initiated as soon as these symptoms are observed. However, detecting the disease in an earlier state, before the appearance of clinical symptoms, is more difficult. Automated and continuous monitoring of calves through Precision Livestock Farming (PLF) Wathes et al., 2008) technology is an approach that has potential for recognition of BRD before the appearance of clinical manifestations of the disease. Infrared thermography has been used to detect the onset of BRD in calves (Schaefer et al., 2012) and image analysis has been used for the detection of lame cows (Viazzi et al., 2014) and disease in pigs (Kashiha et al., 2013; Weixing et al., 2009) . A cough sound monitor has previously been used for the detection of respiratory disease in pigs (Van Hirtum et al., 1999; . Further studies reported the use of an online, cough monitoring system (Exadaktylos et al., 2008; Guarino et al., 2008) , demonstrated that coughing sources could be localised and that the cough monitor could be used for the detection of respiratory diseases in pigs (Finger et al., 2014) . However, this technology has not been evaluated to date for calves, although it has been shown that it is possible to differentiate between mechanical and calf cough sounds (Ferrari et al., 2010) . Thus PLF technologies offer great potential in adding value to the Stockperson by reducing the severity of BRD and associated costs through earlier intervention. Other approaches of PLF specifically with sound analysis worth mentioning are for instance, the detection and counting of screams in pigs for stress assessment (Schön et al., 2004; Moura et al., 2008a; Vandermeulen et al., 2015) . Acoustic monitoring was also used to estimate the dry matter intake of grazing sheep (Galli et al., 2011) . Techniques used in human speech processing were applied to recognise different cow calls (Jahns, 2008) . Sound analysis deduced the thermal comfort of chicks (Moura et al., 2008b) and the differences in sound between a feather pecking flock and a non-feather pecking flock (Bright, 2008) . The objective of this study was to develop a cough monitor for calves to provide a warning system for early recognition of BRD. The approach involved; (1), constructing a cough monitor algorithm based on sound data recorded during calf rearing over a 60 day period in three separate calf houses; (2), assessing the algorithm performance with sensitivity and specificity metrics; (3), comparing the algorithm outcome with a gold standard for BRD using the Wisconsin clinical respiratory score (Lago et al., 2006) combined with rectal temperature. A further objective was to evaluate the algorithm outcome in terms of an early warning system and compare it with the timing of treatment of calves presenting with BRD by the veterinarian. All animal procedures performed in this study were conducted under experimental licence (B100/2869) from the Irish Department of Health and Children in accordance with the Cruelty to Animals Act 1876 and the European Communities (Amendment of Cruelty to Animals Act 1876) Regulation 2002 and 2005. A total of sixty-two male Holstein-Friesian (H-F) and Jersey (J) calves were housed in mixed groups in three calf houses with sawdust covered floors at Teagasc, AGRIC, Grange, from the 21st of March to the 11th of June 2013 (82 days). The number, age and weight of calves, per breed, at the start of the study, in each respective house are shown in Table 1 . Each house was an open-fronted shed with three solid walls and a galvanised monopitch roof and measured 6.77 m (length) by 4.56 m (width). Fig. 1 shows a picture of the house, calves and microphone. The recording microphone was positioned in the centre of each house at a height of 2.75 m above the sawdust covered floor of each house. The houses were adjacent to each other; house 1 was adjacent to house 2 and house 2 was adjacent to house 3. Calves were fed a diet with a 23% crude protein (CP), 18% lipid, milk replacer (MR) (Blossom Easymix; Volac, Co. Cavan, Ireland) and concentrate (26.5% barley, 25% soya, 15% maize, 12.5% beet pulp, 12.5% soya hulls, 5% molasses, 2.5% minerals, 1% vegetable oil (18.8% CP, 22.4% neutral detergent fibre)) using an electronic feeding system (Foster-Tecknik SA 2000, Engen, Germany). During the weaning phase, MR was gradually reduced from its previous allocation over a 14 d period (d À13 to d 0). By d À1, all calves were consuming at least 1 kg of concentrate daily for three consecutive days. On d 0, MR was eliminated from the diet of all calves. Calves were immunised on arrival at Teagasc, AGRIC, Grange against BHV-1, PI-3, BRSV, Mannheimia haemolytica serotypes A1 and A6 and Salmonella dublin and Salmonella typhimurium using Rispoval IBR-Marker live, Bovipast RSP and Bovivac S vaccines, respectively. Calves received a second booster vaccination with Bovipast RSP four weeks after arrival as per manufacturer's instructions. Clinical assessments were performed by a trained human observer on all calves at least twice a week during the pre-weaning period and once per week during the post-weaning period. These assessments included the monitoring and recording of; rectal temperature, presence of a cough (none, induced, spontaneous cough or repeated induced coughs, repeated spontaneous coughs), ear position (normal, ear flick or head shake, unilateral droop, head tilt or bilateral droop), presence of nasal discharge (none, small amount of unilateral discharge, bilateral or excessive discharge, copious bilateral discharge) and presence of ocular discharges (none, small amount, moderate amount of bilateral discharge, heavy discharge). The Wisconsin health scoring criteria were used to create a cumulative respiratory score (RS) from the results of the calves' clinical assessments (Fig. 2) . Then RS was devised from the cumulative score for nasal discharge, eye or ear score (whichever was greatest), cough and rectal temperature. These respiratory disease assessment criteria were approved by the University of Wisconsin Research Animal Resources Centre Animal Care and Use Committee (Lago et al., 2006) . A calf was considered to have respiratory disease if it had an RS of 5 or higher, and a rectal temperature of at least 39.5°C. In this study the combined RS and rectal temperature were regarded as gold standard one (GS1) for positive identification of calves with BRD. On d À14, À6, À3, 0, 1, 3, 8, and, 14 relative to weaning (d 0), calves were blood sampled via jugular venepuncture for subsequent haematological analysis of neutrophil profiles. Blood samples were collected in 6 ml K 3 Ethylenediaminetetraacetic acid (K 3 EDTA) tubes (Vacuette, Cruinn Diagnostics, Ireland). Whole K 3 -EDTA blood samples were analysed immediately after collection using an ADVIA 2120 analyser (ADVIA 2120, Bayer Healthcare, Siemens, UK) which contained software necessary for the analysis of bovine blood. The normal reference interval for blood neutrophils is between 600 and 4000/ll of whole blood (Jones and Allison, 2007) . A calf with a neutrophil number greater than 5000/ll was considered to have a heightened inflammatory response. This measure was used as a second gold standard (GS2) for positive identification of calves with BRD. One H-F and one J calf died from pneumonia during the preweaning period. One H-F calf and one J calf were removed from the study after weaning and placed in an isolation pens due to severe pneumonia. The calves were treated when they presented with signs of BRD. A veterinarian examined all clinically ill calves, reviewed the GS1 indicated by the human observer and made the decision to treat the calves with antibiotics and/or anti-inflammatory drugs based on his/her diagnosis. Each house was equipped with the hardware of the pig cough monitor (SoundTalks, Belgium). It consisted of one microphone (C-4 Small Diaphragm Condenser Mic, Behringer, Germany) and a sound Card (MAYA44, ESI, Germany). The sound was recorded in wave format with 16 bit precision and a sampling frequency of 22,050 Hz. The sound was continuously recorded from the 1st April to the 31st May 2013. In total 4320 h of data were collected. In order to develop a classifier to distinguish calf coughs from other sounds, a reference data set was required. From the recorded sound data, the start and end time of each calf cough present in the sound file were identified by a human labeller off-scene using audio-visual scoring of sound on a computer (Aerts et al., 2005; Tullo et al., 2013) . In total 205 min of the recorded sound data were labelled by a human labeller. This resulted in 385 labelled calf coughs. The total number of calf coughs labelled per house is shown in Table 2 . More sounds were labelled in house 1 because the algorithm would initially be developed on house 1, thereby using 66% of the labelled data of house 1 (training set). The algorithm was later validated using the remaining labelled sound data recorded in houses 1, 2 and 3. Moreover, the labeller commented that the recordings from house one and two sounded similar but recordings from house 3 were different. The latter sounded quieter as if the quality was lower. The algorithm to detect cough sounds consisted of three parts: the sound event detection, the feature calculation and the classification. The sound event detection determined possible events in the recorded sound data that could be calf coughs. Subsequently, sound features were calculated per sound event which were finally used by the classifier to determine if the sound event was a cough. A final calibration was added to the algorithm to reach an accept- able performance in all houses. The algorithm was developed and run on 60 days of data for each house on a desktop pc running a commercial software package (MATLAB 8, The MathWorks Inc., USA). Initially, all the possible events in the sound data that could contain a cough were detected by the event detection. The sound event detection was based on a method for detecting sound events used for human cough detection (Barry et al., 2006) . The method detected events by searching for sudden differences in the standard deviation of the recorded sound. These sound events could be calf coughs, bird sounds, creaking of the fence, etc. Finally, 5739 events, including the 385 labelled coughs, were found in the labelled sound data. Thus, 385 per 5739 or one per fifteen sound events detected was considered a cough. The feature calculation divided the sound events into 30 ms hamming windows (Oppenheim and Schafer, 1989 ) with a 15 ms overlap. These numbers were chosen similar to speech analysis in which 20-40 ms windows are used (Paliwal et al., 2010) . On each window the Fast Fourier Transform (FFT) was calculated. Since background noise was still present in these windows a simple noise reduction method was applied. The background noise of each window was removed by subtracting the averaged window. This averaged window was calculated as the average of the adjacent windows. In total, one minute of adjacent windows were used for this averaged window. Finally, the values were transformed in decibel (dB) scale. To reduce the information contained in these windows and to make a rough spectrogram the frequency values were summed together in twelve linear spaced frequency bands. Afterwards, three subsequent windows were summed together. In Fig. 3 , the spectrogram, the spectrogram with the average subtracted and, the rough spectrogram is shown for two coughs. After the rough spectrogram was calculated, the algorithm calculated the 'duration' of the cough. As calf coughs have been found to have an average duration of 0.37 s (Ferrari et al., 2010) . The duration was calculated from the rough spectrogram. Instead of calculating only one duration, different durations were calculated to make the algorithm more robust (Fig. 4) . The calculation was done in different steps. In step 1, the frequency values were summed together for each time period. In step 2, we went from the highest value to the lowest value of step 1 in ten levels. These are displayed as red 1 arrows in Fig. 4 . The length of each arrow was the duration of that level. To reduce the information in this feature a straight line was fitted through the durations based on reducing the squared error (Fig. 4) . First the red arrows were aligned to the left, then the green line was fitted through the right arrows. The final properties of this straight line, slope and intercept, were called the duration features. Another feature calculated the number of peaks in the rough spectrogram. All the frequency values were summed together as in step 1 of the duration calculation. Several sound events had multiple peaks as seen in Fig. 5 , while for coughs, multiple peaks were not observed. Therefore, this feature expressed whether there were multiple peaks present in the spectrogram. In Fig. 5 , a non-cough sound is shown with the detected peaks. The peaks are required to be further than 0.1 s from each other before they are detected as two different peaks. Each sound event had to be classified as either a cough or another sound. The performance of the classification was measured with the sensitivity, specificity and precision. In these formulas the coughs classified as cough by the classifier were the true positives, the unclassified coughs were the false negatives, the correctly classified other sounds are the true negatives and the wrongly classified other sounds were the false positives. Due to the fact that only one out of fifteen sound events were coughs, a classification with a high specificity was needed. A preliminary calculation determined that the classifier that would detect all the coughs (n = 385) and only half that number of other sound (n = 167) would require a specificity of 96.7%. However, detecting all coughs would mean 100% sensitivity which is unrealistic for such a high specificity. Therefore, the desired sensitivity had to be lowered in order to increase and the desired specificity had to be increased. In order to visualise the coughing trend in the calf houses, we need (1), to detect at least 50% of the labelled coughs i.e. a sensitivity of 50%. (2), that the majority of the detected events were coughs i.e. a precision of at least 75%. This required a target performance with a specificity of at least 98%, a precision of more than 75% and a sensitivity above 50%. The classification was based on the features calculated under Section 2.9.2 : the duration, the peaks and, the rough spectrogram. The classification was made on 66% of the labelled data from house 1 and afterwards validated on the remaining data from house 1, and the data from houses 2 and 3. Therefore, the initial dataset from the labelled sound files of house one was randomly divided into an example set and a validation set. The example set or training set consisted of 169 coughs and 2698 other sounds events. To achieve the chosen target performance, the example based classifier that was used was based on the rough spectrogram and subsequently, two more rules were added, based on duration and peak information. The example based classifier compared the rough spectrum values of a sound event on each time and frequency value with those of a labelled cough. The comparison was done with the Euclidean distance between the two rough spectrograms. This resulted in a Euclidean distance value per sound event. The lower the value the more a sound event resembled the labelled cough. If F ijl represents the rough spectrogram of sound l at time i and at frequency j and G ijm the rough spectrogram of labelled cough m, then the Euclidean distance e lm between both is calculated as There was a big spread in resemblances between the rough spectrograms of labelled coughs. A few sound events labelled as coughs did not have a comparable rough spectrogram to the majority of labelled coughs. Other sound events labelled as coughs were only comparable to a restricted number of other labelled coughs. To consider these irregular coughs, a weighted threshold was developed on the Euclidean distance value. The higher the threshold, the more a sound event could deviate from that labelled cough, or the higher the Euclidean distance value could be. This threshold was chosen as the highest Euclidian distance value which achieved a precision of 90% for that specific labelled cough in the training set. This method is a simplified version of a pig cough detection algorithm from the literature . This version is faster compared with their use of a dynamic time warping method (Rabiner and Juang, 1993) . The threshold t m for each labelled cough m had to fulfil the following equation in which the result between square brackets is either 1 if true or 0 if false. The threshold was found by exhaustively going over all thresholds t m . These threshold calculations were made on the training set of 66% of the labelled data of house 1. Each detected sound event received a value per labelled cough. Any sound event which was below the threshold, was classified as a cough. This gave a precision of 70% on the training set which was inadequate compared to the chosen target. To improve the classification, two more features, the peaks and the duration, were added. Coughs could not have more than one peak as seen in Fig. 3 and in Fig. 5 . This improved the precision to 73%. Additionally, the duration was limited by an empirical threshold equal to 3 units in the rough spectrum for the intercept values of the duration, leading to a precision of 79%. Finally, to consider the difference in recordings between the three houses, a second version of the algorithm was developed which had a calibration step after the calculation of the rough spectrogram. The purpose of the calibration step was to improve the algorithm's performance to an acceptable level in all three houses, 3 because the algorithm was developed on recordings of house 1 and performed poorly in house 3. First, the calibration calculated the average rough spectrogram of labelled coughs in houses 1, 2 and 3. In the following formula X ij represents the time-frequency value of the average rough spectrogram at time i and at frequency j. F ijkl represents the value of rough spectrogram number l at house k. Furthermore, n k is the total number of cough spectrograms in house k. The ratio per time-frequency value of the averaged rough spectrograms between house 1 and house 2 (R2 ij ), and between house 1 and house 3 (R3 ij ) was calculated as Subsequently, this ratio was used to normalise or calibrate the rough spectrogram of each sound event in houses 2 and 3, to better resemble the sound events in house 1. The time-frequency value CF ijkl of this calibrated spectrogram for house k can be represented as In the present study a cough monitor was developed for calves which is capable of providing an early warning system for BRD recognition. Initially, the performance of the calf cough algorithm will be discussed. Subsequently, the algorithm's results of the number of coughs recorded are shown for sixty days in all three houses. The number of coughs were later compared with the two gold standards. Finally, the number of coughs that coincided with the days of treatment, as described Section 2.6, were examined. Two algorithm versions, one without and one with the calibration step were developed. The performance of these algorithms is shown in Table 3 . The most important requirement was to achieve a specificity higher than 98% which both algorithms attained. The algorithm with calibration applied in house 3 achieved 100% specificity. The sensitivity of the algorithm with calibration applied in houses 1 and 2 was always higher than 50%, respectively 57.52% and 50.82%, so these met the criteria. In house 3, the algorithm without calibration underperformed with only 16% sensitivity while the algorithm with calibration performed at 42%. The precision was always above 75% which indicates that three out of four detected sounds were calf coughs. Despite, using a specificity higher than 98%, only 75% of the detected sounds were coughs in house 1. The algorithm needs on average 96 min for one day of data on a desktop pc as described under Section 2.9. The results of the calibrated algorithm over the period from the 1st April to the 11th June are shown for each house in Figs. 6-8. These figures show the number of coughs detected per hour. In houses 1 and 2, 48 and 36 coughs, respectively, were detected on average per hour, while in house 3 only 16 coughs were detected per hour. The algorithm data of houses 1 and 2 show that most coughs were detected between 23:00 h and 12:00 h. In total 38% more coughs per hour were detected during this period. To detect periods of increased coughing, Figs. 6-8 were visually assesed. When the number of coughs increased from a constant low level we regarded it as the start of an increased coughing per- Table 3 The performance of the algorithm on the labelled data for each calf house. The results for house 1 are divided between training and validation data. The other houses provided validation data only. In these houses the results are divided between the non-calibrated and the calibrated data. House iod. In house 1, in Fig. 6 , two relative increases in cough number were detected using the visual approach. There was a sharp increase in coughing on the 19th April which was named period 1. This was followed by a further increase between the 20th and the 26th May occurring usually in the morning hours and this increase was named period 2. In house 2, in Fig. 7 , three relative increases in cough numbers were detected. On the 3th April there was a small increase in cough numbers (period 1). Afterwards there were two increases between the 20th April and the 25th April (period 2), and between the 21th and the 23rd May (period 3). In house 3, in Fig. 8 , no periods with increased cough numbers were detected. The number of calves with high rectal temperature and high RS (GS1) and with high neutrophil number (GS2) were compared to the increased coughing periods (Figs. 9-11 ). The number of calves treated for BRD is also shown. It is evident that a greater number of calves presenting with BRD (GS1) were present in house 1 and 2 than in house 3. In total 24, 14 and, 6 animals presented with BRD in house 1, 2 and, 3 respectively. This is also supported by the number of coughs detected by our algorithm. In house 1, in Fig. 9 , GS1 indicated calves presented with BRD between the 8th and the 10th April but this did not correspond to an increased number of coughs. However, the calves in house 1 received a booster vaccination on the 9th April which may have induced some clinical manifestations of BRD. In Fig. 9 , the first increased coughing period (period 1, Fig. 6 ) coincided with three cases of BRD determined by GS1. The data shows that one calf had BRD on the 18th April and two different calves had BRD on the 21st April. The second increased coughing period (period 2, Fig. 6 ) also coincided with calves presenting with BRD on the 23rd (two cases) and the 27th May (two new cases). However, on the 21st May no calves presented with BRD. There was only limited data from GS2. On the 13th of May two calves had a higher GS2 (neutrophil) value. These GS2 values did not coincide with an increased coughing period. In house 2, three periods with increased coughing were detected before calves presented with BRD using GS1 (Fig. 10) . For the first period, increased number of coughing sounds were detected on the 3th April but no calves presented with BRD using GS1. On the 5th April two calves presented with BRD. Therefore, coughing sounds (period 1, Fig. 7) were detected a day before clinical signs were observed (GS1). For period 2, no calves presented with BRD using GS1 on the 18th April. Five calves presented with BRD on the 23rd April which coincided with this period 2 of increased coughing (Fig. 7) . During period 3, no calves presented with BRD using GS1. The limited dataset of GS2 showed a clear increase in neutrophil number during the second coughing period. A total of six calves had higher values for GS2 on the 23rd April, confirming period 2 of increased coughing. However, between the 29th April and the 13th May, several calves had higher GS2 values which were not confirmed by GS1 or by increased coughing. In house 3, in Fig. 11 , there were no periods of increased coughing. There was never more than one calf presenting with BRD according to GS1 at any time. However, the GS2 of three calves was increased on the 13th May. The periods of increased coughing were compared to the times when the calves were treated for BRD (Figs. 9-11 ). Most calves were treated in house 1 (23 treatments in total) while in house 2 and house 3 calves received 12 and 5 treatments, respectively. Figs. 9 and 10 showed that during or after each period of increased coughing at least one animal was treated. In house 1, two calves were treated after the first coughing period. Furthermore, two calves were treated during the period 2, and three calves were treated after period 2. In house 2, the first, second and third period of increased coughing, respectively, corresponded to treatment for BRD of two, four and, one calf. In house 3, only five calves were treated for BRD in total. Moreover, in each house, on several occasions, calves received repeated treatments for BRD which did not correspond to periods of increased coughing. The algorithm attained a sensitivity of 57%, 51% and 43%, for houses 1, 2 and 3, respectively, which is lower than values reported for algorithms used to detect pig coughs (Chung et al., 2013; Guarino et al., 2008; . These authors reported sensitivities ranging from 85% to 94% (Table 4) . However, the main difference between the present study and the reported literature (Chung et al., 2013; Guarino et al., 2008; is the ratio of number of cough sounds to total number of sounds. The ratio in these studies was between 60% and 26.9% while in the present study it was only 6.3%. Due to this ratio, the specificity was regarded as more important than the sensitivity in the present study. Table 4 shows the ratio, sensitivity, specificity and precision of this study's algorithm and the algorithms from literature. The table shows that the current algorithm attained a similar precision compared with literature while having a greater number of other sounds and a smaller ratio of cough sounds to total sounds. This resulted in a superior specificity compared to the other studies. Different to existing studies, our method was developed and tested in three different houses. Therefore, a calibration step was added to the algorithm in the present study as described under Section 2.9.4. The calibration step considered the difference in recordings between the three houses. These differences could possibly be explained by different building acoustics of the houses or a different set-up of the sound recording equipment. The performance results of Table 3 shows that the recordings of house 3 were more different compared to the two other houses. This difference in recording had previously been remarked by the labeller. The table further shows that the calibration step improved the performance in house 3 as intended but decreased the sensitivity with two percent in house 2 ( Table 3 ). The reason for the decreased sensitivity was not investigated as the performance was still acceptable. This showed that calibration mainly improved the house that sounded differently and this difference will most likely happen in practice. This performance difference also demonstrates that applying the pig coughing algorithms as described in literature on another experimental set-up is probably not straightforward. Lastly, it was concluded that the algorithm with calibration step applied in house 3 was too strict (Table 3) as the specificity and precision were both 100% and the sensitivity was below 50%. However, the algorithm was not modified as it was decided that 42% sensitivity was acceptable. In order to check if 50% sensitivity is sufficient for practical use, the performance of the algorithm was assessed against periods when calves presented with BRD as determined by gold standards. First we determined the periods of increased coughing based on visual inspection of data from Figs. 6-8. When the number of coughs increased from a constant low level we regarded it as the start of an increased coughing period. The GS's indicated BRD at discrete times, while the calf cough algorithm provided information on a continuous basis. Although, the GS's indicate BRD, they do not indicate if the BRD caused an increase in the number of coughs. As the symptoms of BRD vary, it is possible that calves may present with clinical manifestations of BRD, but do not develop a cough (Van der Fels-Klerx et al., 2002) . Four out of the five indicated coughing periods coincided with an increase in the number of calves presenting with BRD. For example, period 1 in house 1 coincided with the increase of BRD cases from one to two different calves over five days. So in total three different calves were detected as being sick. However, there were no GS scores recorded in between these two days. A similar increase in the number of calves presenting with BRD was observed for every detected period with an increased coughing frequency, except for the last period of increased coughing frequency in house two. In house 3 we did not find an increased coughing period which was confirmed by the GS1. Based on these results, we decided that detecting more than one calf presented with BRD is possible based on visually analysing Figs. 6-8. The data used for the GS2 (neutrophil number higher than the reference range) was only available during two increased coughing periods. In house 1, GS2 failed to indicate BRD in the increased coughing period nr.2 (Fig. 9 ) contrary to GS1, while in house 2, GS2 indicated BRD in the increased coughing period nr.2 consistent with GS1. However, in house 2, GS2 suggested that more calves presented with BRD than GS1 on 2nd May. In house 3, GS2 indicated that there were calves presenting with BRD but this did not correspond to either GS1 or an increased coughing period. Therefore, it appears that GS1 was better correlated than GS2 with the increased coughing periods. This may be because an increase in neutrophil number may be caused by many other infections or stresses other than BRD (Carroll and Forsberg, 2007) while the GS1 scoring was specific for symptoms of BRD (Lago et al., 2006) . Recently, research compared blood samples to the number of coughs from pigs (Finger et al., 2014) . They could relate an increase in pig coughs to Mycoplasma Hyopneumoniae and Swine Influenza Virus. If the increased coughing periods can be detected by the algorithm before clinical signs are noticeable, then there is an added value in an early warning system for the Stockperson. Therefore, we analysed the time between an increased coughing period and treatment for BRD. The animals were always treated after or during a period of increased coughing (Figs. 9 and 10 ). This suggests that the veterinarian could have started the treatment earlier. How much earlier the treatment could have started is dependent on when the algorithm detects an increased coughing period. In the current paper this detection was not yet automated but visually assessed based on the number of coughs. Therefore, it was not possible to quantify how much earlier. These results show for the first time that detection of coughs may indeed be an early warning system for calves presenting with BRD. Instead of only using visual inspections in the calf house to detect BRD an automated cough detection method can assist the Stockperson in recognising BRD. If the final algorithm would be able to indicate increased coughing before BRD is recognised by other means, the animals would be treated earlier. This would reduce the severity of the disease (Cusack et al., 2003) and decrease the costs for the Stockperson. Moreover, the method could decrease the use of antibiotics and/ or anti-inflammatory drugs because animals are treated in an earlier stage. This may help reduce the growing antibiotics resistance trend (Graveland et al., 2010) . Additionally, animals remaining sick for shorter periods would improve animal welfare. When analysing Figs. 6-8, it was observed that during the increased coughing periods most coughs were concentrated in the morning. Between 23 h and 12 h there were on average 38% more coughs than between 13 h and 22 h. The greater number of coughs could be explained due to husbandry management between 7 h and 12 h (including feeding and cleaning, replenishing of bedding, health observations) disturbing the calves. Calves were consequently more active in the morning hours than during the afternoon. Furthermore, the periods of increased coughing in houses 1 and house 2 were close to each other in time as seen in Figs. 9 and 10. Period 1 of house 1 lasted from the 19th to the 21st April while period 2 of house 2 lasted from the 20th to the 25th April. Period 2 in house 1 lasted from the 20th to the 26th May while period 3 of house 2 lasted from the 21st to the 23th May. This agreement was likely due to the transfer of infection between houses as they were adjacent to each other. An early warning system to support diagnosis of BRD in calves was proposed based on the detection of calf coughs using a continuous, automated, sound algorithm. This calf cough detection algorithm achieved on average 50.3% sensitivity, 99.2% specificity and 87.5% precision. Even with the low sensitivity a total of five periods with increased coughing were observed. For all five periods, a number of calves were treated for BRD during or after the observed coughing period. This indicates that automated detection of coughs may be an early warning system for calves presenting with BRD. This automated cough detection method could thus assist the Stockperson in recognising BRD alongside visual inspections in the calf house. The views expressed in this publication are the sole responsibility of the author(s) and do not necessarily reflect the views of the European Commission. Neither the European Commission nor any person acting on behalf of the Commission is responsible for potential uses of this information. The information in this document is provided with no guarantee or warranty that the information is fit for any particular purpose. The user thereof uses the information at his or her sole risk and liability. Labeling of cough data from pigs for on-line disease monitoring by sound analysis Animal Disease Surveillance Report The automatic recognition and counting of cough Basic principles of PLF: gold standard, labelling and field data Vocalisations and acoustic parameters of flock noise from feather pecking and non-feather pecking laying flocks Mortality in Holstein-Friesian calves and replacement heifers, in relation to body weight and IGF-I concentration, on 19 farms in England Effect of management factors and blood metabolites during the rearing period on growth in dairy heifers on UK farms Calf health in cow-calf herds in Switzerland Influence of stress and nutrition on cattle immunity Automatic detection and recognition of pig wasting diseases using sound data in audio surveillance systems The medicine and epidemiology of bovine respiratory disease in feedlots A questionnaire on the health, management, and performance of cow-calf herds in Québec Real-time recognition of sick pig cough sounds Cough sound description in relation to respiratory diseases in dairy calves Practical Application of the Pig Cough Monitor in a German Fattening pig Herd with PRDC International Pig Veterinary Society Acoustic monitoring of short-term ingestive behavior and intake in grazing sheep Methicillin resistant Staphylococcus aureus ST398 in veal calf farming: human MRSA carriage related with animal antimicrobial usage and farm hygiene Field test of algorithm for automatic cough detection in pig houses Morbidity and mortality in a large Irish feedlot; microbiological and serological findings in cattle with acute respiratory disease Call recognition to identify cow conditions-a call-recogniser translating calls to text Evaluation of the ruminant complete blood cell count The automatic monitoring of pigs water use by cameras Calf respiratory disease and pen microenvironments in naturally ventilated calf barns in winter Real time computer stress monitoring of piglets using vocalization analysis Noise analysis to evaluate chick thermal comfort Discrete-Time Signal Processing Preference for 20-40 ms window duration in speech analysis Respiratory disease of the bovine neonate Fundamentals of Speech Recognition The non-invasive and automated detection of bovine respiratory disease onset in receiver calves using infrared thermography Automated recording of stress vocalizations as a tool to document impaired welfare in pigs Cough localization for the detection of respiratory diseases in pig houses Management practices and risk factors for morbidity and mortality in Minnesota dairy heifer calves Factors associated with calf mortality in Michigan dairy herds The effect of respiratory disease and a preventative antibiotic treatment on growth, survival, age at first calving, and milk production of dairy heifers Precision livestock farming: an overview of image and sound labelling Effects on productivity and risk factors of Bovine Respiratory Disease in dairy heifers; a review for the Netherlands On-line cough recognizer system Fuzzy approach for improved recognition of citric acid induced piglet coughing from continuous registration Automatic detection of chronic pig coughing from continuous registration in field situations Comparison of a three-dimensional and twodimensional camera system for automated measurement of back posture in dairy cows Discerning pig screams in production environments Is precision livestock farming an engineer's daydream or nightmare, an animal's friend or foe, and a farmer's panacea or pitfall? Automated detection of sick pigs based on machine vision Factors associated with morbidity, mortality, and growth of dairy heifer calves up to 3 months of age The authors gratefully acknowledge the European Community for financial participation in Collaborative Project EU-PLF KBBE.2012.1.1-02-311825 under the 7th Framework Programme.The authors acknowledge SoundTalks NV (Kapeldreef 60, 3001 Heverlee, Belgium) for their support in providing the hardware and the continuous service of the sound recording system.