Intelligent laser radar pig counting method and system for pig farms
By using the combined technology of intelligent laser radar and liftable baffles in pig farms, we can identify and block abnormal pig counting, solve the problem of inaccurate pig counting, and achieve accurate counting of pig passages.
Patent Information
- Application Number
- CN202410924917.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-11
AI Technical Summary
The existing method of counting pigs in pig farms has the problem of inaccurate counting, especially when pigs are stacked together or when workers are bent over and blocked, resulting in counting errors.
The intelligent lidar pig counting method is adopted. By setting the identification area and tracking area, the image recognition model and lidar are used to establish a 3D point cloud map to identify and judge abnormal pig counting, and use liftable baffles for blocking operations to ensure accurate counting. sex.
It effectively reduces counting misjudgments caused by pig stacking or staff obstruction, and achieves accurate counting of pig channels, with low cost, high power consumption and strong practicability.
Smart Images

Figure CN118486053B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent breeding control technology, and in particular to a pig farm intelligent laser radar pig counting method and system. Background Art
[0002] With the development and application of information technology, artificial intelligence technology has gradually been widely used in industrial production, energy, transportation and other fields. In the breeding industry, due to the high labor costs, low production efficiency, low disease prevention and control capabilities and high feed waste rate of traditional large-scale breeding methods, the future pig breeding industry will definitely upgrade to a large-scale, intelligent and intensive breeding model with advantages such as low labor costs, high production efficiency and strong disease prevention and control capabilities.
[0003] When pigs are brought into the farm for inventory or sale, there is a need to count the pigs passing through the channel.
[0004] Although there are already solutions for counting pigs in aisles through deep learning and tracking algorithms, the existing solutions have the problem of inaccurate counting. Research has found that the existing implementation solution is to directly count the pigs passing through the aisle under the camera through deep learning. Therefore, if there is a stacking situation where one pig is stacked on top of another pig, or if the staff bends down to block the pigs, these situations will cause the existing methods to have inaccurate counting. Summary of the invention
[0005] The present invention proposes a pig farm intelligent laser radar pig counting method to solve the problem of inaccurate pig counting. The pig farm intelligent laser radar pig counting method comprises: a partitioning step: setting an identification area and a tracking area located in a channel. When a pig passes through the channel, it first passes through the identification area and then passes through the tracking area; a mapping step: using an image recognition model to perform image recognition in the identification area. When a moving object is recognized in the identification area, the laser radar is used to detect the moving object at the position to establish a laser radar 3D (three-dimensional) point cloud map of the moving object; a recognition step: establishing a point cloud recognition model corresponding to the laser radar 3D point cloud map type, identifying whether there is an abnormality in pig counting according to the point cloud recognition model; blocking step: when the abnormality in pig counting is identified, a blocking operation is performed according to the corresponding pig height calculated by the laser radar 3D point cloud map to eliminate the abnormality in pig counting, and the blocking operation is set between the identification area and the tracking area; counting step: after eliminating the abnormality in pig counting or when the abnormality in pig counting is not identified, the pigs entering the tracking area are identified and tracked to count the pigs; removing the blocking step: when the personnel situation is identified and the pigs have completely passed through the identification area, the blocking operation is removed.
[0006] Furthermore, the identification step includes: calculating the centroid of the laser radar 3D point cloud by means of a K-means clustering (K-means) algorithm, selecting a predetermined range, initializing two center points in the laser radar 3D point cloud, calculating and comparing the distance between the two centroids in the laser radar 3D point cloud to determine: whether the laser radar 3D point cloud is the same object, or two objects that are close to each other, or two objects that are a certain distance apart, so as to preliminarily determine whether there is any abnormality in the pig counting.
[0007] Furthermore, the identification step includes: setting a first distance and a second distance: when the distance between two centroids in the laser radar 3D point cloud is less than the first distance, it is judged that the objects on the laser radar 3D point cloud are the same object and no further inspection and judgment is required; when the distance between the two centroids in the laser radar 3D point cloud is greater than the second distance, it is judged that the objects on the laser radar 3D point cloud are two objects with a certain distance between them and no further inspection and judgment is required; when the distance between the two centroids in the laser radar 3D point cloud is between the first distance and the second distance, it is judged that the objects are two objects with a close distance and further inspection and judgment is required.
[0008] Furthermore, the identification step includes: first, through 3D modeling, outputting a series of collected laser radar 3D point cloud data of pigs, and training a preliminary model, then collecting a large number of laser radar 3D point clouds of real pigs, automatically annotating and manually fine-tuning through the preliminary model, and finally further determining the type of the abnormal pig counting situation by training iterative method based on the collected data; or, through the camera RGB (red, green, blue) image depth algorithm, assisting the laser radar 3D point cloud data, directly performing target segmentation, and further determining the type of the abnormal pig counting situation.
[0009] Furthermore, the identification step includes: using a 3D point cloud segmentation algorithm that segments the image and the laser radar 3D point cloud to further determine the type of the abnormal pig counting situation.
[0010] Furthermore, it also includes: converting the coordinates of the laser radar 3D point cloud image into coordinates with the ground as the XY plane through coordinate rotation; and identifying whether there is any abnormal pig counting based on the point cloud recognition model formed by the laser radar 3D point cloud image after the coordinate conversion.
[0011] Furthermore, the abnormal pig counting situation is a situation where a worker bends over or pigs are stacked.
[0012] Furthermore, it also includes: in the process of identification and counting, repeating the mapping step, identification step, blocking step, counting step and blocking removal step until one pig counting work is completed.
[0013] The method provided by the present invention can determine the situation of pig stacking or staff obstruction based on deep learning and laser radar, block the operation (for example, block the stacked pigs or the staff blocking the pigs) through (Internet of Things devices), and identify the count of pigs passing through the channel under the camera through deep learning.
[0014] To solve the above problems, the present invention also provides a pig farm intelligent laser radar pig counting system, which is used to execute the pig farm intelligent laser radar pig counting method as described above, including: a camera, which is used to be set above the channel through which pigs pass, and is used to distinguish between the identification area directly below and the tracking area below the side; a laser radar, which is used to be set above the side of the channel through which pigs pass to identify the laser radar 3D point cloud; a liftable baffle, which is used to be set above the side of the channel through which pigs pass for blocking; and an edge computing device, which is used for AI algorithms.
[0015] Furthermore, the camera, laser radar and liftable baffle are Internet of Things devices.
[0016] The system provided by the present invention applies the pig farm intelligent laser radar pig counting method as described above, based on deep learning and equipment such as cameras, laser radars and Internet of Things railings, to reduce the misjudgment problem of pig stacking or staff obstruction during pig channel counting, and prevents staff from bending over to block pigs or obstruction when pigs are stacked. It not only has low cost and power consumption, but also has strong practicality and can solve the corresponding counting error problem in a targeted manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of a system structure corresponding to the method provided by an embodiment of the present invention from one angle (side view);
[0018] Figure 2 It is a schematic diagram of another angle (top view) of the system structure corresponding to the method provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. 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.
[0020] The existing method relies on workers to control the condition and posture of the pigs, and through training, workers are required to prevent pigs from stacking and reduce the occlusion of pigs caused by bending over when driving pigs. However, in actual operation, it is difficult for workers to take into account the condition of each pig because there may be a large number of pigs and the speed of movement may be fast or slow. In addition, even if most workers are trained, they will inevitably have irregular postures due to the ever-changing situations they face when performing their work, which will cause misrecognition and counting errors in deep learning.
[0021] The method and system provided by the present invention are used to solve the above-mentioned problems, so that even in scenarios with high counting requirements, inaccurate counting caused by situations such as pig stacking or staff blocking pigs can be prevented, and accurate counting can be achieved.
[0022] An embodiment of the present invention provides a method for counting pigs in a pig farm using an intelligent laser radar, comprising: a partitioning step, a mapping step, an identification step, a blocking step, a counting step and a blocking removal step.
[0023] Zoning steps: Set up the identification area and tracking area in the channel. When the pigs pass through the channel, they first pass through the identification area and then the tracking area.
[0024] Please refer to Figure 1 In order to implement the partitioning step, the present embodiment can set a corresponding camera 100 above the channel through which the pigs pass, and set a laser radar 200 on the upper side, and they can be connected to an edge computing device (not shown) for AI algorithm together, or they can be connected to different edge computing devices respectively, and the corresponding access method can be a wireless communication connection or a wired connection.
[0025] In this embodiment, the camera 100 and the laser radar 200 can be Internet of Things devices to achieve advantages such as low power consumption and remote intelligent control.
[0026] Please refer to Figure 2 In this embodiment, the area below the camera 100 is divided into two areas. The area directly below the camera 100 is set as the recognition area (such as Figure 2 The lower side is the (identification) tracking area (such as Figure 2 (marked in Chinese characters) Figure 2 The dotted line in the figure indicates the boundary position of the two areas. A liftable baffle 300 is arranged above the boundary position of the two areas. Figure 1 and Figure 2 It can be seen that the liftable baffle 300 may include two side columns (not distinguished by label) and a crossbar structure (not distinguished by label) spanning between the two side columns, wherein the crossbar structure can move up and down (such as Figure 1), when the cross structure rises to a higher position, pigs and personnel can pass directly from under the cross structure, and when the cross structure descends to the corresponding position, it can ensure that only a single pig can pass through, that is, when pigs are stacked, the pigs stacked on top cannot pass through.
[0027] Mapping steps: Use the image recognition model to perform image recognition in the recognition area. When a moving object is identified in the recognition area, the laser radar 200 is used to detect the moving object at that position to create a laser radar 3D point cloud map of the moving object.
[0028] In this embodiment, in the mapping step, when the image recognition model (deep learning image recognition model) recognizes that the moving object appearing in the recognition area of the camera 100 is a pig or a staff member, the pig or staff member at that position is detected by the laser radar 200, and the point cloud map of the laser radar 200 (i.e., the corresponding laser radar 3D point cloud map) is returned.
[0029] Identification steps: Establish a point cloud recognition model (deep learning point cloud recognition model) corresponding to the LiDAR 3D point cloud map, and identify whether there are any abnormal pig counts based on the point cloud recognition model.
[0030] In this embodiment, the abnormal situation of pig counting is the situation of staff bending over or pigs stacking, that is, in this embodiment, the situation of staff bending over or pigs stacking is identified through the point cloud recognition model. The abnormal situation of pig counting can also be other situations, such as other occlusion situations, which will be misidentified and reduce the accuracy of counting.
[0031] In this embodiment, the laser radar 3D point cloud image coordinates are converted into coordinates with the ground as the XY plane by coordinate rotation, that is, the point cloud image coordinates are converted into coordinates with the ground as the XY plane by coordinate rotation. At this time, this embodiment identifies whether there is an abnormal pig count based on the point cloud recognition model formed by the laser radar 3D point cloud image after the coordinate conversion.
[0032] The specific process may include: when pigs or staff members pass through the passage, they are counted by cameras and corresponding algorithms, and lidar and corresponding algorithms are used to detect situations where people bend over to block the pigs or pigs are stacked and passing through.
[0033] The specific operation of transforming the coordinates of the point cloud image is as follows: the Z axis remains unchanged, and the X axis and the Y axis are transformed from the laser radar reference plane to the ground reference plane using the following formula (1):
[0034] (1)
[0035] The angle θ in the above conversion formula is as follows Figure 1As shown in , x and y represent the coordinates before transformation. and Represents the transformed coordinates.
[0036] Furthermore, the identification step includes: calculating the centroid of the LiDAR 3D point cloud through the K-Means algorithm, selecting a predetermined range (referring to the range that you want to detect during work, which is selected through configuration during implementation, similar to the camera selecting a certain area, for example, it can be within 1 square meter to 4 square meters), initializing two center points in the LiDAR 3D point cloud, calculating and comparing the distance between the two centroids in the LiDAR 3D point cloud to determine: whether the LiDAR 3D point cloud is the same object, or two objects that are close to each other, or two objects that are a certain distance apart, so as to preliminarily determine whether there is any abnormality in pig counting.
[0037] K-Means algorithm, also known as K-means algorithm, is a kind of clustering algorithm. The process of calculating the centroid of point cloud by K-Means algorithm includes: selecting a predetermined range (a certain range, by pre-setting the channel range, excluding obstacles such as fences on both sides of the channel to avoid affecting the calculation) in the LiDAR 3D point cloud, initializing the calculation of two center points, and at the beginning, you can select two points that are higher than the ground and farthest apart, and compare the distances of the last two centroids calculated by iterative calculation to determine whether the LiDAR 3D point cloud (three-dimensional point cloud) is the same object / two objects that are too close / two objects at a certain distance.
[0038] Specifically, to achieve the above judgment, the identification step includes: setting a first distance d1 and a second distance d2: when the distance between the two centroids in the laser radar 3D point cloud is less than the first distance d1, it is judged that they are the same object on the laser radar 3D point cloud map, and no further inspection and judgment is required; when the distance between the two centroids in the laser radar 3D point cloud is greater than the second distance d2, it is judged that they are two objects with a certain distance on the laser radar 3D point cloud map, and no further inspection and judgment is required; when the distance between the two centroids in the laser radar 3D point cloud is between the first distance d1 and the second distance d2, it is judged that they are two objects with a close distance, and further inspection and judgment are required.
[0039] The steps to determine the distance between the two centroids include initialization, selecting the two points above the ground with the farthest distance, expressed as: .
[0040] For each point Xi in the LiDAR 3D point cloud, it is expressed as: .
[0041] Use the following formulas (2) and (3) to calculate the distance to different centroids (the centroids μ1 and μ2 are the two points with the longest distance initialized):
[0042] (2)
[0043] (3)
[0044] According to the distance from Xi to two points, the points are assigned to two different clusters, as shown in the following formula (4):
[0045] (4)
[0046] For each cluster C1 and C2, calculate the new centroid using formulas (5) and (6):
[0047] (5)
[0048] (6)
[0049] Formulas (5) and (6) are iterated multiple times until the distance between the two centroids changes within a range less than δ.
[0050] According to experience, a first distance d1 and a second distance d2 are set (for example, a range of 3 times the distance between points in the point cloud, which may have different values depending on different devices). When d(μ1, μ2) in the following formula (7) is less than the first distance d1 (in some embodiments, the first distance d1 may be 0.3-0.5 meters), there is only one object on the point cloud. When d(μ1, μ2) in the following formula is greater than the second distance d2 (in some embodiments, the first distance d1 may be 1.5-2.0 meters), the distance between the two objects on the point cloud is far, and no further inspection or judgment is required.
[0051] (7)
[0052] Continuing from formula (7), when the distance d(μ1, μ2) between the centroids μ1 and μ2 is between the first distance d1 and the second distance d2, it means that the two objects may be relatively close and further judgment is needed, that is, whether there is an abnormality in pig counting.
[0053] In this embodiment, the identification step may include: further determining what kind of abnormal pig counting situation exists, such as using a 3D point cloud segmentation algorithm that uses images and lidar 3D point clouds for segmentation to further determine the type of abnormal pig counting situation.
[0054] Specifically, the 3D point cloud segmentation algorithm is used to further determine whether two objects (pigs) overlap. Among them, the 3D point cloud segmentation algorithm that performs segmentation through images and point clouds, such as the Dynamic Graph Convolutional Neural Network (Dynamic GraphCNN, or DGCNN), can directly segment the point cloud to determine whether a person is bending over and blocking a pig or a pig is stacked on another pig.
[0055] In the 3D point cloud segmentation algorithm for image and point cloud segmentation, the dynamic graph convolutional neural network extracts features by dynamically constructing an adjacency graph and performing convolution operations on it. It has the following key features:
[0056] 1. Dynamic graph construction: The dynamic graph convolutional neural network dynamically recalculates the adjacency relationship between points at each layer through the k-nearest neighbor algorithm to construct an adjacency graph, which can capture the local structural information of the point cloud at different levels;
[0057] 2. Edge Conv operation: The dynamic graph convolutional neural network uses an operation called edge convolution to replace the traditional convolution operation. Edge convolution extracts local features by calculating the feature difference between each point and its neighboring points, which has better representation ability;
[0058] 3. Hierarchical feature learning: The dynamic graph convolutional neural network gradually extracts local and global features of the point cloud through multiple levels of edge convolution operations. This hierarchical feature learning method can effectively capture the geometric structure of the point cloud;
[0059] 4. Classification and segmentation tasks: Dynamic graph convolutional neural networks can be applied to the classification and segmentation tasks of point cloud data. In the classification task, the dynamic graph convolutional neural network maps the global features of the point cloud to the category labels; in the segmentation task, the dynamic graph convolutional neural network maps the local features of the point cloud to the point-level category labels.
[0060] However, there are two problems with using point cloud algorithms (the above-mentioned 3D point cloud segmentation algorithm): first, the algorithm has a huge amount of computational complexity, which is not conducive to high-frequency reasoning; second, the algorithm itself is not specifically trained for pigs, and the recognition effect needs to be further improved.
[0061] On the contrary, when another embodiment of the present invention adopts an improved point cloud algorithm, the corresponding shortcomings can be overcome to better further determine the type of abnormal pig counting situation. Please refer to the following content.
[0062] The identification steps include: first, through 3D modeling, output a series of collected laser radar 3D point cloud data of pigs, and train a preliminary model; then, collect a large number of laser radar 3D point clouds of real pigs, automatically annotate them through the preliminary model and perform manual fine-tuning; finally, use the method of training iteration based on the collected data to further determine the type of abnormal pig counting.
[0063] Specifically, we first output a series of 3D point cloud data of collected pigs through 3D modeling and train a preliminary model. Then, we collect a large number of 3D point clouds of real pigs, automatically annotate them through the preliminary model and perform manual fine-tuning. Finally, we use the method of training iteration based on the collected data to further determine the type of abnormal pig counting situation, such as the situation where the staff is bending over or the pigs are stacked.
[0064] The identification steps include: using the camera RGB image depth algorithm, assisted by the lidar 3D point cloud data, to directly segment the target and further determine the type of abnormal pig counting.
[0065] Specifically, the camera RGB image depth algorithm can be used to assist in 3D point cloud data to directly segment the target and further determine whether the type of abnormal pig counting situation is a situation where the staff is bending over or the pigs are stacked.
[0066] According to the above steps, this embodiment can form a laser radar 3D point cloud recognition model that can identify abnormal pig counting situations such as staff blocking pigs or pigs stacking.
[0067] Blocking step: When an abnormal pig count is identified, a blocking operation is performed based on the corresponding pig height calculated from the LiDAR 3D point cloud image to eliminate the abnormal pig count. The blocking operation is set between the identification area and the tracking area.
[0068] In order to implement the blocking step, in this embodiment, a liftable baffle 300 can be set above the passage through which the pigs pass for the blocking operation of the blocking step. The liftable baffle 300 is set between the identification area and the tracking area (as mentioned above, the identification area and the tracking area can be distinguished by the liftable baffle 300).
[0069] It should be noted that the setting of the liftable baffle takes into account both the ability to effectively block pigs and the goal of not damaging the pigs. While ensuring a large blocking strength (not easy to be damaged), the surface (especially the surface of the above-mentioned cross baffle structure) can be covered with a soft surface layer to prevent pigs or staff from being accidentally hit or scratched.
[0070] In this embodiment, the liftable baffle 300 is also connected to an edge computing device for AI algorithm (it can be the same device as the camera 100 and the laser radar 200, or it can be a different device), and it can also be an Internet of Things device.
[0071] When the embodiment identifies the situation of staff blocking or pigs stacking, the height of the pigs (the specific height of each pig may be different) can be calculated according to the corresponding point cloud map (laser radar 3D point cloud map), and the liftable baffle 300 can be lowered to the height that the lowest pig can pass through. At this time, the staff is blocked and cannot move forward, and the stacked pigs will be blocked by another pig and continue to move forward. This provides conditions for subsequent accurate counting.
[0072] Counting steps: After eliminating abnormal pig counting or when no abnormal pig counting is identified, the pigs entering the tracking area are identified and tracked for pig counting.
[0073] In this embodiment, when it is identified that there is no abnormal pig counting situation, that is, when no abnormal pig counting situation is identified, the pigs are directly identified and tracked from the tracking area to count the pigs; in another case, after eliminating the abnormal pig counting situation, the pigs entering the tracking area are identified and tracked to count the pigs. In either case, it is guaranteed that there is no abnormal pig counting situation for the pigs entering the tracking area.
[0074] In the counting step, since the tracking area on the other side (lower side) of the camera 100 is not blocked or stacked with pigs, accurate AI recognition and tracking can be performed, and the corresponding deep learning and the model formed by it can be fully utilized to achieve accurate counting. This step can be performed using existing counting methods, such as pig recognition through RGB image recognition algorithm and tracking and counting through deepsort algorithm. Due to the previous steps, it is ensured that the corresponding pigs are counted individually, there is no stacking, and there is no misidentification due to improper operation of the staff, so the corresponding AI recognition and tracking work can be carried out efficiently and accurately.
[0075] Removal of blocking steps: When a person is identified and the pig has completely passed through the identification area, the blocking operation is removed.
[0076] In this embodiment, specifically, when it is recognized that the baffle is lowered due to obstruction by people, the baffle is raised after the pigs have completely passed through to facilitate the passage of people.
[0077] The pig farm intelligent laser radar pig counting method provided by the embodiment of the present invention also includes: in the identification and counting process, repeating the mapping step, the identification step, the blocking step, the counting step and the blocking removal step (wherein the blocking removal step may be performed multiple times or may not need to be performed, depending on whether the operation method of the personnel is standardized) until a pig counting work is completed.
[0078] In summary, this embodiment can control the rise and fall of the liftable baffle 300 according to the identification situation of the identification step, prevent abnormal pig counting such as pig stacking or staff blocking, and realize an Internet of Things pig inventory (counting) method. The corresponding method can prevent technical problems caused by abnormal pig counting such as staff blocking pigs or pig stacking during pig channel inventory (counting), and realize accurate pig channel (aisle) counting.
[0079] The method provided in this embodiment establishes a 3D point cloud through a laser radar, and then identifies the corresponding situation that causes inaccurate counting through the laser radar 3D point cloud. Due to factors such as cost and existing supply products, the point cloud accuracy of the laser radar is usually low and cannot be used for target type identification and tracking. It cannot complete the corresponding pig channel counting work when used alone. In view of these shortcomings, the method of this embodiment introduces a laser radar and combines related steps and algorithms to judge abnormal pig counting (such as pig stacking, etc.), and through corresponding blocking operations (such as using the Internet of Things railing to block pigs stacked / climbing on pigs, or blocking bent staff), and finally uses the camera 100 to accurately identify in the identification area, so as to solve various abnormal pig counting situations (various occlusion problems) and achieve accurate pig counting.
[0080] An embodiment of the present invention also provides a pig farm intelligent laser radar pig counting system, which is used to execute the pig farm intelligent laser radar pig counting method in the above embodiment.
[0081] The system includes: a camera, which is used to be set above the passage through which the pigs pass, and is used to distinguish the identification area directly below and the tracking area below the side; a laser radar, which is used to be set above the side of the passage through which the pigs pass to identify the laser radar 3D point cloud; a liftable baffle, which is used to be set above the side of the passage through which the pigs pass to block; an edge computing device for AI algorithms, and the camera and the laser radar are both connected to the edge computing device. That is, in this embodiment, a camera is set above the passage through which the pigs pass, and a laser radar and an IoT device such as a liftable baffle are set above the side (for example, the liftable baffle can specifically be an IoT railing), and are connected to an edge computing device for AI algorithms to form a corresponding system.
[0082] In this embodiment, as described above, the camera, lidar and liftable baffle are selected to use IoT devices, taking advantage of the low power consumption and remote intelligent control of IoT devices to achieve a system with lower cost and longer service life.
[0083] The system can reduce the misjudgment problems such as pig stacking or staff obstruction when counting pig channels based on deep learning, cameras, lidar, IoT railings and other equipment, and prevent staff from bending over to block pigs or obstruction when pigs are stacked. It is not only low in cost and power consumption, but also highly practical and can solve the corresponding pig counting error problems in a targeted manner.
[0084] For more information about the pig farm intelligent laser radar pig counting system according to the embodiment of the present invention, please refer to the corresponding content of the above-mentioned pig farm intelligent laser radar pig counting method embodiment, and can be combined with reference to Figure 1 and Figure 2 , I will not go into details here.
[0085] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A pig farm intelligent laser radar pig counting method, characterized in that: include: Partitioning step: setting an identification area and a tracking area located in the passage, when the pig passes through the passage, it first passes through the identification area and then passes through the tracking area; Mapping step: performing image recognition in the recognition area using an image recognition model, and when a moving object is recognized to appear in the recognition area, detecting the moving object in the recognition area by using a laser radar to establish a laser radar 3D point cloud map of the moving object; Identification step: establishing a point cloud recognition model corresponding to the laser radar 3D point cloud image, and identifying whether there is an abnormal pig counting situation according to the point cloud recognition model; Blocking step: when the abnormal pig counting is identified, a blocking operation is performed according to the corresponding pig height calculated by the laser radar 3D point cloud map to eliminate the abnormal pig counting, and the blocking operation is set between the identification area and the tracking area; Counting step: after eliminating the abnormal pig counting situation or when no abnormal pig counting situation is identified, identifying and tracking the pigs entering the tracking area to count the pigs; Blocking removal step: when the person is identified and the pig has completely passed through the identification area, the blocking operation is removed; The identification step includes: calculating the centroid of the laser radar 3D point cloud by a K-means clustering algorithm, selecting a predetermined range, initializing two center points in the laser radar 3D point cloud, calculating and comparing the distance between the two centroids in the laser radar 3D point cloud to determine: the laser radar 3D point cloud is the same object, or two objects that are close to each other, or two objects that are a certain distance apart, so as to preliminarily determine whether there is an abnormality in the pig counting; The identification step further includes: setting a first distance and a second distance: when the distance between two centroids in the laser radar 3D point cloud is less than the first distance, it is judged that the laser radar 3D point cloud image is the same object, and no further inspection and judgment is required; when the distance between two centroids in the laser radar 3D point cloud is greater than the second distance, it is judged that the laser radar 3D point cloud image is two objects with a certain distance, and no further inspection and judgment is required; when the distance between two centroids in the laser radar 3D point cloud is between the first distance and the second distance, it is judged that the objects are close to each other and further inspection and judgment is required; The identification step also includes: first, through 3D modeling, outputting a series of collected laser radar 3D point cloud data of pigs, and training a preliminary model, then collecting a large number of laser radar 3D point clouds of real pigs, automatically annotating and manually fine-tuning through the preliminary model, and finally further determining the type of abnormal pig counting situation by a training iteration method based on the collected data.
2. The pig farm intelligent laser radar pig counting method according to claim 1, characterized in that: The identification step includes: using a 3D point cloud segmentation algorithm that segments the image and the laser radar 3D point cloud to further determine the type of the abnormal pig counting situation.
3. The pig farm intelligent laser radar pig counting method according to claim 1, characterized in that: Also includes: By rotating the coordinates, the coordinates of the laser radar 3D point cloud image are converted into coordinates with the ground as the XY plane; based on the point cloud recognition model formed by the laser radar 3D point cloud image after the coordinate conversion, it is identified whether there is an abnormality in the pig counting.
4. The pig farm intelligent laser radar pig counting method according to claim 1, characterized in that: The abnormal pig counting situation is a situation where the staff bends over or the pigs are stacked.
5. The pig farm intelligent laser radar pig counting method according to claim 1, characterized in that: Also includes: During the identification and counting process, the mapping step, identification step, blocking step, counting step and blocking removal step are repeated until one pig counting work is completed.
6. An intelligent laser radar pig counting system for pig farms, characterized in that: The system is used to execute the pig farm intelligent laser radar pig counting method according to any one of claims 1 to 5, comprising: A camera is used to be set above the passage through which the pigs pass, and is used to distinguish between an identification area directly below and a tracking area below and to the side; A laser radar is set above the side of the channel where the pigs pass to identify the laser radar 3D point cloud; A liftable baffle plate is used to be arranged above the side of the passage through which the pigs pass, so as to block the passage; Edge computing devices for AI algorithms.
7. The pig farm intelligent laser radar pig counting system as claimed in claim 6, characterized in that: The camera, laser radar and liftable baffle are Internet of Things devices.
Citation Information
Patent Citations
Pig counting method for fixed channel
CN114119648A
Posture identification method for identifying postures of pigs and related products thereof
CN114187659A
Live pig multi-target tracking and behavior recognition method, computer equipment and storage medium
CN115830078A
Living pig counting and multi-target tracking method based on convolutional neural network
CN116051488A
Method and device for estimating body weight of group-fed pigs, electronic equipment and storage medium
CN117237990A
Cited By
Live pig counting method and system based on visual fusion algorithm, and storage medium
CN121617135A
Pig counting method and system based on visual fusion algorithm and storage medium
CN121617135B
