Lamb limp behavior recognition method and device based on indoor camera
By collecting sheep gait images through indoor cameras and combining motion blur suppression and symmetry index calculation, sheep lameness behavior can be automatically identified, solving the problems of low efficiency and low precision in existing technologies and achieving efficient and accurate sheep lameness detection.
Patent Information
- Application Number
- CN202510686513.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-05-27
AI Technical Summary
The existing technology for sheep lameness detection has low efficiency and accuracy, and the sensors are easy to fall off and require regular maintenance, making it difficult to achieve real-time and accurate monitoring in large-scale breeding scenarios.
Indoor cameras are used to capture sheep gait images, and through motion blur suppression processing, motion key point recognition and symmetry index calculation, sheep lameness behavior is automatically identified, avoiding sensor contact with the sheep's body, reducing stress reactions and maintenance difficulties.
It achieves efficient and accurate identification of sheep lameness behavior, improves detection efficiency and accuracy, eliminates the subjective limitations of traditional manual observation, and is suitable for large-scale breeding scenarios.
Smart Images

Figure CN120635979A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a method and device for identifying sheep lameness behavior based on an indoor camera. Background Art
[0002] With the development of large-scale sheep farming, lameness has become a key factor hindering profitability, as it can easily lead to chain reactions such as growth retardation and decreased fertility. Traditional sheep lameness detection relies on manual inspections, where breeders make judgments based on the sheep's gait and hoof appearance. This method is not only inefficient and labor-intensive, but also subject to the influence of human experience and subjective factors, making it difficult to achieve real-time and accurate monitoring.
[0003] Existing technologies use pressure sensors, inertial sensors, and other devices attached to the sheep's legs to collect limb movement data and determine lameness. For example, some studies use accelerometers to monitor the sheep's movement. However, these methods suffer from issues such as sensors easily falling off, requiring regular maintenance, and causing stress in the sheep, making them unsuitable for large-scale farming scenarios. Therefore, there is an urgent need to develop an efficient, high-precision automated identification method suitable for indoor farming environments. Summary of the Invention
[0004] The present invention provides a method and device for identifying sheep lameness behavior based on an indoor camera, the main purpose of which is to solve the problem of low efficiency and low precision of existing sheep lameness behavior identification methods.
[0005] To achieve the above objectives, the present invention provides a sheep lameness behavior recognition method based on an indoor camera, comprising:
[0006] Using a preset indoor camera to collect gait images of the target sheep according to a preset time interval to obtain a gait image sequence;
[0007] performing motion blur suppression processing on the gait image sequence to obtain a blur-suppressed image sequence;
[0008] Performing motion key point recognition on the blur-suppressed image sequence to obtain key point recognition data;
[0009] Identify the intervals between the left and right limbs leaving the ground on the fuzzy suppressed image sequence according to the key point recognition data to obtain a time series of the intervals between the left and right limbs leaving the ground;
[0010] Calculating a symmetry index based on the time series of the drop-off interval;
[0011] The lameness behavior of the target sheep is identified according to the symmetry index to obtain an identification result.
[0012] Optionally, the performing motion key point recognition on the blur-suppressed image sequence to obtain key point recognition data includes:
[0013] Performing limb edge recognition on the blur-suppressed image sequence to obtain limb edge data;
[0014] Marking the bottom edges of the limbs of the blur-suppressed image sequence according to the limb edge data to obtain a bottom edge image sequence;
[0015] Setting a same ground reference line for each image in the bottom edge image sequence, obtaining a vertical distance between the bottom edge in each image in the bottom edge image sequence and the ground reference line, and obtaining a distance data sequence;
[0016] Motion key points are identified on the bottom edge image sequence according to the distance data sequence.
[0017] Optionally, the performing motion key point recognition on the bottom edge image sequence according to the distance data sequence includes:
[0018] Dividing the bottom edge image sequence into four limb intervals to obtain four groups of single limb bottom edge image sequences;
[0019] identifying, based on the distance data sequence, regions in each set of single-limb bottom edge image sequences where the vertical distance between the bottom edge and the ground reference line remains constant, to obtain multiple sets of ground contact image sequences;
[0020] Confirming the first frame of each set of touchdown image sequences as a touchdown key point image, and confirming the last frame of each set of touchdown image sequences as a lift-off key point image;
[0021] All touchdown key point images and lift-off key point images are aggregated to obtain the key point recognition data.
[0022] Optionally, the step of identifying the intervals between the left and right limbs falling off the ground on the fuzzy suppressed image sequence according to the key point recognition data to obtain a time series of the intervals between the left and right limbs falling off the ground comprises:
[0023] Dividing the blur-suppressed image sequence into gait cycles based on a preset periodic interval to obtain gait cycle sequence data;
[0024] According to the key point recognition data and the gait cycle sequence data, the fuzzy suppression image sequence is subjected to left and right limb landing interval recognition to obtain a left limb landing interval sequence and a right limb landing interval sequence;
[0025] Calculating the time difference between the left and right limbs landing according to the left limb landing interval sequence and the right limb landing interval sequence to obtain a time difference sequence;
[0026] Calculating the variance of the time difference sequence to obtain the sequence variance;
[0027] Determining whether the sequence variance is greater than a preset variance threshold;
[0028] If the sequence variance is greater than the variance threshold, adjusting the preset period interval, and returning to the step of dividing the blur-suppressed image sequence into gait periods based on the preset period interval to obtain gait period sequence data;
[0029] If the sequence variance is less than or equal to the variance threshold, the left limb lift-off and landing interval sequence and the right limb lift-off and landing interval sequence are summarized to obtain gait cycle sequence data.
[0030] Optionally, calculating the symmetry index based on the time series of the landing interval includes:
[0031] Identifying the time interval between each hoof of the target sheep falling off the ground according to the time interval between the hoof falling off the ground sequence, and obtaining four groups of time interval sequences between the hoof falling off the ground;
[0032] Calculate the left and right limb coordination index based on the four groups of sheep hoof landing interval sequences;
[0033] The symmetry index is calculated based on the left and right limb coordination index.
[0034] Optionally, the left and right limb coordination index is calculated as follows:
[0035]
[0036] Among them, K LR is the left and right limb coordination index, M represents the number of samples of each of the four groups of sheep hoof falling off the ground interval sequences, T LF,i represents the i-th time interval in the left forelimb falling off the ground interval sequence contained in the four groups of sheep hoof falling off the ground interval sequences, T RB,i T represents the i-th time interval in the right hind limb falling off the ground interval sequence contained in the four groups of sheep hoof falling off the ground interval sequences, RF,i represents the i-th time interval in the right forelimb falling off the ground interval sequence contained in the four groups of sheep hoof falling off the ground interval sequences, T LB,i It represents the i-th time interval in the interval sequence of the left hind limb falling off the ground contained in the four groups of interval sequences of the sheep's hooves falling off the ground.
[0037] Optionally, the calculation formula of the symmetry index is as follows:
[0038]
[0039] Wherein, M is the symmetry index, K LR is the left and right limb coordination index, K max is the preset maximum left and right limb coordination index, α is the preset coordination index weight, γ is the preset period variance weight, N is the number of samples of a single set of sheep hoof lift-off interval sequences in the four sets of sheep hoof lift-off interval sequences, T j,k represents the jth separation data of the kth group of sheep's hoof separation interval sequences in the four groups of sheep's hoof separation interval sequences, It represents the mean of the kth group of sheep's hoof separation interval sequences among the four groups of sheep's hoof separation interval sequences.
[0040] Optionally, the identifying the lameness behavior of the target sheep according to the symmetry index to obtain an identification result includes:
[0041] Normalizing the symmetry index to obtain a normalized symmetry index;
[0042] Determining whether the normalized symmetry index is greater than a preset index threshold;
[0043] If the normalized symmetry index is greater than the index threshold, it is confirmed that the target sheep has no lameness behavior;
[0044] If the normalized symmetry index is less than or equal to the index threshold, sheep lameness gait cycle recognition is performed on the blur-suppressed image sequence to obtain a recognition result.
[0045] Optionally, performing sheep lameness gait cycle recognition on the blur-suppressed image sequence to obtain a recognition result includes:
[0046] Dividing the landing and liftoff interval time series into multiple periods to obtain multiple groups of landing and liftoff interval period sequences;
[0047] Calculate the symmetry index of each set of ground-to-ground interval periodic sequence to obtain the periodic sequence symmetry index;
[0048] confirming the periodic sequence of intervals between sheep lameness and leaving the ground according to the periodic sequence symmetry index;
[0049] The sheep lameness frame image recognition is performed on the fuzzy suppressed image sequence according to the sheep lameness interval period sequence to obtain a recognition result.
[0050] In order to solve the above problems, the present invention also provides a sheep lameness behavior recognition device based on an indoor camera, the device comprising a data acquisition module, a data calculation module, an edge detection module, an edge fitting module and a quantity generation module, wherein:
[0051] The image acquisition module is used to use a preset indoor camera to acquire gait images of the target sheep according to preset time intervals to obtain a gait image sequence;
[0052] The blur suppression module is used to perform motion blur suppression processing on the gait image sequence to obtain a blur suppressed image sequence;
[0053] The key point recognition module is used to perform motion key point recognition on the blur-suppressed image sequence to obtain key point recognition data;
[0054] The fall-off interval recognition module is used to identify the fall-off intervals of the left and right limbs on the fuzzy suppression image sequence according to the key point recognition data to obtain a fall-off interval time series;
[0055] The sheep lameness behavior recognition module is used to calculate a symmetry index according to the time series of the fall-off interval, and perform sheep lameness behavior recognition on the target sheep according to the symmetry index to obtain a recognition result.
[0056] The embodiment of the present invention uses an indoor camera to collect a gait image sequence of a target sheep, and combines it with motion blur suppression processing technology to effectively eliminate image blur caused by the sheep's rapid movement, thereby improving image clarity and key point recognition accuracy. By calibrating the bottom edge marks of the limbs with the ground reference line, the touchdown and lift-off key frames are accurately identified, key point data is generated, and quantitative conversion from image to motion parameters is achieved. Based on the time series of the landing and lift-off intervals of the left and right limbs, a symmetry index calculation model is proposed, which integrates the left and right limb coordination index and the cycle variance weight to objectively quantify the symmetry of the limb movement, breaking through the subjective limitations of traditional manual observation. The gait cycle division threshold is adjusted through a closed loop to ensure the stability of the time series and further improve recognition reliability. The present invention does not require contact with the sheep's body, avoiding stress reactions and equipment maintenance problems. Through full-process automation, the efficiency and accuracy of lameness recognition are significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A schematic flow chart of a method for identifying sheep lameness behavior based on an indoor camera according to an embodiment of the present invention;
[0058] Figure 2 This is a functional module diagram of a sheep lameness behavior recognition device based on an indoor camera provided by one embodiment of the present invention.
[0059] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0060] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0061] The embodiment of the present application provides a method for identifying sheep lameness behavior based on an indoor camera. The execution subject of the method for identifying sheep lameness behavior based on an indoor camera includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for identifying sheep lameness behavior based on an indoor camera can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0062] Reference Figure 1 FIG. 1 is a flow chart of a method for identifying sheep lameness based on an indoor camera according to an embodiment of the present invention. In this embodiment, the method for identifying sheep lameness based on an indoor camera includes:
[0063] S1. Using a preset indoor camera to collect gait images of a target sheep according to preset time intervals to obtain a gait image sequence.
[0064] In the embodiment of the present invention, the target sheep refers to the sheep selected as the monitoring object, which wears an identification ring so that its identity information can be confirmed when collecting gait images.
[0065] In the embodiment of the present invention, the preset time interval may be 0.1 seconds.
[0066] In detail, the preset time interval needs to be set according to the requirements of recognition accuracy. The shorter the time interval, the higher the accuracy of the obtained gait image sequence, and the higher the accuracy of subsequent sheep lameness recognition, but the higher the requirements for equipment performance and storage space.
[0067] In an embodiment of the present invention, a preset indoor camera is used to capture gait images of a target sheep according to a preset time interval to obtain a gait image sequence. The gait images of the target sheep can be obtained when the target sheep passes through a preset channel in a farm.
[0068] In detail, each sheep wears an identification ring, and the identity of the target sheep can be confirmed by scanning the identification ring when passing through the preset channel.
[0069] S2. Perform motion blur suppression processing on the gait image sequence to obtain a blur-suppressed image sequence.
[0070] In an embodiment of the present invention, the motion blur suppression processing is performed on the gait image sequence to obtain a blur-suppressed image sequence, and a blind deconvolution algorithm based on deep learning can be used. First, a data set containing a large number of normal and blurry gait image pairs is constructed, and a convolutional neural network (CNN) training model is used to enable it to learn the mapping relationship from blurry images to clear images. The trained model can process the gait image sequence frame by frame, and by analyzing the motion trajectory and blur degree of the pixels in the image, the deblurring parameters are adaptively adjusted to quickly restore the image details; or a method of combining non-local mean filtering with sparse representation can be used, first using non-local mean filtering to perform preliminary noise reduction on the blurred image, and then extracting image features through a sparse representation model to reconstruct a clear image. The combination of the two methods can effectively remove the motion blur caused by the rapid movement of sheep, retain the image edge and texture information, obtain a blur-suppressed image sequence, and provide high-quality image data for subsequent sheep lameness recognition.
[0071] Specifically, the deep learning-based blind deconvolution algorithm uses a large dataset of normal and blurred gait image pairs to train a convolutional neural network (CNN) model. This model learns the mapping between blurred and sharp images, analyzes pixel motion and blur levels during image processing, and adaptively adjusts deblurring parameters to restore image detail.
[0072] In the embodiment of the present invention, by performing motion blur suppression processing on the gait image sequence to obtain a blur-suppressed image sequence, the accuracy of subsequent sheep lameness behavior recognition can be improved.
[0073] S3. Perform motion key point recognition on the blur-suppressed image sequence to obtain key point recognition data.
[0074] In the embodiment of the present invention, the motion key point identification refers to identifying the key time points at which the limbs of the target sheep touch the ground and the key time points at which the limbs leave the ground in the blur-suppressed image sequence.
[0075] In an embodiment of the present invention, the step of performing motion key point recognition on the blur-suppressed image sequence to obtain key point recognition data includes:
[0076] Performing limb edge recognition on the blur-suppressed image sequence to obtain limb edge data;
[0077] Marking the bottom edges of the limbs of the blur-suppressed image sequence according to the limb edge data to obtain a bottom edge image sequence;
[0078] Setting a same ground reference line for each image in the bottom edge image sequence, obtaining a vertical distance between the bottom edge in each image in the bottom edge image sequence and the ground reference line, and obtaining a distance data sequence;
[0079] Motion key points are identified on the bottom edge image sequence according to the distance data sequence.
[0080] In detail, the limb edge recognition on the blur-suppressed image sequence refers to identifying the edge contours of the sheep's limbs in the blur-suppressed image sequence and obtaining limb edge data for subsequent analysis.
[0081] In an embodiment of the present invention, the step of performing motion key point recognition on the bottom edge image sequence according to the distance data sequence includes:
[0082] Dividing the bottom edge image sequence into four limb intervals to obtain four groups of single limb bottom edge image sequences;
[0083] identifying, based on the distance data sequence, regions in each set of single-limb bottom edge image sequences where the vertical distance between the bottom edge and the ground reference line remains constant, to obtain multiple sets of ground contact image sequences;
[0084] Confirming the first frame of each set of touchdown image sequences as a touchdown key point image, and confirming the last frame of each set of touchdown image sequences as a lift-off key point image;
[0085] All touchdown key point images and lift-off key point images are aggregated to obtain the key point recognition data.
[0086] In detail, the limb interval division refers to dividing the bottom edge image sequence into intervals according to the sheep's limbs, and obtaining four groups of single limb bottom edge image sequences corresponding to the left forelimb, left hind limb, right forelimb, and right hind limb respectively.
[0087] In the embodiment of the present invention, by performing motion key point recognition on the fuzzy suppressed image sequence to obtain key point recognition data, the accuracy of subsequent recognition of the interval between the left and right limbs falling off the ground can be improved.
[0088] S4. Identify the intervals between the left and right limbs leaving the ground on the fuzzy suppressed image sequence according to the key point recognition data to obtain a time series of the intervals between the left and right limbs leaving the ground.
[0089] In an embodiment of the present invention, identifying the interval between the left and right limbs landing and leaving the ground of the blur-suppressed image sequence based on the key point recognition data means identifying the time interval between the sheep's hooves landing and leaving the ground in the blur-suppressed image sequence based on the key point recognition data, which is used to analyze the coordination of the sheep's left and right limb movements.
[0090] In an embodiment of the present invention, the step of identifying the intervals between the left and right limbs leaving the ground on the fuzzy suppressed image sequence based on the key point recognition data to obtain a time series of the intervals between the left and right limbs leaving the ground includes:
[0091] Dividing the blur-suppressed image sequence into gait cycles based on a preset periodic interval to obtain gait cycle sequence data;
[0092] According to the key point recognition data and the gait cycle sequence data, the fuzzy suppression image sequence is subjected to left and right limb landing interval recognition to obtain a left limb landing interval sequence and a right limb landing interval sequence;
[0093] Calculating the time difference between the left and right limbs landing according to the left limb landing interval sequence and the right limb landing interval sequence to obtain a time difference sequence;
[0094] Calculating the variance of the time difference sequence to obtain the sequence variance;
[0095] Determining whether the sequence variance is greater than a preset variance threshold;
[0096] If the sequence variance is greater than the variance threshold, adjusting the preset period interval, and returning to the step of dividing the blur-suppressed image sequence into gait periods based on the preset period interval to obtain gait period sequence data;
[0097] If the sequence variance is less than or equal to the variance threshold, the left limb lift-off and landing interval sequence and the right limb lift-off and landing interval sequence are summarized to obtain gait cycle sequence data.
[0098] In an embodiment of the present invention, the blur-suppressed image sequence is divided into gait cycles according to the key point recognition data to obtain gait cycle sequence data.
[0099] In detail, the calculation of the time difference between the left and right limbs landing based on the left limb landing interval sequence and the right limb landing interval sequence refers to subtracting the interval data in the left limb landing interval sequence from the interval data in the right limb landing interval sequence in sequence and taking the absolute value.
[0100] In an embodiment of the present invention, by identifying the intervals between the left and right limbs leaving the ground for the fuzzy suppressed image sequence based on the key point recognition data, a time series of the intervals between the left and right limbs leaving the ground is obtained, which can improve the accuracy of subsequent calculation of the symmetry index.
[0101] S5. Calculate a symmetry index based on the time series of the interval between landing and leaving the ground.
[0102] In the embodiment of the present invention, the symmetry index is a coefficient indicating the consistency of the time intervals between each time the sheep's hooves leave the ground.
[0103] In an embodiment of the present invention, the calculating of the symmetry index based on the time series of the interval between the landing and the lifting off the ground includes:
[0104] Identifying the time interval between each hoof of the target sheep falling off the ground according to the time interval between the hoof falling off the ground sequence, and obtaining four groups of time interval sequences between the hoof falling off the ground;
[0105] Calculate the left and right limb coordination index based on the four groups of sheep hoof landing interval sequences;
[0106] The symmetry index is calculated based on the left and right limb coordination index.
[0107] In detail, the four groups of sheep hoof landing interval sequences include a left forelimb landing interval sequence, a left hindlimb landing interval sequence, a right forelimb landing interval sequence and a right hindlimb landing interval sequence.
[0108] Specifically, the left-right limb coordination index is used to measure the coordination of the left and right limb movements of sheep. Its calculation formula comprehensively considers the differences in the time interval between the left forelimb and right hindlimb, and the time interval between the right forelimb and left hindlimb, and is calculated by weighted average.
[0109] In detail, the calculation formula of the left and right limb coordination index is as follows:
[0110]
[0111] Among them, K LR is the left and right limb coordination index, M represents the number of samples of each of the four groups of sheep hoof falling off the ground interval sequences, T LF,i represents the i-th time interval in the left forelimb falling off the ground interval sequence contained in the four groups of sheep hoof falling off the ground interval sequences, T RB,i T represents the i-th time interval in the right hind limb falling off the ground interval sequence contained in the four groups of sheep hoof falling off the ground interval sequences, RF,i represents the i-th time interval in the right forelimb falling off the ground interval sequence contained in the four groups of sheep hoof falling off the ground interval sequences, T LB,i It represents the i-th time interval in the interval sequence of the left hind limb falling off the ground contained in the four groups of interval sequences of the sheep's hooves falling off the ground.
[0112] In detail, the calculation formula of the symmetry index is as follows:
[0113]
[0114] Wherein, M is the symmetry index, K LRis the left and right limb coordination index, K max is the preset maximum left and right limb coordination index, α is the preset coordination index weight, γ is the preset period variance weight, N is the number of samples of a single set of sheep hoof lift-off interval sequences in the four sets of sheep hoof lift-off interval sequences, T j, represents the jth separation data of the kth group of sheep's hoof separation interval sequences in the four groups of sheep's hoof separation interval sequences, It represents the mean of the kth group of sheep's hoof separation interval sequences among the four groups of sheep's hoof separation interval sequences.
[0115] In the embodiment of the present invention, by calculating the symmetry index according to the time series of the interval between falling off the ground, the accuracy of identifying the lameness behavior of the target sheep can be improved.
[0116] S6. Identify the lameness behavior of the target sheep according to the symmetry index to obtain an identification result.
[0117] In the embodiment of the present invention, the step of identifying the lameness behavior of the target sheep according to the symmetry index to obtain an identification result includes:
[0118] Normalizing the symmetry index to obtain a normalized symmetry index;
[0119] Determining whether the normalized symmetry index is greater than a preset index threshold;
[0120] If the normalized symmetry index is greater than the index threshold, it is confirmed that the target sheep has no lameness behavior;
[0121] If the normalized symmetry index is less than or equal to the index threshold, sheep lameness gait cycle recognition is performed on the blur-suppressed image sequence to obtain a recognition result.
[0122] In detail, the normalization process refers to mapping the data to the range of [0, 1].
[0123] In detail, the sheep lameness gait cycle recognition is performed on the fuzzy suppressed image sequence to obtain a recognition result, including:
[0124] Dividing the landing and liftoff interval time series into multiple periods to obtain multiple groups of landing and liftoff interval period sequences;
[0125] Calculate the symmetry index of each set of ground-to-ground interval periodic sequence to obtain the periodic sequence symmetry index;
[0126] confirming the periodic sequence of intervals between sheep lameness and leaving the ground according to the periodic sequence symmetry index;
[0127] The sheep lameness frame image recognition is performed on the fuzzy suppressed image sequence according to the sheep lameness interval period sequence to obtain a recognition result.
[0128] In detail, the dividing the landing-off interval time series into multiple periods may be dividing the landing-off interval time series into ten gait interval sequences as one period.
[0129] In detail, the calculation of the symmetry index of each set of liftoff periodic sequence adopts the same method as the calculation of the symmetry index based on the landing and liftoff time sequence, which will not be repeated here.
[0130] In detail, the sheep lameness frame image recognition is performed on the fuzzy suppressed image sequence according to the sheep lameness interval period sequence, and the fuzzy suppressed image sequence is analyzed according to the determined sheep lameness interval period sequence, and the frame image containing the sheep lameness behavior is identified to obtain the final recognition result.
[0131] like Figure 2 2 is a functional module diagram of a sheep lameness behavior recognition device based on an indoor camera provided by an embodiment of the present invention.
[0132] The indoor camera-based sheep lameness identification device 100 described in the present invention can be installed in an electronic device. Depending on the functionality implemented, the indoor camera-based sheep lameness identification device 100 may include an image acquisition module 101, a blur suppression module 102, a key point identification module 103, a fall-off-ground distance identification module 104, and a sheep lameness identification module 105. A module, also referred to as a unit, is a series of computer program segments that can be executed by an electronic device processor and perform a fixed function. These modules are stored in the electronic device's memory.
[0133] In this embodiment, the functions of each module / unit are as follows:
[0134] The image acquisition module 101 is used to use a preset indoor camera to collect gait images of the target sheep according to preset time intervals to obtain a gait image sequence;
[0135] The blur suppression module 102 is configured to perform motion blur suppression processing on the gait image sequence to obtain a blur suppressed image sequence;
[0136] The key point recognition module 103 is used to perform motion key point recognition on the blur-suppressed image sequence to obtain key point recognition data;
[0137] The fall-off interval recognition module 104 is configured to recognize the fall-off intervals of the left and right limbs on the fuzzy suppressed image sequence based on the key point recognition data, and obtain a fall-off interval time series;
[0138] The sheep lameness behavior recognition module 105 is used to calculate a symmetry index according to the time series of the fall-off interval, and perform lameness behavior recognition on the target sheep according to the symmetry index to obtain a recognition result.
[0139] In detail, each module in the sheep lameness behavior recognition system 100 based on indoor cameras in the embodiment of the present invention is used in the same manner as above. Figure 1 The same technical means as the sheep lameness behavior recognition method based on indoor cameras described in the text are used and can produce the same technical effects, so they will not be repeated here.
[0140] In the embodiments provided herein, it should be understood that the disclosed devices, apparatuses, and methods may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical functional division, and actual implementation may employ other division methods.
[0141] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of the solution of this embodiment according to actual needs.
[0142] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional modules.
[0143] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0144] Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the claims are intended to be embraced therein. Any reference to a figure in a claim should not be construed as limiting the claim to which it relates.
[0145] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) refers to the theories, methods, technologies, and application devices that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.
[0146] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a device claim may also be implemented by a single unit or device through software or hardware. Terms such as "first" and "second" are used to indicate names and do not imply any particular order.
[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A sheep lameness behavior recognition method based on indoor cameras, characterized in that: The method comprises: Using a preset indoor camera to collect gait images of the target sheep according to a preset time interval to obtain a gait image sequence; performing motion blur suppression processing on the gait image sequence to obtain a blur-suppressed image sequence; Performing motion key point recognition on the blur-suppressed image sequence to obtain key point recognition data; Identify the intervals between the left and right limbs leaving the ground on the fuzzy suppressed image sequence according to the key point recognition data to obtain a time series of the intervals between the left and right limbs leaving the ground; Calculating a symmetry index based on the time series of the drop-off interval; The lameness behavior of the target sheep is identified according to the symmetry index to obtain an identification result.
2. The sheep lameness behavior recognition method based on indoor cameras according to claim 1, characterized in that: The step of performing motion key point recognition on the blur-suppressed image sequence to obtain key point recognition data includes: Performing limb edge recognition on the blur-suppressed image sequence to obtain limb edge data; Marking the bottom edges of the limbs of the blur-suppressed image sequence according to the limb edge data to obtain a bottom edge image sequence; Setting a same ground reference line for each image in the bottom edge image sequence, obtaining a vertical distance between the bottom edge in each image in the bottom edge image sequence and the ground reference line, and obtaining a distance data sequence; Motion key points are identified on the bottom edge image sequence according to the distance data sequence.
3. The sheep lameness behavior recognition method based on indoor cameras according to claim 2, characterized in that: The performing motion key point recognition on the bottom edge image sequence according to the distance data sequence includes: Dividing the bottom edge image sequence into four limb intervals to obtain four groups of single limb bottom edge image sequences; identifying, based on the distance data sequence, regions in each set of single-limb bottom edge image sequences where the vertical distance between the bottom edge and the ground reference line remains constant, to obtain multiple sets of ground contact image sequences; Confirming the first frame of each set of touchdown image sequences as a touchdown key point image, and confirming the last frame of each set of touchdown image sequences as a lift-off key point image; All touchdown key point images and lift-off key point images are aggregated to obtain the key point recognition data.
4. The sheep lameness behavior recognition method based on indoor cameras according to claim 1, characterized in that: The step of identifying the intervals between the left and right limbs falling off the ground on the fuzzy suppressed image sequence according to the key point recognition data to obtain a time series of the intervals between the left and right limbs falling off the ground comprises: Dividing the blur-suppressed image sequence into gait cycles based on a preset period interval to obtain gait cycle sequence data; According to the key point recognition data and the gait cycle sequence data, the fuzzy suppression image sequence is subjected to left and right limb landing interval recognition to obtain a left limb landing interval sequence and a right limb landing interval sequence; Calculating the time difference between the left and right limbs landing according to the left limb landing interval sequence and the right limb landing interval sequence to obtain a time difference sequence; Calculating the variance of the time difference sequence to obtain the sequence variance; Determining whether the sequence variance is greater than a preset variance threshold; If the sequence variance is greater than the variance threshold, adjusting the preset period interval, and returning to the step of dividing the blur-suppressed image sequence into gait periods based on the preset period interval to obtain gait period sequence data; If the sequence variance is less than or equal to the variance threshold, the left limb lift-off and landing interval sequence and the right limb lift-off and landing interval sequence are summarized to obtain gait cycle sequence data.
5. The sheep lameness behavior recognition method based on indoor cameras according to claim 1, characterized in that: The calculating of the symmetry index according to the time series of the interval between the landing and the lifting off the ground comprises: Identifying the time interval between each hoof of the target sheep falling off the ground according to the time interval between the hoof falling off the ground sequence, and obtaining four groups of time interval sequences between the hoof falling off the ground; Calculate the left and right limb coordination index based on the four groups of sheep hoof landing interval sequences; The symmetry index is calculated based on the left and right limb coordination index.
6. The sheep lameness behavior recognition method based on indoor cameras according to claim 5, characterized in that: The calculation formula of the left and right limb coordination index is as follows: Among them, K LR is the left and right limb coordination index, M represents the number of samples of each of the four groups of sheep hoof falling off the ground interval sequences, T LF,i represents the i-th time interval in the left forelimb falling off the ground interval sequence contained in the four groups of sheep hoof falling off the ground interval sequences, T RB,i T represents the i-th time interval in the right hind limb falling off the ground interval sequence contained in the four groups of sheep hoof falling off the ground interval sequences, RF,i represents the i-th time interval in the right forelimb falling off the ground interval sequence contained in the four groups of sheep hoof falling off the ground interval sequences, T LB,i It represents the i-th time interval in the interval sequence of the left hind limb falling off the ground contained in the four groups of interval sequences of the sheep's hooves falling off the ground.
7. The sheep lameness behavior recognition method based on indoor cameras according to claim 5, characterized in that: The calculation formula of the symmetry index is as follows: Wherein, M is the symmetry index, K LR is the left and right limb coordination index, K mαx is the preset maximum left and right limb coordination index, α is the preset coordination index weight, γ is the preset period variance weight, N is the number of samples of a single set of sheep hoof lift-off interval sequences in the four sets of sheep hoof lift-off interval sequences, T j,k represents the jth separation data of the kth group of sheep's hoof separation interval sequences in the four groups of sheep's hoof separation interval sequences, It represents the mean of the kth group of sheep's hoof separation interval sequences among the four groups of sheep's hoof separation interval sequences.
8. The sheep lameness behavior recognition method based on indoor cameras according to claim 1, characterized in that: The step of identifying the lameness behavior of the target sheep according to the symmetry index to obtain an identification result includes: Normalizing the symmetry index to obtain a normalized symmetry index; Determining whether the normalized symmetry index is greater than a preset index threshold; If the normalized symmetry index is greater than the index threshold, it is confirmed that the target sheep has no lameness behavior; If the normalized symmetry index is less than or equal to the index threshold, sheep lameness gait cycle recognition is performed on the blur-suppressed image sequence to obtain a recognition result.
9. The sheep lameness behavior recognition method based on indoor cameras according to claim 1, characterized in that: The step of performing sheep lameness gait cycle recognition on the fuzzy suppressed image sequence to obtain a recognition result includes: Dividing the landing and liftoff interval time series into multiple periods to obtain multiple groups of landing and liftoff interval period sequences; Calculate the symmetry index of each set of ground-to-ground interval periodic sequence to obtain the periodic sequence symmetry index; confirming the periodic sequence of intervals between sheep lameness and leaving the ground according to the periodic sequence symmetry index; The sheep lameness frame image recognition is performed on the fuzzy suppressed image sequence according to the sheep lameness interval period sequence to obtain a recognition result.
10. A sheep lameness behavior recognition device based on an indoor camera, characterized in that: The device includes an image acquisition module, a fuzzy suppression module, a key point recognition module, a fall-off-ground interval recognition module, and a sheep lameness behavior recognition module, wherein: The image acquisition module is used to use a preset indoor camera to acquire gait images of the target sheep according to preset time intervals to obtain a gait image sequence; The blur suppression module is used to perform motion blur suppression processing on the gait image sequence to obtain a blur suppressed image sequence; The key point recognition module is used to perform motion key point recognition on the blur-suppressed image sequence to obtain key point recognition data; The fall-off interval recognition module is used to identify the fall-off intervals of the left and right limbs on the fuzzy suppression image sequence according to the key point recognition data to obtain a fall-off interval time series; The sheep lameness behavior recognition module is used to calculate a symmetry index according to the time series of the fall-off interval, and perform sheep lameness behavior recognition on the target sheep according to the symmetry index to obtain a recognition result.
Citation Information
Patent Citations
Dairy cow early limp recognition method and device
CN112293295A
Gait evaluation method and system based on multiple parameters
CN112957034A
Motion recognition method, motion recognition device and computer storage medium
CN115035593A
Cow early limp identification method and device based on time sequence anomaly detection
CN116671899A
Patient rehabilitation training data acquisition method and system based on visual identification
CN119446391A