Received date: January 11, 2019; Accepted date: January 21, 2019; Published date: January 31, 2019
Citation: Stalder KJ, McNeil BM, Diaz JAC, Stock JD, Parsons TD, et al. (2019) Development of Sow Lameness Classification Trees Using an Embedded Microcomputer-based Force Plate in a Commercial Setting. J Anim Sci Livest Prod Vol. 2 No.2:06. doi: 10.21767/2577-0594.10006
Copyright: © 2019 Stalder KJ, et al. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Background and Objectives: The objectives of this study were: 1) to examine the relationship between forces applied by each leg as measured by the force plate and the degree of visually assessed lameness under conditions applicable to a commercial herd, and 2) to develop an automated lameness detection algorithm based on the force plate output.
Methods and Findings: The microcomputer-based embedded force plate system provides an objective approach to lameness detection by measuring the force generated by each individual limb. The force plate device was installed within an Electronic Sow Feeder (ESF) and used to monitor a subset of the 120 multiparous gestating sows housed in a dynamic group over a 21 day period. Each day sows entered the ESF station one at a time to eat. At times when the sow stood squarely and applied pressure to all quadrants of the device, the force applied by each foot was recorded once per second. Sows were visually scored for the presence of lameness using a four-point scale (0=normal to 3=severely lame) on a weekly basis and classified based on this visual assessment as non-lame (score ≤ 1) or lame (score ≥ 2). An ensemble learning method called Random Forest was used to identify the optimal decision tree for classifying the force plate data into similar categories of non-lame and lame. A Kappa Statistics test was used to measure the level of agreement between the visual scoring and force plate results. Changes in lameness status, as well as the first day of lameness identification for each detection method, were also analyzed. Seven variables were included in the classification tree with the most weight given to the difference between the forces applied to the 2 hind legs. The two lameness detection methods assigned the same lameness classification in 95% of cases and had substantial agreement (Kappa Statistic=0.79; P<0.05). However, the classification tree algorithm detected lameness almost 5 days earlier than the visual scoring system (P<0.001). Additionally, comparing lameness of sows from the time of entry into the group, showed an increase in lameness after the first week regardless of the lameness scoring method.
Conclusions: Lameness detection typically is based on subjective visual evaluation, which requires time, training, and can be biased between and within individuals. Results demonstrate that under conditions applicable to a commercial herd, the force plate can accurately detect lameness sooner than a weekly visual lameness assessment.
Keywords: Sow; Lameness detection; Force plate; Weight distribution
Lameness is a major concern for swine producers as it negatively affects sow welfare and farm profitability . Lameness is one of the most common reasons for involuntary sow removals  and could become a larger concern as the swine industry transitions to group sow housing systems . It is estimated that, on average, 10% of sows are removed due to lameness [4,5]. This high replacement rate negatively influences sow longevity and overall herd performance [1,6]. For instance, first parity sows have smaller litter sizes and litters are lighter when compared to higher parity sows . This lowers the herd means litter size and the mean number of pigs weaned per sow per year [4,8]. Additionally, it has been reported that lame lactating sows have a lower feed intake which could result in decreased milk production that results in poor litter performance [9,10].
In order to address lameness, an accurate and timely detection method is needed. Currently, lameness detection is commonly evaluated by visually observing a sow’s gait and standing posture and assigning a subjective lameness score. However, such methodology is highly dependent on the observers’ training and experience [11,12], and subclinical lameness could go undetected , making lame sow treatment more challenging before the condition deteriorates.
Efforts to identify sow lameness using objective methodologies include: footprint analysis, kinematics, accelerometers, nociceptive threshold testing, digital imagery [14-17] and an embedded microcomputer-based force plate [18-21]. Although results are promising, these methodologies may be complex and time-consuming. Additionally, many of these tools have only been used in controlled laboratory settings and their use in commercial swine facilities is unknown. The embedded microcomputer-based force plate (hereafter referred to as the force plate system) could be implemented in a commercial setting as it can be fitted under an Electronic Sow Feeder (ESF) system. Based on the information collected by the force plate system, a lameness classification tree can be obtained for each sow . The objectives of this study were to utilize the force plate in a commercial setting to determine the relationship between the force applied by each leg when sows are in varying degrees of lameness and to develop a lameness classification tree.
This study was conducted under the guidance of the University of Pennsylvania Institution of Animal Care and Use Committee protocol number 804656. Additionally, the study was performed in accordance with the Guide for the Care and Use of Agricultural Animals in Research and Teaching as issued by the Federation of Animal Science Societies .
The study was managed at the University of Pennsylvania School of Veterinary Medicine’s Swine Teaching and Research Center. The force plate device (1.52 mL × 0.56 mW × 0.11 mH) was installed for 21 days within one of the two Electronic Sow Feeding (ESF) stations used to feed a single pen of group-housed gestating sows. Approximately 120 crossbred Large White × Landrace sows (PIC 1050) were housed in a large dynamic group at a space allowance of 2.05 m2 per head. Seventy-six sows logged force recordings for more than 1 week. The force plate consisted of four quadrants [right front (RF), left front (LF), right rear (RR), left rear (LR)] that measured the force (kg) applied by each sow foot. The force applied was recorded once per second and accepted after the sow stood squarely and applied pressure to all quadrants. If a sow applied less than 4.5 kg on two adjacent quadrants or if the sow did not apply any force to one quadrant, the information for that recording point was deleted. For further details regarding the design and data recording methodology for the force plate, please see [18,20]. In the present study, the force applied to each sow foot was recorded during her first daily visit to the ESF.
Lameness was visually assessed on a weekly basis using a four-point scale where 0=sow moves easy, comfortable on all feet; 1=sow moves easily, only minor deviation from normal gait; 2=sow exhibits compensatory behaviours such as dipping her head or arching her back, to account for reduced pressure on one or more limbs; 3=sow is reluctant to bear weight on one or more legs making it difficult to move her (Zinpro, Feet first: locomotion scoring, Eden Prairie, MN).
Lameness classification trees: Classification trees were constructed to identify lame sows using the randomForest package in R (Liaw A, et al., 2015 Package ‘randomForest’). First, the percentage of the total force applied by each sow according to quadrant for each recording point step was calculated. The force recorded is illustrated for a sound and lame sow respectively in (Figures 1 and 2).
Figure 1: Force applied1 to each foot2 per second3 for a sound sow using an embedded microcomputer-based force plate.
1. The raw force applied to each foot as a percentage of the sows total body weight
2. All feet: Left Front (LF), Right Front (RF), Left Rear (LR) and Right Rear (RR) were included
3. The first 100 seconds of data used after making sure the sow was on the force plate, where each second is unique of the next
Figure 2: Force applied1 to each foot2 per second3 for a lame sow using an embedded microcomputer-based force plate
1. The raw force applied to each foot as a percentage of the sows total body weight.
2. All feet: Left Front (LF), Right Front (RF), Left Rear (LR) and Right Rear (RR) were included
3. The first 100 seconds of data used after making sure the sow was on the force plate, where each second is unique of the next
Descriptive statistics included average force (mean), the standard deviation of the force applied, and skewness (i.e. measurement to evaluate the degree of asymmetry of the force applied). Additionally, the 5th percentile (P5) of the force applied on each quadrant, 95th percentile (P95), range between P95-P5, maximum and minimum standard deviations for that date, maximum and minimum skewness, maximum and minimum P5 and P95 and the maximum P95 minus P5 were calculated for each sow, per day, on each quadrant using SAS v9.3 PROC MEANS (SAS, Cary, NC).
The P5 value was selected because it provides a more accurate value for the minimum force applied by the sow because when she adjusts her weight between limbs, the plate gives a recording of 0 kg. The P95 provides a more accurate value for the maximum force applied by the sow, as excessive force could be applied by the sow when she pushes up on the feed trough or adjusts her weight.
The second step was to calculate the difference between the force applied between LR-RR, RF-RR, LF-LR, LF-RF, and a difference of the contralateral measurements (LF-RR)-(RF-LR) for inclusion in the classification trees. Additionally, the weekly visual lameness score was used as the deterministic variable for the creation of the lameness classification trees. Based on the visual lameness scoring, sows were classified as non-lame (visual score ≤ 1) or lame (visual score ≥ 2). If a sow was identified as lame during the weekly assessment, she was considered lame for the week prior to the lameness identification.
The previously mentioned variables were included in the creation of the lameness classification trees. In Random Forest analysis , multiple trees are created from the inputted data (i.e. 1,000 in the present study), which use a subset of the total daily sow recordings to make a tree. The randomForest package automatically selects the variables with the more predictive ability and the variables that were used in the greatest proportion of trees were considered to be the most valuable to identify lameness. The value can also be seen in the length of the branches, as longer branches indicate more valuable variables .
Each specific classification tree was created using randomly selected sows at different days; this allows validation by comparing trees created with different sources of information by testing those cases left out of the creation process for classifying the sow correctly sound or lame. Each node of the classification tree represents a test. Each test is associated with an inequality threshold value. If the inequality is met, the tree will branch to the left, otherwise, it will branch to the right. At the end of each branch, either a new node will be created to follow, or a value of “0” or “1” is reached. A value of “0” means the sow is classified as sound and a value of “1” represents a lame sow. The percentage of time the incorrect decision is made is called the out-of-bag error estimates (oob error) . The oob error is reported for the entire classification tree process.
After the Random Forest analysis identified a potential best tree. All records were analyzed against this tree to get to an overall error rate. This included sow data points that would have been included in the development of the tree.
Comparison between lameness evaluation systems: A Kappa Statistics test in SAS v9.3 PROC FREQ (SAS, Cary, NC) was used to measure the level of agreement between the visual scoring and force plate results from the classification tree. A Kappa Statistics considers the likelihood that the results could have been due to chance; a score of 0 means the results were entirely due to chance and 1 is perfect agreement between two observations. Kappa Statistics scores of 0.4 to 0.6 mean a moderate level of agreement, 0.61 to 0.8 a substantial agreement, and 0.81 to 0.99 almost perfect agreement .
Additionally, weekly changes in lameness status between scoring methods were analyzed using generalized estimated equations in SAS v9.3 PROC GENMOD (SAS, Cary, NC). The model included a lameness scoring method, measuring week, and their interaction. Results are reported as odds ratios with the associated 95% CI. An odds ratio greater than 1 is indicative of an increased risk of lameness, whereas an odds ratio less than 1 indicates a reduced risk of lameness compared with the reference category.
Day of first lameness detection: A univariate generalized linear mixed model with lameness scoring method included as the fixed effect was used to identify possible differences in the time of lameness identification between scoring methods, using SAS v9.3 PROC GLIMMIX (SAS, Cary, NC). The day for the visual assessment was considered the day the visual observation took place. Results are reported as least squares means with their associated standard errors.
Lameness classification trees
Seven variables were included in the lameness detection model to accurately detect lameness in sows using the force plate (Figure 3). The significant variables included LR-RR, P95-P5 for LR, the minimum value of the P95, the standard deviations for the RF and LF, the average for LF, and the skewness for LF. The oob error rate for the classification tree created in this study was 6.8%. The overall error rate for this tree was 4.9%.
Figure 3: Lameness classification tree 8.
a. LR-RR=The percentage difference in force applied between the Left Rear and Right Rear quadrants b. Range LR=The difference between the sows 95th percentile value for the force applied in a day and 5th percentile for the Left Rear quadrant c. MinP95=The minimum value between the four force plate quadrants for the 95th percentile quadrant d. SD RF=The standard deviation of the force plate recordings for the Right Front quadrant e. SD LR=The standard deviation of the force plate recordings for the Left Rear quadrant f. Avg LF=The mean value for the force applied to the Left Front quadrant g. Skew LF=The skew of the recordings for the Left Front quadrant h. Each node of the classification tree represents a test. Each test is associated with an inequality threshold value (Represented by a letter in this example). If the inequality is met (i.e. a sows value for LR-RR is less than value a) the tree will branch to the left, otherwise, it will branch to the right. At the end of each branch, either a new node will be created to follow, or a value of “0” or “1” is reached. A value of “0” means the sow is classified as sound and a value of “1” represents a lame sow. Visual lameness assessment was included as a deterministic variable (non-lame [score ≤ 1] or lame [score ≥ 2])
Comparison between lameness evaluation systems
Twenty-one days of data collection yielded 956 daily lameness records for each lameness scoring method. Of the 956 measurements, visual assessment (considering sows as lame/ sound for each day during the week previous to visual scoring) indicated 99 as lame while the force-plate methodology indicated 107. The methods agreed on 80 lame and 829 sound scores across the study period. Furthermore, the lameness classification tree model and the visual lameness scoring system had substantial agreement beyond that expected by chance with a Kappa Statistic of 0.79 (P<0.05).
Comparing lameness status across weeks showed an increase in the risk for a sow to become lame from week 1 to week 2 (Odds ratio=1.84; CI=1.13 to 3.02; P<0.05) irrespective of the scoring method used to assess lameness; however, there was no difference in the risk for a sow to become lame between week 2 and week 3 (P>0.05).
Day of first lameness detection
The force plate was able to identify lameness 4.62 ± 0.97 days earlier (P<0.0001) compared to weekly visual lameness scoring.
Results from this study suggest that the force plate is able to accurately detect differences in pressure applied between feet, and more importantly, lameness status, similar to a visual assessment, in multiparous sows in a commercial sow breeding herd  showed that data obtained from the force plate can be used to create classification trees for automated lameness identification. Interestingly, some variables (i.e. the difference in force applied by the left and right rear legs, and the minimum value of the 95th percentile) included in the classification tree reported in the present study, were not used as potential sources of information by . It is important to note that  developed individual lameness classification trees for each foot and thus, some variables, such as the difference between the pressures applied in two adjacent feet may only become relevant when classifying lameness status irrespective of the affected limb. In the present study, the difference in the pressure applied between the left and right rear legs was selected as the most important variable for the classification tree. This was likely due to the fact that 100% of lameness observed in the present study occurred in the rear legs. The fact that lameness was observed only in the rear leg agrees with findings in the literature reporting that hind limbs are most commonly affected by lameness [26,27]. Furthermore, the fact that greater range between the 95th and 5th percentile was only important for the left rear leg could indicate that the majority of lame sows in this study were lame in the right rear leg; however, further research is required.
As sows become lame, the maximum pressure exerted decreases in the affected limb , thus the minimum for 95th percentile decreases, indicating positive lameness detection. Due to the feeder being positioned slightly to the right of the sows’ midline, on average, sows needed to apply more pressure in the left front quadrant to access the feeder. The reason randomForest selected the standard deviations and the skewness for certain measurements remain unclear and requires further investigation.
The oob error rate indicates that a low percentage of sows received an incorrect lameness classification. The oob error rate found in the present study was greater than the one reported by  during the first 3 days after lameness induction (i.e. the period of time where animals were clinically lame;  using the same lameness classification tree methodology. Differences between studies could be attributed to the fact that the  study was a controlled lameness induced study and the severity of lameness was similar for all the animals involved across all the experimental periods. In the present study, lameness severity varied between sows and between weeks. Nonetheless, the likelihood that the two lameness detection methods were similar beyond chance was very high, implying the classification tree can detect lameness at least as accurate as visual assessment.
With an increasing number of sows that are group housed, lameness may become a bigger problem , and thus accurate and timely detection is essential. Results indicate the force plate can detect lameness almost 5 days sooner than a weekly visual lameness assessment. This could be partially explained by the force plate providing daily recordings instead of weekly observations. One of our goals was to replicate commercial herds as close as possible. It is not a common practice in commercial herds to conduct routine lameness identification but rather a general daily observation of the breeding herd. Lame sows usually go unnoticed until clinical signs are very evident. If an animal was observed clinically lame before the weekly assessment, the sow was removed from the trial for treatment. Most of the sows in the present study were mildly lame and unless the weekly lameness assessment was performed, most likely they would go unnoticed until the condition has deteriorated. By comparing the daily force plate information to the weekly score we were able to identify lameness correctly before the condition worsens.
This is of vital importance as early detection of lameness is critical in preventing the condition from deteriorating. Earlier detection would provide the producer management and treatment options. Additionally, this system in the future could create a daily printout of suspected lame animals to be visually examined, thus increasing worker efficiency and efficacy by examining one a daily basis only animals that are classified as lame by the force plate. As the industry transitions to more third-party audits, the force plate also provides production companies with an extra safeguard to ensure sows are being cared for in the most humane way possible.
By the second week of the trial, the likelihood of a sow being classified as lame increased compared to week 1. The sows used in this study were in a dynamic group with sows entering and exiting on a weekly basis, subjecting the sows to constant regrouping and aggressive interactions to establish social hierarchy .
The lameness classification tree created, based on the information gathered from the force plate, can accurately detect lameness earlier than a weekly visual assessment. This could aid in designing management practices for lame sows that prevent the condition from deteriorating. Further research needs to be done in order to validate the lameness classification tree in a separate sow herd.
This work was funded by the National Pork Checkoff grant #11-092. The authors would like to thank the personnel from the University of Pennsylvania School of Veterinary Medicine Swine Teaching and Research Center for their collaboration during this project.
All Published work is licensed under a Creative Commons Attribution 4.0 International License
Copyright © 2019 All rights reserved. iMedPub LTD Last revised : September 21, 2019