A method for recognizing horse gait and detecting lameness based on inertial sensor
Patent Information
- Application Number
- CN202310482098.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-29
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2043-04-29
AI Technical Summary
[0045]The beneficial effects of this invention are as follows: This invention provides a method for horse gait recognition and limp detection based on inertial sensors. Based on deep learning, BiLSTM is introduced into a convolutional neural network to extract the forward and backward dependencies of feature sequences, improving network performance and effectively enhancing the accuracy of horse gait recognition. Compared with image-based gait recognition, inertial sensor-based gait recognition is low-cost, small-sized, low-power, highly flexible, and unaffected by environmental factors. This invention is mainly aimed at equestrian training scenarios, objectively, comprehensively, and accurately grasping the real-time gait and limp degree of horses during equestrian training. This not only improves the effectiveness of equestrian training and the competitive state of horses, but also has a good control effect on the early prevention of sports injuries in horses, making it highly practical.
Smart Images

Figure CN116649957B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical fields of machine learning, deep learning, signal processing and pattern recognition, and in particular to a method for horse gait recognition and limp detection based on inertial sensors. Background Technology
[0002] In competitive sports, collecting data related to athletic activities during training and competition is crucial for specific sport training. With the increasing popularity and prevalence of equestrian events, equestrian sports have come into the public eye. Long-term management practices and successful experiences have shown that objectively, comprehensively, and accurately understanding the horse's condition during equestrian training can not only improve training effectiveness and competitive performance but also effectively control the early prevention of sports injuries in horses.
[0003] Currently, monitoring in equestrian training mainly revolves around the analysis of signal indicators such as image signals, gait signals, and electromyography (EMG) signals. Gait signals primarily include acceleration signals and gyroscope signals. These signals can be used to identify the three natural gaits of horses (walking, trotting, and cantering) and to monitor abnormal gaits. With the development of sensor technology, signal acquisition has become increasingly stable. Therefore, the analysis and recognition of gait signals have received more attention. How to combine gait signal processing with machine learning and deep learning and apply it to equestrian training to achieve gait recognition, lameness detection, comprehensive, objective, and accurate assessment of the horse's competitive state, timely adjustment of training load, and scientific training has become an urgent problem to be solved. Summary of the Invention
[0004] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.
[0005] In view of the aforementioned existing problems, the present invention is proposed.
[0006] Therefore, the technical problem solved by the present invention is that the existing technology has the problems of complex technical means and high cost in identifying horse gait and lameness detection.
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a method for horse gait recognition and lameness detection based on inertial sensors, comprising:
[0008] By equipping horses with inertial sensor devices, signals from the horses' activities are collected, and the data is preprocessed.
[0009] Feature extraction is performed on the processed data using CNN, and a gait recognition model is built based on BiLSTM network training.
[0010] From the processed data, a horse trotting dataset is selected to construct a feature vector, which is then input into a machine learning model for limp detection.
[0011] As a preferred embodiment of the horse gait recognition and lameness detection method based on inertial sensors described in this invention, the signal data collected by the sensor is represented as follows:
[0012] Acc measure =Acc real +Acc noise
[0013] Among them, Acc measure For the actual measured value, Acc real For the true value, Acc noise It is noise.
[0014] As a preferred embodiment of the horse gait recognition and lameness detection method based on inertial sensors described in this invention, the preprocessing includes noise reduction and signal segmentation;
[0015] The noise reduction process uses a first-order inertial low-pass filter to filter the data, and the filtering formula is expressed as follows:
[0016] Acc filter (i)=m×Acc(i)+(1-m)×Acc(i-1)
[0017] Where m is the filter coefficient, and Acc(i) is the acceleration value at the i-th sampling point. filter (i) represents the acceleration value of the i-th sampling point after filtering;
[0018] The signal segmentation uses a sliding window with a length between 100ms and 200ms, and a sliding length between 10ms and 100ms.
[0019] As a preferred embodiment of the horse gait recognition and lameness detection method based on inertial sensors described in this invention, the feature extraction includes:
[0020] The processed information data is input into a 1×3 kernel parallel one-dimensional convolutional network for feature extraction. The calculation method for feature extraction is as follows:
[0021]
[0022] in, For the nth class output of the mth sample, F conv (xm [i,j,filters]) represents the convolution operation performed on the samples using a convolution kernel of size [i,j,filters].
[0023] The extracted features are represented using a fully connected layer activated by the sigmoid function, and a bidirectional LSTM network is used to learn effective information from the noisy data in the hidden state through forward and backward propagation.
[0024] Important features are merged together based on an attention mechanism, and key features are selected by reallocating weights.
[0025] The key features are classified by a fully connected layer to determine whether the current gait is walking, jogging, or slow running.
[0026] As a preferred embodiment of the horse gait recognition and lameness detection method based on inertial sensors described in this invention, the BiLSTM network is a bidirectional stacked LSTM network, and the propagation process is represented as follows:
[0027] h t =σ(w1x t +w2h t-1 )×tanh(C t )
[0028] h′ t =σ(w3x t +w4h′ t-1 )×tanh(C′ t )
[0029] OG t =w5h t +w6h′ t
[0030] Where, x t Here, w is the input at time t, w is the weight of the LSTM cell gate, and h is the input at time t. t and h′ t These are forward output and reverse output, respectively, and the output gate is OG. t Save bidirectional step size information.
[0031] As a preferred embodiment of the horse gait recognition and lameness detection method based on inertial sensors described in this invention, the formula for constructing the features is expressed as follows:
[0032] c(i) = |Acc x (i)÷Acc(i)-c0|
[0033] Among them, Acc x(i) represents the x-axis acceleration at the i-th sampling point, c0 is a constant, and Acc(i) represents the combined triaxial acceleration at the i-th sampling point, expressed as:
[0034]
[0035] As a preferred embodiment of the horse gait recognition and limp detection method based on inertial sensors described in this invention, the method involves analyzing the horse's trotting process and determining the acceleration Acc of the left and right legs along the x-axis. x The combined acceleration Acc of the three axes and the new feature c show significant differences, therefore the following feature vector is constructed:
[0036]
[0037] Where Δc and ΔAc are the difference in characteristic c and the difference in acceleration between the left and right legs of the horse's forelimbs or hindlimbs, respectively.
[0038] As a preferred embodiment of the horse gait recognition and lameness detection method based on inertial sensors described in this invention, the feature vector is input into a machine learning model to distinguish between lameness and non-lameness. The degree of lameness of the horse needs to be further subdivided. Based on the difference in feature vectors of the left and right legs of the forelimbs or hindlimbs, the degree of lameness is determined by calculating the Euclidean distance.
[0039] As a preferred embodiment of the horse gait recognition and lameness detection method based on inertial sensors described in this invention, the Euclidean distance is calculated using the following formula:
[0040]
[0041] Among them, v lk v represents the k-th parameter of the left anterior / hind limb feature vector. rk The k-th parameter of the right forelimb / hindlimb feature vector is represented by y, which takes values in the range [0,1] and represents the degree of lameness in the horse's forelimb or hindlimb.
[0042] As a preferred embodiment of the horse gait recognition and lameness detection method based on inertial sensors described in this invention, when y < 0.3, it indicates that the horse's lameness is relatively mild;
[0043] When 0.3≤y≤0.4, it indicates that the horse's lameness is moderate;
[0044] When y > 0.4, it indicates that the horse's lameness is relatively severe.
[0045] The beneficial effects of this invention are as follows: This invention provides a method for horse gait recognition and limp detection based on inertial sensors. Based on deep learning, BiLSTM is introduced into a convolutional neural network to extract the forward and backward dependencies of feature sequences, improving network performance and effectively enhancing the accuracy of horse gait recognition. Compared with image-based gait recognition, inertial sensor-based gait recognition is low-cost, small-sized, low-power, highly flexible, and unaffected by environmental factors. This invention is mainly aimed at equestrian training scenarios, objectively, comprehensively, and accurately grasping the real-time gait and limp degree of horses during equestrian training. This not only improves the effectiveness of equestrian training and the competitive state of horses, but also has a good control effect on the early prevention of sports injuries in horses, making it highly practical. Attached Figure Description
[0046] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0047] Figure 1 This is an overall flowchart of a method for horse gait recognition and lameness detection based on inertial sensors according to an embodiment of the present invention.
[0048] Figure 2 This is a BiLSTM network diagram of a horse gait recognition and lameness detection method based on an inertial sensor according to an embodiment of the present invention.
[0049] Figure 3 This is a diagram of the CNN-BiLSTM neural network model structure of the horse gait recognition and lameness detection method based on inertial sensors according to an embodiment of the present invention.
[0050] Figure 4 This is a flowchart of the horse lameness detection process in an embodiment of the horse gait recognition and lameness detection method based on inertial sensors according to one embodiment of the present invention.
[0051] Figure 5 This is a schematic diagram of the overall implementation scheme of the horse gait recognition and lameness detection method based on inertial sensors according to an embodiment of the present invention. Detailed Implementation
[0052] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0053] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0054] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0055] This invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of this invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not adhering to the usual scale. Furthermore, the schematic diagrams are merely examples and should not be construed as limiting the scope of protection of this invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.
[0056] Furthermore, in the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In addition, the terms "first," "second," or "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0057] Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" in this invention should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; similarly, they can refer to mechanical connections, electrical connections, or direct connections, or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0058] Example 1
[0059] Reference Figure 1—4, is the first embodiment of the present invention, which provides a method for horse gait recognition and lameness detection based on inertial sensors, characterized in that it includes:
[0060] S1: By equipping horses with inertial sensor devices, signals from the horses' activities are collected, and the data is preprocessed.
[0061] Furthermore, wearable inertial sensor devices were fitted to the horses' limbs to collect sensor signals. All devices were connected to mobile devices via Bluetooth, the sensor signal sampling frequency was set to 200Hz, and the data collection site was a special equestrian fiber sand field. Each horse performed a set of walking, trotting, and slow trotting every 30 minutes, and the field surface was checked before each data collection.
[0062] The signal data collected by the sensor is represented as follows:
[0063] Acc measure =Acc real +Acc noise
[0064] Among them, Acc measure For the actual measured value, Acc real For the true value, Acc noise It is noise.
[0065] Furthermore, preprocessing includes noise reduction and signal segmentation;
[0066] Noise reduction is achieved by filtering the data using a first-order inertial low-pass filter, the filtering formula of which is expressed as:
[0067] Ac filter (i)=m×Acc(i)+(1-m)×Acc(i-1)
[0068] Where m is the filter coefficient, and Acc(i) is the acceleration value at the i-th sampling point. filter (i) represents the acceleration value of the i-th sampling point after filtering;
[0069] Signal segmentation uses a sliding window with a length between 100ms and 200ms, and a sliding length between 10ms and 100ms.
[0070] S2: Features are extracted from the processed data using CNN, and a gait recognition model is built based on a BiLSTM network.
[0071] Furthermore, feature extraction includes:
[0072] The processed information data is input into a 1×3 kernel parallel one-dimensional convolutional network for feature extraction. The calculation method for feature extraction is as follows:
[0073]
[0074] in, For the nth class output of the mth sample, F conv (x m [i,j,filters]) represents the convolution operation performed on the samples using a convolution kernel of size [i,j,filters].
[0075] The extracted features are represented using a fully connected layer activated by the sigmoid function, and a bidirectional LSTM network is used to learn effective information from the noisy data in the hidden state through forward and backward propagation.
[0076] Important features are merged together based on an attention mechanism, and key features are selected by reallocating weights.
[0077] The key features are classified by a fully connected layer to determine whether the current gait is walking, jogging, or slow running.
[0078] Furthermore, such as Figure 2 As shown, the BiLSTM network is a bidirectional stacked LSTM network, and the propagation process is represented as follows:
[0079] h t =σ(w1x t +w2h t-1 )×tanh(C t )
[0080] h′ t =σ(w3xt+w4h′) t-1 )×tanh(C′ t )
[0081] OG t =w5h t +w6h′ t
[0082] Where, x t Here, w is the input at time t, w is the weight of the LSTM cell gate, and h is the input at time t. t and h′ t These are the forward and reverse outputs, respectively, with the output gate OGT storing bidirectional step size information. Therefore, both future and past information can be retained, which is more conducive to faster and richer learning for gait recognition tasks.
[0083] It should be noted that, as Figure 3 As shown, CNN-BiLSTM is a parallel bidirectional LSTM (BiLSTM) model based on CNN, which has an attention mechanism and includes the tuning of training parameters.
[0084] S3: Select a horse trotting dataset from the processed data to construct a feature vector, and input it into a machine learning model for limp detection.
[0085] Furthermore, such as Figure 4 As shown, the formula for constructing the feature is expressed as follows:
[0086] c(i) = |Acc x (i)÷Acc(i)-c0|
[0087] Among them, Acc x (i) represents the x-axis acceleration at the i-th sampling point, c0 is a constant, and Acc(i) represents the combined triaxial acceleration at the i-th sampling point, expressed as:
[0088]
[0089] Furthermore, analyzing the horse's trotting process, the acceleration Acc of the left and right legs along the x-axis is... x The combined acceleration Acc of the three axes and the new feature c show significant differences, therefore the following feature vector is constructed:
[0090]
[0091] Where Δc and ΔAcc are the difference in characteristic c and acceleration between the left and right legs of a horse's forelimb or hindlimb, respectively.
[0092] Furthermore, the formula for calculating the Euclidean distance is expressed as follows:
[0093]
[0094] Among them, v lk v represents the k-th parameter of the left anterior / hind limb feature vector. rk The k-th parameter of the right forelimb / hindlimb feature vector is represented by y, which takes values in the range [0,1] and represents the degree of lameness in the horse's forelimb or hindlimb.
[0095] When y < 0.3, it indicates that the lameness of the horse is relatively mild;
[0096] When 0.3≤y≤0.4, it indicates that the horse's lameness is moderate;
[0097] When y > 0.4, it indicates that the horse's lameness is relatively severe.
[0098] Example 2
[0099] Reference Figure 5This is one embodiment of the present invention, which provides a method for horse gait recognition and lameness detection based on inertial sensors. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through implementation effects.
[0100] Reference Figure 5 This invention has been applied in equestrian training at the School of Physical Education, Shanghai University. The results show that this invention can accurately grasp the real-time gait and degree of lameness of horses in equestrian training, and has a good control effect on the prevention of horse injuries and diseases, making it highly practical.
[0101] Compared to existing image-based gait recognition, the inertial sensor-based gait recognition method of this invention is much lower in cost. This invention uses self-developed inertial sensor nodes, each costing approximately 200 yuan. This invention requires installing one inertial sensor on each of the horse's four limbs, with a total cost of around 800 yuan. In contrast, the high-definition cameras required for image-based gait recognition cost anywhere from several thousand to tens of thousands of yuan.
[0102] Existing technologies often only target one aspect of horse gait recognition or lameness detection. This invention builds separate models for horse gait recognition and lameness detection, enabling simultaneous gait recognition and lameness detection in a single data acquisition. Therefore, this invention is specifically designed for equestrian training scenarios, objectively, comprehensively, and accurately capturing the horse's real-time gait and degree of lameness. This not only improves training effectiveness and the horse's competitive performance but also provides excellent control over early sports injuries, demonstrating strong practicality.
[0103] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for horse gait recognition and lameness detection based on inertial sensors, characterized in that, include: By equipping horses with inertial sensor devices, signals from the horses' activities are collected, and the data is preprocessed. Feature extraction is performed on the processed data using CNN, and a gait recognition model is built based on BiLSTM network training. Feature vectors are constructed from a horse trotting dataset selected from the processed data and then input into a machine learning model for limp detection. The formula for constructing features is expressed as follows: ; in, For the first sampling points Axial acceleration, For constant terms, For the first The combined triaxial acceleration of each sampling point is expressed as: ; Analyzing the horse's trotting process, the left and right legs of the horse's forelimbs and hindlimbs. Axial acceleration Triaxial combined acceleration and new features The differences are obvious, therefore the following feature vector is constructed: ; in, as well as These are the characteristics of the left and right legs of a horse's forelimbs or hindlimbs. The difference between the values of the two accelerations and the difference between the accelerations. The feature vectors are input into a machine learning model to distinguish between lameness and non-lameness. The degree of lameness in horses needs to be further subdivided. Based on the difference in feature vectors between the left and right legs of the forelimbs or hindlimbs, the degree of lameness is determined by calculating the Euclidean distance.
2. The method for horse gait recognition and lameness detection based on inertial sensors as described in claim 1, characterized in that: The signal data collected by the inertial sensor is represented as follows: ; in, These are the actual measured values. For the true value, It is noise.
3. The method for horse gait recognition and lameness detection based on inertial sensors as described in claim 2, characterized in that: The preprocessing includes noise reduction and signal segmentation; The noise reduction process uses a first-order inertial low-pass filter to filter the data, and the filtering formula is expressed as follows: ; in, These are the filter coefficients. No. Acceleration values at each sampling point For the filtered first Acceleration values at each sampling point; The signal segmentation uses a sliding window with a length between 100ms and 200ms, and a sliding length between 10ms and 100ms.
4. The method for horse gait recognition and lameness detection based on inertial sensors as described in claim 3, characterized in that: The feature extraction includes: The processed information data is input into a 1×3 kernel parallel one-dimensional convolutional network for feature extraction. The calculation method for feature extraction is as follows: ; in, For the first The first sample Class output, For use of size The convolution operation performed on the samples by the convolution kernel; The extracted features are represented using a fully connected layer activated by the sigmoid function, and a bidirectional LSTM network is used to learn effective information from the noisy data in the hidden state through forward and backward propagation. Important features are merged together based on an attention mechanism, and key features are selected by reallocating weights. The key features are classified by a fully connected layer to determine whether the current gait is walking, jogging, or slow running.
5. The method for horse gait recognition and lameness detection based on inertial sensors as described in claim 4, characterized in that: The BiLSTM network is a bidirectional stacked LSTM network, and the propagation process is represented as follows: ; ; ; in, yes Input at any time These are the weights of the LSTM cell gates. and These are forward output and reverse output, respectively; output gate Save bidirectional step size information.
6. The method for horse gait recognition and lameness detection based on inertial sensors as described in claim 1, characterized in that: The formula for calculating the Euclidean distance is expressed as follows: ; in, The first digit representing the feature vector of the left forelimb / hindlimb One parameter, The first digit representing the feature vector of the right forelimb / hindlimb One parameter, The range of values is This indicates the degree of lameness in a horse's forelimbs or hindlimbs.
7. The method for horse gait recognition and lameness detection based on inertial sensors as described in claim 6, characterized in that, Also includes: when A value <0.3 indicates that the lameness in the horse is relatively mild; When 0.3≤ A value ≤0.4 indicates a moderate degree of lameness in the horse; when A value greater than 0.4 indicates that the horse's lameness is quite severe.
Citation Information
Patent Citations
Wireless radio frequency signal-based non-contact living state monitoring method and system
CN115474901A
Evaluation device, evaluation program, and evaluation method
EP3111841A1