Search

CN-121982750-A - All-weather monitoring method and system for behavior of group-rearing multi-target sheep

CN121982750ACN 121982750 ACN121982750 ACN 121982750ACN-121982750-A

Abstract

The invention provides an all-weather monitoring method and system for the behavior of a group-raising multi-target sheep, and relates to the technical field of computer vision and intelligent raising, wherein the method comprises the steps of processing a video sequence frame by frame, and extracting characteristic key point coordinates of 7 parts of each sheep target lip, head, neck, left shoulder, right shoulder, left hip and right hip; calculating the similarity of the motion and appearance between the target and the established track, performing preliminary association matching to obtain preliminary association matching similarity, respectively calculating the similarity of the relative positions of the nodes and the topological similarity of the angles of bones by utilizing the coordinates of the characteristic key points when the preliminary association matching similarity is lower than a set threshold value, weighting and summing to obtain the geometric similarity of the bones, performing identity matching to maintain unique identity identification, generating a continuous body trunk key point sequence based on the unique identity identification, and inputting a space-time behavior classification model to judge behavior categories. The invention solves the problem of identity jump caused by the shielding and similar appearance of sheep.

Inventors

  • ZHANG LINA
  • YANG LU

Assignees

  • 内蒙古师范大学

Dates

Publication Date
20260505
Application Date
20260407

Claims (10)

  1. 1. All-weather monitoring method for the behavior of a group of multi-target sheep is characterized by comprising the following steps: Obtaining a video sequence of a group-reared sheep; performing frame-by-frame processing on the video sequence by adopting a key point detection model, and detecting and outputting characteristic key point coordinates of 7 parts of lips, heads, necks, left shoulders, right shoulders, left hips and right hips of each sheep target; when the preliminary association matching similarity is lower than a preset preliminary association threshold value, the relative position similarity of the joint points and the bone angle topological similarity formed by the included angles of the bone vectors are respectively calculated by utilizing the characteristic key point coordinates, and the two are weighted and summed to obtain the skeleton geometrical similarity, so that identity matching is carried out to maintain unique identity; Based on the unique identity, generating a continuous body trunk key point sequence by the corresponding characteristic key point coordinates, inputting the continuous body trunk key point sequence into a space-time behavior classification model, and outputting the behavior category of each sheep target.
  2. 2. The all-weather monitoring method for the behavior of the group-raised multi-target sheep according to claim 1, wherein the key point detection model comprises a multi-scale feature fusion module, and the feature graphs of different levels of the backbone network are subjected to self-adaptive weighted fusion through the multi-scale feature fusion module so as to improve the detection precision of key points of the small-scale body backbone.
  3. 3. The all-weather monitoring method for behavior of a group-rearing multi-target sheep according to claim 2, wherein the adaptive weighted fusion of feature maps of different levels of a backbone network specifically comprises: respectively carrying out self-adaptive average pooling on each feature map to obtain feature descriptors; Inputting the feature descriptors into a weight generation network to obtain corresponding attention weights; Weighting and summing the feature images by using the attention weight to obtain a fusion feature image; and inputting the fusion characteristic map into a detection head so as to output coordinates of body trunk key points corresponding to each sheep target.
  4. 4. The all-weather monitoring method for multi-target sheep behaviors in group cultivation according to claim 1, wherein the appearance similarity is obtained by extracting an Re-ID model, and for each sheep target detected in the current frame, an appearance feature vector is extracted by adopting the Re-ID model, and a cosine distance or euclidean distance between the appearance feature vector and the appearance feature vector of the established target track is used as the appearance similarity.
  5. 5. The all-weather monitoring method for behavior of group-fed multi-target sheep according to claim 1, wherein the motion similarity is calculated by the following method: Predicting the expected position of an established target track in a current frame according to the historical state of the established target track by using a Kalman filtering model; and comparing the position of the sheep target detected by the current frame with the expected position, and obtaining a motion similarity score based on the position error or the intersection and reconstruction degree between the target position and the expected position.
  6. 6. The all-weather monitoring method for multi-target sheep raising in groups according to claim 1, wherein when the preliminary association matching similarity is lower than a set preliminary association threshold, the method further comprises: Aiming at the sheep targets with the preliminary association matching similarity lower than the preliminary association threshold, calculating the skeleton geometrical similarity score of the sheep targets and the established target track; comparing the skeleton geometrical similarity score with a preset skeleton geometrical similarity threshold; If the skeleton geometrical similarity score is lower than the preset skeleton geometrical similarity threshold, judging that the preliminary association matching is invalid and rejecting the preliminary association matching; and if the skeleton geometrical similarity score is equal to or greater than the preset skeleton geometrical similarity threshold, determining that the preliminary association matching is final identity allocation.
  7. 7. The all-weather monitoring method for behavior of a group-rearing multi-target sheep according to claim 1 or 6, wherein the calculating the similarity of the relative positions of the joint points and the topological similarity of the bone angles formed by the included angles of the bone vectors by using the coordinates of the characteristic key points respectively, and the weighting and summing the two to obtain the geometric similarity of the skeleton specifically comprises: calculating the position deviation of each corresponding key point of the target track of the sheep detected by the current frame and the established target track, and obtaining the relative position similarity of the joint points; Constructing a skeleton vector set based on body trunk key points, and calculating cosine similarity of included angles between a sheep target detected by a current frame and the skeleton vector corresponding to the established target track to obtain skeleton angle topological similarity; And carrying out weighted summation on the relative position similarity of the joint points and the topological similarity of the bone angles to obtain a final bone geometric similarity score.
  8. 8. The all-weather monitoring method for behaviors of group-raised multi-target sheep according to claim 1, wherein the space-time behavior classification model is a space-time diagram convolution network ST-GCN, the generating the corresponding characteristic key point coordinates into a continuous body trunk key point sequence, inputting the continuous body trunk key point sequence into the space-time behavior classification model, and outputting the behavior category of each sheep target, and the method further comprises: and sampling the continuous body trunk key point sequence by adopting a sliding window, and generating one or more input units with fixed lengths for the space-time behavior classification model.
  9. 9. The all-weather monitoring method for multi-target sheep raising in groups according to claim 1, further comprising, before generating the corresponding characteristic key point coordinates into a continuous body trunk key point sequence and inputting the continuous body trunk key point sequence into a space-time behavior classification model: And constructing a space diagram structure for each frame of key point data in the continuous body trunk key point sequence, wherein nodes of the space diagram structure are the body trunk key points, and the sides are node connection relations set according to the body anatomical structure of the sheep, and the node connection of each key point at least comprises connection of lips and heads, heads and necks, necks and left shoulders, necks and right shoulders, left shoulders and left hips, and right shoulders and right hips.
  10. 10. All-weather monitoring system for the behavior of a group of multi-target sheep is characterized by comprising the following components: the acquisition module is used for acquiring video sequences of the group-reared sheep; The key point detection module is used for carrying out frame-by-frame processing on the video sequence by adopting a key point detection model, and detecting and outputting characteristic key point coordinates of 7 parts of lips, heads, necks, left shoulders, right shoulders, left hip and right hip of each sheep target; When the preliminary association matching similarity is lower than a preset preliminary association threshold value, the characteristic key point coordinates are used for respectively calculating the relative position similarity of the joint points and the bone angle topological similarity formed by the included angles of the bone vectors, and the weighted sum is carried out on the relative position similarity and the bone angle topological similarity to obtain the bone geometric similarity, so that identity matching is carried out to maintain unique identity; and the behavior recognition module is used for generating a continuous body trunk key point sequence by corresponding characteristic key point coordinates based on the unique identity mark, inputting the continuous body trunk key point sequence into a space-time behavior classification model and outputting the behavior category of each sheep target.

Description

All-weather monitoring method and system for behavior of group-rearing multi-target sheep Technical Field The invention relates to the technical field of computer vision and intelligent breeding, in particular to an all-weather monitoring method and system for behavior of a group-breeding multi-target sheep. Background Intensive barn feeding has become an important mode of modern farming, however in a barn feeding environment, the disease transmission and stress reaction risks are increased by factors such as limited space, large population density of small ruminants (such as goats, sheep, etc.). The animal behavior can intuitively reflect the physiological health condition and psychological state of the animal, and timely and accurately monitor the animal behavior change, so that the animal behavior monitoring method has important value for early disease judgment, animal welfare intervention and reduction of breeding risks. The traditional manual inspection means are difficult to meet the high-frequency and long-time monitoring requirements, and the method based on the wearable sensor is easy to induce animal stress reaction to influence the natural behavior mode. Computer vision methods based on hand-designed features have limited expressive power and difficulty in capturing high-level semantic information of behaviors. In contrast, computer vision methods based on deep learning have the advantage of automatically extracting features, and have been widely used in the field of livestock behavior recognition. The method based on the key point detection is widely applied due to the advantages of compact characteristics, strong anti-interference performance and the like, but the identification performance of the method under the complex cultivation environment still faces the bottleneck. The existing method depends on a general whole-body key point model, and lacks of targeted optimization on the culture environment, so that the detection accuracy of the model is reduced when the model faces limb shielding, and meanwhile, too many key points bring heavy calculation burden to real-time deployment. Taking goats as an example, in an individual tracking link, the existing method is singly dependent on appearance or motion characteristics, faces the conditions of similar appearance and frequent movement of goats, is easy to generate identity confusion or tracking breakage, is difficult to generate a skeleton sequence of continuous identity marks, is insufficient in time-space characteristic fusion of a behavior recognition model in a behavior recognition link, and is difficult to capture behavior dynamic semantic information by single spatial characteristics. Therefore, how to construct a system for identifying the behaviors of small animals in a barn feeding group is a technical problem to be solved. Disclosure of Invention The invention provides an all-weather monitoring method and system for behavior of a group-raised multi-target sheep, which are used for solving the defects of unstable detection and identity jump caused by shielding and individual similarity in a group-raised scene in the prior art and realizing accurate identity maintenance and high-precision behavior identification of the group-raised sheep. The invention provides an all-weather monitoring method for the behavior of a group-rearing multi-target sheep, which comprises the following steps: Obtaining a video sequence of a group-reared sheep; performing frame-by-frame processing on the video sequence by adopting a key point detection model, and detecting and outputting characteristic key point coordinates of 7 parts of lips, heads, necks, left shoulders, right shoulders, left hips and right hips of each sheep target; when the preliminary association matching similarity is lower than a preset preliminary association threshold value, the relative position similarity of the joint points and the bone angle topological similarity formed by the included angles of the bone vectors are respectively calculated by utilizing the characteristic key point coordinates, and the two are weighted and summed to obtain the skeleton geometrical similarity, so that identity matching is carried out to maintain unique identity; Based on the unique identity, generating a continuous body trunk key point sequence by the corresponding characteristic key point coordinates, inputting the continuous body trunk key point sequence into a space-time behavior classification model, and outputting the behavior category of each sheep target. According to the all-weather monitoring method for the behavior of the group-rearing multi-target sheep, the key point detection model comprises a multi-scale feature fusion module, and the feature images of different levels of the backbone network are subjected to self-adaptive weighted fusion through the multi-scale feature fusion module so as to improve the detection precision of key points of the small-scale body backbone. According to the