Sow estrus behavior monitoring and identifying method based on multi-target tracking

Through the sow estrus behavior monitoring method based on multi-objective tracking, the probability of estrus behavior in sows is statistically and identified, and the problem of low accuracy of sow estrus recognition in the prior art is solved, and higher recognition accuracy and productivity are achieved.

CN120126076AInactive Publication Date: 2025-06-10EAST UNIV OF HEILONGJIANG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510189402.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-06-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The current sow estrus recognition method has extremely low recognition accuracy, making it difficult to accurately judge the sow's estrus status.

Method used

The sow estrus behavior monitoring method based on multi-objective tracking was used to obtain the breed and development stage of the sow, and historical estrus data were counted, the probability of each estrus behavior was calculated, and the estrus behavior was identified within the set monitoring time, and the total probability of estrus behavior was calculated.

Benefits of technology

It significantly improves the accuracy of sow estrus recognition, can timely identify the sow's estrus status, and helps to formulate reasonable feed delivery and breeding plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120126076A_ABST
    Figure CN120126076A_ABST
Patent Text Reader

Abstract

The invention discloses a sow oestrus behavior monitoring and identification method based on multi-target tracking, relates to the technical field of livestock breeding, and aims at solving the problem that an existing sow oestrus identification method is low in identification accuracy. And then, within a set monitoring time, acquiring behaviors of the sow, and according to the occurrence probability of each oestrus behavior in the behaviors of the sow, obtaining the oestrus probability of the sow. According to the technical scheme, the accuracy of sow oestrus recognition can be greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of livestock breeding, and particularly to a method for monitoring the estrus behavior of sows based on multi-target tracking. Background Art

[0002] How to accurately judge the estrus cycle of sows has always been one of the important issues concerned by the livestock breeding industry. Whether various estrus states of sows can be accurately identified determines whether breeding can be carried out in a timely manner and whether the feed delivery of sows can be adjusted in a timely manner, etc., and further determines the number of piglets born and the productivity level of sows, which is of great significance for large-scale breeding farms of breeding pigs.

[0003] The existing detection of sow estrus is only identified by manual observation. For example, by observing the physical state of sows or by artificially simulating the behavior of boars to stimulate the sows to produce estrus reflex behaviors to judge whether the sows are in or about to be in estrus. The recognition accuracy of this method is extremely low. Summary of the Invention

[0004] The purpose of the present invention is: aiming at the problem of low recognition accuracy in the existing sow estrus recognition method, to provide a method for monitoring the estrus behavior of sows based on multi-target tracking.

[0005] The technical solution adopted by the present invention to solve the above technical problems is:

[0006] A method for monitoring and recognizing the estrus behavior of sows based on multi-target tracking, comprising the following steps:

[0007] Step 1: For the sows to be monitored, obtain the breed and development stage of the sows.

[0008] Step 2: Obtain all historical estrus data within the same estrus cycle in the corresponding development stage of the breed. The historical estrus data is the estrus behavior of the sows recorded each time during estrus.

[0009] Step 3: Count each estrus behavior of the sows in all historical estrus data, the number of times each estrus behavior appears, and the number of times all estrus behaviors appear, and take the proportion of the number of times each estrus behavior appears in the number of times all estrus behaviors appear as the estrus behavior probability of this estrus behavior.

[0010] Step 4: Monitor the sows to be monitored within the set monitoring time. When each estrus behavior of the sows is first recognized, then based on Step 3, directly obtain the estrus behavior probability of the corresponding estrus behavior.

[0011] Step 5: Sum up the estrus behavior probabilities obtained during the monitoring time to obtain the total estrus behavior probability.

[0012] Furthermore, the developmental stage is a young sow or a multiparous sow.

[0013] Furthermore, the estrus behavior is identified by YOLOV5.

[0014] Furthermore, the estrus behavior includes standing still, ears pricked up, and mounting.

[0015] Furthermore, in the estrus behavior, the identification steps for ears pricked up are as follows:

[0016] According to the breed and developmental stage of the sow, obtain the average area size of the ears when the sow's ears are not pricked up, and use this as a threshold. Then, obtain the monitoring image, extract the pig ear image from the monitoring image, and obtain the area of the pig ear according to the internal parameters of the shooting camera. Finally, compare the area of the pig ear with the threshold. If the area of the pig ear exceeds the threshold, it is ears pricked up; otherwise, it is not ears pricked up.

[0017] Furthermore, in the estrus behavior, the identification steps for standing still are as follows:

[0018] Use a millimeter-wave radar to obtain continuous video images of the sow. Then, use the trained neural network to process the video images, identify the movement posture of the sow, and judge whether the sow is in a standing still state according to the movement posture of the sow.

[0019] The trained neural network is obtained through the following steps:

[0020] Step A1: Obtain the historical monitoring images of the sow, set key points for the four limbs of the sow in the first frame image, and represent each key point by a three-dimensional spatial position to construct a pose space.

[0021] Step A2: Perform random sampling in the pose space to obtain the sow detection pose vector.

[0022] Step A3: Use the detection target pose vector and the first frame image to obtain the regression score.

[0023] Step A4: After performing gradient descent on the sow detection pose vector using the regression score, obtain the pose estimation result.

[0024] Step A5: In the next frame image, perform sampling around the pose estimation result and perform the above processing until the pose estimation results of all frames are obtained, and construct a training set based on all key points and the corresponding pose estimation results to train the neural network.

[0025] Furthermore, the regression score is obtained through a neural network, and the neural network includes an image processing part and a feature regression part.

[0026] The image processing part includes seven modules;

[0027] Among them,

[0028] The first module includes a convolutional layer with 64 7×7 convolutional kernels;

[0029] The second module includes 3 convolutional layers with 64 1×1 convolutional kernels, 3 convolutional layers with 64 3×3 convolutional kernels, and 3 convolutional layers with 512 1×1 convolutional kernels;

[0030] The third module includes 3 convolutional layers with 128 1×1 convolutional kernels, 3 convolutional layers with 128 3×3 convolutional kernels, and 3 convolutional layers with 512 1×1 convolutional kernels;

[0031] The fourth module includes 3 convolutional layers with 256 1×1 convolutional kernels, 3 convolutional layers with 256 3×3 convolutional kernels, and 3 convolutional layers with 1024 1×1 convolutional kernels;

[0032] The sixth module includes an average pooling layer of 7×7;

[0033] The seventh module includes a fully connected layer of 2048×48;

[0034] The feature regression part includes four modules;

[0035] Among them,

[0036] The first module includes a graph convolutional layer with a fully connected layer of 6×8;

[0037] The second module includes a graph convolutional layer with a fully connected layer of 8×16;

[0038] The third module includes a graph convolutional layer with a fully connected layer of 16×32;

[0039] The fourth module includes a fully connected layer of 512×1.

[0040] Furthermore, in the estrus behavior, the recognition steps of mounting are as follows:

[0041] Step B1: Obtain the pigsty monitoring image data, and use YOLOV5 to identify the state of the sow. If the sow is in a standing state, execute Step B2; otherwise, the sow is not mounting.

[0042] Step B2: Obtain the point cloud data of the sow, and identify the backbone point cloud, the front leg bone point cloud, and the hind leg bone point cloud in the point cloud data;

[0043] Step B3: Select two point clouds from the backbone point cloud, connect the two selected point clouds, and then extend the connecting line in both directions along the straight line direction to obtain the extended backbone line;

[0044] Step B4: Select two point clouds from the front leg bone point cloud of the sow, connect the two selected point clouds, and then extend the connecting line in both directions along the straight line direction to obtain the extended front leg bone line;

[0045] Step B5: Select two point clouds from the hind leg bone point cloud of the sow, connect the two selected point clouds, and then extend the connecting line in both directions along the straight line direction to obtain the extended hind leg bone line;

[0046] Step B5: Obtain the included angle formed by the extended backbone line and the extended front leg bone line, and the included angle formed by the extended backbone line and the extended hind leg bone line. If the two included angles are respectively within their respective threshold ranges, it is a mounting behavior; otherwise, it is not a mounting behavior.

[0047] Further, the specific steps for obtaining the point cloud data of the sow in Step B2 are as follows:

[0048] Obtain the point cloud data of the pigsty, and remove the ground point cloud from the point cloud data to obtain the point cloud data of the sow;

[0049] The specific steps for removing the ground point cloud from the point cloud data are as follows:

[0050] Step B21: Divide the point cloud data into multiple polar coordinate sub-grids, and each polar coordinate sub-grid contains N r,m ×N θ,m grid cells, where N r,m represents the number of rings in the polar coordinate sub-grid, and N θ,m represents the number of sectors in the polar coordinate sub-grid;

[0051] Step B22: Select the point cloud with the lowest height in each polar coordinate sub-grid as the initial seed point, and thus obtain the ground point set which is expressed as:

[0052]

[0053] where z(p k ) represents the height threshold of the returned point, p k represents the point in the grid cell, S n represents the total set of points in n grid cells within the polar coordinate sub-grid, represents the average height of the seed points, and z seed represents the height threshold for selecting the seed points;

[0054] Step B23: Obtain the mean value of the point cloud in the ground point set ​ and the centering matrix;

[0055] Step B24: Obtain the covariance matrix of the centering matrix, perform singular value decomposition on the covariance matrix to obtain the minimum singular value, and then use the eigenvector corresponding to the minimum singular value as the normal vector of the plane Finally, the mean value and the normal vector of the plane are dot-multiplied to obtain the projection value The projection value is expressed as:

[0056]

[0057] Step B25: Dot-multiply the normal vector of the plane and p k to obtain the projection value The projection value is expressed as:

[0058]

[0059] Step B26: Use the projection value and the projection value to obtain the ground point set The ground point set is expressed as:

[0060]

[0061] Step B27: Let Repeat steps B23 to B26 until the set number of iterations is reached to obtain the ground point set

[0062] Step B28: Based on the ground point set and using verticality, height, and flatness to obtain the ground point set The ground point set is expressed as:

[0063]

[0064] where, φ(v 3,n ) represents verticality, represents height, represents flatness, N C represents the number of grid cells included in all polar sub-grids, N Z represents the number of polar sub-grids, represents an intermediate variable, z = [0, 0, 1] T , θ τ represents the angle threshold, v 3,ndenote the unit normal vector of denote the average height, r n denote the distance between the centroid of Sn and the origin, where Sn represents the total set of points of n grid cells within the polar coordinate sub-grid, γ(r n ) denote the adaptive midpoint function that makes r n exponentially grow, L τ denote the constant range parameter, and σ τ,m denote the magnitude of the gain and the set flatness threshold respectively, σ n denote the intermediate variable, λ 1,n , λ 2,n , λ 3,n are the PCA features of the grid cell;

[0065] Step B29: Based on the point cloud data of the pigsty, after removing the ground point set, the point cloud data of the sows is obtained.

[0066] The beneficial effects of the present invention are:

[0067] By statistically analyzing the historical estrus data of sows, this application obtains the probabilities of various behaviors occurring during the estrus period of sows. Then, within the set monitoring time, the behaviors of sows are acquired, and based on the probabilities of each estrus behavior in the sow behaviors, the probability of sow estrus is further obtained. The technical solution of this application can greatly improve the accuracy of sow estrus recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 is the overall process schematic diagram of this application;

[0069] Figure 2 is the schematic diagram of the backbone, front leg bone and hind leg bone structures of pigs. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0070] It should be specifically noted that, without conflict, the various embodiments disclosed in this application can be combined with each other.

[0071] Specific Embodiment 1: A method for monitoring and recognizing sow estrus behaviors based on multi-object tracking described in this embodiment includes the following steps:

[0072] Step 1: For the sows to be monitored, obtain the breed and development stage of the sows;

[0073] Step 2: Obtain all historical estrus data within the same estrus cycle in the corresponding development stage of the breed, where the historical estrus data is the estrus behaviors of the sows recorded each time during estrus;

[0074] Each estrus cycle of sows is approximately 21 days. Specifically, the estrus cycle of sows usually ranges from 17 to 24 days, but this cycle can vary due to different breeds, environmental conditions, and individual differences.

[0075] Step 3: Statistically analyze each estrus behavior of the sows in all historical estrus data, the number of occurrences of each estrus behavior, and the total number of occurrences of all estrus behaviors, and take the proportion of the number of occurrences of each estrus behavior in the total number of occurrences of all estrus behaviors as the estrus behavior probability of that estrus behavior;

[0076] During estrus, sows will exhibit unique behavioral characteristics. Therefore, in this application, by statistically analyzing the estrus behaviors that occur within a complete estrus cycle of sows, and based on the proportion of the number of occurrences of each estrus behavior in this cycle to the total number of estrus occurrences, it is used as the estrus probability corresponding to that estrus behavior.

[0077] The estrus behaviors of sows include: standing still, tail raising, ear erecting, urination, back arching, mounting, walking back and forth, number of lying-down and standing-up during the day, number of lying-down and standing-up at night, abnormal ground rooting, and running in circles, etc.

[0078] Step 4: Monitor the sows to be monitored within the set monitoring time. When each estrus behavior of the sows is first identified, then based on Step 3, directly obtain the estrus behavior probability corresponding to the estrus behavior;

[0079] Step 5: Sum up the estrus behavior probabilities obtained during the monitoring time to obtain the total estrus behavior probability.

[0080] This application obtains the corresponding estrus probability based on the estrus behaviors that occur during the monitoring time (the idea here is that within the estrus cycle of sows, the number of occurrences of estrus behaviors is regarded as the importance of estrus behaviors. When an estrus behavior is detected during the monitoring time, directly obtain its corresponding estrus probability, so that it is not necessary to statistically analyze and monitor the entire estrus cycle). The estrus probability has nothing to do with the number of occurrences of estrus behaviors. As long as an estrus behavior occurs, obtain the estrus probability of that estrus behavior. Since this application needs to identify sows during estrus and cannot monitor the complete estrus cycle of sows, otherwise the estrus cycle of sows will be missed. Therefore, this application conducts estrus monitoring of sows by setting a monitoring time (this time is much shorter than the number of days of the estrus cycle of sows).

[0081] During different estrus cycles of sows, the proportion of estrus behaviors may vary. However, due to the significant characteristics of sows' estrus behaviors, the proportion fluctuations within different estrus cycles of sows are not very large. Additionally, the technical solution of this application obtains the estrus probability of sows. Probability, also known as "likelihood", reflects the likelihood of a random event occurring. A random event refers to an event that may or may not occur under the same conditions. Therefore, the technical solution of this application obtains a probability, not an inevitable result, but rather a reference result for breeders or technicians.

[0082] The overall process of this application is as Figure 1 shown.

[0083] The following is an example: Assume that the estrus behaviors of sows include standing still, ears erecting, and mounting. During an estrus cycle of 21 days, standing still occurred 20 times, ears erecting occurred 30 times, and mounting occurred 50 times. Then, the estrus probability corresponding to standing still is 20%, the estrus probability corresponding to ears erecting is 30%, and the estrus probability corresponding to mounting is 50%.

[0084] Set the monitoring time to 5 days. Within 5 days, if standing still is recognized for the first time, obtain the estrus probability of 20% corresponding to standing still. If ears erecting is recognized for the first time afterwards, the estrus probability is 20% + 30%. If mounting is recognized for the first time afterwards, the estrus probability is 20% + 30% + 50%.

[0085] Specific Embodiment 2: This embodiment is a further description of Specific Embodiment 1. The difference between this embodiment and Specific Embodiment 1 is that the developmental stage is a young sow or a multiparous sow.

[0086] Specific Embodiment 3: This embodiment is a further description of Specific Embodiment 1. The difference between this embodiment and Specific Embodiment 1 is that the estrus behaviors are recognized by YOLOV5.

[0087] In the prior art, YOLOV5 can be used to recognize the postures or behaviors of sows or cows. However, the accuracy of only recognizing surveillance images by YOLOV5 in the prior art is low. Therefore, this application sets recognition methods for standing still, ears erecting, and mounting respectively, such as Specific Embodiments 5 to 9. Although this application uses three different methods to recognize standing still, ears erecting, and mounting, the recognition accuracy of this application is very high.

[0088] Specific Embodiment 4: This embodiment is a further description of Specific Embodiment 1. The difference between this embodiment and Specific Embodiment 1 is that the estrus behaviors include standing still, ears erecting, and mounting.

[0089] Specific Embodiment 5: This embodiment is a further elaboration on Specific Embodiment 4. The difference between this embodiment and Specific Embodiment 4 in the estrus behavior is that the recognition steps for the ears standing up are as follows:

[0090] According to the breed and development stage of the sow, obtain the average area size of the ears when the sow's ears are not standing up, and use this as a threshold. Then, obtain the monitoring image, extract the pig ear image based on the monitoring image, and obtain the area of the pig ear according to the internal parameters of the shooting camera. Finally, compare the area of the pig ear with the threshold. If the area of the pig ear exceeds the threshold, it is a standing ear; otherwise, it is a non-standing ear.

[0091] Specific Embodiment 6: This embodiment is a further elaboration on Specific Embodiment 5. The difference between this embodiment and Specific Embodiment 5 in the estrus behavior is that the recognition steps for standing still are as follows:

[0092] Use a millimeter-wave radar to obtain continuous video images of the sow, and then use a trained neural network to process the video images to identify the movement posture of the sow, and judge whether the sow is in a standing still state according to the movement posture of the sow;

[0093] The trained neural network is obtained through the following steps:

[0094] Step A1: Obtain historical monitoring images of the sow, set key points for the four limbs of the sow in the first frame image, and represent each key point by a three-dimensional spatial position to construct a pose space;

[0095] Step A2: Perform random sampling in the pose space to obtain a sow detection pose vector;

[0096] Step A3: Use the detection target pose vector and the first frame image to obtain a regression score;

[0097] Step A4: After performing gradient descent on the sow detection pose vector using the regression score, obtain a pose estimation result;

[0098] Step A5: In the next frame image, perform sampling around the pose estimation result and perform the above processing until the pose estimation results of all frames are obtained, and construct a training set based on all key points and the corresponding pose estimation results to train the neural network.

[0099] Specific Embodiment 7: This embodiment is a further elaboration on Specific Embodiment 6. The difference between this embodiment and Specific Embodiment 6 is that the regression score is obtained through a neural network, and the neural network includes an image processing part and a feature regression part;

[0100] The image processing part contains seven modules;

[0101] Among them,

[0102] The first module contains a convolutional layer with 64 7×7 convolutional kernels;

[0103] The second module contains 3 convolutional layers with 64 1×1 convolutional kernels, 3 convolutional layers with 64 3×3 convolutional kernels, and 3 convolutional layers with 512 1×1 convolutional kernels;

[0104] The third module contains 3 convolutional layers with 128 1×1 convolutional kernels, 3 convolutional layers with 128 3×3 convolutional kernels, and 3 convolutional layers with 512 1×1 convolutional kernels;

[0105] The fourth module contains 3 convolutional layers with 256 1×1 convolutional kernels, 3 convolutional layers with 256 3×3 convolutional kernels, and 3 convolutional layers with 1024 1×1 convolutional kernels;

[0106] The sixth module contains a 7×7 average pooling layer;

[0107] The seventh module contains a fully connected layer of 2048×48;

[0108] The feature regression part contains four modules;

[0109] Among them,

[0110] The first module contains a graph convolutional layer with a 6×8 fully connected layer;

[0111] The second module contains a graph convolutional layer with an 8×16 fully connected layer;

[0112] The third module contains a graph convolutional layer with a 16×32 fully connected layer;

[0113] The fourth module contains a fully connected layer of 512×1.

[0114] Specific Embodiment 8: This embodiment is a further description of Specific Embodiment 4. The difference between this embodiment and Specific Embodiment 4 is that in the estrus behavior, the recognition steps of mounting are as follows:

[0115] Step B1: Obtain the pigsty monitoring image data, and use YOLOV5 to identify the state of the sow. If the sow is in a standing state, execute Step B2; otherwise, the sow is not mounting;

[0116] Step B2: Obtain the point cloud data of the sow, and identify the backbone point cloud, the front leg bone point cloud, and the hind leg bone point cloud in the point cloud data;

[0117] Step B3: Select two point clouds from the backbone point cloud, connect the two selected point clouds, and then extend the connection line in the straight line direction to both ends to obtain the backbone extension line;

[0118] Step B4: Select two point clouds from the front leg bone point cloud of the sow, connect the two selected point clouds, and then extend the connection line in the straight line direction to both ends to obtain the front leg bone extension line;

[0119] Step B5: Select two point clouds from the hind leg bone point cloud of the sow, connect the two selected point clouds, and then extend the connection line in the straight line direction to both ends to obtain the hind leg bone extension line;

[0120] Step B5: Obtain the angle formed by the backbone extension line and the front leg bone extension line, and the angle formed by the backbone extension line and the hind leg bone extension line. If the two angles are respectively within their respective threshold ranges, it is a mounting behavior; otherwise, it is not a mounting behavior. The backbone, front leg bone, and hind leg bone of the sow are as Figure 2 shown.

[0121] When the sow lies on its side, the angles formed by the sow's backbone and the sow's front leg bone, and the angles formed by the sow's backbone and the sow's hind leg bone may also meet their respective thresholds. Therefore, in this embodiment, an image is first obtained, and the pose of the sow is recognized through YOLOV5 to recognize the standing pose of the sow and exclude the influence of the lying-on-side pose. Since recognizing the mounting behavior through image recognition is affected by night. The point cloud data is mainly obtained through laser scanning technology, and LiDAR (Light Detection and Ranging) is one of the common technologies. LiDAR measures the distance between an object and the sensor by emitting laser pulses and receiving reflected signals, thereby generating three-dimensional point cloud data. LiDAR is not affected by lighting conditions, so it can work normally at night and will not be affected by insufficient light at night. Therefore, for the standing sow in this application, by obtaining the point cloud data of the sow and selecting two point clouds from the front legs, back, and hind legs of the sow respectively, three extended straight lines (the front leg extension line of the sow, the back extension line of the sow, and the hind leg extension line of the sow) are obtained. Finally, the angle formed by the front leg extension line of the sow and the back extension line of the sow, and the angle formed by the back extension line of the sow and the hind leg extension line of the sow are obtained, and it is respectively determined whether the two angles meet their respective thresholds. If the thresholds are met, it proves that the pose of the sow at this time conforms to the mounting pose. Then the sow is mounting at this time. It should be noted that when both of the two angles meet the thresholds, the sow will not be in a standing state. When the sow is in the mounting behavior, the angle formed by the front leg extension line of the sow and the back extension line of the sow is less than 90 degrees, and the angle formed by the back extension line of the sow and the hind leg extension line of the sow is greater than 90 degrees, and the sow will fall forward with its head down. Therefore, the mounting recognition performed through this embodiment is not affected by night, greatly improving the recognition accuracy.

[0122] Embodiment 9: This embodiment is a further description of Embodiment 8. The difference between this embodiment and Embodiment 8 is that the specific steps for obtaining the point cloud data of the sow in step B2 are as follows:

[0123] Obtain the point cloud data of the pigsty, and remove the ground point cloud in the point cloud data to obtain the point cloud data of the sow;

[0124] The specific steps for removing the ground point cloud in the point cloud data are as follows:

[0125] Step B21: Divide the point cloud data into multiple polar coordinate sub-grids, and each polar coordinate sub-grid contains N r,m ×N θ,m grid cells, where N r,m represents the number of rings in the polar coordinate sub-grid, and N θ,m represents the number of sectors in the polar coordinate sub-grid;

[0126] Step B22: Select the point cloud with the lowest height in each polar coordinate sub-grid as the initial seed point, and then obtain the ground point set which is expressed as:

[0127]

[0128] where z(p k ) represents the height threshold of the returned point, p k represents the point in the grid cell, S n represents the total set of points in n grid cells within the polar coordinate sub-grid, represents the average height of the seed points, z seed represents the height threshold for selecting the seed points;

[0129] Step B23: Obtain the mean value of the point cloud in the ground point set and the centering matrix;

[0130] Step B24: Obtain the covariance matrix of the centering matrix, perform singular value decomposition on the covariance matrix to obtain the minimum singular value, and then use the eigenvector corresponding to the minimum singular value as the normal vector of the plane Finally, perform a dot product on the mean value and the normal vector of the plane to obtain the projection value The projection value is expressed as:

[0131]

[0132] Step B25: Use the normal vector of the plane and p kPerform a dot product to obtain the projection value Projection value It is expressed as:

[0133]

[0134] Step B26: Use the projection value And the projection value To obtain the ground point set Ground point set It is expressed as:

[0135]

[0136] Step B27: Let Repeat steps B23 to B26 until the set number of iterations is reached to obtain the ground point set

[0137] Step B28: Based on the ground point set And use the perpendicularity, height, and flatness to obtain the ground point set Ground point set It is expressed as:

[0138]

[0139] Where, φ(v 3,n ) represents the perpendicularity, Represents the height, Represents the flatness, N C Represents the number of grid cells included in all polar coordinate sub - grids, N Z Represents the number of polar coordinate sub - grids, Represents an intermediate variable, z = [0, 0, 1] T , θ τ Represents the angle threshold, v 3,n Represents The unit normal vector of Represents the average height, r n Represents the distance between the centroid of Sn and the origin, Sn represents the total set of points of n grid cells within the polar coordinate sub - grid, γ(r n ) represents the adaptive mid - point function that makes r n Exponentially grow, L τ Represents the constant range parameter, And σ τ,m Respectively represent the magnitude of the gain and the set flatness threshold, σ n Represents an intermediate variable, λ 1,n , λ 2,n , λ 3,n Are the PCA features of the grid cell;

[0140] Step B29: Based on the point cloud data of the pigsty, after removing the ground point set, the point cloud data of the sows is obtained.

[0141] It should be noted that the specific implementation manners are only explanations and illustrations of the technical solutions of the present invention, and the scope of the right protection cannot be limited thereby. Those that are only partial changes made according to the claims and the description of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A sow estrus behavior monitoring and identification method based on multi-target tracking, characterized in that The following steps are involved: Step 1: For the sow to be monitored, obtain the breed and development stage of the sow; Step 2: Obtain all historical estrus data in the same estrus cycle in the corresponding development stage of the breed, wherein the historical estrus data is the estrus behavior of the sow recorded in each inspection when the sow is in estrus; Step 3: Count each estrus behavior of the sows in all historical estrus data, the number of occurrences of each estrus behavior, and the number of occurrences of all estrus behaviors, and take the proportion of the number of occurrences of each estrus behavior in the number of occurrences of all estrus behaviors as the estrus behavior probability of the estrus behavior; Step 4: Monitor the sows to be monitored within the set monitoring time. When each estrus behavior of the sow is identified for the first time, the estrus behavior probability of the corresponding estrus behavior is directly obtained based on step 3; Step 5: Add up the estrus behavior probabilities obtained during the monitoring time to obtain the total estrus behavior probability.

2. The method for monitoring and identifying sow estrus behavior based on multi-target tracking according to claim 1 is characterized in that The development stage is gilt or sow.

3. The method for monitoring and identifying sow estrus behavior based on multi-target tracking according to claim 1 is characterized in that The estrus behavior is identified by YOLOV5.

4. The method for monitoring and identifying sow estrus behavior based on multi-target tracking according to claim 1 is characterized in that The estrus behaviors include standing still, ears erect and mounting.

5. The method for monitoring and identifying sow estrus behavior based on multi-target tracking according to claim 4 is characterized in that In the estrus behavior, the steps for identifying the ears standing up are as follows: According to the breed and development stage of the sow, the average area of ​​the sow's ear when it is not erect is obtained and used as the threshold. After that, the monitoring image is obtained, and the pig ear image is extracted based on the monitoring image. The area of ​​the pig ear is obtained based on the internal reference of the shooting camera. Finally, the area of ​​the pig ear is compared with the threshold. If the area of ​​the pig ear exceeds the threshold, it is an erect ear, otherwise it is a non-erect ear.

6. The method for monitoring and identifying sow estrus behavior based on multi-target tracking according to claim 5 is characterized in that In the estrus behavior, the identification steps of standing still are as follows: Use millimeter-wave radar to obtain continuous video images of sows, and then use the trained neural network to process the video images, identify the sow's movement posture, and determine whether the sow is in a static state based on the sow's movement posture; The trained neural network is obtained by the following steps: Step A1: Obtain historical monitoring images of sows, set key points on the limbs of the sow in the first frame image, and represent each key point by a three-dimensional position in space to construct a posture space; Step A2: Perform random sampling in the posture space to obtain the sow detection posture vector; Step A3: Obtain regression scores using the detected target posture vector and the first frame image; Step A4: After performing gradient descent on the sow detection posture vector using the regression score, the posture estimation result is obtained; Step A5: In the next frame image, sampling is performed around the pose estimation result, and the above processing is performed until the pose estimation results of all frames are obtained, and a training set is constructed based on all key points and the corresponding pose estimation results to train the neural network.

7. The method for monitoring and identifying sow estrus behavior based on multi-target tracking according to claim 6 is characterized in that The regression score is obtained by a neural network, and the neural network includes an image processing part and a feature regression part; The image processing part includes seven modules; in, The first module contains a convolutional layer with 64 7×7 convolution kernels; The second module contains 3 convolutional layers with 64 1×1 convolutional kernels, 3 convolutional layers with 64 3×3 convolutional kernels, and 3 convolutional layers with 512 1×1 convolutional kernels; The third module contains 3 convolutional layers with 128 1×1 convolutional kernels, 3 convolutional layers with 128 3×3 convolutional kernels, and 3 convolutional layers with 512 1×1 convolutional kernels; The fourth module contains 3 convolutional layers with 256 1×1 convolutional kernels, 3 convolutional layers with 256 3×3 convolutional kernels, and 3 convolutional layers with 1024 1×1 convolutional kernels; The sixth module contains a 7×7 average pooling layer; The seventh module contains a 2048×48 fully connected layer; The feature regression part includes four modules; in, The first module contains a graph convolutional layer with a 6×8 fully connected layer; The second module contains a graph convolutional layer with 8×16 fully connected layers; The third module contains a graph convolution layer with a 16×32 fully connected layer; The fourth module contains a 512×1 fully connected layer.

8. The method for monitoring and identifying sow estrus behavior based on multi-target tracking according to claim 4 is characterized in that In the estrus behavior, the identification steps of mounting are as follows: Step B1: Obtain the pig house monitoring image data and use YOLOV5 to identify the state of the sow. If the sow is standing, execute step B2; otherwise, the sow is not climbing; Step B2: Obtaining point cloud data of the sow, and identifying the point cloud of the spine, the point cloud of the sow's front leg bones, and the point cloud of the sow's hind leg bones in the point cloud data; Step B3: Select two point clouds from the spine point cloud, connect the two selected point clouds, and then extend the connection line to both ends along the straight line direction to obtain the spine extension line; Step B4: Select two point clouds from the sow front leg bone point cloud, connect the two selected point clouds, and then extend the connection line to both ends along the straight line direction to obtain the front leg bone extension line; Step B5: Select two point clouds from the sow hind leg bone point cloud, connect the two selected point clouds, and then extend the connection line to both ends along the straight line direction to obtain the hind leg bone extension line; Step B5: Obtain the angle formed by the extended line of the spine and the extended line of the front leg bone, and the angle formed by the extended line of the spine and the extended line of the hind leg bone. If the two angles are within their respective threshold ranges, it is a climbing behavior, otherwise it is not a climbing behavior.

9. The method for monitoring and identifying sow estrus behavior based on multi-target tracking according to claim 8, characterized in that The specific steps of obtaining the point cloud data of the sow in step B2 are: Obtain the point cloud data of the pig house, and remove the ground point cloud in the point cloud data to obtain the point cloud data of the sow; The specific steps to remove the ground point cloud from the point cloud data are: Step B21: Divide the point cloud data into multiple polar coordinate sub-grids, each polar coordinate sub-grid contains N r,m ×N θ,m grid cells, where N r,m Represents the number of rings in the polar coordinate subgrid, N θ,m Indicates the number of sectors in the polar coordinate subgrid; Step B22: Select the point cloud with the lowest height in each polar coordinate subgrid as the initial seed point, and then obtain the ground point set It is expressed as: Among them, z(p k ) represents the height threshold of the returned point, p k represents the point in the grid cell, S n represents the total set of points in n grid cells within the polar coordinate subgrid, Indicates the average height of the seed points, z seed Indicates the height threshold for selecting seed points; Step B23: Obtain ground point set Mean of the point cloud and the centralization matrix; Step B24: Obtain the covariance matrix of the centralization matrix, and perform singular value decomposition on the covariance matrix to obtain the minimum singular value, and then use the eigenvector corresponding to the minimum singular value as the normal vector of the plane Finally, the mean and the plane normal vector Perform dot multiplication to get the projection value Projection value It is expressed as: Step B25: Change the plane's normal vector and p k Perform dot multiplication to get the projection value Projection value It is expressed as: Step B26: Using Projection Values and projection value Get ground point set Ground point set It is expressed as: Step B27: Make Repeat steps B23 to B26 until the set number of iterations is reached to obtain the ground point set. Step B28: Based on ground point set And use verticality, height and flatness to get the ground point set Ground point set It is expressed as: Among them, φ(v 3,n ) represents verticality, Indicates height, Indicates flatness, N C Indicates the number of grid cells contained in all polar coordinate subgrids, N Z represents the number of polar coordinate subgrids, Represents the intermediate variable, z=[0,0,1] T ,θ τ Indicates the angle threshold, v 3,n express The unit normal vector of represents the average height, r n represents the distance between the centroid and the origin of Sn, Sn represents the total set of points in n grid cells in the polar coordinate subgrid, γ(r n ) means to make r n Exponentially growing adaptive midpoint function, L τ Denotes constant range parameters, θ and σ τ,m Respectively represent the size of the gain and the set flatness threshold, σ n represents the intermediate variable, λ 1,n , 2,n , 3,n is the PCA feature of the grid unit; Step B29: Based on the point cloud data of the pig house, after removing the ground point set, the point cloud data of the sow is obtained.