Skip to main content

ORIGINAL RESEARCH article

Front. Vet. Sci., 07 March 2023
Sec. Comparative and Clinical Medicine
Volume 10 - 2023 | https://doi.org/10.3389/fvets.2023.1111140

A workflow for automatic, high precision livestock diagnostic screening of locomotor kinematics

Falk Mielke1,2* Chris Van Ginneken2 Peter Aerts1
  • 1Functional Morphology, Department of Biology, Faculty of Science, University of Antwerp, Antwerp, Belgium
  • 2Comparative Perinatal Development, Department of Veterinary Sciences, University of Antwerp, Antwerp, Belgium

Locomotor kinematics have been challenging inputs for automated diagnostic screening of livestock. Locomotion is a highly variable behavior, and influenced by subject characteristics (e.g., body mass, size, age, disease). We assemble a set of methods from different scientific disciplines, composing an automatic, high through-put workflow which can disentangle behavioral complexity and generate precise individual indicators of non-normal behavior for application in diagnostics and research. For this study, piglets (Sus domesticus) were filmed from lateral perspective during their first 10 h of life, an age at which maturation is quick and body mass and size have major consequences for survival. We then apply deep learning methods for point digitization, calculate joint angle profiles, and apply information-preserving transformations to retrieve a multivariate kinematic data set. We train probabilistic models to infer subject characteristics from kinematics. Model accuracy was validated for strides from piglets of normal birth weight (i.e., the category it was trained on), but the models infer the body mass and size of low birth weight (LBW) piglets (which were left out of training, out-of-sample inference) to be “normal.” The age of some (but not all) low birth weight individuals was underestimated, indicating developmental delay. Such individuals could be identified automatically, inspected, and treated accordingly. This workflow has potential for automatic, precise screening in livestock management.

1. Introduction

Veterinary diagnostics have struggled with a methodological trade-off between high precision and high through-put. In the era of genomics, proteomics, and the like, the strive for accurate diagnostics of livestock diseases has directed considerable attention to the development of modern laboratory tests (1, 2). Conventional imaging techniques also play a role, but usually require special equipment and measurement techniques [e.g., radiography, microscopy, ultrasound, cf. (3)]. These methods are high precision tools, but low through-put or expensive, some potentially invasive, and therefore not generally suitable for broad monitoring of farm animals. On the other hand, computational techniques are increasingly available to mine extensive data sets collected with sensors or cameras for diagnostically relevant signals (48). “Precision Lifestock Farming,” an application of integrated management systems, might be the desired economic model. These techniques complement the high precision tools by enabling broad screening and early detection of abnormalities, often preceding manual, veterinary intervention. Precision Lifestock Farming is promising in terms of its impact on animal welfare and economic success, but pitfalls remain (9, 10). The term “precision” might be misleading. In an animal management context, it refers to the availability of individual animal data, and the reduction of inefficient and thereby non-sustainable management. However, in practice, the use of sensors and cameras often still is restricted to superficial measures such as the overall activity or the mere occurrence or frequency of certain behaviors of individuals. For example, in swine farming, conventional video cameras can be used to monitor activity, and reduction can be associated with disease (1113); specificity and precision of these methods deserve further validation.

One class of behaviors that is typically monitored with such cameras is locomotion. Locomotion involves multiple subsystems, and one of the major challenges is to understand how exactly locomotor patterns are altered by conditions of the animal or by external circumstances. The involved subsystems are the musculoskeletal apparatus, energy supply, metabolism, and multiple levels of neuro-motor control. The kinematic and dynamic measurements obtainable by cameras and measurement equipment represent the collective output of interacting variables of the ensemble of subsystems (14). In normal function, all of them are potentially affected in different, non-trivial ways by characteristics of the animal (15), e.g., age (due to individual development), weight (due to body segment inertia), and size and morphology (due to allometrics in general and specific muscle lever relations in particular). In non-normal conditions or disease, another dimension of complexity is added. In consequence, studying alterations in specific locomotor patterns holds more diagnostic potential than activity measurement alone. Kinematic measurements have enabled the inference of many aspects of the locomotion of domestic animals [e.g., (8, 1618)]; even individual recognition is possible in well-studied domestic species [e.g., (19, 20)]. However, the cross-influence of the more or less correlated systems and co-variates mentioned above, and thus the superimposed effects of multiple factors, complicate data analysis, and diagnostics. Most studies have relied on derived measures, such as speed or duty factor, as performance indicators, which neglects most of the individual movements of the joints and their temporal orchestration. For precision diagnostics, it would be desirable to have an automated system which tracks the locomotion of an individual, extracts and quantifies kinematics in all available detail, takes into account possible co-factors (such as age, size, and external physical conditions), and compares these observations to a reference for the species. Implicitly, this is what “a medieval husbandman,” i.e., a human classifier, would do with “his house cow or sow” (9).

At the technical core of diagnostics is thus a classification problem: finding a diseased subset in a population of observations. Correct classification is complicated when there are multiple influence factors, but even more when the observation is subject to substantial intrinsic variability.1 Variability is a central feature of motor behavior: even for identical external conditions and in a single individual, it can be noted that “successive movements […] never exactly repeat themselves” (21). Could a putatively abnormal or pathological behavior actually fall “within the bell curve” of normal variability? How likely is that? Which of the many “input factors” is responsible, and how, for a given (temporary) alteration in the collective output? These analysis questions are common in research on bipeds [e.g., (2224)] and quadrupeds [e.g., (2527)], and the solution is not novel. Multivariate models are capable of handling complex situations, given sufficient data. Multivariate probabilistic models (see below) are suited to also capture intra-individual variability and yield effect likelihoods. However, the high dimensionality of kinematic data sets, the multi-parameter, multi-level (hierarchical) covariate situations, and the high digitization workload have often been a limiting factor for the generation of quantitative models of vertebrate locomotion (2830).

Several recent technological advances have enabled researchers to tackle scientific questions on locomotion in a more efficient way. Firstly, the past few years have brought huge leaps in terms of computer vision, deep learning, and thereby semi-automatic video digitization methods (3034). These tools typically require a manually digitized subset of the data as the “training set” for a neural network, which is then able to digitize further videos in high through-put, hopefully with reasonable accuracy. A second field of technological advance are the aforementioned probabilistic models, which build on an elegant computational implementation of Bayesian theory [Markov Chain Monte Carlo / MCMC sampling, cf. (3537)]. Such models can naturally incorporate hierarchical parameter interrelations and intrinsic variability. The main reason for this is that probabilistic models work on data distributions, and their outcome are distributions and “effect likelihoods,” rather than point estimates. This can be informative on an intrinsically varying process such as locomotion (38). Machine learning methods for video digitization are validly advancing to be the standard in kinematic analysis, whereas probabilistic models still lack recognition in the field, despite their potential. To summarize, the mentioned advances in computer vision and statistical modeling enable us to (1) acquire a lot of quantitative data with minimal to no workload, and (2) model them in a suitable way. It would be desirable to adapt those technological advances for veterinary use, generating a classifier which could identify systematic alterations in the locomotion of domestic animals, and thereby enabling the computer-supported diagnostic screening for deficiencies, pathological states, and diseases.

Domestic pigs are a well-studied model system in which scientific interest joins the economic interest of commercial breeding. These animals have been subject to a variety of locomotor studies, including paradigms to test the effects of breed (39), birth weight (4042), surface friction (43), welfare (44), various pathologies (4547), and more [cf. (8)]. Of particular interest has been the occurrence of a subset of individuals which are born with lower weight (LBW, low birth weight) than their “normal” (NBW) littermates. There are multiple standards to classify these birth weight categories, using absolute mass, litter quantile criteria, or asymmetry of body proportions (4854). A possible cause of low birth weight is intra-uterine growth restriction, and LBW phenotype seems often, but not always, to correlate with low vitality and a reduced chance of survival (5558). Locomotor maturation after birth is quick (40, 59), yet crushing by the sow constitutes one of the major causes of piglet mortality (60, 61). The likelihood of being crushed is directly reduced by more agile locomotion. Thus, locomotor capabilities are crucial for piglet survival, and delayed development might be fatal.

Previous studies from our group (40, 42) raised the hypothesis that the apparent difference in LBW and NBW individuals can be attributed to delayed development. They measured spatiotemporal gait variables (e.g., stride frequency and distance, speed, duty factor), which are collective variables of the actual kinematics [cf. (14, 62, 63)]. This strategy has the advantage that it requires only five landmarks (four limbs, one reference) to be digitized, which used to be a crucial trade-off to handle large data sets. However, the collective variables cannot capture full information on intra-limb coordination (i.e., the relative timing of segmental movements within a limb; as opposed to inter-limb coordination, i.e., the relative timing of the cycling of the different limbs). This complicates disentangling effects such as those of size, age, (birth) weight, and disease. It is expected that animals adapt their gait to the physical constraints of motor behavior, which are depending on the weight and other characteristics of the subject. However, the changes to kinematics might be more subtle, and collective variables might not be altered in a distinct way. For example, an animal might learn to move its joint angles in a more efficient way by adapting clearance to substrate conditions (43), which could in principle be achieved without changing the speed of voluntary locomotion on those substrates. Hence, targeting automated gait analysis and diagnostic classification of swine, it would be desirable to include full kinematic information.

Using the semi-automatic, machine-learning digitization techniques mentioned above, one can extend the analysis of gait variables to quantities of intra-limb coordination with manageable workload. However, using the whole set of raw point coordinates of joint points of interest raises the issue of dimensionality (two to three coordinates per reference point, simply too many data variables). Statistical modeling requires a minimum number of observations for being able to infer effects of the different variables (6467). The common solution is to reduce the dimensionality with an appropriate transformation. To choose a transformation, it can be exploited that common analysis procedures in locomotor biomechanics require steady state locomotion. “Steady state” implies that the behavior consists of repetitive blocks of kinematics, i.e., stride cycles. And one of the most common sets of techniques in physics and engineering to handle cyclic data is Fourier analysis, or more specifically Fourier Series Decomposition [FSD; (26, 6872)]. With FSD, joint angle profiles are transformed into their representation in the frequency domain, i.e., an array of harmonics. Some of the characteristics of the profiles (namely mean angle, amplitude, and phase) are more readily captured by those harmonics and can optionally be removed. This is most intuitive in the case of phase: removing phase differences enables a mathematically optimal temporal alignment of the profiles. By isolating the other characteristics, mean and amplitude, the joint angle profiles can be transformed to meaningful quantities such as dynamic posture [mean joint angle and effective range of motion (eROM)], and coordination sensu stricto [relative phase/joint timing and residual kinematics, cf. (68)]. Harmonics are independent of temporal sampling and duration: the coefficient array is of fixed size, which is useful for subsequent multivariate analysis methods, such as Principal Component Analysis (PCA). Another advantage of this transformation procedure is that it is reversible because all mathematical information is retained in the process (which is not the case when using collective variables alone). This means that joint angle profiles can be reconstructed for any observed or hypothetical point in parameter space, which enables in-sample and out-of-sample predictive sampling.

To summarize, the Fourier Series decomposition provides a mathematically convenient and biomechanically meaningful representation of the kinematic data, which opens up new options for data analysis and modeling.

In this study, we establish a workflow which can be automated and used to identify individual animals locomoting differently from the “normal” reference, based on video recordings, deep learning digitization, mathematical transformations, and probabilistic modeling. A conventional, 2D kinematics data set is extracted with the aid of deep learning tools from lateral videos of walking piglets. By applying multivariate analysis and FSD, we separate spatiotemporal gait variables, dynamic posture, and coordination, and model their relation to subject characteristics (mass, size, age, and birth weight category). Crucially, this constitutes the complete information captured by locomotor kinematics, and all parameters are submitted to an inclusive, probabilistic model. As a test case, we tackle the question of whether low birth weight in domestic piglets is an indication of delayed development, and attempt to quantify the delay with an inverse modeling strategy as follows. Intuitively, and conventionally, joint kinematics are considered the output of the locomotor system. Therefore, conventional statistical models might consider them on the “outcome” side; on the “input” side, the effects of birth weight, age, speed, or other parameters are quantified. Herein, we use a different approach, and invert the model. We construct a probabilistic computer model which describes “age” and other subject characteristics as a function of all available kinematic parameters. The rationale is similar to that in subject recognition tasks: given a certain kinematic profile, can we infer (characteristics of) the subject? We split our data set into birth weight classes (LBW, NBW), and train the model on only the strides from NBW observations. This NBW model is our “kinematic reference” model, quantitatively capturing the expectation of what would be “normal” by inferring the plausible age range for a given kinematic observation. We then use that trained model to compute out-of-sample inference of individual LBW observations.

Our hypothesis is that, if LBW were at the same stage of postnatal locomotor development as their NBW siblings, then the model should accurately infer the age of the LBW animals. Conversely, if the LBW piglets are delayed in development, the model would underestimate their age. Thus, by applying this inverse modeling strategy and comparing the computer-inferred age to the actual age of the LBW piglets, we can quantify and potentially falsify a hypothesized delay in locomotor development.

The components of this classification workflow are not novel, and commonly used in physics and engineering. We use available machine learning tools to digitize videos, apply a series of well-known transformations, and train a probabilistic model classifier. We demonstrate that a set of individual locomotor events can be used to distinguish individuals which develop slower than expected, in a temporal accuracy of four to eight hours (which is a considerable timespan for neonate animals). These are precise diagnostic measurements, generated at high through-put, with the overall aim of improving animal welfare, all of which is in line with the prototypical ideal of precision livestock farming.

2. Materials and methods

2.1. Data acquisition

Recordings were done at a local farm in Belgium during several trips in October and November 2017. Farrowing was monitored to select Topigs × PIC piglets for another experiment (73). Piglets from selected litters were weighed at birth and numbered with non-toxic skin markers. Low birth weight (LBW) was classified by birth weight quantile [lowest 10% of each litter] and by a maximum mass of (800) g (4951, 74); all other piglets are assigned the NBW category. At variable time points afterwards [ages (1–10) h], piglets were briefly taken from their pen and brought to a separate room for video recording (see below). Animals were recorded in pairs [as in (38)], which drastically reduced anxiety and increased their motivation to cooperate. A few animals were recorded repeatedly, usually with a changing partner. Animals were ear-tagged and followed up: recording was repeated at approximately 4 and 10 days of age. That data was part of the digitization procedure (i.e., “deeplabcut” network training), but excluded from further analysis (i.e., probabilistic modeling, see below). The subject characteristics documented for analysis are birth weight (continuous, and categories “LBW”/“NBW”), mass at recording, age at recording (i.e., hours since farrowing), sex, and size. The size of the animal was approximated by a Principal Component Analysis (PCA) of digitization landmark distances along all segments (“size PCA,” only first PC used, 93% of variability). Size and mass are expected to correlate, yet deviations would indicate animals of particularly slender or rotund habitus. All procedures followed ethical regulations and guidelines, and were approved by the Ethical Committee for Animal Testing of the University of Antwerp, Belgium (ECD 2015-26).

The recording room contained an elevated runway (150 × 50 cm), covered with a rubber mat to increase friction, and visible through a transparent frontal shield. Color videos were recorded (camera model: GC-PX100BE, JVC, Japan) at a temporal sampling rate of 50 frames per second and a spatial resolution of 1, 920 × 1, 080 pixels (later cropped to 500 pixels height), from a distance at which the field of view would exactly capture the entire runway. A chess board at the back wall enabled spatial calibration. Video surveillance was permanent during the presence of the animals and stopped only in between recording sessions. Animals were able to move freely on the enclosed platform. To stimulate locomotion, the two animals were repeatedly placed on opposite ends of the runway. Gentle tickling on the back and grunting vocalization of the researcher were other successful strategies to induce targeted locomotion in the direction perpendicular to the camera axis. After recording sessions the piglets were returned to their litter and remained with the sow. The workflow herein involved handling of the animals as a consequence of the research setting. However, note that the procedure could easily be automated for continuous data collection by a suitable pen arrangement (8, 27, 75).

2.2. Digitization

We used the software DeepLabCut [DLC, (76)] for digitization of all video material. In addition, a custom made point tracking software (34) was used to generate a training set. In total, our dataset contained 180 videos (more than 11 h, 169 animals) of video. Our goal was to prepare a general DLC network which is capable of automatically tracking piglets at multiple ages, and which can be shared and re-used for subsequent research questions. This is why the full data set was used for digitization and for the calculation of some derived measures (size PCA). However, the analysis focus of this study (see below) was only a subset of the data (i.e., the 58 animals of the youngest age class). The video processing workflow, applied to the full data set, was as follows. To get a balanced training set, one stride of each of the animals was selected, and the video was cut, cropped to runway height, and optionally mirrored horizontally so that movement would always be rightwards. All videos were concatenated and submitted to the DLC training set generation. DLC was set to select 2,552 frames from these videos, which were tracked in an external software and re-imported for training (80% training fraction). Seventeen landmarks (i.e., points of interest or “key-points”; usually joint centers, Figure 1) were digitized, representing all body parts visible on the lateral perspective (head: snout, eye, ear; back line: withers, croup, tail base; forelimb: scapula, shoulder, elbow, carpal/wrist, fetlock, forehoof; hindlimb: hip, stifle/knee, tarsal/ankle, hind fetlock, hindhoof). We selected a “resnet 152” network architecture and trained for 540, 672 iterations (16 days of computer workload). The network was then applied to digitize the continuous, full video recordings twice: once in default direction and once horizontally mirrored, because training set was always rightward movement.

FIGURE 1
www.frontiersin.org

Figure 1. Video digitization and joint angle definitions. White circles mark points of interest (“landmarks”). Movement was always rightwards. Labels show joint angles, defined as shown in the inset: straight joint (parallel segments) corresponds to zero; counter-clockwise angles are positive. Forelimb angle was used as a reference for temporal alignment, but did not enter the analysis.

The next step is to find the relevant temporal sequences of walking in the continuous videos. Naturally, the trained network would only extract potentially useful landmark traces for episodes which resembled the training set, i.e., in episodes with a piglet moving perpendicular to the image axis, in lateral aspect and rightward direction. We automatically extracted 2, 597 of such sequences by filtering for high digitization “likelihood” provided by DLC, low noise (i.e., steady landmark movement) and consistent, plausible landmark distances. We further applied an automatic algorithm to find footfalls and label stride cycles in the candidate episodes (4, 730 cycles). This procedure involved a start-end-matching optimization (using Procrustes superimposition) to ensure that strides were indeed cyclical. To further assess digitization quality, gait variables were automatically extracted. Definition of these variables was chosen to simplify the automatic procedure, as follows. Stride distance, frequency, and speed are trivial measures of the animal movement. Duty factor is available for fore- and hindlimb, and measures the fraction of stride time in which the respective hoof is in ground contact. Clearance is approximated by quantifying the ratio of flexion of each limb (one minus the quotient of minimum and maximum absolute hip-toe-distance during the stride). Head and torso angle are the stride-average angles of the snout-ear or withers-croup lines with respect to the coordinate system. Hindlimb phase measures the time between hind- and forehoof touchdown, divided by the stride cycle duration. Where applicable, gait variables were prepared for analysis (see below) by converting them to dimensionless values (77, 78) using the cumulated distance of landmarks along the snout-to-tailbase line of the animal as reference, extracted as stride average from the digitized landmarks. Only strides with plausible values (i.e., those which lie within the theoretical distribution of each parameter; 1, 862 cycles) where processed. Manual inspection further boiled down the data set to 897 stride cycles (the others excluded for digitization errors, multi-animal confusion, non-walking gait, intermittent or sidewards locomotion, or incompleteness).

Finally, 368 of the remaining strides from 58 animals were in the youngest age category (<10 h) and thus selected for the present analysis, the data table is available online (see below).

2.3. Data processing

The landmark data provided by DLC was further processed for analysis. Python code for the whole procedure is available (https://git.sr.ht/~falk/piglet_fcas, Python version 3.10.8 at time of model calculation, https://www.python.org). First, joint angle profiles (i.e., joint angle values over time) were extracted for all relevant joints and for the total forelimb angle (croup-withers-hoof). Shoulder, elbow, carpal, hip, stifle, and tarsal were the six joints sufficiently well-digitized and therefore considered relevant for analysis. We then applied Fourier Series decomposition in the framework we previously termed Fourier Coefficient Affine Superimposition [FCAS, (68)], a flexible procedure which subsumes the following steps. Joint angle profiles are cyclic, i.e., periodical, and can therefore be transformed to the frequency domain with a Fourier Series decomposition (eight harmonics were deemed sufficient by visual comparison of raw and transformed/retransformed profiles). In the frequency domain, the affine components (mean, amplitude, phase) of a joint angle profile are easily accessible [cf. (68)]. The forelimb angle served as reference to temporally align all cycles in the data set (removal of phase differences between different cycles; forelimb angle was not used further). Then, mean and amplitude of the joint oscillations were isolated for all joint angles and are categorized as “dynamic posture” parameters. Mean joint angle is the temporal average, whereas amplitude is related to effective range of motion (eROM). The residual, i.e., differences captured by non-affine Fourier coefficients, can be categorized as “coordination” sensu stricto (it measures the precise temporal succession of joint configurations). In our case, there were 96 variables of coordination (six angles, eight harmonics, real and imaginary) which were submitted to a PCA. Only the first 12 coordination components (CC) were used for statistical analysis, capturing 80.2% of the variability in coordination.

To summarize, FSD and FCAS served three purposes: (i) temporal alignment of the cyclic traces, (ii) separation of meaningful parameter categories (dynamic posture and coordination), and (iii) preparation for multivariate analysis via PCA. Basic script code (Python, Matlab, and R) to perform FCAS can be found on a dedicated git repository (https://git.sr.ht/f~alk/fcas_code).

Information retention is generally a strength of this method. FCAS and PCA are mathematical transformations, which means that the information content after transformation is theoretically identical to that prior to transformation (theoretically, because only a finite number of harmonics can be used, yet this is of little concern for continuous, smooth joint angle profiles). The neglected PCs and the residual not captured by eight harmonics were the only information from kinematics of the given joints to be lost in this procedure, and by definition these contain the least information. Apart from that, all information present in the raw joint angle profiles enters the analysis. Though we used a 2D dataset herein, the procedure could be applied equally well to angles measured from 3D coordinate data (79).

Furthermore, all transformations are reversible, hence any analysis outcome can be translated back to kinematics with high accuracy. Reversibility bares a lot of herein unused potential, for example for interpolating unobserved subject states or for inferring kinematics of fossil species by phylogenetic and morphometric bracketing. Reversibility can also be of use when presenting raw joint angle profiles and their averages, as follows. One crucial aspect of the FCAS procedure is temporal alignment of the joint angle profiles in the frequency domain. In conventional temporal alignment, a single characteristic point in the stride cycle is chosen as a reference, wherein this is only “characteristic” for a certain part of one limb (e.g., left hindlimb hoof touchdown). Temporal alignment to the hindhoof touchdown might cause distinct peaks in the forelimb angle joint profiles to occur at different relative points in the stride cycle (e.g., tarsal joint profiles in Figure 3 below, lower half, green traces). If profiles show such variable peak positions, then their average will have a wider, less pronounced (i.e., lower amplitude), and potentially unnatural peak. For illustration, this is analogous to averaging two sine-waves of identical amplitude, but phase shifted: in the worst case, they cancel each other out (as in “destructive interference”). The problem is not restricted to pronounced peaks, but generally occurs if the temporal intra-limb coordination varies within a data set. Using FCAS, it is possible to get a more representative average of the raw traces which has its amplitude conserved, but phase and mean angle averaged. This is enabled by transformation to the frequency domain, separation of affine components, removal of phase differences by shifting to average phase, profile averaging, followed by inverse transformation back to the time domain. Because a set of profiles and phases may be calculated for each angle individually, and because phase relations can differ between joints, there are the options to align based on one reference angle (e.g., the whole forelimb, as done herein) or minimize all phase differences across all joints. Choosing the first option herein has implications: when plotting hindlimb joints aligned by a forelimb reference (as in Figure 3, lower half), phases still differ, and the “destructive interference” problem might hamper averaging. In such cases it is possible to apply an extra, joint-wise FCAS alignment for the sole purpose of generating meaningful averages.

2.4. Statistical modeling

To summarize, four categories of variables were used for analysis:

• subject characteristics: age, sex, mass, birth weight category, size

• spatiotemporal gait variables: distance, frequency, speed, clearance (fore-/hindlimb), duty factor (fore-/hindlimb), head angle, hindlimb phase

• dynamic posture: mean joint angles and eROM for six joints

• coordination: the residual after extraction of dynamic posture (see above).

Our guiding question for model design is whether a probabilistic, linear model is able to infer subject characteristics (specifically: age, mass, and size) from raw kinematics (expressed as dynamic posture and coordination) and gait variables (collective variables). Given the common conception that kinematics are a complex output of an individual motor system, this might be considered an “inverse” modeling approach. The present analysis focused on three outcome variables (Figure 2): mass (kg), size (arb. units, from a PCA of marker distances), and age (h). Though these outcome variables were specific per individual and recording session, we analyzed them “per stride” (i.e., there were multiple strides with identical subject measures on the outcome side).

FIGURE 2
www.frontiersin.org

Figure 2. Histogram of observations. Trivially, the LBW group measured the lowest body masses in the data set. This correlated with a lower body size, whereas age is rather uniformly sampled for all study groups. Recordings happened opportunistically within the first 10 life hours of the animals, repeated measurements were possible. Number of strides per class are indicated in brackets on the legend. Bar heights are scaled by sample size to show relative value distributions.

The model formula is:

θ~v1·α+vs·βs+Gvg·βg+Pvp·βp+Cvc·βc+v1·ϵ    (1)

Herein, θ is either of the outcome subject characteristics, β are slopes associated with the model parameters (s sex, G gait variables, P dynamic posture, C coordination), v are data vectors (e.g., v1 is a vector of ones for the intercept α and model residual ϵ, and vs is a boolean vector coding for subjects of “sex == male”). The models have a total number of 36 degrees of freedom. Priors (i.e., a priori assigned distributions) for all slopes were Normal distributions with mean and standard deviation corresponding to the mean and two times standard deviation of all observed values of each parameter; logarithmic transform was applied where necessary. The observable (“likelihood”) prior for θ was a Student's t-distribution (allows for wider-than-normal tails and robust regression) with a Gamma distributed ν (degrees of freedom); ϵ was modeled to be a Half Cauchy distribution. The model was implemented using the Python library “PyMC” [version 4.2.2, (80)].

To re-emphasize, dynamic posture and coordination together effectively capture all the kinematic information of the stride. Hence, we train the predictor model with all kinematics, gait variables, and sex. Birth weight category (LBW, NBW) is a filter parameter: we split our data set into LBW strides and two NBW subsets (training and validation). Training is performed by MCMC sampling (“sample” function in PyMC), and a No U-Turn sampler was set to sample with 32 chains, each 214 tuning and equally many sampling steps. All post-hoc model checks confirmed convergence (inspection of traces, bfmi > 0.94 for all chains, Gelman-Rubin statistics ≈ 1 for all parameters, sufficient effective sample size). Model comparison was performed, iteratively leaving out model parameters or replacing some by meaningful combinations (e.g., duty factor combined for fore- and hindlimb). However, because we follow an “all in” strategy, the results have little instructive value for model construction: we might thus have retained parameters which are numerically unimportant for the NBW-only models.

The data set of N=368 strides was split into three categories: (i) the NBW training set as reference with N=294 strides, (ii) the NBW validation set (N=35 strides), which is a random subset of NBW strides, approximately equal in size to (iii) the LBW test set with N=39 strides.

The model was thus trained with a set of 294 NBW training strides (i). Inferences (model “predictions”) were then done per stride, for all observed strides (NBW training, NBW validation, and LBW test), iteratively using the “pymc.sample_posterior_predictive” function in PyMC after setting all the data arrays to the actual observed values for one given stride (using “pymc.set_data”). The number of predictions usually matches the number of training samples, which means that all posterior information is used to construct the prediction distributions. We would thus retrieve mass, size, and age predictions (i.e., probabilistic inference) for each stride in the data set, which were then compared to the known, actual mass, size, and age.

All procedures, code, data, and this manuscript are available online (https://git.sr.ht/~falk/piglet_fcas).

3. Results

The present analysis is centered around a linear model which is designed to infer mass, size, and age (subject characteristics) from an extensive set of kinematic parameters from 2D videos. The numbers provided by the model sampling are equally extensive, and will only be reported in brief. The key purpose of the model is posterior predictive sampling of the LBW strides which were left out of the model, and which are analyzed in detail below.

To assess whether there are qualitative differences between the birth weight categories, one can compare the joint angle profiles (i.e., raw, angular kinematics) on which the present analysis was performed (Figure 3). The intra-group variability clearly exceeds the differences between groups, although it must be emphasized that groups are inhomogeneous (with regard to age, speed, etc.), which might lead to a bias if composition of LBW and NBW data differs. Low birth weight piglets walk with a more flexed hindlimb posture, as indicated by the parallel offset average hip, stifle, and tarsal profiles. Additionally, NBW individuals on average seem to set the shoulder at a more extended angle. No differences in coordination are apparent (which would manifest in altered temporal structure of the profiles). These findings indicate that LBW kinematics are hardly distinguishable from NBW kinematics by qualitative, visual assessment, which is at least in part be due to high variability.

FIGURE 3
www.frontiersin.org

Figure 3. Joint angle profiles per joint, grouped by birth weight category. An angle of zero would be a fully extended (i.e., straight) joint. Thick lines represent the average profiles, dashed lines indicate the average of the opposite birth weight group for comparison. Colored, shaded lines show all raw profiles available for the present analysis. Temporal alignment was done based on total forelimb angle (see methods), yet for the shown hindlimb averages (but not for the raw profiles), a separate alignment of the hindlimb was performed.

A quantitative comparison of variable kinematic measurements can be achieved with probabilistic linear models. For the purpose of predictive sampling (see below), we train models to describe the interrelations of kinematic parameters and subject characteristics in NBW piglets. The outcome of MCMC sampling of a linear model are value distributions for slopes, which in our case indicated how certain kinematic parameters are associated with a change in mass, size, and age (Supplementary Table S1). Of the gait- or coordination parameters, only hindlimb clearance was correlated with differences in animal mass. Mass was also associated with changes in the dynamic posture of the hip and tarsal. For size, the model inferred associations with head angle, hindlimb duty factor and clearance, and one coordination component (CC3), as well as changes in the fore- and hindlimb posture and an effect of sex. Finally, age was associated with an increase in forelimb clearance, potential changes at the hip and carpal, and several coordination components (CC9, CC11). Some eROM slope distributions for age were high in average magnitude, but variable (the “credible interval” contained zero). These model results provide detailed insight into parameter interrelations in the present data set and indicate which of the parameters are the relevant ones to infer a given subject attribute in predictive sampling.

Performing in-sample and out-of-sample predictive inference with the models trained on NBW strides elucidated if and how left-out strides differed from NBW model expectation (Figure 4). Note that, to capture variance (i.e., uncertainty in the prediction), each stride was sampled repeatedly.

FIGURE 4
www.frontiersin.org

Figure 4. Model inference. For all included subject characteristics, models which were trained on NBW strides correctly inferred the training data (gray) and values from the validation set (blue). In contrast, the same models wrongly inferred the characteristics of LBW subjects (orange). The x-axes show the difference (Δ) between actual and predicted values per prediction. To facilitate comparison, histogram heights are again normalized per category.

Out-of-sample inferences for the NBW validation set matched those of in-sample NBW inference in terms of average values and standard deviation for all modeled outcome variables, which confirms that inference of subject characteristics from kinematics is possible. In contrast, inferences for LBW strides did not match those of the NBW training set. Low birth weight animals were inferred to be on average 0.44 kg heavier than actual, and their size was overestimated (+ 1.71 units). Both faults matched the actual differences in magnitude (cf. methods, Figure 2). In contrast, the age inference for the low birth weight subjects were not normally distributed: most ages were correctly inferred from stride-wise kinematics, but ages for some strides were underestimated. The underestimation of those strides quantified to just below 5 h.

In summary, the NBW-trained model “guesses” the size and mass of the animals producing LBW strides to be “normal” (although they are not), which indicates that these defining features of LBW do not reflect in altered kinematics. However, age inference is non-normal, i.e., some strides are classified as typical for animals of younger than actual age.

To find out whether the offset age inference was related to certain individuals, or certain strides from different individuals, we grouped the inferences per stride or subject and calculated the chance of over- or underestimating age. Of the 8 low birth weight subjects who contributed 39 strides, 4 individuals were consistently underestimated (Table 1). Consistently means that more than 75% of all predictive samples were below actual age, and that the ages for a majority of strides were on average underestimated. The magnitude of underestimation was between 2 and 5 h. Curiously, those were the individuals recorded at a slightly higher age (>5 h). Overestimation in the other four LBW individuals was also consistent, but less so (less extreme underestimation rate, mean Δ < 2 h). Standard deviation of the estimates did not vary across individuals or birth weight categories.

TABLE 1
www.frontiersin.org

Table 1. Age inference per LBW animal (compared to NBW average, last row).

We conclude that underestimation of age is consistent over multiple strides of the same individual, and thus individual-specific.

4. Discussion

Quadruped terrestrial locomotion is the collective output of an ensemble of organismal subsystems, which is both reason and challenge for its usefulness in veterinary diagnostics. On one side, the kinematics can be quantified in multidimensional data sets, capturing the many degrees of freedom of the limb joints. On the other side, kinematic quantities are context dependent and affected by numerous subject characteristics (age, weight, pathologies, …) which also cross-influence each other. The challenge emerges to find the right trace of a given (or unknown) condition in the multidimensional observation on the background of kinematic variability. Deep Learning methods for video digitization have become available, and probabilistic computational models offer a flexible framework to mirror complex parameter relations. Once trained to a given question, these computer tools can achieve comparative diagnostic classification with minimal human interaction, e.g., for continuous screening in a farm setting. Multivariate systems have been a challenge to integrated management and precision farming, and the presented locomotor analysis workflow highlights a possible way to succeed in that challenge.

In this study, we have demonstrated a test case for generating a probabilistic model of piglet locomotion which incorporates all kinematic information.

Our example model was trained on a high number of observations which are considered “normal,” and applied to classify untrained observations in terms of deviation from normal behavior. The data stems from laterally filmed videos of normal (NBW) and low birth weight (LBW) piglet locomotor behavior from unrestricted walking gait (an inexpensive, high-throughput arrangement, and a common behavior). Low birth weight is often associated with low vitality (5557), and this supposedly correlates with deficient locomotion. Hence, the obvious first research question is whether birth weight has an influence on the locomotor behavior. Top-down, direct, visual assessment could justify the hypothesis that LBW walking kinematics are somehow different from “normal” (81). Yet that is (i) hard to assess due to high behavioral variability and (ii) trivially expected given the adaptation to different physical properties of their body: gravitational force is a predominant constraint of locomotion, and it simply scales with animal weight. Our results showed that the eight LBW individuals we submitted to the weight-kinematics model were all over-estimated in terms of their weight, by the amount that matched LBW–NBW weight difference (Figure 4). The same is true for the size model. This indicates that LBW, at least all those in our data set, are capable of walking as if they were of normal birth weight and size. This is the first example of a diagnostic model application: the model confirms quantitatively normal locomotor behavior despite occurrence of a given non-normal co-variate (weight).

A second diagnostic application is the identification of individuals (or even strides) which systematically deviate from an expectation or norm. Probabilistic models do not only classify “normal” or “not”: they yield a distribution of plausible values, and thereby a likelihood that a given observation is indicative of a problem. The same model architecture as above, but configured to infer age from a kinematic measurement, estimated some (but not all) individuals to be of lower than actual age (Table 1). Those were specifically the older of the LBW individuals, whereas the youngest ones (<4 h) walked as expected for neonates. Though we cannot fully rule out chance with our limited sample size, this provides evidence that the quick postnatal development was halted in those individuals. Our interpretation is that, at birth, LBW individuals putatively had the same capabilities as their NBW siblings, yet at least some “fell behind” regular development in the first hours. We can think of two possible reasons for this: (1) the birth process as a trauma might mask the actual capabilities of all neonates alike, concealing actual, pre-existing differences (74); (2) development is impeded by depleted energy reserves and a failure in (kin) competition and the perinatal struggle for teats and warmth (82). We found little support for the first possible reason: top-down locomotor development is quick for both groups (40, 41), and muscular architecture shows no differences (83). On the other hand, there is evidence for quick depletion of energy levels in the low birth weight individuals, which rectifies within a period of 10 h (84). This finding is consistent with the present study and supports the perinatal struggle hypothesis. Delayed development does not necessarily corroborate the hypothesis of locomotor deficiency in LBW. We would expect truly deficient strides to be substantially different from the data trained to the model, thus be either excluded or misclassified. Exclusion means that the used Deep Learning implementation could not capture deficient strides, or only in a way which led to exclusion in subsequent (automatic) quality checks (see below). We acknowledge that there currently still is room for refinement in the Deep Learning digitization procedure. Yet in the likely case that some deficient strides passed quality checks and were subjected to the model, we would expect them to be more “unpredictable” (i.e., higher variance of posterior samples). Instead, in our data set, inferences were consistent for repeated measures of an individual, without notable increase in variance across inferences per stride. For the affected subjects, we can even quantify a plausible delay of less than 5 h, which could nevertheless be critical given the rapid maturation of locomotor behavior in this species (40) and the importance of postnatal competition. Such detailed information is valuable when evaluating the success of different mitigation strategies [e.g., supplementing energy to piglets, (85)]. It must be emphasized that, just like other computational diagnostic tools, the method outlined herein is not intended for standalone use. Instead, it is complementary to or can facilitate the in-depth inspection. Nevertheless, the specificity of the presented gait analysis supersedes mere activity analysis: to our knowledge, being able to automatically retrieve an individual, probabilistic measure for developmental delay in swine has not been achieved before. Information retention is a feature of the presented workflow which we think can enable researchers and veterinaries to differentiate a multitude of potential influences on locomotor behavior, given sufficient reference data and an appropriate model design.

These observations are specific to the present test case, and the question remains whether the method is generally suited to diagnose animal pathologies. In the proposed workflow, data transformations (e.g., Fourier Series, PCA) are preparing the kinematic data for diagnostics. Diagnostics are the classification of “non-normal” observation, herein achieved by comparison of the probabilistic predictive samples and the actual observation (Figure 4 and Table 1). In the present example, there is no pathology, which was surprising to us: when observing NBW and LBW piglets (human classifier), one tends to see differences in how they walk. However, there are confounding factors: first and foremost, their weight and body proportions, age (locomotor maturation), sex, etc. In other words: they walk differently, but this is expected, given the biomechanical and physical constraints of the phenomenon. These are general complications in diagnostics. Our models provide evidence that, when accounting for potentially confounding factors (e.g., by working on “dynamically similar” joint angle profiles), no difference remains. Given the high level of detail that could be extracted for the present case, we would expect it to be as accurate as a human classifier in cases where pathologies can be visually identified. Whether the workflow could even outperform human diagnosis in other cases, for example because confounding factors are accounted for, remains to be evaluated.

There are other limits imposed by the present test case. Our data set is limited and potentially biased in terms of LBW observations. There are much fewer valid LBW strides in our data set, in absolute numbers: only 39 of 368 observations are LBW. This could be interpreted as evidence for a lower capacity (despite equal potential) of LBW to produce normal locomotion. Yet there are proximal, trivial explanations: for this study, the 10% lower quantile of birth weights in a litter is considered LBW, and there is a hard cap of 800 g. The resulting share is equal in our training set for video digitization, and in the final data set, because of pseudo-random, opportunistic sampling on-site (i.e., recording work was permanent, yet determined by farrowing and feeding of the subjects). The minority of LBW training videos might lead to an under-learning of those animals in the digitization network, which could lead to reduced digitization quality and therefore an exclusion bias for “non-normal” individuals. Though it seems unlikely, we cannot rule out reduced locomotor capacity in LBWs: the present data set is unsuited to count the occurrence of locomotor behavior due to its automatic generation. On the other hand, the strict stride filtering criteria for “good” kinematics may have involuntarily filtered out deficient individuals. Our conclusion that low birth weight individuals are non-deficient is strictly tied to the definition of the low birth weight category, which is herein based on weight criteria and did not regard phenotypical indicators of intra-uterine growth restriction [which we did not record, cf. (54)].

A corollary question is which patterns in the kinematic variables cause the different age inferences. We report high magnitude (but also highly variable, i.e., “non-significant”) slopes inferred from the age model (Supplementary Table S1). Note that these slopes solely reflect effects within the NBW data subset. We also observed slight differences in the average hindlimb dynamic posture (Figure 3). In fact, a more flexed hindlimb is typical for the youngest animals of both birth weight categories. We emphasized potential differences in group composition to explain that (e.g., sex effect in the “size” model), and different age per group might be a proximal explanation for the non-normal age inference in LBW. However, the average age of LBW animals (5.3 h) in our data set is nominally above that of NBW (3.8 h), which is a discrepancy with the age underestimation. Yet if we assume that the hypothesis of delayed locomotor development is correct, the nominal age would be misleading, and LBW effectively behave similar to younger animals. This can explain the apparent discrepancy in age group composition and age inferences from kinematics. It also suggests that dynamic posture might be the major proxy for perinatal maturation, though many other parameters also entered the probabilistic model and influenced the model outcome.

To summarize, we herein assembled state-of-the-art computer techniques for the purpose of individual diagnostics in quadruped locomotion, which we think constitute a valuable workflow for livestock screening and management. All components require some manual and computational efforts for initialization (network training, model regression). However, once that is done, the workflow is as follows:

• generate more video recordings (e.g., in an instrumented runway)

• apply the trained Deep Learning network for automated digitization

• identify stride cycles (automatic with framewise Procrustes comparison)

• stride cycle quality filtering by automatic criteria (end-start difference, constant speed, …)

• Fourier Series decomposition, temporal alignment, and parameter transformation (PCA)

• probabilistic classification (i.e., posterior predictive sampling) with an inverted model structure

• validation of above-threshold classifications.

Except for the last (crucial) step, all of this can be fully automated, and the whole workflow is readily available for precision livestock farming. Modules of the workflow can be altered: for example, Probabilistic Deep Learning models could be applied instead of the currently implemented classification. Monitoring can happen automatically [as in (8, 74)], which reduces delay in identifying individuals in need of intervention. Multiple models can be tested in parallel: in the present test case, the “weight” and “size” models found LBW locomotion indistinguishable from the “normal” reference group, whereas the “age” model specifically identified those animals which likely experience a delay in locomotor development. Likewise, tests for specific diseases could be set up. A more extensive (longitudinal) data set and more specific models are required to bring this tool into “clinical” or economical/commercial use, and one purpose of the present study was also to give sufficient explanations and references for readers unfamiliar with the mentioned methods. Nevertheless, we demonstrated that the modeling workflow is able to provide a high precision, high throughput method for domestic pig locomotor diagnostics.

Data availability statement

The datasets presented in this study can be found in online repositories. The names of the repository/repositories and accession number(s) can be found below: git repository https://git.sr.ht/~falk/piglet_fcas.

Ethics statement

The animal study was reviewed and approved by Ethical Committee for Animal Testing of the University of Antwerp, Belgium (ECD 2015-26). Written informed consent from the owners for the participation of their animals in this study was not required in accordance with the national legislation and the institutional requirements. Naturally, the owner of the animals was consulted on this application. The Ethics Committee on animal experimentation has indicated that no additional and specific requests were needed including that no consent was to be filled out. Moreover, biosecurity on a pig farm is strict, which means that any access to the farm must be approved and checked. Therefore, because we were able to carry out the in the manuscript mentioned on-site observations, the owner declares his agreement with the procedures and use of the piglets.

Author contributions

FM acquired and analyzed the data and wrote the initial draft of the manuscript. All authors conceptualized the study and refined the manuscript. All authors contributed to the article and approved the submitted version.

Funding

This study was funded by a grant from the special research fund of the University of Antwerp (BOF-GOA 2016 33927).

Acknowledgments

The authors would like to thank Miriam Ayuso for organizing and participating in the recording sessions, as well as Laura Buyssens, Georgios Petrellis, Gunther Vrolix, Charlotte Vanden Hole, Denise Vogel, and all students who joined for help during recordings. Maja Mielke provided valuable comments on the manuscript text.

Conflict of interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Publisher's note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

Supplementary material

The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/fvets.2023.1111140/full#supplementary-material

Footnotes

1. ^Whether “intrinsic” just describes variability for which no influence factor has yet been determined is a valid, but philosophical question beyond the scope of this study.

References

1. Howson ELA, Soldan A, Webster K, Beer M, Zientara S, Belak S, et al. Technological advances in veterinary diagnostics: opportunities to deploy rapid decentralised tests to detect pathogens affecting livestock. Rev Sci Tech. (2017) 36:479–98. doi: 10.20506/rst.36.2.2668

PubMed Abstract | CrossRef Full Text | Google Scholar

2. Lamy E, Mau M. Saliva proteomics as an emerging, non-invasive tool to study livestock physiology, nutrition and diseases. J Proteomics. (2012) 75:4251–8. doi: 10.1016/j.jprot.2012.05.007

PubMed Abstract | CrossRef Full Text | Google Scholar

3. Yitbarek D, Dagnaw GG. Application of advanced imaging modalities in veterinary medicine: a review. Vet Med. (2022) 13:117. doi: 10.2147/VMRR.S367040

PubMed Abstract | CrossRef Full Text | Google Scholar

4. Neethirajan S. The role of sensors, big data and machine learning in modern animal farming. Sens Bio Sens Res. (2020) 29:100367. doi: 10.1016/j.sbsr.2020.100367

CrossRef Full Text | Google Scholar

5. Wurtz K, Camerlink I, D'Eath RB, Fernández AP, Norton T, Steibel J, et al. Recording behaviour of indoor-housed farm animals automatically using machine vision technology: a systematic review. PLoS ONE. (2019) 14:1–35. doi: 10.1371/journal.pone.0226669

PubMed Abstract | CrossRef Full Text | Google Scholar

6. Piñeiro C, Morales J, Rodríguez M, Aparicio M, Manzanilla EG, Koketsu Y. Big (pig) data and the internet of the swine things: a new paradigm in the industry. Anim Front. (2019) 9:6–15. doi: 10.1093/af/vfz002

PubMed Abstract | CrossRef Full Text | Google Scholar

7. Gómez Y, Stygar AH, Boumans IJMM, Bokkers EAM, Pedersen LJ, Niemi JK, et al. A systematic review on validated precision livestock farming technologies for pig production and its potential to assess animal welfare. Front Vet Sci. (2021) 8:660565. doi: 10.3389/fvets.2021.660565

PubMed Abstract | CrossRef Full Text | Google Scholar

8. Netukova S, Duspivova T, Tesar J, Bejtic M, Baxa M, Ellederova Z, et al. Instrumented pig gait analysis: state-of-the-art. J Vet Behav. (2021) 45:51–9. doi: 10.1016/j.jveb.2021.06.006

CrossRef Full Text | Google Scholar

9. Wathes CM, Kristensen HH, Aerts JM, Berckmans D. Is precision livestock farming an engineer's daydream or nightmare, an animal's friend or foe, and a farmer's panacea or pitfall? Comput Electr Agric. (2008) 64:2–10. doi: 10.1016/j.compag.2008.05.005

CrossRef Full Text | Google Scholar

10. Azarpajouh S, Díaz JAC, Taheri H. Precision livestock farming: automatic lameness detection in intensive livestock systems. CABI Rev. (2020). doi: 10.1079/PAVSNNR202015031

CrossRef Full Text | Google Scholar

11. Fernández-Carrión E, Martínez-Avilés M, Ivorra B, Martínez-López B, Ramos AM, Sánchez-Vizcaíno JM. Motion-based video monitoring for early detection of livestock diseases: the case of African swine fever. PLoS ONE. (2017) 12:e0183793. doi: 10.1371/journal.pone.0183793

PubMed Abstract | CrossRef Full Text | Google Scholar

12. Benjamin M, Yik S. Precision livestock farming in swine welfare: a review for swine practitioners. (2019). Animals (Basel). (2019) 9:133. doi: 10.3390/ani9040133

PubMed Abstract | CrossRef Full Text | Google Scholar

13. Vranken E, Berckmans D. Precision livestock farming for pigs. Anim Front. (2017) 7:32–7. doi: 10.2527/af.2017.0106

CrossRef Full Text | Google Scholar

14. Nishikawa K, Biewener AA, Aerts P, Ahn AN, Chiel HJ, Daley MA, et al. Neuromechanics: an integrative approach for understanding motor control. Integr Comp Biol. (2007) 47:16–54. doi: 10.1093/icb/icm024

PubMed Abstract | CrossRef Full Text | Google Scholar

15. Young JW, Shapiro LJ. Developments in development: What have we learned from primate locomotor ontogeny? Am J Phys Anthropol. (2018) 165:37–71. doi: 10.1002/ajpa.23388

PubMed Abstract | CrossRef Full Text | Google Scholar

16. Schlageter-Tello A, Bokkers EAM, Groot Koerkamp PWG, Van Hertem T, Viazzi S, Romanini CEB, et al. Manual and automatic locomotion scoring systems in dairy cows: a review. Prevent Vet Med. (2014) 116:12–25. doi: 10.1016/j.prevetmed.2014.06.006

PubMed Abstract | CrossRef Full Text | Google Scholar

17. Serra Bragança FM, Rhodin M, van Weeren PR. On the brink of daily clinical application of objective gait analysis: What evidence do we have so far from studies using an induced lameness model? Vet J. (2018) 234:11–23. doi: 10.1016/j.tvjl.2018.01.006

PubMed Abstract | CrossRef Full Text | Google Scholar

18. Qiao Y, Kong H, Clark C, Lomax S, Su D, Eiffert S, et al. Intelligent perception-based cattle lameness detection and behaviour recognition: a review. Animals. (2021) 11:3033. doi: 10.3390/ani11113033

PubMed Abstract | CrossRef Full Text | Google Scholar

19. Figueiredo J, Santos CP, Moreno JC. Automatic recognition of gait patterns in human motor disorders using machine learning: a review. Med Eng Phys. (2018) 53:1–12. doi: 10.1016/j.medengphy.2017.12.006

PubMed Abstract | CrossRef Full Text | Google Scholar

20. Patua R, Muchhal T, Basu S. Gait-based person identification, gender classification, and age estimation: a review. In: Panigrahi CR, Pati B, Mohapatra P, Buyya R, Li KC, editors. Progress in Advanced Computing and Intelligent Engineering. Singapore: Springer Singapore (2021) p. 62–74.

Google Scholar

21. Bernstein NA. Chapter II: The problem of the interrelation of co-ordination and localization. Adv Psychol. 17:77–119. doi: 10.1016/S0166-4115(08)61370-9

CrossRef Full Text | Google Scholar

22. Ganley KJ, Powers CM. Gait kinematics and kinetics of 7-year-old children: a comparison to adults using age-specific anthropometric data. Gait Posture. (2005) 21:141–5. doi: 10.1016/j.gaitpost.2004.01.007

PubMed Abstract | CrossRef Full Text | Google Scholar

23. Stiffler-Joachim MR, Wille C, Kliethermes S, Heiderscheit B. Factors influencing base of gait during running: consideration of sex, speed, kinematics, and anthropometrics. J Athl Train. (2020) 55:1300–6. doi: 10.4085/1062-6050-565-19

PubMed Abstract | CrossRef Full Text | Google Scholar

24. Bruton MR, O'Dwyer N, Adams R. Sex differences in the kinematics and neuromuscular control of landing: Biological, environmental and sociocultural factors. J Electromyogr Kinesiol. (2013) 23:747–58. doi: 10.1016/j.jelekin.2013.04.012

PubMed Abstract | CrossRef Full Text | Google Scholar

25. Irschick DJ, Jayne BC. Comparative three-dimensional kinematics of the hindlimb for high-speed bipedal and quadrupedal locomotion of lizards. J Exp Biol. (1999) 202:1047–65. doi: 10.1242/jeb.202.9.1047

PubMed Abstract | CrossRef Full Text | Google Scholar

26. Pike AVL, Alexander RM. The relationship between limb-segment proportions and joint kinematics for the hind limbs of quadrupedal mammals. J Zool. (2002) 258:427–33. doi: 10.1017/S0952836902001577

CrossRef Full Text | Google Scholar

27. Stavrakakis S, Guy JH, Warlow OME, Johnson GR, Edwards SA. Walking kinematics of growing pigs associated with differences in musculoskeletal conformation, subjective gait score and osteochondrosis. Lives Sci. (2014) 165:104–13. doi: 10.1016/j.livsci.2014.04.008

CrossRef Full Text | Google Scholar

28. Seethapathi N, Wang S, Saluja R, Blohm G, Kording KP. Movement science needs different pose tracking algorithms. arXiv. (2019) 1907.10226. doi: 10.48550/arXiv.1907.10226

CrossRef Full Text | Google Scholar

29. Michelini A, Eshraghi A, Andrysek J. Two-dimensional video gait analysis: a systematic review of reliability, validity, and best practice considerations. Prosthet Orthot Int. (2020) 44:245–62. doi: 10.1177/0309364620921290

PubMed Abstract | CrossRef Full Text | Google Scholar

30. Jackson BE, Evangelista DJ, Ray DD, Hedrick TL. 3D for the people: multi-camera motion capture in the field with consumer-grade cameras and open source software. Biol. Open. (2016) 5:1334–42. doi: 10.1242/bio.018713

PubMed Abstract | CrossRef Full Text | Google Scholar

31. Karashchuk P, Rupp KL, Dickinson ES, Walling-Bell S, Sanders E, Azim E, et al. Anipose: a toolkit for robust markerless 3D pose estimation. Cell Rep. (2021) 36):109730. doi: 10.1016/j.celrep.2021.109730

PubMed Abstract | CrossRef Full Text | Google Scholar

32. Mathis A, Schneider S, Lauer J, Mathis MW. A primer on motion capture with deep learning: principles, pitfalls, and perspectives. Neuron. (2020) 108:44–65. doi: 10.1016/j.neuron.2020.09.017

PubMed Abstract | CrossRef Full Text | Google Scholar

33. Corcoran AJ, Schirmacher MR, Black E, Hedrick TL. ThruTracker: open-source software for 2-D and 3-D animal video tracking. bioRxiv. (2021). doi: 10.1101/2021.05.12.443854

CrossRef Full Text | Google Scholar

34. Mielke M, Aerts P, Van Ginneken C, Van Wassenbergh S, Mielke F. Progressive tracking: a novel procedure to facilitate manual digitization of videos. Biol Open. (2020) 9:bio055962. doi: 10.1242/bio.055962

PubMed Abstract | CrossRef Full Text | Google Scholar

35. McElreath R. Statistical Rethinking: A Bayesian Course With Examples in R and Stan. New York, NY: Chapman and Hall/CRC (2018).

Google Scholar

36. Gelman A, Carlin J, Stern H, Dunson D, Vehtari A, Rubin D. Bayesian Data Analysis. 3rd ed. (2020). Available online at: http://www.stat.columbia.edu/~gelman/book/ (accessed February 19, 2023).

Google Scholar

37. van de Schoot R, Depaoli S, King R, Kramer B, Märtens K, Tadesse MG, et al. Bayesian statistics and modelling. Nat Rev Methods Primers. (2021) 1:1. doi: 10.1038/s43586-020-00001-2

CrossRef Full Text | Google Scholar

38. Mielke F, Schunke V, Wölfer J, Nyakatura JA. Motion analysis of non-model organisms using a hierarchical model: influence of setup enclosure dimensions on gait parameters of Swinhoe's striped squirrels as a test case. Zoology (Jena). (2018) 129:35–44. doi: 10.1016/j.zool.2018.05.009

PubMed Abstract | CrossRef Full Text | Google Scholar

39. Mirkiani S, Roszko DA, O'Sullivan CL, Faridi P, Hu DS, Fang D, et al. Overground gait kinematics and muscle activation patterns in the Yucatan mini pig. J. Neural Eng. (2022) 19:026009. doi: 10.1088/1741-2552/ac55ac

PubMed Abstract | CrossRef Full Text | Google Scholar

40. Vanden Hole C, Goyens J, Prims S, Fransen E, Ayuso Hernando M, Van Cruchten S, et al. How innate is locomotion in precocial animals? A study on the early development of spatio-temporal gait variables and gait symmetry in piglets. J Exp Biol. (2017) 220:2706–16. doi: 10.1242/jeb.157693

PubMed Abstract | CrossRef Full Text | Google Scholar

41. Vanden Hole C, Aerts P, Prims S, Ayuso M, Van Cruchten S, Van Ginneken C. Does intrauterine crowding affect locomotor development? A comparative study of motor performance, neuromotor maturation and gait variability among piglets that differ in birth weight and vitality. PLoS ONE. (2018) 13:1–21. doi: 10.1371/journal.pone.0195961

PubMed Abstract | CrossRef Full Text | Google Scholar

42. Vanden Hole C, Ayuso M, Aerts P, Van Cruchten S, Thymann T, Sangild PT, et al. Preterm birth affects early motor development in pigs. Front Pediatr. (2021) 9:731877. doi: 10.3389/fped.2021.731877

PubMed Abstract | CrossRef Full Text | Google Scholar

43. von Wachenfelt H, Pinzke S, Nilsson C, Olsson O, Ehlorsson CJ. Gait analysis of unprovoked pig gait on clean and fouled concrete surfaces. Biosyst Eng. (2008) 101:376–82. doi: 10.1016/j.biosystemseng.2008.09.002

CrossRef Full Text | Google Scholar

44. Guesgen MJ, Bench CJ. What can kinematics tell us about the affective states of animals? Anim Welf. (2017) 26:383–97. doi: 10.7120/09627286.26.4.383

CrossRef Full Text | Google Scholar

45. Abell CE, Johnson AK, Karriker LA, Rothschild MF, Hoff SJ, Sun G, et al. Using classification trees to detect induced sow lameness with a transient model. Animal. (2014) 8:1000–9. doi: 10.1017/S1751731114000871

PubMed Abstract | CrossRef Full Text | Google Scholar

46. LaVallee KT, Maus TP, Stock JD, Stalder KJ, Karriker LA, Murthy NS, et al. Quantitation of gait and stance alterations due to monosodium iodoacetate–induced knee osteoarthritis in Yucatan swine. Comp Med. (2020) 70:248–57. doi: 10.30802/AALAS-CM-19-000075

PubMed Abstract | CrossRef Full Text | Google Scholar

47. Benasson I, Wagnac E, Diotalevi L, Moore D, Mac-Thiong JM, Petit Y. Gait analysis of a post induced traumatic spinal cord injury porcine model. Annu Int Conf IEEE Eng Med Biol Soc. (2020) 2020:3803–6. doi: 10.1109/EMBC44109.2020.9175280

PubMed Abstract | CrossRef Full Text | Google Scholar

48. Quiniou N, Dagorn J, Gaudré D. Variation of piglets' birth weight and consequences on subsequent performance. Livest Prod Sci. (2002) 78:63–70. doi: 10.1016/S0301-6226(02)00181-1

PubMed Abstract | CrossRef Full Text | Google Scholar

49. Van Tichelen K, Prims S, Ayuso M, Van Kerschaver C, Vandaele M, Degroote J, et al. Handling associated with drenching does not impact survival and general health of low birth weight piglets. Animals. (2021) 11:404. doi: 10.3390/ani11020404

PubMed Abstract | CrossRef Full Text | Google Scholar

50. Wang J, Yang M, Cao M, Lin Y, Che L, Duraipandiyan V, et al. Moderately increased energy intake during gestation improves body condition of primiparous sows, piglet growth performance, and milk fat and protein output. Livestock Sci. (2016) 194:23–30. doi: 10.1016/j.livsci.2016.09.012

CrossRef Full Text | Google Scholar

51. D'Inca R, Gras-Le Guen C, Che L, Sangild PT, Le Huërou-Luron I. Intrauterine growth restriction delays feeding-induced gut adaptation in term newborn pigs. Neonatology. (2011) 99:208–16. doi: 10.1159/000314919

PubMed Abstract | CrossRef Full Text | Google Scholar

52. Feldpausch JA, Jourquin J, Bergstrom JR, Bargen JL, Bokenkroger CD, Davis DL, et al. Birth weight threshold for identifying piglets at risk for preweaning mortality. Transl Anim Sci. (2019) 3:633–40. doi: 10.1093/tas/txz076

PubMed Abstract | CrossRef Full Text | Google Scholar

53. Roehe R, Kalm E. Estimation of genetic and environmental risk factors associated with pre-weaning mortality in piglets using generalized linear mixed models. Anim Sci. (2000) 70:227–40. doi: 10.1017/S1357729800054692

CrossRef Full Text | Google Scholar

54. Amdi C, Krogh U, Flummer C, Oksbjerg N, Hansen CF, Theil PK. Intrauterine growth restricted piglets defined by their head shape ingest insufficient amounts of colostrum. J Anim Sci. (2013) 91:5605–13. doi: 10.2527/jas.2013-6824

PubMed Abstract | CrossRef Full Text | Google Scholar

55. Baxter EM, Jarvis S, D'Eath RB, Ross DW, Robson SK, Farish M, et al. Investigating the behavioural and physiological indicators of neonatal survival in pigs. Theriogenology. (2008) 69:773–83. doi: 10.1016/j.theriogenology.2007.12.007

PubMed Abstract | CrossRef Full Text | Google Scholar

56. Hales J, Moustsen VA, Nielsen MBF, Hansen CF. Individual physical characteristics of neonatal piglets affect preweaning survival of piglets born in a noncrated system. J Anim Sci. (2013) 91:4991–5003. doi: 10.2527/jas.2012-5740

PubMed Abstract | CrossRef Full Text | Google Scholar

57. Muns R, Manzanilla EG, Sol C, Manteca X, Gasa J. Piglet behavior as a measure of vitality and its influence on piglet survival and growth during lactation. J Anim Sci. (2013) 91:1838–43. doi: 10.2527/jas.2012-5501

PubMed Abstract | CrossRef Full Text | Google Scholar

58. Van Ginneken C, Ayuso M, Van Bockstal L, Van Cruchten S. Preweaning performance in intrauterine growth-restricted piglets: characteristics and interventions. Mol Reprod Dev. (2022) 1–11. doi: 10.1002/mrd.23614

PubMed Abstract | CrossRef Full Text | Google Scholar

59. Andersen AD, Sangild PT, Munch SL, van der Beek EM, Renes IB, Ginneken Cv, et al. Delayed growth, motor function and learning in preterm pigs during early postnatal life. Am J Physiol Regul Integr Comp Physiol. (2016) 310:R481–92. doi: 10.1152/ajpregu.00349.2015

PubMed Abstract | CrossRef Full Text | Google Scholar

60. Marchant JN, Rudd AR, Mendl MT, Broom DM, Meredith MJ, Corning S, et al. Timing and causes of piglet mortality in alternative and conventional farrowing systems. Vet Rec. (2000) 147:209–14. doi: 10.1136/vr.147.8.209

PubMed Abstract | CrossRef Full Text | Google Scholar

61. Edwards SA, Baxter EM. Chapter 11. Piglet mortality: causes and prevention. In: Farmer C, editor. The Gestating and Lactating Sow (2015) p. 253–78. doi: 10.3920/978-90-8686-803-2_11

CrossRef Full Text | Google Scholar

62. Newell KM, Liu YT. Collective variables and task constraints in movement coordination, control and skill. J Mot Behav. (2021) 53:770–96. doi: 10.1080/00222895.2020.1835799

PubMed Abstract | CrossRef Full Text | Google Scholar

63. Aerts P, Van Damme R, Van Elsacker L, Duchêne V. Spatio-temporal gait characteristics of the hind-limb cycles during voluntary bipedal and quadrupedal walking in bonobos (Pan paniscus). Am J Phys Anthropol. (2000) 111:503–17. doi: 10.1002/(SICI)1096-8644(200004)111:4<503::AID-AJPA6>3.0.CO;2-J

PubMed Abstract | CrossRef Full Text | Google Scholar

64. Frick RW. The appropriate use of null hypothesis testing. Psychol Methods. (1996) 1:379. doi: 10.1037/1082-989X.1.4.379

CrossRef Full Text | Google Scholar

65. Maxwell SE, Delaney HD, Kelley K. Designing Experiments and Analyzing Data: A Model Comparison Perspective. New York, NY: Routledge (2017).

Google Scholar

66. Riley RD, Ensor J, Snell KIE, Harrell FE, Martin GP, Reitsma JB, et al. Calculating the sample size required for developing a clinical prediction model. BMJ. (2020) 368:m441. doi: 10.1136/bmj.m441

PubMed Abstract | CrossRef Full Text | Google Scholar

67. Austin PC, Steyerberg EW. The number of subjects per variable required in linear regression analyses. J Clin Epidemiol. (2015) 68:627–36. doi: 10.1016/j.jclinepi.2014.12.014

PubMed Abstract | CrossRef Full Text | Google Scholar

68. Mielke F, Van Ginneken C, Aerts P. Quantifying intralimb coordination of terrestrial ungulates with Fourier coefficient affine superimposition. Zool J Linn Soc. (2019) 189:1067–83. doi: 10.1093/zoolinnean/zlz135

CrossRef Full Text | Google Scholar

69. Webb D, Sparrow WA. Description of joint movements in human and non-human primate locomotion using Fourier analysis. Primates. (2007) 48:277–92. doi: 10.1007/s10329-007-0043-4

PubMed Abstract | CrossRef Full Text | Google Scholar

70. Fourier J. Theorie Analytique de la Chaleur, par M. Fourier. Paris: Chez Firmin Didot, père et Fils (1822).

Google Scholar

71. Bracewell RN. The Fourier Transform and its Applications. 3rd ed. McGraw-Hill Series in Electrical and Computer Engineering. Circuits and Systems. New York, NY: McGraw Hill (2000).

Google Scholar

72. Gray RM, Goodman JW. Fourier Transforms: An Introduction for Engineers. 1st ed. The Springer International Series in Engineering and Computer Science. Vol. 322. New York, NY: Springer US (1995).

73. Ayuso M, Irwin R, Walsh C, Van Cruchten S, Van Ginneken C. Low birth weight female piglets show altered intestinal development, gene expression, and epigenetic changes at key developmental loci. FASEB J. (2021) 35:e21522. doi: 10.1096/fj.202002587R

PubMed Abstract | CrossRef Full Text | Google Scholar

74. Litten J, Drury P, Corson A, Lean I, Clarke L. The influence of piglet birth weight on physical and behavioural development in early life. Neonatology. (2003) 84:311–8. doi: 10.1159/000073640

PubMed Abstract | CrossRef Full Text | Google Scholar

75. Meijer E, Bertholle CP, Oosterlinck M, van der Staay FJ, Back W, van Nes A. Pressure mat analysis of the longitudinal development of pig locomotion in growing pigs after weaning. BMC Vet Res. (2014) 10:1–37. doi: 10.1186/1746-6148-10-37

PubMed Abstract | CrossRef Full Text | Google Scholar

76. Mathis A, Mamidanna P, Cury KM, Abe T, Murthy VN, Mathis MW, et al. DeepLabCut: markerless pose estimation of user-defined body parts with deep learning. Nat Neurosci. (2018) 21:1281–9. doi: 10.1038/s41593-018-0209-y

PubMed Abstract | CrossRef Full Text | Google Scholar

77. Hof AL. Scaling gait data to body size. Gait Posture. (1996) 4:222–3. doi: 10.1016/S0966-6362(01)00097-2

PubMed Abstract | CrossRef Full Text | Google Scholar

78. Alexander RM, Jayes AS. A dynamic similarity hypothesis for the gaits of quadrupedal mammals. J Zool. (1983) 201:135–52. doi: 10.1111/j.1469-7998.1983.tb04266.x

PubMed Abstract | CrossRef Full Text | Google Scholar

79. Scott B, Seyres M, Philp F, Chadwick EK, Blana D. Healthcare applications of single camera markerless motion capture: a scoping review. PeerJ. (2022) 10:e13517. doi: 10.7717/peerj.13517

PubMed Abstract | CrossRef Full Text | Google Scholar

80. Salvatier J, Wiecki TV, Fonnesbeck C. Probabilistic programming in Python using PyMC3. PeerJ Comput Sci. (2016) 2:e55. doi: 10.7717/peerj-cs.55

CrossRef Full Text | Google Scholar

81. D'Eath R. Repeated locomotion scoring of a sow herd to measure lameness: consistency over time, the effect of sow characteristics and inter-observer reliability. Anim Welf. (2012) 21:219–31. doi: 10.7120/09627286.21.2.219

CrossRef Full Text | Google Scholar

82. Le Dividich J, Charneca R, Thomas F. Relationship between birth order, birth weight, colostrum intake, acquisition of passive immunity and pre-weaning mortality of piglets. Span J Agric Res. (2017) 15:e0603. doi: 10.5424/sjar/2017152-9921

CrossRef Full Text | Google Scholar

83. Vanden Hole C, Cleuren S, Van Ginneken C, Prims S, Ayuso M, Van Cruchten S, et al. How does intrauterine crowding affect locomotor performance in newborn pigs? A study of force generating capacity and muscle composition of the hind limb. PLoS ONE. (2018) 13:e0209233. doi: 10.1371/journal.pone.0209233

PubMed Abstract | CrossRef Full Text | Google Scholar

84. Vanden Hole C, Ayuso M, Aerts P, Prims S, Van Cruchten S, Van Ginneken C. Glucose and glycogen levels in piglets that differ in birth weight and vitality. Heliyon. (2019) 5:e02510. doi: 10.1016/j.heliyon.2019.e02510

PubMed Abstract | CrossRef Full Text | Google Scholar

85. Schmitt O, Baxter EM, Lawlor PG, Boyle LA, O'Driscoll K. A single dose of fat-based energy supplement to light birth weight pigs shortly after birth does not increase their survival and growth. Animals (Basel). (2019) 9:227. doi: 10.3390/ani9050227

PubMed Abstract | CrossRef Full Text | Google Scholar

Keywords: locomotion, kinematics, probabilistic modeling, Fourier Series, precision livestock farming, diagnostics, piglets, low birth weight

Citation: Mielke F, Van Ginneken C and Aerts P (2023) A workflow for automatic, high precision livestock diagnostic screening of locomotor kinematics. Front. Vet. Sci. 10:1111140. doi: 10.3389/fvets.2023.1111140

Received: 29 November 2022; Accepted: 13 February 2023;
Published: 07 March 2023.

Edited by:

Rocio Fernandez-Parra, Catholic University of Valencia San Vicente Mártir, Spain

Reviewed by:

Suresh Neethirajan, Farmworx Research Institute, Netherlands
Madonna Benjamin, Michigan State University, United States

Copyright © 2023 Mielke, Van Ginneken and Aerts. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: Falk Mielke, falkmielke.biology@mailbox.org

Download