Method for detecting and identifying targets in flat-litter livestock and poultry house based on airborne laser point cloud

By optimizing point cloud preprocessing, segmentation, clustering, and classification methods, and combining global information and an adaptive input module, the efficiency and accuracy issues of target detection and recognition inside livestock and poultry houses were solved, achieving fast and accurate target detection and recognition.

CN118334425BActive Publication Date: 2026-06-16ZHEJIANG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2024-04-11
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In the detection and recognition of targets inside livestock and poultry houses, existing technologies require a large amount of computing resources to directly process the massive raw point cloud data, making it impossible to achieve efficient detection and recognition. On the other hand, point cloud clustering and classification methods cannot effectively utilize global information, which limits the accuracy of detection and recognition.

Method used

A method based on airborne laser point cloud data is adopted. By preprocessing the point cloud, segmenting the ground, clustering and classifying the point cloud, global information is introduced, and an adaptive point cloud structure input module is added to optimize the point cloud clustering and classification process, so as to achieve fast and accurate target detection and recognition.

🎯Benefits of technology

It enables more accurate and faster target detection and recognition inside livestock and poultry houses, reduces the demand for computing resources, and can process point cloud data of any size without cropping.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118334425B_ABST
    Figure CN118334425B_ABST
Patent Text Reader

Abstract

The application discloses a kind of flat raising livestock and poultry house internal target detection and identification method based on airborne laser point cloud.In the present application,firstly, point cloud collection and point cloud pretreatment are carried out on the inside of flat raising livestock and poultry house, and the pretreated livestock and poultry house point cloud is obtained;Then, after ground segmentation is carried out on the point cloud, ground point cloud and non-ground point cloud are obtained;Then, the clustering method based on point cloud step feature is used to cluster the ground point cloud and the non-ground point cloud respectively, and the ground point cloud clustering cluster and the non-ground point cloud clustering cluster are obtained;Finally, the point cloud classification is carried out on the ground point cloud clustering cluster and the non-ground point cloud clustering cluster respectively, and the target recognition result of the ground point cloud and the non-ground point cloud is obtained, so as to realize the flat raising livestock and poultry house internal target detection and identification.The point cloud clustering and point cloud classification method of the present application is optimized, and the coded global information can be introduced in the point cloud classification process, to ensure accurate and fast target recognition in the livestock and poultry house.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a target detection and recognition method in the field of intelligent sensing technology for livestock and poultry farming, specifically to a method for target detection and recognition inside floor-raised livestock and poultry houses based on airborne laser point cloud data. Background Technology

[0002] Livestock and poultry farming is an important component of agricultural and rural economic development and a major source of income for rural residents. The increasing market demand and decreasing labor resources are driving the gradual transformation of livestock and poultry farming towards automation, precision, and intelligence. In this intelligent transformation, intelligent sensing technology is crucial. The development of intelligent farming technologies such as automatic livestock and poultry counting, detection and location of sick and dead livestock and poultry, intelligent maintenance of farming equipment, and positioning and navigation of livestock and poultry farming robots all rely on the assistance of corresponding intelligent sensing technologies.

[0003] The internal environment of livestock and poultry houses is complex, with intricate structures and significant differences between different pieces of equipment. Livestock and poultry exhibit a variety of postures and can move freely within a certain range. To address this complex environment, intelligent sensing technology needs to possess the ability to accurately perceive different targets within the livestock and poultry house.

[0004] Currently, in order to achieve accurate perception of targets inside livestock and poultry houses, many sensors are installed on intelligent devices. Among these, 3D LiDAR is considered by most companies to be an indispensable sensor for the development of intelligent sensing technology due to its large sensing range, high ranging accuracy, and perception capability unaffected by lighting conditions. Therefore, based on the point cloud data collected by 3D LiDAR, the rapid detection and identification of targets inside livestock and poultry houses is an important part of developing intelligent sensing technology for livestock and poultry farming and realizing the intelligent transformation of livestock and poultry farming. Summary of the Invention

[0005] This invention employs multi-line lidar to acquire 3D point cloud data. Traditional point cloud target detection and recognition methods directly process massive amounts of raw point cloud data from livestock sheds, requiring significant computational resources and failing to achieve efficient target detection and recognition. Furthermore, target detection and recognition methods based on point cloud clustering and classification cannot effectively utilize the global information of the raw point cloud, limiting the accuracy of target detection and recognition. To address the shortcomings of existing technologies, this invention provides a method for target detection and recognition inside floor-raised livestock sheds based on airborne lidar point cloud data. This invention optimizes point cloud clustering and classification methods, incorporating pre-coded global information during point cloud classification to ensure accurate and rapid target detection and recognition within the livestock shed. Additionally, it adds an adaptive point cloud structure input module, allowing the point cloud classification network to accept point cloud data of arbitrary sizes without requiring data cropping.

[0006] To solve the technical problems in each stage, the present invention designs the following technical solution:

[0007] I. A method for target detection and recognition inside floor-raised livestock and poultry houses based on airborne laser point clouds

[0008] 1) Use lidar to collect point cloud data inside the floor-raised livestock and poultry sheds to obtain the original livestock and poultry shed point cloud; then preprocess the original livestock and poultry shed point cloud to obtain the preprocessed livestock and poultry shed point cloud.

[0009] 2) After ground segmentation of the pre-processed livestock and poultry house point cloud, ground point cloud and non-ground point cloud are obtained;

[0010] 3) Use a clustering method based on point cloud step features to perform point cloud clustering on ground point cloud and non-ground point cloud respectively, to obtain ground point cloud clusters and non-ground point cloud clusters;

[0011] 4) Perform point cloud classification on the ground point cloud clusters and non-ground point cloud clusters respectively to obtain target recognition results of ground point clouds and non-ground point clouds, thereby realizing target detection and recognition inside the flat-raised livestock and poultry house.

[0012] In step 1), the laser radar has 16, 32, or 64 lines.

[0013] Specifically, 2) refers to:

[0014] 2.1) Analyze and obtain the hardware parameters of the lidar;

[0015] 2.2) For point data P of two adjacent vertical wire bundle indices under the same horizontal wire bundle index. i,j P i,j+1 Their three-dimensional coordinates relative to the lidar are (X... i,j Y i,j Z i,j ), (X i,j+1 Y i,j+1 Z i,j+1 ), where i is the current horizontal harness index and j is the current vertical harness index;

[0016] 2.3) Calculate the difference vector (X) between the two points. i,j+1 -X i,j Y i,j+1 -Y i,j Z i,j+1 -Z i,j Then, calculate the angle Angle between the difference vector and the horizontal plane of the lidar using the following formula:

[0017]

[0018] 2.4) Based on the angle Angle between the difference vector and the horizontal plane of the lidar, and the installation elevation angle SensorMountAngle of the lidar, the angle Angle_ground between the difference vector and the horizontal plane is calculated using the following formula:

[0019] Angle_ground=|Angle+SensorMountAngle|

[0020] Where || represents taking the absolute value;

[0021] 2.5) If the angle between the calculated difference vector and the horizontal plane, Angle_ground, is greater than the angle threshold T1, then both points are determined to be non-ground points, and point P is set to... i,j Point P i,j+1 The flag bit f i,j f i,j+1 If the angle between the calculated difference vector and the horizontal plane, Angle_ground, is less than or equal to the angle threshold T1, then both points are determined to be ground points, and the flag bits are set to 1.

[0022] 2.6) Repeat steps 2.2)-2.5) to traverse the preprocessed point cloud according to the vertical and horizontal line bundle indices in turn to complete the segmentation of the preprocessed point cloud, thereby obtaining the ground point cloud and non-ground point cloud.

[0023] In step 3), a clustering method based on point cloud step features is used to cluster the ground point cloud to obtain ground point cloud clusters, specifically as follows:

[0024] 3.1) In the ground point cloud, select point C with two adjacent horizontal bundle indices i and i+1 under the same vertical bundle index j. i,j Point C i+1,j According to point C i,j Point C i+1,j Calculate the Euclidean distance D between the two points using the three-dimensional coordinates of the lidar; if point C i,j Point C i+1,j If the Euclidean distance D is less than or equal to the first distance threshold T2, then the two points belong to the same cluster of point clouds. If point C i,j Point C i+1,j If the Euclidean distance D is greater than the first distance threshold T2, then the two points do not belong to the same cluster of point clouds, and point C is removed. i+1,j Place it into a new point cloud cluster;

[0025] 3.2) Repeat 3.1) sequentially to traverse and determine the points with adjacent horizontal bundle indices under the same vertical bundle index in the ground point cloud, thereby obtaining all ground point cloud clusters.

[0026] 3.3) Calculate the spatial average coordinates of each surface point cloud cluster;

[0027] 3.4) Calculate the Euclidean distance D between two ground point cloud clusters based on the spatial average coordinates of the cloud clusters in each location. avg If the Euclidean distance D between two ground point cloud clusters avg If the distance is less than or equal to the second distance threshold T3, then the two ground point cloud clusters belong to the same cluster and are merged. This process is repeated for each ground point cloud cluster until the final ground point cloud cluster is obtained.

[0028] In step 4), point cloud classification is performed on the ground point cloud clusters to obtain the target recognition result of the ground point cloud, specifically as follows:

[0029] 4.1) Input the preprocessed point cloud of livestock and poultry houses and the clusters of point clouds in various places into the global feature encoding module, and output the feature vectors corresponding to the clusters of point clouds in various places;

[0030] 4.2) The adaptive point cloud structure input module is used to modify the feature vectors of ground point cloud clusters in each region during the forward propagation of the point cloud classification network, so that the point cloud classification network can adapt to ground point cloud feature vectors of different sizes as input.

[0031] 4.3) Input the ground point cloud features into the pre-trained point cloud classification network to classify the point cloud and output the target detection results of the ground point cloud.

[0032] Specifically, 4.1) refers to:

[0033] 4.1.1) Determine the points corresponding to the maximum and minimum values ​​of the three-axis coordinates in the preprocessed livestock and poultry house point cloud, and denot them as point cloud boundary points;

[0034] 4.1.2) Construct the three-dimensional coordinates of each ground point cloud cluster into a first two-dimensional vector v1 with a size of (N, 3), where N is the number of points in the ground point cloud cluster and 3 represents the number of bits in the three-dimensional coordinates. Then, concatenate the first two-dimensional vector v1 with the coordinates of the point cloud boundary points to obtain a second two-dimensional vector v2 with a size of (N, 21).

[0035] 4.1.3) Input the second two-dimensional vector v2 into the linear layer to learn the global features of each point in the ground point cloud cluster, and output a third two-dimensional vector v3 of size (N, 3);

[0036] 4.1.4) Construct a fourth two-dimensional vector v4 with size (N, 4) based on the three-dimensional coordinates and reflection intensity of the current ground point cloud cluster. The size 4 represents the number of bits in the three-dimensional coordinates and the number of bits in the reflection intensity. Then, concatenate the third two-dimensional vector v3 with the fourth two-dimensional vector v4 to obtain a fifth two-dimensional vector v5 with size (N, 7) and use it as the feature vector of the current ground point cloud cluster.

[0037] 4.1.5) Repeat 4.1.1)-4.1.4) to extract features from the remaining ground point cloud clusters to obtain the feature vectors of all ground point cloud clusters.

[0038] Specifically, 4.2) refers to:

[0039] 4.2.1) The dimension of the feature vector of each ground point cloud cluster is extended to the size (M, 7) to obtain the corresponding sixth two-dimensional vector v6, where M is the number of points of the ground point cloud cluster with the most points. Then, a mask of size (M, 1) is constructed for each ground point cloud cluster.

[0040] 4.2.2) After concatenating the sixth two-dimensional vector v6 of each surface point cloud cluster along the channel dimension, a seventh three-dimensional vector v7 with size (C, M, 7) is obtained. Similarly, after concatenating the mask of each surface point cloud cluster along the channel dimension, an eighth three-dimensional vector v7 with size (C, M, 1) is obtained. mask Composed of the seventh three-dimensional vector v7 and the eighth three-dimensional vector v mask The input ground point cloud features that make up the point cloud classification network.

[0041] II. A target detection and recognition system for floor-raised livestock and poultry sheds based on airborne laser point cloud data

[0042] include:

[0043] The data acquisition module is used to collect point cloud data of the interior of the floor-raised livestock and poultry house using lidar to obtain the original livestock and poultry house point cloud; and to preprocess the original livestock and poultry house point cloud to obtain the preprocessed livestock and poultry house point cloud.

[0044] The ground point cloud segmentation module is used to segment the preprocessed livestock and poultry house point cloud into ground point clouds and non-ground point clouds.

[0045] The point cloud clustering module is used to perform point cloud clustering on ground point clouds and non-ground point clouds respectively using a clustering method based on point cloud step features, to obtain ground point cloud clusters and non-ground point cloud clusters.

[0046] The point cloud classification and recognition module is used to classify ground point cloud clusters and non-ground point cloud clusters, and obtain target recognition results for ground point clouds and non-ground point clouds respectively, thereby realizing target detection and recognition inside flat-raised livestock and poultry houses.

[0047] The beneficial effects of this invention are as follows:

[0048] This invention provides a method for target detection and recognition inside floor-raised livestock and poultry sheds based on airborne laser point cloud data, which can help intelligent technologies achieve more accurate target perception inside livestock and poultry sheds. This invention uses multi-line lidar to acquire three-dimensional point cloud data. Traditional point cloud target detection and recognition methods directly process the massive amount of raw point cloud data from livestock and poultry sheds, requiring significant computing resources and failing to achieve efficient target detection and recognition. Target detection and recognition methods based on point cloud clustering and classification cannot effectively utilize the global information of the raw point cloud, limiting the accuracy of target detection and recognition. To address the shortcomings of existing technologies, this invention provides a method for target detection and recognition inside floor-raised livestock and poultry sheds based on airborne laser point cloud data. It designs and optimizes point cloud clustering and classification methods, introducing pre-coded global information during point cloud classification to ensure accurate and rapid target detection and recognition inside livestock and poultry sheds. Furthermore, it adds an adaptive point cloud structure input module, allowing the point cloud classification network to accept point cloud data of any size without cropping the data. Attached Figure Description

[0049] Figure 1 This is an overall module diagram of the present invention.

[0050] Figure 2 This is a flowchart of ground point cloud segmentation.

[0051] Figure 3 This is a flowchart of point cloud clustering.

[0052] Figure 4 This is a flowchart of point cloud classification and recognition. Detailed Implementation

[0053] The implementation method of this invention is described in detail below with reference to the accompanying drawings. This invention uses multi-line lidar to acquire three-dimensional point cloud data. Traditional point cloud target detection and recognition methods directly process massive amounts of raw point cloud data from livestock and poultry houses, requiring significant computing resources and failing to achieve efficient target detection and recognition. Target detection and recognition methods based on point cloud clustering and classification cannot effectively utilize the global information of the raw point cloud, limiting the accuracy of target detection and recognition. To address the shortcomings of existing technologies, this invention provides a method for target detection and recognition inside floor-raised livestock and poultry houses based on airborne lidar point cloud data. It designs and optimizes point cloud clustering and classification methods, introducing pre-coded global information during point cloud classification to ensure accurate and rapid target detection and recognition inside the livestock and poultry house. Furthermore, it adds an adaptive point cloud structure input module, allowing the point cloud classification network to accept point cloud data of any size without cropping the data. Detection and Recognition Method

[0054] like Figure 1 As shown, the present invention includes the following steps:

[0055] 1) Use lidar to collect point cloud data inside the floor-raised livestock and poultry sheds to obtain the original livestock and poultry shed point cloud; then preprocess the original livestock and poultry shed point cloud to obtain the preprocessed livestock and poultry shed point cloud.

[0056] The LiDAR can be of any brand, and its line count can be 16, 32, or 64 lines. In this embodiment, the LiDAR is from Velodyne, and its line count is 16 lines. Preprocessing includes outlier filtering and invalid point filtering to extract valid point clouds for subsequent processing.

[0057] 2) After ground segmentation of the pre-processed livestock and poultry house point cloud, ground point cloud and non-ground point cloud are obtained;

[0058] like Figure 2 As shown, 2) specifically refers to:

[0059] 2.1) Parse and obtain the hardware parameters of the LiDAR, such as the number of horizontal lines H_SCAN, the number of vertical lines V_SCAN, the index of the central beam Horizontal_SCAN, and the mounting pitch angle SensorMountAngle.

[0060] 2.2) For point data P of two adjacent vertical wire bundle indices under the same horizontal wire bundle index. i,j P i,j+1 Their three-dimensional coordinates relative to the lidar are (X... i,j Y i,j Z i,j ), (X i,j+1 Y i,j+1 Z i,j+1), where i is the index of the current horizontal harness and j is the index of the current vertical harness.

[0061] 2.3) Calculate the difference vector (X) between the two points. i,j+1 -X i,j Y i,j+1 -Y i,j Z i,j+1 -Z i,j Then, calculate the angle Angle between the difference vector and the horizontal plane of the lidar using the following formula:

[0062]

[0063] 2.4) Based on the angle Angle between the difference vector and the horizontal plane of the lidar, and the installation elevation angle SensorMountAngle of the lidar, the angle Angle_ground between the difference vector and the horizontal plane is calculated using the following formula:

[0064] Angle_ground=|Angle+SensorMountAngle|

[0065] Where || represents the calculation of absolute value.

[0066] 2.5) If the angle between the calculated difference vector and the horizontal plane, Angle_ground, is greater than the angle threshold T1, then both points are determined to be non-ground points, and point P is set to... i,j Point P i,j+1 The flag bit f i,j f i,j+1 If the angle between the calculated difference vector and the horizontal plane, Angle_ground, is less than or equal to the angle threshold T1, then both points are determined to be ground points, and the flag bits are both set to 1.

[0067] 2.6) Repeat steps 2.2)-2.5) to traverse the preprocessed point cloud sequentially using the vertical and horizontal beam indices from 0 to Horizontal_SCAN, thus segmenting the preprocessed point cloud and obtaining the ground point cloud and non-ground point cloud. The ground point cloud contains livestock and poultry objects and major breeding facilities, and is the primary target detection and recognition area.

[0068] 3) Use a clustering method based on point cloud step features to perform point cloud clustering on ground point cloud and non-ground point cloud respectively, to obtain ground point cloud clusters and non-ground point cloud clusters, that is, to divide the three-dimensional point cloud data into different clusters and output them.

[0069] 3) In, such as Figure 3As shown, the point cloud is divided into ground point cloud and non-ground point cloud based on the identifier bits of each point in the point cloud. Taking the ground point cloud as an example, a clustering method based on the step features of the point cloud is used to cluster the ground point cloud, obtaining ground point cloud clusters, specifically:

[0070] 3.1) In the ground point cloud, select point C with two adjacent horizontal bundle indices i and i+1 under the same vertical bundle index j. i,j Point C i+1,j According to point C i,j Point C i+1,j The Euclidean distance D between the two is calculated using the following formula based on their three-dimensional coordinates:

[0071]

[0072] Among them, U i+1,j V i+1,j W i+1,j They are point C i+1,j The three-dimensional coordinates of the lidar, U i,j V i,j W i,j Point C i,j The three-dimensional coordinates of the lidar;

[0073] If point C i,j Point C i+1,j If the Euclidean distance D is less than or equal to the first distance threshold T2, then the two consecutive points are determined to belong to the same cluster of point clouds, that is, the two points are placed in the same container for storage. If point C i,j Point C i+1,j If the Euclidean distance D is greater than the first distance threshold T2, then it is determined that the two consecutive points do not belong to the same cluster of point clouds, and point C is moved to the next cluster. i+1,j Place it into a new point cloud cluster, that is, create a new container to store point C. i+1,j ;

[0074] 3.2) Repeat 3.1) sequentially traverse and determine the points with adjacent horizontal bundle indices under the same vertical bundle index in the ground point cloud, thereby obtaining all ground point cloud clusters. If the number of points in a point cloud cluster is equal to 1, then discard that point cloud cluster.

[0075] 3.3) Calculate the spatial average coordinates (U0, U0, of each surface point cloud cluster. i,j,avg V i,j,avg W i,j,avg ),in Where n is the number of points in the point cloud cluster, n>1;

[0076] 3.4) Calculate the Euclidean distance D between two ground point cloud clusters based on the spatial average coordinates of the cloud clusters in each location.avg If the Euclidean distance D between two ground point cloud clusters avg If the distance is less than or equal to the second distance threshold T3, then the two current ground point cloud clusters are determined to belong to the same cluster and are merged, i.e., the two current ground point cloud clusters are stored in the same container. If the distance is greater than the second distance threshold T3, no processing is performed. This process is repeated for each ground point cloud cluster, merging them to obtain the final ground point cloud clusters, thus completing point cloud segmentation. Each cluster represents a target object. This invention uses the step distance feature on horizontal lines for point cloud clustering, avoiding the problem of poor clustering results caused by the inability to extract effective features such as normal vectors due to the limited vertical lines of the target. It exhibits good clustering and segmentation effects for small targets with few vertical lines.

[0077] 4) Perform point cloud classification on the ground point cloud clusters and non-ground point cloud clusters respectively to obtain target recognition results of ground point clouds and non-ground point clouds, thereby realizing target detection and recognition inside the flat-raised livestock and poultry house.

[0078] The point cloud classification and recognition method proposed in this invention is responsible for classifying clustered point cloud clusters to identify the target category represented by the point cloud clusters, realizing target recognition based on 3D point clouds in livestock and poultry houses. It uses a point cloud classification algorithm based on the PointNet neural network, and optimizes this algorithm by introducing a global feature encoding module, enabling the network to learn global information of the point cloud. An adaptive point cloud structure input module is also added, allowing the network to input point cloud data of arbitrary size without cropping the point cloud data.

[0079] Among them, such as Figure 4 As shown, based on the clustered point cloud of livestock and poultry houses, taking the ground point cloud cluster as an example, point cloud classification is performed on the ground point cloud cluster to obtain the target recognition result of the ground point cloud, specifically:

[0080] 4.1) Input the preprocessed point cloud of livestock and poultry houses and the clusters of point clouds in various places into the global feature encoding module, and output the feature vectors corresponding to the clusters of point clouds in various places;

[0081] 4.1) Specifically:

[0082] 4.1.1) Determine the points corresponding to the maximum and minimum values ​​of the three-axis coordinates in the preprocessed livestock and poultry house point cloud, and denot them as point cloud boundary points, specifically the point with the maximum X-axis coordinate. max (X xmax Y xmax Z xmax The minimum point of the X-axis coordinate. min (X xmin Y xmin Z xminThe maximum point of the Y-axis coordinate. max (X ymax Y ymax Z ymax The minimum point of the Y-axis coordinate. min (X ymin Y ymin Z ymin The maximum Z-axis coordinate point Z max (X zmax Y zmax Z zmax The minimum point of the Z-axis coordinate Z min (X zmin Y zmin Z zmin );

[0083] 4.1.2) Construct a first two-dimensional vector v1 with dimensions (N, 3) for the three-dimensional coordinates of each ground point cloud cluster. The first dimension N represents the number of points in the ground point cloud cluster, and the second dimension 3 represents the number of bits in the three-dimensional coordinate system. Then, concatenate the first two-dimensional vector v1 with the coordinates of the point cloud boundary points to obtain a second two-dimensional vector v2 with dimensions (N, 21). The coordinates of the point cloud boundary points are arranged according to X... max ,X min ,Y max ,Y min Z max Z min The , are arranged in order to form an 18-bit vector.

[0084] 4.1.3) Input the second two-dimensional vector v2 into the linear layer to learn the global features of each point in the ground point cloud cluster, and output a third two-dimensional vector v3 of size (N, 3), which is the global feature corresponding to the ground point cloud cluster; where the linear layer is trained on a self-constructed dataset according to the requirements, N in the size represents the number of points in the ground point cloud cluster, and 3 represents the dimension of the output feature of the linear layer.

[0085] 4.1.4) Construct a fourth two-dimensional vector v4 with size (N, 4) based on the three-dimensional coordinates and reflection intensity of the current ground point cloud cluster. The size 4 represents the number of bits in the three-dimensional coordinates and the number of bits in the reflection intensity. Then, concatenate the third two-dimensional vector v3 with the fourth two-dimensional vector v4 to obtain a fifth two-dimensional vector v5 with size (N, 7), which serves as the feature vector of the current ground point cloud cluster.

[0086] 4.1.5) Repeat 4.1.1)-4.1.4) to extract features from the remaining ground point cloud clusters to obtain the feature vectors of all ground point cloud clusters.

[0087] 4.2) The adaptive point cloud structure input module modifies the feature vectors of ground point cloud clusters during the forward propagation of the point cloud classification network, so that the point cloud classification network can adapt to ground point cloud feature vectors of different sizes as input; the adaptive point cloud structure input module uses the Mask corresponding to the point cloud of each channel to filter non-zero rows during the forward propagation of the two-dimensional vector of each channel, so as to achieve the ability to process point cloud clusters of arbitrary sizes without pruning.

[0088] 4.2) Specifically:

[0089] 4.2.1) Expand the dimension of the feature vectors of each ground point cloud cluster (i.e., the fifth two-dimensional vector v5 with size (N, 7)) to size (M, 7) to obtain the corresponding sixth two-dimensional vector v6, where M is the number of points in the ground point cloud cluster with the most points. If the number of points in the ground point cloud cluster is less than M, fill the dimension with 0 until the size of the two-dimensional vector v6 is (M, 7). Then construct a mask of size (M, 1) for each ground point cloud cluster, which stores boolean values ​​to indicate the non-zero rows of the corresponding two-dimensional vector v6 on scale M.

[0090] 4.2.2) After concatenating the sixth two-dimensional vector v6 of each surface point cloud cluster along the channel dimension, a seventh three-dimensional vector v7 with size (C, M, 7) is obtained. Similarly, after concatenating the mask of each surface point cloud cluster along the channel dimension, an eighth three-dimensional vector v7 with size (C, M, 1) is obtained. mask Composed of the seventh three-dimensional vector v7 and the eighth three-dimensional vector v mask The inputs that make up the point cloud classification network.

[0091] 4.3) Input these 3D vectors into a pre-trained point cloud classification network for point cloud classification, and output the target recognition results of the ground point cloud. In this embodiment, the point cloud classification network adopts the PointNet network, and the network outputs the category of each cluster of point clouds, realizing rapid and intelligent perception of livestock and poultry house point clouds.

[0092] Methods for target detection and recognition inside floor-raised livestock and poultry sheds based on airborne laser point cloud data include:

[0093] Data acquisition module 10 is used to collect point cloud data of the interior of the floor-raised livestock and poultry house using lidar to obtain the original livestock and poultry house point cloud; and to preprocess the original livestock and poultry house point cloud to obtain the preprocessed livestock and poultry house point cloud.

[0094] The ground point cloud segmentation module 20 is used to segment the preprocessed livestock and poultry house point cloud into ground point cloud and non-ground point cloud.

[0095] The point cloud clustering module 30 is used to perform point cloud clustering on ground point cloud and non-ground point cloud respectively using a clustering method based on point cloud step features to obtain ground point cloud clusters and non-ground point cloud clusters.

[0096] The point cloud classification and recognition module 40 is used to classify ground point cloud clusters and non-ground point cloud clusters, and obtain target recognition results for ground point clouds and non-ground point clouds respectively, thereby realizing target detection and recognition inside flat-raised livestock and poultry houses.

[0097] In summary, the target detection and recognition method for floor-raised livestock and poultry sheds based on airborne laser point cloud data provided by this invention can help intelligent technologies achieve more accurate target perception inside livestock and poultry sheds. This invention uses multi-line lidar to acquire three-dimensional point cloud data. Traditional point cloud target detection and recognition methods directly process massive amounts of raw point cloud data from livestock and poultry sheds, requiring significant computing resources and failing to achieve efficient target detection and recognition. Target detection and recognition methods based on point cloud clustering and classification cannot effectively utilize the global information of the raw point cloud, limiting the accuracy of target detection and recognition. To address the shortcomings of existing technologies, this invention provides a target detection and recognition method for floor-raised livestock and poultry sheds based on airborne laser point cloud data. It designs and optimizes point cloud clustering and classification methods, introducing pre-coded global information during point cloud classification to ensure accurate and rapid target detection and recognition inside livestock and poultry sheds. Furthermore, it adds an adaptive point cloud structure input module, allowing the point cloud classification network to input point cloud data of arbitrary size without cropping the data. Detection and Recognition Method

[0098] The specific embodiments described in this invention are merely illustrative of the spirit of the invention. Those skilled in the art can make various modifications or additions to the described specific embodiments or use similar methods to replace them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.

Claims

1. A method for target detection and recognition inside floor-raised livestock and poultry sheds based on airborne laser point clouds, characterized in that, Includes the following steps: 1) Use lidar to collect point cloud data of the interior of the floor-raised livestock and poultry house to obtain the original livestock and poultry house point cloud; then preprocess the original livestock and poultry house point cloud to obtain the preprocessed livestock and poultry house point cloud. 2) After ground segmentation of the pre-processed livestock and poultry house point cloud, ground point cloud and non-ground point cloud are obtained; 3) Use a clustering method based on point cloud step features to perform point cloud clustering on ground point clouds and non-ground point clouds respectively, to obtain ground point cloud clusters and non-ground point cloud clusters; In step 3), a clustering method based on point cloud step features is used to cluster the ground point cloud to obtain ground point cloud clusters, specifically as follows: 3.1) In the ground point cloud, select point C with two adjacent horizontal line bundle indices i and i+1 under the same vertical line bundle index j. i,j Point C i+1,j According to point C i,j Point C i+1,j Calculate the Euclidean distance D between the two points using the three-dimensional coordinates of the lidar; if point C i,j Point C i+1,j If the Euclidean distance D is less than or equal to the first distance threshold T2, then the two points belong to the same cluster of point clouds. If point C i,j Point C i+1,j If the Euclidean distance D is greater than the first distance threshold T2, then the two points do not belong to the same cluster of point clouds, and point C is removed. i+1,j Place it into a new point cloud cluster; 3.2) Repeat 3.1) sequentially traverse and determine the points with adjacent horizontal bundle indices under the same vertical bundle index in the ground point cloud, thereby obtaining all ground point cloud clusters; 3.3) Calculate the spatial average coordinates of each surface point cloud cluster; 3.4) Calculate the Euclidean distance D between two ground point cloud clusters based on the spatial average coordinates of the ground point cloud clusters in each location. avg If the Euclidean distance D between two ground point cloud clusters avg If the distance is less than or equal to the second distance threshold T3, then the two ground point cloud clusters belong to the same cluster and are merged. This process is repeated for each ground point cloud cluster to complete the merging of ground point cloud clusters and obtain the final ground point cloud cluster. 4) Perform point cloud classification on ground point cloud clusters and non-ground point cloud clusters respectively to obtain target recognition results for ground point clouds and non-ground point clouds, thereby realizing target detection and recognition inside flat-raised livestock and poultry houses; In step 4), point cloud classification is performed on the ground point cloud clusters to obtain the target recognition result of the ground point cloud, specifically as follows: 4.1) Input the preprocessed point cloud of livestock and poultry houses and the clusters of point clouds in various places into the global feature encoding module, and output the feature vectors corresponding to the clusters of point clouds in various places; 4.2) The adaptive point cloud structure input module is used to modify the feature vectors of ground point cloud clusters in each region during the forward propagation of the point cloud classification network, so that the point cloud classification network can adapt to ground point cloud feature vectors of different sizes as input. 4.3) Input the ground point cloud features into the pre-trained point cloud classification network to classify the point cloud and output the target detection results of the ground point cloud.

2. The method for target detection and recognition inside floor-raised livestock and poultry sheds based on airborne laser point clouds according to claim 1, characterized in that, In 1), the laser radar has 16, 32, or 64 lines.

3. The method for target detection and recognition inside a floor-raised livestock and poultry house based on airborne laser point clouds according to claim 1, characterized in that, Specifically, 2) refers to: 2.1) Analyze and obtain the hardware parameters of the lidar; 2.2) For point data P of two adjacent vertical wire bundle indices under the same horizontal wire bundle index. i,j P i,j+1 Their three-dimensional coordinates relative to the lidar are (X... i,j Y i,j Z i,j (X) i,j+1 Y i,j+1 Z i,j+1 ), where i is the index of the current horizontal harness and j is the index of the current vertical harness; 2.3) Calculate the difference vector (X) between the two points. i,j+1 -X i,j Y i,j+1 -Y i,j Z i,j+1 -Z i,j Then, calculate the angle Angle between the difference vector and the horizontal plane of the lidar using the following formula: 2.4) Based on the angle Angle between the difference vector and the horizontal plane of the lidar, and the installation elevation angle SensorMountAngle of the lidar, the angle Angle_ground between the difference vector and the horizontal plane is calculated using the following formula: in, Indicates taking the absolute value; 2.5) If the angle between the calculated difference vector and the horizontal plane, Angle_ground, is greater than the angle threshold T1, then both points are determined to be non-ground points, and point P is set to... i,j Point P i,j+1 The flag bit f i,j f i,j+1 If the angle between the calculated difference vector and the horizontal plane, Angle_ground, is less than or equal to the angle threshold T1, then both points are determined to be ground points, and the flag bits are set to 1. 2.6) Repeat steps 2.2)-2.5) to traverse the preprocessed point cloud according to the vertical and horizontal line bundle indices in turn to complete the segmentation of the preprocessed point cloud, thereby obtaining the ground point cloud and non-ground point cloud.

4. The method for target detection and recognition inside a floor-raised livestock and poultry house based on airborne laser point clouds according to claim 1, wherein 4.1) specifically comprises: 4.1.1) Determine the points corresponding to the maximum and minimum values ​​of the three-axis coordinates in the preprocessed livestock and poultry house point cloud, and denot them as point cloud boundary points; 4.1.2) Construct the three-dimensional coordinates of each ground point cloud cluster into a first two-dimensional vector v1 with a size of (N, 3), where N is the number of points in the ground point cloud cluster and 3 represents the number of bits in the three-dimensional coordinates. Then, concatenate the first two-dimensional vector v1 with the coordinates of the point cloud boundary points to obtain a second two-dimensional vector v2 with a size of (N, 21). 4.1.3) Input the second two-dimensional vector v2 into the linear layer to learn the global features of each point in the ground point cloud cluster, and output a third two-dimensional vector v3 of size (N, 3); 4.1.4) Construct a fourth two-dimensional vector v4 with size (N, 4) based on the three-dimensional coordinates and reflection intensity of the current ground point cloud cluster. The size 4 represents the number of bits in the three-dimensional coordinates and the number of bits in the reflection intensity. Then, concatenate the third two-dimensional vector v3 with the fourth two-dimensional vector v4 to obtain a fifth two-dimensional vector v5 with size (N, 7) and use it as the feature vector of the current ground point cloud cluster. 4.1.5) Repeat 4.1.1)-4.1.4) to extract features from the remaining ground point cloud clusters to obtain the feature vectors of all ground point cloud clusters.

5. The method for target detection and recognition inside a floor-raised livestock and poultry house based on airborne laser point clouds according to claim 1, characterized in that, Specifically, 4.2) refers to: 4.2.1) Expand the dimension of the feature vector of each ground point cloud cluster to size (M, 7) to obtain the corresponding sixth two-dimensional vector v6, where M is the number of points of the ground point cloud cluster with the most points. Then construct a mask of size (M, 1) for each ground point cloud cluster. 4.2.2) After concatenating the sixth two-dimensional vector v6 of each surface point cloud cluster along the channel dimension, a seventh three-dimensional vector v7 with size (C, M, 7) is obtained. Similarly, after concatenating the mask of each surface point cloud cluster along the channel dimension, an eighth three-dimensional vector v7 with size (C, M, 1) is obtained. mask Composed of the seventh three-dimensional vector v7 and the eighth three-dimensional vector v mask The input ground point cloud features that make up the point cloud classification network.

6. A system for detecting and recognizing targets inside a floor-raised livestock and poultry shed based on airborne laser point cloud data for implementing the method of claim 1, characterized in that, include: The data acquisition module is used to collect point cloud data of the interior of floor-raised livestock and poultry houses using lidar to obtain the original point cloud data of the livestock and poultry houses. The original livestock and poultry house point cloud was preprocessed to obtain the preprocessed livestock and poultry house point cloud; The ground point cloud segmentation module is used to segment the preprocessed livestock and poultry house point cloud into ground point clouds and non-ground point clouds. The point cloud clustering module is used to perform point cloud clustering on ground point clouds and non-ground point clouds respectively using a clustering method based on point cloud step features, to obtain ground point cloud clusters and non-ground point cloud clusters. The point cloud classification and recognition module is used to classify ground point cloud clusters and non-ground point cloud clusters, and obtain target recognition results for ground point clouds and non-ground point clouds respectively, thereby realizing target detection and recognition inside flat-raised livestock and poultry houses.