A corn seed three-dimensional posture estimation method, system and storage medium
Patent Information
- Application Number
- CN202611271103.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-08-20
Smart Images

Figure CN122798887B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of agricultural automation technology, and in particular to a method, system and storage medium for estimating the three-dimensional attitude of maize seeds. Background Technology
[0002] The quality of maize sowing directly affects seedling uniformity and final yield, necessitating precise sowing technology to acquire seed spatial attitude information. Maize seeds have an irregular, flattened ellipsoidal or wedge-shaped structure, with variations among individuals in their long axis direction, embryonic surface orientation, and tip geometry. During seeding, guidance, and free fall, seeds are affected by mechanical collisions, airflow disturbances, and contact effects, resulting in a high degree of uncertainty in their three-dimensional spatial attitude. Accurately acquiring seed three-dimensional attitude information is a crucial prerequisite for achieving directional sowing control and precise evaluation of sowing quality.
[0003] Existing methods for maize seed attitude detection mainly include two-dimensional image methods, multi-sensor signal methods, and three-dimensional point cloud methods. Two-dimensional image methods utilize contour features or deep learning models for planar attitude recognition. However, due to the lack of depth information, they struggle to reliably represent pitch angles, roll angles, and seed surface orientation, and are prone to attitude ambiguity under occlusion or rotation conditions. Multi-sensor signal methods indirectly infer seed attitude through photoelectric, mechanical, or contact signals. They offer fast response times and are easy to integrate, but the relationship between signals and three-dimensional attitude is complex, significantly affected by individual seed differences, motion states, and environmental noise, and highly dependent on reliable attitude labels for calibration.
[0004] 3D point cloud methods can describe the spatial geometry of a target and, under ideal conditions, can recover the target's 3D pose quite well. However, under actual sowing or fixed acquisition conditions, due to viewpoint limitations and occlusion, only partial point cloud data of the seed can usually be obtained. The local geometric structures on the surface of corn seeds are highly similar, leading to incomplete information and pose ambiguity in pose estimation based on partial point clouds. More importantly, it is difficult to directly obtain the complete 3D pose ground truth under actual acquisition conditions. Manual annotation is costly and highly subjective, while offline registration methods based on iterative nearest point or feature matching are sensitive to initial values and parameters, easily getting trapped in local optima during the matching process between partial point clouds and the complete model. Their output depends on the algorithm process, lacks determinism, and is difficult to use as a strictly defined pose label for network supervised training or sensor calibration.
[0005] Therefore, how to obtain partial point cloud training data with deterministic attitude labels and covering the attitude space under known complete point cloud model and rigid body transformation constraints, and learn a robust mapping from partial point cloud to 3D attitude based on this, so that the actual collected partial point cloud can output stable and reliable 3D attitude parameters for sensor signal calibration and directional seeding control, is a technical problem that needs to be solved. Summary of the Invention
[0006] This application provides a method, system, and storage medium for three-dimensional attitude estimation of maize seeds, which can improve the accuracy of attitude estimation and calibration.
[0007] Firstly, this application provides a method for estimating the three-dimensional pose of maize seeds, including: S1. Obtain the original point cloud of corn seeds, establish a complete 3D point cloud model of corn seeds, and construct a full attitude point cloud library based on the complete 3D point cloud model, including corn seed attitude point clouds under different spatial attitudes and corresponding 3D attitude parameters. S2. Based on the full pose point cloud library and preset view constraints, construct a partial point cloud training dataset with known pose labels; S3. Input a portion of the point cloud samples from the partial point cloud training dataset into the pose estimation network to construct features, and extract the geometric features of the point cloud through the relative attention mechanism to obtain deep point-level features; S4. Aggregate deep point-level features into global pose features. Based on the global pose features, the pose estimation network outputs three-dimensional pose parameters. The pose estimation network is then trained under supervision using known pose labels. S5. Input the point cloud of the actual collected corn seeds into the trained attitude estimation network, output the three-dimensional attitude parameters of the corn seeds, and use the three-dimensional attitude parameters as the attitude reference label for subsequent sensor signal calibration.
[0008] Secondly, this application provides a three-dimensional pose estimation system for maize seeds, comprising: The point cloud model and full attitude library construction module is used to obtain the original point cloud of corn seeds, establish a complete 3D point cloud model of corn seeds, and construct a full attitude point cloud library based on the complete 3D point cloud model, including corn seed attitude point clouds under different spatial attitudes and corresponding 3D attitude parameters. A partial point cloud training dataset construction module is used to construct a partial point cloud training dataset with known pose labels based on a full pose point cloud library and preset view constraints. The relative attention feature extraction and processing module is used to input a portion of the point cloud samples from the partial point cloud training dataset into the pose estimation network for feature construction, and extract the geometric features of the point cloud through the relative attention mechanism to obtain deep point-level features; The pose regression and supervised training module is used to aggregate deep point-level features into global pose features. Based on the global pose features, the pose estimation network outputs three-dimensional pose parameters, and the pose estimation network is trained in a supervised manner using known pose labels. The actual attitude estimation and calibration application module is used to input the point cloud of the actual collected corn seed into the trained attitude estimation network, output the three-dimensional attitude parameters of the corn seed, and use the three-dimensional attitude parameters as attitude reference labels for subsequent sensor signal calibration.
[0009] Thirdly, this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the aforementioned method for estimating the three-dimensional pose of corn seeds.
[0010] Compared with the prior art, the beneficial effects of this application are at least as follows: 1. By generating partial point cloud training samples from a complete 3D point cloud model and known rigid body transformations, each partial point cloud has a definite pose label actively set by the system, which solves the problems of difficulty in obtaining the true value of 3D pose under actual acquisition conditions, strong subjectivity of manual annotation, and lack of determinism in offline registration results. 2. By introducing a relative attention mechanism into the pose estimation network, the spatial positional relationship between points is explicitly modeled, enabling the network to effectively extract discriminative pose features from irregular curved surfaces and embryo orientation even when some point cloud information is incomplete and the local geometric similarity of the seed surface is strong. 3. By normalizing the network output and using a joint loss function that includes rotation error, translation error, geometric consistency error and visible area constraint for supervised training, the predicted pose parameters are kept stable within the numerical range, and the interference of invisible points, occlusion points and noise points on pose regression is suppressed. 4. By using the three-dimensional attitude parameters output by the network as attitude reference labels for subsequent sensor signal calibration, a physically consistent reference benchmark is provided for the attitude calibration of photoelectric sensor, mechanical sensor or image sensor signals, overcoming the problem of lack of reliable attitude calibration labels in multi-sensor methods. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart of a three-dimensional pose estimation method for maize seeds according to this application; Figure 2 A schematic diagram illustrating the construction of the complete point cloud model of maize seeds, the full-attitude point cloud library, and partial point cloud samples with defined attitude labels for this application. Figure 3 This is a schematic diagram of the point cloud pose estimation network structure for maize seeds based on the relative attention mechanism in this application. Figure 4 This is a schematic diagram illustrating the application of point cloud attitude estimation and sensor signal calibration for actual maize seeds in this application. Figure 5 This is a schematic diagram of the structure of a three-dimensional attitude estimation system for maize seeds according to this application. Detailed Implementation
[0013] This application provides a method, system, and storage medium for estimating the three-dimensional pose of corn seeds. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0014] The 3D attitude estimation method for maize seeds provided in this application is typically used in scenarios such as fixed attitude acquisition of maize seeds, free-fall acquisition, acquisition during the operation of seed metering devices, and attitude label construction in subsequent photoelectric, mechanical, or image sensor signal calibration processes. This method is particularly suitable for situations where, under actual acquisition conditions, only local surface point clouds of maize seeds can be obtained from a limited perspective, making it difficult to directly obtain complete 3D attitude ground truth labels.
[0015] In this application, for ease of explanation, the relevant terms and symbols are defined as follows: "Complete point cloud" as used in this application refers to three-dimensional point cloud data of the complete outer surface of a corn seed obtained through three-dimensional scanning or multi-view reconstruction, capable of representing the overall geometric morphology of the seed; "Full-attitude point cloud library" as used in this application refers to a collection of point clouds in different attitudes generated based on a complete point cloud model through multi-angle rotation sampling and spatial transformation; "Partial point cloud" as used in this application refers to point cloud data containing only the locally visible surface of a corn seed under conditions of fixed camera viewpoint, limited field of view, or occlusion; "Three-dimensional attitude parameters" as used in this application include, but are not limited to, rotation matrices, Euler angles, quaternions, continuous six-dimensional rotation representations, and translation vectors.
[0016] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1One embodiment of a three-dimensional pose estimation method for maize seeds in this application includes: Step S1: Obtain the original point cloud of corn seeds, establish a complete 3D point cloud model of corn seeds, and construct a full attitude point cloud library based on the complete 3D point cloud model, including corn seed attitude point clouds under different spatial attitudes and corresponding 3D attitude parameters.
[0017] In one specific embodiment, the process of performing step S1 may specifically include the following steps: S11. Scan corn seeds from multiple perspectives using a 3D scanning device to obtain the original point cloud from multiple perspectives; S12. Denoise, remove outliers, register and fuse the original point clouds to obtain a complete 3D point cloud model of corn seeds, and standardize the complete 3D point cloud model. S13. Using the centroid or principal axis coordinate system of the standardized complete 3D point cloud model as a reference, apply rigid body transformation including rotation matrix and translation vector to the standardized complete 3D point cloud model according to the preset multi-angle rotation sampling method to generate corn seed posture point clouds under different spatial postures. S14. Save the corresponding rotation matrix and translation vector applied to generate each corn seed pose point cloud, and determine the rotation matrix and translation vector as the three-dimensional pose parameters of the corresponding corn seed pose point cloud to construct a full pose point cloud library.
[0018] Specifically, raw point cloud data of corn seeds is acquired using a 3D scanning device, and a complete 3D point cloud model is established. The 3D scanning device can be a structured light 3D scanner, a laser scanner, or a multi-view depth camera; this embodiment uses a structured light 3D scanner as an example. A single corn seed is fixed on a rotating platform, which rotates the seed at a preset angular step size. The structured light scanner scans the seed surface angle by angle from a fixed viewpoint, obtaining raw point clouds covering multiple viewpoints on the seed's outer surface. For example, the rotation step size can be set between 15 and 30 degrees to ensure sufficient overlap between adjacent viewpoint point clouds for subsequent registration. The raw point clouds at each viewpoint inevitably contain scanning noise, background noise, and outliers caused by surface reflection characteristics. Noise reduction is performed on each raw point cloud, and a statistical outlier filtering algorithm is used to calculate the distance from each point to its neighborhood. The average distance between the nearest neighbors is used to identify outliers and remove points whose average distance exceeds a threshold multiple of the global mean and standard deviation. The value can be set to an integer between 20 and 50, depending on the point cloud density.
[0019] Subsequently, a coarse registration method based on fast point feature histograms combined with an iterative nearest-point fine registration method is used to uniformly transform the point clouds from each viewpoint to the same reference coordinate system. First, the fast point feature histogram feature descriptor for each point in each viewpoint point cloud is calculated. Initial correspondences between adjacent viewpoint point clouds are established through feature matching, and the initial rigid body transformation matrix is estimated using a random sampling consensus algorithm to complete coarse registration. Then, using the coarse registration result as initial values, the Euclidean distance between corresponding point pairs is minimized through an iterative nearest-point algorithm, progressively optimizing the rotation matrix and translation vector until convergence to a preset root mean square error threshold or the maximum number of iterations. The point clouds registered from each viewpoint are then fused, merging redundant points in overlapping areas. Resampling is performed using a voxel grid filter. The side length of the voxel grid is set to 0.1 mm to 0.3 mm based on the characteristic size of corn seeds to ensure that the fused point cloud retains both the detailed geometric features of the seed surface and has a uniform point density.
[0020] The fused complete 3D point cloud model of maize seeds is standardized by means of centroid centering, scale normalization, and principal axis alignment. The complete point cloud model of a corn kernel is represented as follows: ; in, For the complete point cloud model of the k-th seed, Let i be the i-th 3D point in the complete point cloud model. , , These are the coordinate components of the point in three-dimensional space. This represents the number of points contained in the complete point cloud model. First, calculate the centroid of the complete point cloud model: ; in, The calculated centroid coordinates are shown below. Then, all points in the complete point cloud model are translated to a local coordinate system with this centroid as the origin: ; in, The coordinates of the points are centered at the centroid. Further, scale normalization is performed based on the maximum bounding box size or maximum inter-point distance of the corn seed point cloud, ensuring that corn seed point clouds of different sizes are within a uniform scale range. Finally, principal component analysis is used to calculate the covariance matrix of the point cloud and solve for eigenvalues and eigenvectors. The direction of the eigenvector corresponding to the largest eigenvalue is used as the approximate direction of the seed's major axis, the direction of the eigenvector corresponding to the second largest eigenvalue as the approximate direction of the seed's width axis, and the direction of the eigenvector corresponding to the smallest eigenvalue as the approximate direction of the seed's thickness axis. A seed-specific coordinate system is established with the centroid as the origin and the approximate principal axis directions determined by principal component analysis as the coordinate axes, thus completing principal axis alignment. It should be noted that, due to the irregular shape of corn seeds and the potential for non-uniform sampling in the point cloud, there may be a certain deviation between the axis determined by principal component analysis and the true geometric principal axis of the seed. This deviation, as an inherent error of the standardization process, is compensated for through data augmentation and loss function constraints during the subsequent training of the pose estimation network.
[0021] Using the centroid or principal axis coordinate system of the standardized complete 3D point cloud model as a reference, a rigid body transformation including rotation matrix and translation vector is applied to the standardized complete 3D point cloud model according to a preset multi-angle rotation sampling method to generate corn seed pose point clouds under different spatial postures. The multi-angle rotation sampling method can employ Euler angle sampling, quaternion uniform sampling, spherical uniform sampling, or discrete sampling based on posture resolution. This embodiment uses Euler angle sampling as an example, where the rotation angles around the three coordinate axes are denoted as roll angles. Pitch angle and yaw angle The corresponding basic rotation matrices are respectively Then the combined rotation matrix under any posture can be expressed as: ; Apply the rotation matrix to the complete point cloud model This yields the complete pose point cloud for the corresponding pose: ; in, Indicates the k-th seed in the rotation matrix The attitude point cloud formed under the action. Furthermore, to simulate the positional changes of corn seeds in the actual collection space, a translation vector is introduced on top of the rotation transformation. The attitude point cloud under the combined effects of rotation and translation is obtained: ; in, Indicates a complete point cloud After a known rotation matrix and the known translation vector The resulting pose point cloud. Since this transformation is actively set by the system, the rotation matrix... Translation vector This can be used as the definite attitude label corresponding to the attitude point cloud. For Euler angle sampling, the roll angle is used in this embodiment. and yaw angle Equal-interval sampling is performed within the range of -180 degrees to 180 degrees at preset angle intervals, pitch angle Sampling is performed at equal angular intervals within the range of -90 degrees to 90 degrees to avoid gimbal lock. It should be noted that, due to the singularity of Euler angles, this application preferably uses quaternion uniform sampling instead of Euler angle sampling. Quaternion uniform sampling uniformly parameterizes a unit hypersphere in quaternion space and then converts it into a rotation matrix, avoiding the density inhomogeneity and gimbal lock problem of Euler angle sampling in high-latitude regions. The angular interval can be set to 20 to 30 degrees to achieve a balance between attitude resolution and sample size. Translation vector The value ranges of each component are set based on the possible positional offset range of the seeds in the actual sowing or harvesting scenario. In this embodiment, with the seed centroid as the origin, the range of each component of the translation vector is set as follows: This range covers the offset of seeds relative to the center of the sensor's field of view during typical seed metering operation. In practical applications, this range can be adjusted based on the field of view of the specific acquisition system and the statistical results of seed fall trajectories. Uniform or random sampling can be performed within this range.
[0022] This leads to the construction of a full-attitude point cloud library for maize seeds: ; in, This represents a full-attitude point cloud library. This represents the number of attitude samples in the full attitude point cloud library. and They represent the first The rotation matrix and translation vector corresponding to each pose sample. The full pose point cloud library not only contains complete point cloud data under different spatial poses, but also synchronously saves the pose parameters such as rotation matrix, translation vector, Euler angles or quaternions corresponding to each pose sample, providing a foundation for subsequent construction of partial point cloud training datasets with defined labels.
[0023] refer to Figure 2 The figure shows a schematic diagram of the construction of a complete point cloud model of a corn seed, a full-pose point cloud library, and partial point cloud samples with definite pose labels. In the figure, a) is the complete point cloud model of a corn seed; b) is the multi-view representation of the complete point cloud of a corn seed; and c) is the partial point cloud samples generated under different poses and their corresponding definite pose labels.
[0024] In one specific embodiment, during the execution of step S12, the standardization process includes one or more of centroid centering, scale normalization, and principal axis alignment; the multi-angle rotation sampling method includes one or more of Euler angle sampling, quaternion uniform sampling, spherical uniform sampling, and discrete sampling based on attitude resolution.
[0025] Specifically, the complete 3D point cloud model of corn seeds obtained after fusion is standardized. Standardization includes one or more of centroid centering, scale normalization, and principal axis alignment; this embodiment preferably uses a combination of all three. Centroid centering involves calculating the mean of the 3D coordinates of all points in the complete point cloud model as the centroid coordinates, subtracting this centroid coordinate from the coordinates of each point, thus translating the point cloud into a local coordinate system with the centroid as the origin, eliminating the influence of initial position differences between scanning batches. Scale normalization involves scaling the point cloud proportionally according to the maximum bounding box size or the maximum distance from a point to the centroid, ensuring that seed point clouds of different sizes are within a uniform scale range. Principal axis alignment involves solving for the eigenvalues and eigenvectors of the point cloud covariance matrix through principal component analysis, establishing the seed's own coordinate system with the direction of the eigenvector corresponding to the largest eigenvalue as the major axis, the direction of the eigenvector corresponding to the second largest eigenvalue as the minor axis, and the direction of the eigenvector corresponding to the smallest eigenvalue as the thickness axis, reducing interference from initial scanning posture differences.
[0026] After standardization, using the centroid or principal axis coordinate system of the complete 3D point cloud model as a reference, a rigid body transformation including rotation matrix and translation vector is applied according to a preset multi-angle rotation sampling method to generate corn seed attitude point clouds under different spatial attitudes. The multi-angle rotation sampling method includes one or more of Euler angle sampling, quaternion uniform sampling, spherical uniform sampling, and attitude resolution-based discrete sampling. Euler angle sampling decomposes the 3D rotation into roll, pitch, and yaw angles around three coordinate axes, sampling at fixed intervals within a preset angle range, and calculating the corresponding rotation matrix through transformation relationships. Quaternion uniform sampling performs uniform parameterization sampling on a unit hypersphere in quaternion space, then converts it to a rotation matrix, avoiding the density inhomogeneity problem of Euler angle sampling in high-latitude regions. Spherical uniform sampling treats the seed's major axis direction as a direction vector on a unit sphere and performs uniform sampling, combining it with the rotation angle sampling around the major axis to form a complete attitude. Attitude resolution-based discrete sampling calculates the sampling step size based on the required angle resolution and performs discrete mesh sampling in rotation space. When generating point clouds for each pose, the applied rotation matrix and translation vector are simultaneously saved as 3D pose parameters to construct a complete pose point cloud library. The flexible combination of the above standardization process and multi-angle rotation sampling method ensures the complete coverage and reasonable sample distribution of the complete pose point cloud library in the pose space, providing basic data support for the subsequent construction of partial point cloud training datasets and the training of pose estimation networks.
[0027] Step S2: Based on the full pose point cloud library and preset view constraints, construct a partial point cloud training dataset with known pose labels.
[0028] In one specific embodiment, the process of performing step S2 may specifically include the following steps: S21. Establish a visibility constraint model based on the sensor installation position, field of view, imaging distance, and occlusion relationship corresponding to the preset viewing angle constraint; S22. Based on the visibility constraint model, perform one or more of the following processing on the corn seed pose point clouds in the full pose point cloud library: view cropping, back face point removal, occlusion simulation, depth noise addition, and point cloud sparsification to obtain partial point cloud samples. S23. The three-dimensional pose parameters corresponding to the corn seed pose point cloud used to generate each part of the point cloud sample are determined as the known pose labels of each part of the point cloud sample. S24. Pair each part of the point cloud samples with the corresponding known pose labels to construct a partial point cloud training dataset.
[0029] Specifically, a visibility constraint model is established based on the sensor installation location, field of view, imaging distance, and occlusion relationship corresponding to the preset viewing angle constraints. Let the three-dimensional sensor coordinate system be... The coordinate system of the corn seed model is The spatial relationship between the sensor and the seed is described by an extrinsic parameter matrix, which contains the sensor's position and orientation information in the seed coordinate system. Based on the installation height, pitch angle, field of view, imaging distance, and effective depth sampling range of the camera or depth sensor in the actual acquisition system, a visibility constraint model under a fixed viewing angle is established. For any complete attitude point cloud in the full attitude point cloud library, it is first transformed to the sensor coordinate system using the extrinsic parameter matrix. Then, each point is checked to determine whether it satisfies the field of view constraint, depth range constraint, and visible surface constraint. The field of view constraint determines whether a point is located within the cone-shaped space defined by the sensor's field of view; if a point is outside the field of view cone, it is marked as invisible. The depth range constraint determines whether the distance between a point and the sensor is within the effective imaging distance range; points exceeding the nearest or farthest imaging distance are marked as invisible. The visible surface constraint determines the orientation of a point by calculating the angle between the point's normal vector and the sensor's line of sight. If the angle is greater than 90 degrees, it indicates that the surface where the point is located is away from the sensor direction, belonging to a back-side invisible point.
[0030] Based on a visibility constraint model, one or more of the following processing methods are applied to the corn seed pose point clouds in the full pose point cloud library: view cropping, back face point removal, occlusion simulation, depth noise addition, and point cloud sparsification, to obtain partial point cloud samples. View cropping, based on the field-of-view constraint, removes points corresponding to areas outside the sensor's field-of-view cone, retaining only points within the field of view. Back face point removal, based on the visible surface constraint, calculates the angle between the normal vector of each point and the sensor's line-of-view direction, and points with an angle greater than a preset threshold are identified as invisible surface points facing away from the sensor and removed. Occlusion simulation is used to handle local self-occlusion areas caused by the irregular shape of corn seeds. This embodiment adopts an occlusion detection method based on depth map projection. First, the complete pose point cloud is transformed to the sensor coordinate system. According to the sensor intrinsic parameter matrix, each 3D point is projected onto the imaging plane. The projection resolution is set to a value matching the square root of the number of network input points. When multiple 3D points are projected onto the same pixel, only the point with the smallest depth value is retained as a visible point, and the remaining points are determined as occluded points and discarded. Depth noise addition is used to simulate the random errors generated by the actual depth sensor during measurement. Zero-mean Gaussian noise is superimposed on the depth direction of each retained visible point. The noise standard deviation is set according to the sensor's nominal accuracy. Point cloud sparsification is used to simulate the uneven point cloud density caused by differences in surface reflection characteristics or sampling resolution limitations during actual acquisition. Through random downsampling or curvature-based adaptive downsampling, the point density in some areas is reduced while maintaining the geometric structure characteristics.
[0031] The generation process of the aforementioned point clouds can be uniformly represented as follows: ; in, This represents a portion of the generated point cloud. This represents a partial point cloud generation function. Indicates a complete point cloud After a known rotation matrix and the known translation vector The complete pose point cloud obtained by transformation This represents the set of sensor viewpoint parameters, field of view parameters, occlusion parameters, sampling density parameters, and noise parameters. This part describes the point cloud generation function. The internal processing flow includes view cropping, backface culling, occlusion simulation, depth noise addition, and point cloud sparsification. These steps are executed sequentially. Occlusion simulation employs an occlusion detection method based on depth map projection. The complete pose point cloud is transformed to the sensor coordinate system and then projected onto the imaging plane according to the intrinsic parameter matrix. When multiple points are projected onto the same pixel, only the visible point with the smallest depth value is retained. Due to partial point cloud... From complete point cloud After a known rotation matrix Given the translation vector and fixed-view sampling function Therefore, the pose labels corresponding to this part of the point cloud samples can be directly defined as: ; in, This represents the pose labels of a portion of the point cloud samples. Let be a rotation matrix. This is the translation vector. This forms a partial point cloud training dataset: ; in, This represents a portion of the point cloud training dataset. Show the first Partial point cloud samples, and These represent the rotation matrix and translation vector corresponding to the sample, respectively. This represents the number of pose samples in the full pose point cloud library. To improve the network's adaptability to real-world acquisition conditions, random perturbations can be introduced during the construction of a partial point cloud training dataset. These perturbations include one or more of the following: random point loss, local occlusion, point coordinate jitter, depth noise, sampling density variation, and background point interference. Through this method, the simulated partial point clouds more closely resemble the actual acquisition results in terms of point cloud density, missing patterns, boundary noise, and locally visible regions. Furthermore, each partial point cloud sample carries a defined pose label actively set by the system. These labels are clearly derived and repeatable, providing a reliable supervisory signal for the subsequent supervised training of the pose estimation network.
[0032] Step S3: Input a portion of the point cloud samples from the partial point cloud training dataset into the pose estimation network to construct features, and extract the geometric features of the point cloud through the relative attention mechanism to obtain deep point-level features.
[0033] In one specific embodiment, the process of performing step S3 may specifically include the following steps: S31. Input a portion of the point cloud samples from the partial point cloud training dataset into the pose estimation network to construct features, sample or supplement points for each portion of the point cloud samples, and unify the number of points in each portion of the point cloud samples to a preset number. S32. Construct the three-dimensional coordinates of each point in the point cloud samples after unifying the number of points as point-level input features. Map the point-level input features to the hidden feature space through the pose estimation network to obtain the initial point-level features. S33. Construct a relative position vector based on the three-dimensional coordinate difference between points in each part of the point cloud sample after the point number is unified, and map the relative position vector to a relative position embedding. S34. Embed the relative position into the attention scoring function of the relative attention mechanism, and use the attention scoring function to perform weighted aggregation on the initial point-level features in the candidate neighborhood to obtain the updated point-level features. S35. The updated point-level features are repeatedly weighted and aggregated by the relative attention unit in the pose estimation network to extract the geometric features of the point cloud layer by layer, thus obtaining deep point-level features.
[0034] Specifically, after obtaining a partial point cloud training dataset, a subset of point cloud samples from this dataset is input into a pose estimation network for feature construction. The pose estimation network is a deep learning network model that takes a subset of point clouds as input and outputs corresponding 3D pose parameters, used to learn the mapping relationship between the geometric shape of a subset of point clouds and the pose in a seed space. First, each subset of point cloud samples is sampled or supplemented to unify the number of points in each subset to a preset quantity. Let any subset of point cloud samples be represented as: ; in, This represents a partial point cloud sample. This indicates the first point in this part of the point cloud. A three-dimensional point, These are the coordinate components of the point in three-dimensional space. This represents the number of points contained in this portion of the point cloud sample. If the number of points *n* in a portion of the point cloud sample is greater than a preset number, then a preset number of points are selected from the original point cloud using farthest point sampling or random sampling methods, reducing the number of points while maintaining the overall geometric structure of the point cloud. If the number of points *n* in a portion of the point cloud sample is less than the preset number, then the number of points is supplemented to the preset number through random repeated sampling or neighborhood interpolation. The preset number can be set according to the network structure and computing resources; for example, it can be set to 1024, 2048, or 4096 points.
[0035] After unifying the number of points, the 3D coordinates of each point in each part of the point cloud sample are used to construct point-level input features. For the first point in the part of the point cloud after unifying the number of points... Points Its initial input features consist of three-dimensional coordinate components. In addition to three-dimensional coordinates, point cloud normal vectors, curvature, local point density, reflection intensity, or color information can be added as additional attributes to the coordinates to form point-level input features. Let the point-level input features of the i-th point be: ; in, The superscript represents the initial input feature of the i-th point. Indicates the input layer. This indicates the additional attributes of the point; if the actual collected data only contains three-dimensional coordinates, then... This step can be omitted. Subsequently, through one or more linear mappings and nonlinear activation functions of the pose estimation network, the original point-level input features are mapped to a unified high-dimensional hidden feature space, yielding the initial point-level features. This mapping process can be represented as: ; in, The point feature embedding function consists of a linear mapping layer and a nonlinear activation function. Indicates the first The initial point-level features after embedding of each point.
[0036] Because corn seeds have irregular curved surfaces, local unevenness, and individual morphological differences, relying solely on global coordinate features is insufficient to accurately represent seed pose. This application introduces a relative attention mechanism into the pose estimation network to explicitly model the spatial geometric relationships between points. For any two points in a partial point cloud after point number unification... and Construct a relative position vector based on the difference in three-dimensional coordinates between two points: ; in, Point With point The relative position vectors between them. A multilayer perceptron maps these relative position vectors to relative position embeddings: ; in, This represents a relative position encoding function, composed of a multilayer sensing mechanism. Point With point The relative spatial position features between them are embedded. In this embodiment, A two-layer fully connected network is used. The first layer maps the 3D input to 64-dimensional features, and the second layer maps the 64-dimensional features to 128-dimensional features. The ReLU activation function is used between the two layers, and the final output is a 128-dimensional relative position embedding. .
[0037] The relative position embedding is introduced into the attention scoring function of the relative attention mechanism. Initial point-level features for each point. Perform a linear mapping to generate query vector, key vector, and value vector: ; in, This represents the query vector for the i-th point. This represents the key vector at the j-th point. This represents the value vector of the j-th point. , , These are the learnable parameter matrices for the query, key, and value, respectively. Relative position embedding is introduced during the attention scoring process to obtain the relative attention scoring function: ; in, Point With point Attention scores between This represents a relative position embedding mapping function, used to embed relative positions. Mapped to a scalar space that matches the attention score, Represents the feature dimension, divided by This is used for scaling to prevent the gradient from vanishing due to an excessively large inner product. Among them, As a fully connected layer, it embeds 128-dimensional relative positions. The mapping is a 1D scalar used to adjust the attention score. The attention scores for all points within the candidate neighborhood are normalized to obtain the attention weights: ; in, Point Point Attention weights Point candidate neighborhood, It is an exponential function. Candidate neighborhood. It can be a global point set, i.e., all points in a partial point cloud, or a local neighborhood constructed based on Euclidean distance or k-nearest neighbors. The neighborhood features are weighted and aggregated using attention weights to obtain the updated point-level features: ; in, Point Point-level features updated using a single-layer relative attention mechanism The feature mapping function represents the relative position embedding, used to embed the relative position. Mapping to value vector The same feature dimension space is used as an additional bias term in the weighted aggregation. As a fully connected layer, it embeds 128-dimensional relative positions. Mapped to value vector The same feature dimensions are used as additional bias terms after weighted aggregation.
[0038] The pose estimation network repeatedly performs the weighted aggregation operation on the updated point-level features using multiple relative attention units, extracting point cloud geometric features layer by layer. In the process of stacking L layers of relative attention units, each layer uses the output of the previous layer as input, combining residual connections, layer normalization, multi-head attention, and nonlinear activation operations to enable the network to progressively extract multi-level features from local geometry to global pose. Specifically, the multi-head attention mechanism maps the query vector, key vector, and value vector to multiple subspaces, independently calculates attention weights and aggregates features in each subspace, and finally concatenates the outputs of each subspace and obtains the fused features through linear mapping. Residual connections add the input of each layer to the attention output and then perform layer normalization, alleviating the gradient vanishing problem in deep networks. After L layers of relative attention feature extraction, deep point-level features are obtained: ; in, Represents a deep point-level feature set. Indicates the first The point passes through the first... Deep point-level features after layer feature extraction This represents the total number of layers for relative attention feature extraction. The index of a point is represented by numbers from 1 to 1. , This refers to the number of partial point cloud points unified to a preset number after sampling or point supplementation in step S31, and this number remains constant during the layer-by-layer feature extraction process. Through the aforementioned relative attention mechanism, the network can explicitly model the relative spatial relationships between points, effectively capturing discriminative pose cues from irregular curved surfaces, embryo orientation, and tip geometry features even when partial point cloud information is incomplete and the local geometric similarity of the seed surface is strong. During training, the parameters of the pose estimation network are initialized using Xavier, the optimizer is Adam, the initial learning rate is set to 0.001, the number of training epochs is set to 200, the batch size is set to 16 or 32 depending on the GPU memory capacity, and the learning rate decays to one-tenth of its original value every 50 epochs. These settings improve the accuracy and geometric consistency of 3D pose estimation with partial point cloud input.
[0039] refer to Figure 3 The figure shows a schematic diagram of the point cloud pose estimation network structure for maize seeds based on the relative attention mechanism. The figure illustrates the complete network processing flow from point cloud feature input, layer-by-layer extraction of deep geometric features through relative attention, global feature fusion, to pose parameter regression output.
[0040] Step S4: Aggregate deep point-level features into global pose features, output three-dimensional pose parameters from the pose estimation network based on the global pose features, and use known pose labels to supervise the training of the pose estimation network.
[0041] In one specific embodiment, the process of performing step S4 may specifically include the following steps: S41. Aggregate deep point-level features into global pose features by one or more aggregation methods, such as max pooling, average pooling, and attention pooling. S42. Input the global attitude features into the attitude regression module of the attitude estimation network for regression calculation, and limit the output of the regression calculation to a preset numerical range through a preset activation function to obtain the normalized attitude prediction vector. S43. Perform inverse normalization on the normalized attitude prediction vector according to the preset attitude parameter value range to obtain the three-dimensional attitude parameters. S44. Construct a loss function based on the deviation between the 3D pose parameters and the known pose labels, and use the loss function to supervise the training of the pose estimation network.
[0042] Specifically, after extracting deep point-level features, the deep point-level features are aggregated into global pose features using one or more aggregation methods, including max pooling, average pooling, and attention pooling. The set of deep point-level features is as follows: ; in, Represents a deep point-level feature set. This represents the deep point-level feature of the i-th point after feature extraction at the L-th layer, where n is the number of points in the partial point cloud. Max pooling refers to taking the maximum value of all point features in each feature dimension as a component of the global feature, which can preserve the most significant local geometric information in the point cloud. Average pooling refers to taking the average value of all point features in each feature dimension as a component of the global feature, which can reflect the overall geometric distribution of the point cloud. Attention pooling refers to learning a set of attention weights to perform a weighted summation of the features of each point, enabling the network to adaptively focus on regions that contribute significantly to pose estimation. This embodiment preferably uses a combination of max pooling and average pooling, concatenating the results of the two pooling methods to form the global pose feature vector: ; in, This represents the global pose feature vector. For the max pooling result, For average pooling results, This represents a vector concatenation operation. This combination method preserves significant geometric features while also taking into account overall distribution information.
[0043] The global pose features are input into the pose regression module of the pose estimation network for regression calculation. The pose regression module consists of one or more fully connected layers, normalization layers, and nonlinear activation functions, used to map the global pose features to pose parameters. This regression calculation process can be represented as: ; in, This represents the original output vector of the pose regression module. This represents the pose regression subnetwork, which consists of two fully connected layers. The first fully connected layer is followed by a batch normalization layer and a ReLU activation function. The second fully connected layer outputs the original output vector with the same dimension as the desired pose parameters. The weight matrices of both fully connected layers are initialized using the Xavier method, and the bias terms are initialized to zero. To improve network training stability and ensure the output results are within a uniform numerical range, a preset activation function is used to restrict the regression output to a preset numerical range, resulting in a normalized pose prediction vector. In this embodiment, the Sigmoid activation function is used to restrict the network output to the (0, 1) interval. ; in, This represents the normalized attitude prediction vector. This represents the Sigmoid function. Besides the Sigmoid function, constraints on the output range can also be achieved using Softmax, Tanh mapping followed by linear normalization, normalization layers, or boundary clipping functions.
[0044] The normalized attitude prediction vector is denormalized according to the preset attitude parameter value range to obtain physically meaningful three-dimensional attitude parameters. For any attitude parameter... Its preset true value range is Then the corresponding component in the normalized output y can be obtained. The actual predicted value is obtained using the inverse normalization formula: ; Where u represents the actual attitude parameter value after denormalization. and These are the lower and upper limits of the range of values for this attitude parameter, respectively. These are the corresponding components in the normalized attitude prediction vector y. The rotational part of the 3D attitude parameters can be represented using Euler angles, quaternions, or rotation matrices. If the network output is Euler angles... Translation vector Then, the normalized prediction vector can be mapped to a preset angle range and translation range through inverse normalization. If the network output is a quaternion... Then, the quaternions after denormalization are normalized: ; in, Representing quaternions The L2 norm is calculated, and the unit quaternion is converted into a rotation matrix. If the network output is a continuous six-dimensional rotation representation, then orthogonalization is performed to obtain a rotation matrix that satisfies the orthogonality constraint. Finally, the network output can be uniformly represented as the predicted rotation matrix. and predicted translation vector : ; in, This indicates a pose estimation network that has completed training or is yet to be trained. The input is a partial point cloud sample. and These are the rotation matrix and translation vector predicted by the network, respectively.
[0045] A loss function is constructed based on the deviation between the 3D pose parameters and the known pose labels, and this loss function is used to supervise the training of the pose estimation network. Let the known pose label of the j-th training sample be the rotation matrix. Translation vector The pose parameters predicted by the network are: and The loss function includes one or more of the following: rotation error term, translation error term, geometric consistency error term of the transformed point cloud, visible region overlap constraint term, correspondence constraint term, and regularization constraint term. The rotation error term is used to constrain the angular deviation between the predicted rotation matrix and the known rotation matrix. ; in, Indicates rotational error. Given the rotation matrix, To predict the rotation matrix, Represents the trace of a matrix. Representing the rotation matrix The transpose of .
[0046] The translation error term is used to constrain the Euclidean distance between the predicted translation vector and the known translation vector: ; in, Indicates translation error. Given the translation vector, To predict the translation vector, This represents the L2 norm.
[0047] The transformed point cloud geometric consistency error term is used to constrain the spatial difference between the point cloud under predicted attitude and the point cloud under known attitude. For a complete point cloud... : ; in, This represents the geometric consistency error, where N is the number of points in the complete point cloud. Let be the i-th point in the complete point cloud. This loss term directly constrains the impact of the pose prediction error on the spatial location of the point cloud.
[0048] Visible region overlap constraint error is used to enhance the network's ability to identify visible regions of partial point clouds. For partial point clouds generated from a fixed viewpoint, visible region labels can be constructed based on the nearest neighbor distance between the complete point cloud and the partial point cloud in the true pose. Let the visibility label of the i-th point be... The visibility probability predicted by the network is Then, the constraint can be applied using binary cross-entropy or FocalLoss: ; in, The loss term can be limited to the (0,1) interval using the Sigmoid function. This loss term is used to reduce the interference of invisible, occluded, or noisy points on pose regression.
[0049] The correspondence constraint error is used to constrain the geometric matching relationship between the partial point cloud and the corresponding complete pose point cloud. In one embodiment, the partial point cloud point set can be established through the soft correspondence matrix C predicted by the network. With complete pose point clouds or visible point clouds The correspondence between them. Let... The target position after the actual pose transformation is The matching position obtained by the corresponding matrix is Then the correspondence error can be expressed as: ; C can be obtained through Softmax, Sinkhorn normalization, or other normalization methods. To ensure the stability of the corresponding matrix values, Sigmoid, Softmax, or double random normalization methods can also be used in the correspondence prediction branch to keep the corresponding weights within a stable range.
[0050] Furthermore, to prevent the predicted attitude parameters from exceeding the physically feasible range, output range constraints or regularization constraints can be introduced. For example, for normalized output... The sigmoid activation can be used to ensure that it lies in the (0,1) interval; for the rotation matrix output, orthogonality constraints can be added: ; Where I represents the identity matrix, This represents the Frobenius norm. For quaternion outputs, a unit modulus constraint can be added: ; Combining the above loss terms, the total network loss function can be expressed as: ; Where L represents the total loss, For rotational error term, This is the translation error term. For geometric consistency error term, For visible region overlap constraint terms, For correspondence constraint terms, Regularization constraints can include rotation matrix orthogonality constraints, quaternion normalization constraints, network parameter regularization, or output boundary constraints. to These are the weight coefficients corresponding to each loss term. Each weight coefficient is set empirically or determined through hyperparameter search before training. Before weighted summation, each loss term is normalized to ensure their values are of similar magnitude and to guarantee uniformity of dimensions. During training, known pose labels are used as supervision signals, and the parameters of the pose estimation network are iteratively updated using the backpropagation algorithm until the loss function converges to a preset threshold or reaches the maximum number of training epochs. Through the above normalization constraints and multi-loss joint supervised training, the pose estimation network effectively improves both output stability and geometric consistency of pose prediction. The predicted pose parameters remain stable within their numerical range, and the interference of invisible points, occluded points, and noise points on pose regression is suppressed.
[0051] In one specific embodiment, the process of executing step S44 may specifically include the following steps:
[0052] Specifically, a loss function is constructed based on the deviation between the 3D pose parameters and the known pose label. This loss function includes one or more of the following: rotation error term, translation error term, transformed point cloud geometric consistency error term, visible region overlap constraint term, correspondence constraint term, and regularization constraint term. The rotation error term constrains the angular deviation between the predicted rotation matrix and the known rotation label. It measures the accuracy of the rotation prediction by calculating the relative rotation angle between the two rotation matrices; this error is zero when the predicted rotation is completely consistent with the known rotation. The translation error term constrains the Euclidean distance between the predicted translation vector and the known translation label, directly measuring the positional deviation of the translation prediction in 3D space. The transformed point cloud geometric consistency error term constrains the spatial positional difference between the complete point cloud under the predicted pose and the complete point cloud under the known pose, ensuring that the predicted pose remains consistent with the known pose at the overall geometric level of the point cloud. The visible region overlap constraint term constructs a visibility mask, ensuring that the loss calculation only applies to the overlapping portion of the visible regions under the predicted pose and the known pose, avoiding misleading signals from the geometric differences in invisible regions during network training. The correspondence constraint term constrains the geometric matching relationship between the partial point cloud and the complete pose point cloud. It establishes the correspondence between the partial and complete point clouds through the soft correspondence matrix predicted by the network, prompting the network to learn the geometric correspondence between them. The regularization constraint term ensures the orthogonality of the rotation matrix, the unit magnitude of the quaternions, or the stability of the output boundary, preventing overfitting and improving the network's generalization ability. Each loss term is normalized before weighted summation to ensure that their values are of similar magnitude, guaranteeing dimensional consistency. Through the joint constraints of these multiple loss functions, the pose estimation network is effectively supervised in terms of rotation accuracy, translation accuracy, and geometric consistency.
[0053] Step S5: Input the point cloud of the actual collected corn seeds into the trained attitude estimation network, output the three-dimensional attitude parameters of the corn seeds, and use the three-dimensional attitude parameters as attitude reference labels for subsequent sensor signal calibration.
[0054] In one specific embodiment, the process of performing step S5 may specifically include the following steps: S51. Obtain the point cloud of the actual corn seeds under the conditions of fixed posture acquisition, free fall acquisition, or acquisition during the operation of the seed metering device using a three-dimensional sensor. S52. Perform one or more of the following preprocessing steps on the actual collected corn seed point cloud: background point removal, outlier removal, spatial clipping, point cloud downsampling, coordinate normalization, and noise filtering to obtain the preprocessed partial point cloud. S53. Input the preprocessed partial point cloud into the trained pose estimation network and output the three-dimensional pose parameters of the corn seed. S54. Acquire sensor signals that are synchronously collected with the point cloud of the actual corn seed sample, pair the sensor signals with the three-dimensional attitude parameters to construct a calibration dataset, and use the three-dimensional attitude parameters as attitude reference labels for calibrating the sensor signals in the calibration dataset.
[0055] Specifically, point clouds of maize seeds are acquired using 3D sensors under conditions of fixed-attitude acquisition, free-fall acquisition, or acquisition during the seed metering process. The 3D sensors can be structured light depth cameras, binocular stereo cameras, laser scanners, or time-of-flight depth cameras. Fixed-attitude acquisition involves placing maize seeds on a platform in a specific manner, with the 3D sensor acquiring the seed surface point cloud from a fixed perspective. Free-fall acquisition involves capturing the instantaneous attitude point cloud of the seeds in the air from the side or below using a high-speed 3D sensor as the seeds fall from the seed metering outlet. Acquisition during the seed metering process involves installing sensors at the seed metering outlet or on the side wall of the seed guide tube to acquire partial point clouds of the seeds as they pass through the detection area in real time during actual seed metering operations. Regardless of the acquisition method, due to limitations in sensor perspective and seed self-occlusion, the actual acquired point cloud only covers a localized area of the seed surface facing the sensor.
[0056] The point cloud of the actual corn seeds is subjected to one or more preprocessing steps, including background point removal, outlier removal, spatial clipping, point cloud downsampling, coordinate normalization, and noise filtering, to obtain a preprocessed partial point cloud. Background point removal involves removing background point clouds that do not belong to the seed surface through depth threshold segmentation or region of interest extraction. Outlier removal uses a statistical outlier filtering algorithm, calculating the average distance from each point to its k nearest neighbors and removing points exceeding a preset multiple of the global mean and standard deviation. Spatial clipping involves cropping the target spatial region containing the seeds based on their possible locations. Point cloud downsampling reduces the point cloud density using voxel grid filtering or random downsampling to match the point cloud density distribution of the training dataset. Coordinate normalization involves translating the point cloud to the centroid coordinate system and performing scale normalization to ensure the actual point cloud has the same scale range as the training data. Noise filtering uses bilateral filtering or guided filtering to remove sensor measurement noise while preserving surface geometry.
[0057] The preprocessed partial point cloud is input into the trained pose estimation network, which is the pose estimation network trained under supervision in step S4. Its network parameters were determined during the training phase through supervised optimization using known pose labels. Let the actual preprocessed partial point cloud be: ; in, This represents a portion of the point cloud data after actual acquisition and preprocessing. This represents the i-th three-dimensional point. Let be the 3D coordinates of the point, and m be the number of points in that part of the point cloud. Input these coordinates into the trained pose estimation network. After processing by the feature construction, relative attention feature extraction, global feature aggregation, and pose regression modules, the three-dimensional pose parameters corresponding to the actual corn seed are output: ; in, The rotation matrix predicted by the network. The translation vector predicted by the network. This represents the trained pose estimation network. The three-dimensional pose parameters describe the spatial orientation and position of the corn seed in the sensor coordinate system.
[0058] Sensor signals acquired synchronously with the point cloud of maize seeds collected in reality are obtained. These sensor signals are then paired with 3D attitude parameters to construct a calibration dataset. The sensor signals can be one or more of the following: photoelectric sensor signals, mechanical sensor signals, image feature signals, contact response signals, or seed metering device operating status signals. Synchronous acquisition means that the sampling time of the sensor signals is consistent with the time when the 3D sensor acquires the point cloud, or has a known fixed time offset relationship. The sensor signals acquired at each sampling time are paired one-to-one with the 3D attitude parameters output by the attitude estimation network at the corresponding time to construct a calibration dataset. This calibration dataset uses the 3D attitude parameters as attitude reference labels for calibrating the sensor signals. This calibration dataset can be used to train a sensor attitude recognition model, establish a mapping relationship between sensor signals and seed attitude, optimize the parameters of the directional seeding mechanism, or evaluate the directional operation quality of the seed metering device. Through the above method, this application deploys the trained attitude estimation network in an actual acquisition environment, providing a physically consistent reference benchmark for the attitude calibration of multiple types of sensor signals, overcoming the problem of lacking reliable attitude calibration labels in multi-sensor methods.
[0059] refer to Figure 4 The figure shows a schematic diagram of the application of point cloud attitude estimation and sensor signal calibration for a portion of actual corn seeds. The figure shows that the actual collected point cloud is preprocessed and input into the trained attitude estimation network. The network outputs the three-dimensional attitude parameters of the corn seeds. At the same time, the sensor signals collected synchronously with the point cloud are paired with the attitude parameters output by the network to construct a calibration dataset with the three-dimensional attitude parameters as reference labels, which is used for subsequent sensor signal calibration.
[0060] The above describes a method for estimating the three-dimensional pose of corn seeds in an embodiment of this application. The following describes a system for estimating the three-dimensional pose of corn seeds in an embodiment of this application. Please refer to [link / reference]. Figure 5 One embodiment of a three-dimensional pose estimation system for maize seeds in this application includes: The point cloud model and full attitude library construction module is used to obtain the original point cloud of corn seeds, establish a complete 3D point cloud model of corn seeds, and construct a full attitude point cloud library based on the complete 3D point cloud model, including corn seed attitude point clouds under different spatial attitudes and corresponding 3D attitude parameters. A partial point cloud training dataset construction module is used to construct a partial point cloud training dataset with known pose labels based on a full pose point cloud library and preset view constraints. The relative attention feature extraction and processing module is used to input a portion of the point cloud samples from the partial point cloud training dataset into the pose estimation network for feature construction, and extract the geometric features of the point cloud through the relative attention mechanism to obtain deep point-level features; The pose regression and supervised training module is used to aggregate deep point-level features into global pose features. Based on the global pose features, the pose estimation network outputs three-dimensional pose parameters, and the pose estimation network is trained in a supervised manner using known pose labels. The actual attitude estimation and calibration application module is used to input the point cloud of the actual collected corn seed into the trained attitude estimation network, output the three-dimensional attitude parameters of the corn seed, and use the three-dimensional attitude parameters as attitude reference labels for subsequent sensor signal calibration.
[0061] Through the collaborative efforts of the aforementioned components, this application constructs a complete processing chain from complete model building to actual attitude calibration. The point cloud model and full attitude library construction module establishes a complete 3D point cloud model of corn seeds through scanning, denoising, and standardization. It then generates a full attitude point cloud library covering different spatial orientations through multi-angle rotation sampling, providing an attitude reference space for the system and avoiding manual attitude annotation of massive physical samples. The partial point cloud training dataset construction module, under known rigid body transformation constraints, performs visibility cropping on the point clouds in the full attitude library according to a preset viewpoint, ensuring that each training sample carries a specific attitude label actively set by the system, bridging the gap between the ideal complete model and actual limited-view observations. The relative attention feature extraction processing module encodes the relative spatial positional relationships between points, enabling the network to effectively capture discriminative geometric features such as embryo orientation and tip contour even when some point cloud information is missing and the local geometric similarity of the seed surface is strong. The pose regression and supervised training module aggregates point-by-point features into a global pose representation. Supervised training is performed using normalization constraints and a joint loss function to suppress interference from invisible and occluded points on pose regression. The practical pose estimation and calibration application module uses the trained network in an online data acquisition environment, outputting the 3D pose parameters of corn seeds and pairing them with synchronous sensor signals. This provides a physically consistent reference benchmark for pose calibration of multiple types of sensor signals.
[0062] This application also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the method for estimating the three-dimensional pose of corn seeds.
[0063] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for estimating the three-dimensional pose of maize seeds, characterized in that, include: S1. Obtain the original point cloud of corn seeds, establish a complete 3D point cloud model of corn seeds, and construct a full attitude point cloud library based on the complete 3D point cloud model, including corn seed attitude point clouds under different spatial attitudes and corresponding 3D attitude parameters. S2. Based on the full pose point cloud library and preset view constraints, construct a partial point cloud training dataset with known pose labels; S3. Input a portion of the point cloud samples from the partial point cloud training dataset into the pose estimation network to construct features, and extract the geometric features of the point cloud through the relative attention mechanism to obtain deep point-level features; S4. Aggregate deep point-level features into global pose features. Based on the global pose features, the pose estimation network outputs three-dimensional pose parameters. The pose estimation network is then trained under supervision using known pose labels. S5. Input the point cloud of the actual collected corn seeds into the trained attitude estimation network, output the three-dimensional attitude parameters of the corn seeds, and use the three-dimensional attitude parameters as the attitude reference label for subsequent sensor signal calibration.
2. The method according to claim 1, characterized in that, S1 includes: S11. Scan corn seeds from multiple perspectives using a 3D scanning device to obtain the original point cloud from multiple perspectives; S12. Denoise, remove outliers, register and fuse the original point clouds to obtain a complete 3D point cloud model of corn seeds, and standardize the complete 3D point cloud model. S13. Using the centroid or principal axis coordinate system of the standardized complete 3D point cloud model as a reference, apply rigid body transformation including rotation matrix and translation vector to the standardized complete 3D point cloud model according to the preset multi-angle rotation sampling method to generate corn seed posture point clouds under different spatial postures. S14. Save the corresponding rotation matrix and translation vector applied to generate each corn seed pose point cloud, and determine the rotation matrix and translation vector as the three-dimensional pose parameters of the corresponding corn seed pose point cloud to construct a full pose point cloud library.
3. The method for estimating the three-dimensional pose of maize seeds according to claim 2, characterized in that, Standardization processing includes one or more of centroid centering, scale normalization, and principal axis alignment; multi-angle rotation sampling methods include one or more of Euler angle sampling, quaternion uniform sampling, spherical uniform sampling, and attitude resolution-based discrete sampling.
4. The method according to claim 1, characterized in that, S2 includes: S21. Establish a visibility constraint model based on the sensor installation position, field of view, imaging distance, and occlusion relationship corresponding to the preset viewing angle constraint; S22. Based on the visibility constraint model, perform one or more of the following processing on the corn seed pose point clouds in the full pose point cloud library: view cropping, back face point removal, occlusion simulation, depth noise addition, and point cloud sparsification to obtain partial point cloud samples. S23. The three-dimensional pose parameters corresponding to the corn seed pose point cloud used to generate each part of the point cloud sample are determined as the known pose labels of each part of the point cloud sample. S24. Pair each part of the point cloud samples with the corresponding known pose labels to construct a partial point cloud training dataset.
5. The method according to claim 1, characterized in that, S3 includes: S31. Input a portion of the point cloud samples from the partial point cloud training dataset into the pose estimation network to construct features, sample or supplement points for each portion of the point cloud samples, and unify the number of points in each portion of the point cloud samples to a preset number. S32. Construct the three-dimensional coordinates of each point in the point cloud samples after unifying the number of points as point-level input features. Map the point-level input features to the hidden feature space through the pose estimation network to obtain the initial point-level features. S33. Construct a relative position vector based on the three-dimensional coordinate difference between points in each part of the point cloud sample after the point number is unified, and map the relative position vector to a relative position embedding. S34. Embed the relative position into the attention scoring function of the relative attention mechanism, and use the attention scoring function to perform weighted aggregation on the initial point-level features in the candidate neighborhood to obtain the updated point-level features. S35. The updated point-level features are repeatedly weighted and aggregated by the relative attention unit in the pose estimation network to extract the geometric features of the point cloud layer by layer, thus obtaining deep point-level features.
6. The method according to claim 1, characterized in that, S4 includes: S41. Aggregate deep point-level features into global pose features by one or more aggregation methods, such as max pooling, average pooling, and attention pooling. S42. Input the global attitude features into the attitude regression module of the attitude estimation network for regression calculation, and limit the output of the regression calculation to a preset numerical range through a preset activation function to obtain the normalized attitude prediction vector. S43. Perform inverse normalization on the normalized attitude prediction vector according to the preset attitude parameter value range to obtain the three-dimensional attitude parameters. S44. Construct a loss function based on the deviation between the 3D pose parameters and the known pose labels, and use the loss function to supervise the training of the pose estimation network.
7. The method according to claim 6, characterized in that, The loss function includes one or more of the following: rotation error term, translation error term, geometric consistency error term of the transformed point cloud, visible region overlap constraint term, correspondence constraint term, and regularization constraint term.
8. The method according to claim 1, characterized in that, S5 includes: S51. Obtain the point cloud of the actual corn seeds under the conditions of fixed posture acquisition, free fall acquisition, or acquisition during the operation of the seed metering device using a three-dimensional sensor. S52. Perform one or more of the following preprocessing steps on the actual collected corn seed point cloud: background point removal, outlier removal, spatial clipping, point cloud downsampling, coordinate normalization, and noise filtering to obtain the preprocessed partial point cloud. S53. Input the preprocessed partial point cloud into the trained pose estimation network and output the three-dimensional pose parameters of the corn seed. S54. Acquire sensor signals that are synchronously collected with the point cloud of the actual corn seed sample, pair the sensor signals with the three-dimensional attitude parameters to construct a calibration dataset, and use the three-dimensional attitude parameters as attitude reference labels for calibrating the sensor signals in the calibration dataset.
9. A three-dimensional pose estimation system for maize seeds, used to implement the method as described in any one of claims 1-8, characterized in that, include: The point cloud model and full attitude library construction module is used to obtain the original point cloud of corn seeds, establish a complete 3D point cloud model of corn seeds, and construct a full attitude point cloud library based on the complete 3D point cloud model, including corn seed attitude point clouds under different spatial attitudes and corresponding 3D attitude parameters. A partial point cloud training dataset construction module is used to construct a partial point cloud training dataset with known pose labels based on a full pose point cloud library and preset view constraints. The relative attention feature extraction and processing module is used to input a portion of the point cloud samples from the partial point cloud training dataset into the pose estimation network for feature construction, and extract the geometric features of the point cloud through the relative attention mechanism to obtain deep point-level features; The pose regression and supervised training module is used to aggregate deep point-level features into global pose features. Based on the global pose features, the pose estimation network outputs three-dimensional pose parameters, and the pose estimation network is trained in a supervised manner using known pose labels. The actual attitude estimation and calibration application module is used to input the point cloud of the actual collected corn seed into the trained attitude estimation network, output the three-dimensional attitude parameters of the corn seed, and use the three-dimensional attitude parameters as attitude reference labels for subsequent sensor signal calibration.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instruction is executed by the processor, it implements the three-dimensional pose estimation method for maize seeds as described in any one of claims 1-8.
Citation Information
Patent Citations
Depth 6D pose estimation network model and workpiece pose estimation method
CN114299150A
Camera-laser radar joint calibration method and device based on natural scene features
CN122391378A