Garlic clove directional precise sowing method based on deep learning
By using deep learning and binocular vision technology, the precise recognition and adjustment of the three-dimensional posture of garlic cloves has been achieved, solving the problem of inaccurate orientation of garlic clove sowing in existing technologies and improving sowing efficiency and quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-03-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing garlic planting technology cannot achieve precise three-dimensional orientation of garlic cloves, resulting in delayed emergence, reduced emergence rate, and weak plant growth. Furthermore, existing mechanical planting methods are unreliable in handling individual differences and cannot meet the needs of large-scale planting.
Using a deep learning-based approach, multi-view image acquisition and preprocessing are employed. Convolutional neural networks with encoder-decoder structures are used to identify key points of garlic cloves. Combined with binocular vision triangulation, three-dimensional pose is calculated, driving the actuator to adjust the pose and ensure that the garlic cloves are planted in the soil with the buds facing upwards and the base facing downwards.
It enables precise identification and adjustment of the three-dimensional posture of garlic cloves, improves the accuracy and consistency of sowing, significantly increases the emergence rate and uniformity of seedlings, and solves the problem of handling individual differences in traditional methods.
Smart Images

Figure CN121661635A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural planting automation technology, and in particular to a method for directional and precise sowing of garlic cloves based on deep learning. Background Technology
[0002] Garlic is an important economic crop, and its planting quality directly affects yield and quality. The key technical challenge in garlic clove planting lies in its orientation. Garlic cloves have distinct physiological polarity; therefore, during planting, the bulbils (commonly known as "bud tips" or "tops") must face upwards, and the root base downwards, planted vertically or nearly vertically into the soil. This ensures uniform and robust emergence and promotes normal bulb enlargement. Incorrect planting direction will lead to delayed emergence, decreased emergence rate, weak plant growth, and ultimately, significant yield reduction.
[0003] Existing garlic planting techniques are mainly divided into two categories: manual planting and mechanical planting. Manual planting relies entirely on experience, relying on the naked eye to judge the top and bottom of the garlic cloves and manually orienting them. This method has problems such as high labor intensity, extremely low production efficiency, poor planting uniformity, and high production costs, and cannot meet the needs of large-scale planting.
[0004] Existing mechanical sowing methods mainly employ mechanical seed metering devices, such as finger-clamp, spoon-chain, or pneumatic suction types. These methods primarily address the automated single-seed picking and placement of garlic cloves, but they fall short in achieving precise orientation of the cloves' posture. A common approach involves combining vibrating discs, guide grooves, and other mechanical mechanisms, utilizing the garlic clove's own geometry and center of gravity for coarse posture adjustment. However, individual garlic cloves exhibit significant differences in shape, size, and mass distribution; even within the same variety, their appearance is not a regular geometric shape. This inherent biodiversity leads to poor reliability of orientation methods based on simple mechanical principles, resulting in high rates of reseeding, missed sowing, and orientation errors. Some studies have attempted to introduce machine vision for garlic clove recognition and positioning, but these are mostly limited to determining the presence or two-dimensional planar position of the cloves, failing to address the real-time recognition and precise control of posture (i.e., top orientation) in three-dimensional space.
[0005] In recent years, deep learning technology has made groundbreaking progress in image recognition, object detection, and pose estimation, and its application in agriculture is becoming increasingly widespread, such as in fruit identification and weed detection. However, applying deep learning technology to small, non-rigid planting objects like garlic cloves, which exhibit significant inter-class variations, and achieving real-time online recognition of their three-dimensional pose to drive actuators for precise physical orientation operations, still faces numerous technical challenges. These challenges include, but are not limited to: how to design an efficient image acquisition scheme to clearly capture the subtle features of the top and bottom of garlic cloves; how to construct and train a deep learning model capable of robustly recognizing key parts of garlic cloves of different varieties and sizes; how to convert the two-dimensional image information output by the model into spatial pose parameters that can be used to control the three-dimensional actuator; and how to design a fast-response planting actuator to work collaboratively with the recognition system to meet the real-time requirements of field operations. Existing technologies lack a complete, efficient, and reliable technical solution to systematically address these problems, which is precisely the technical obstacle that this invention aims to overcome.
[0006] Therefore, there is an urgent need to invent a method for directional planting of garlic cloves that can simulate human visual judgment and achieve automated and precise operation, so as to significantly improve planting quality and efficiency. Summary of the Invention
[0007] To achieve the above objectives, this invention provides a method for precise and directional planting of garlic cloves based on deep learning, comprising the following steps:
[0008] Step 1: Simultaneously acquire multi-view images of garlic cloves using at least two industrial cameras arranged at a specific angle, and preprocess the multi-view images to obtain multi-view image pairs.
[0009] Step 2: Input the multi-view image pairs into the pre-trained garlic clove keypoint detection deep learning model, identify and output the pixel coordinates of the top center point and bottom center point of the garlic clove in each image;
[0010] Step 3: Based on the pixel coordinates of the top and bottom center points of the garlic cloves, the internal and external parameters of the industrial camera, calculate the physiological axis vector of the garlic cloves in three-dimensional space, and calculate the actual pose angle of the garlic cloves based on the physiological axis vector.
[0011] Step 4: Generate attitude adjustment parameters for controlling the sowing actuator based on the actual posture angle of the garlic cloves. The attitude adjustment parameters include the angle and direction of rotation that the gripper needs to rotate.
[0012] Step 5: Based on the attitude adjustment parameters, drive the gripper of the sowing actuator to grab and rotate the garlic cloves, adjust the garlic cloves to the target vertical posture, and then put them into the seed furrow.
[0013] Preferably, in step one, at least two industrial cameras arranged at a specific angle include a first industrial camera facing directly above the garlic clove and a second industrial camera facing sideways to the garlic clove; the first industrial camera acquires a first image containing the top features and planar contour of the garlic clove, and the second industrial camera acquires a second image containing the side contour and height information of the garlic clove; the preprocessing of the multi-view images includes image noise reduction, image enhancement, and image segmentation, wherein the image segmentation is used to extract regions of interest containing only a single garlic clove from the first image and the second image respectively, and to combine the two regions of interest images into a multi-view image pair.
[0014] Preferably, in step one, the image enhancement processing specifically includes contrast stretching and histogram equalization operations; the image segmentation processing adopts a threshold-based segmentation method or an edge detection-based segmentation method, and the threshold or edge detection parameters of the segmentation processing are dynamically determined by analyzing the gray-level distribution and contour features of a large number of garlic clove sample images.
[0015] Preferably, in step two, the garlic clove keypoint detection deep learning model is a convolutional neural network with an encoder-decoder structure; the encoder consists of multiple convolutional layers and pooling layers alternately, used to extract multi-level features from the input multi-view image pairs; the decoder consists of multiple deconvolutional layers or upsampling layers, used to restore the feature map extracted by the encoder to the input image size, and output a heat map representing the position of the top center point and the bottom center point or directly regressed pixel coordinates.
[0016] Preferably, in step two, the pre-training of the garlic clove keypoint detection deep learning model includes the following process: constructing a training dataset containing multiple pairs of multi-view images of garlic clove samples of different varieties, sizes, and poses, and manually annotating the true pixel coordinates of the top center point and bottom center point of the garlic clove in each image; using the training dataset, iteratively optimizing the parameters of the convolutional neural network through the backpropagation algorithm and gradient descent optimizer until the average error of the model in predicting the keypoint position on the independent validation set is lower than a set threshold, thus completing the model training.
[0017] Preferably, in step three, the specific process of calculating the physiological axis vector of the garlic clove in three-dimensional space is as follows: using the principle of binocular visual triangulation, the pixel coordinates of the top center point in the first image are matched with the pixel coordinates of the top center point in the second image to obtain the first three-dimensional coordinates of the top center point; the pixel coordinates of the bottom center point in the first image are matched with the pixel coordinates of the bottom center point in the second image to obtain the second three-dimensional coordinates of the bottom center point; the vector pointing from the second three-dimensional coordinates to the first three-dimensional coordinates is the physiological axis vector.
[0018] Preferably, in step three, the specific process of calculating the actual posture angle of the garlic clove is as follows: the vertical axis of the world coordinate system is predefined as the opposite direction of gravity; the angle between the physiological axis vector and the vertical axis of the world coordinate system is calculated, and the degree of this angle is the magnitude of the actual posture angle; the projection direction of the physiological axis vector on the horizontal plane is analyzed to determine the orientation of the actual posture angle.
[0019] Preferably, in step four, the specific logic for generating the attitude adjustment parameters is as follows: set the target attitude angle corresponding to the target sowing attitude to zero degrees; calculate the difference between the actual attitude angle of the garlic clove and the zero-degree target value, and use the absolute value of this difference as the angle that the gripper needs to rotate; determine the rotation direction of the gripper based on the orientation of the actual attitude angle; convert the rotation angle and rotation direction into pulse quantity control commands and steering control commands for the drive motor, and calculate the trigger time of the gripper action in combination with the conveying speed of the garlic clove, which together constitute the attitude adjustment parameters.
[0020] Preferably, in step five, the specific process of precise directional sowing is as follows: when the garlic cloves with identification tags are transported to the sowing execution station by the conveying device, the control system immediately retrieves the posture adjustment parameters corresponding to the identification tag; after receiving the control command, the gripper of the sowing execution mechanism grabs the garlic cloves with a preset gripping force, and then the drive motor drives the gripper and garlic cloves to rotate at a specified angle with a constant angular velocity according to the pulse number control command and the steering control command; after the rotation is completed, the gripper releases the garlic cloves, so that the garlic cloves fall into the prepared seed furrow in a vertical posture with the scales facing up and the base facing down.
[0021] Preferably, before step one, a system calibration step is included: using a standard calibration board of known size and pattern, which appears simultaneously in the field of view of both industrial cameras, and acquiring multiple sets of images of the calibration board in different poses; identifying feature points of the calibration board through image processing algorithms, and combining the known physical dimensions of the calibration board, calculating the internal parameter matrix and distortion coefficient of each of the two industrial cameras, as well as the rotation matrix and translation vector between the two industrial cameras, thereby determining the external parameters of the cameras and completing the system calibration.
[0022] The beneficial effects of this invention are:
[0023] 1. This invention acquires multi-view images of garlic cloves using two industrial cameras at specific angles, and uses a trained deep learning model to accurately identify key points at the top and bottom, solving the technical problem of stable and accurate identification of key parts of non-standard shaped garlic cloves in complex backgrounds, and providing a reliable data foundation for attitude calculation.
[0024] 2. This invention utilizes the principle of binocular vision to convert key point information in a two-dimensional image into three-dimensional spatial coordinates, and calculates the precise physiological axis and posture angle of the garlic clove accordingly, realizing the quantitative perception of the three-dimensional spatial orientation of the garlic clove, breaking through the limitation of traditional methods that can only perform two-dimensional or rough posture judgment.
[0025] 3. Based on the calculated three-dimensional posture angle, this invention generates high-precision rotation control parameters in real time, driving the actuator to actively correct the posture of the garlic cloves. This achieves closed-loop control from visual perception to physical operation, ensuring that each garlic clove can be planted in the soil with the scales facing upwards and the base facing downwards, greatly improving the accuracy and consistency of directional sowing. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in this invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0027] Figure 1 This is a flowchart of the steps of the method of the present invention;
[0028] Figure 2 This is a flowchart illustrating the steps of pre-training a deep learning model for detecting key points in garlic cloves in the method of this invention.
[0029] Figure 3 This is a flowchart illustrating the precise directional seeding process in step five of the method of the present invention. Detailed Implementation
[0030] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. It should also be noted that, to make the embodiments more comprehensive, the following embodiments are the best and preferred embodiments, and those skilled in the art can use other alternative methods to implement some well-known technologies; moreover, the accompanying drawings are only for more specific description of the embodiments and are not intended to specifically limit the present invention.
[0031] Please see Figures 1-3 This invention provides a method for precise directional planting of garlic cloves based on deep learning. This method systematically solves the problem of automatic posture recognition during garlic clove planting by using biomimetic vision and intelligent decision-making. Its core lies in constructing a closed-loop intelligent system of "perception-decision-execution": first, the three-dimensional posture of the garlic clove is accurately perceived through multi-view imaging; then, its physiological polarity (top and bottom) is intelligently identified using a deep learning model; finally, a high-precision actuator is driven to complete physical posture correction and planting. The entire solution achieves a coherent and automatic conversion from image information to mechanical action.
[0032] The technical solution is described in detail below:
[0033] Step 1: Garlic clove pose image acquisition and preprocessing;
[0034] This step forms the data foundation for all subsequent analysis and control, and its core objective is to provide high-quality, interference-free input images for the deep learning model. To achieve this goal, this invention designs a specific image acquisition hardware scheme and preprocessing workflow.
[0035] In terms of hardware setup, two industrial cameras are installed at the image acquisition station of the planting line. The first industrial camera is vertically mounted directly above the garlic clove conveyor belt, with its optical axis perpendicular to the conveyor belt plane. It is used to acquire a top-view image including the top scales, base, and overall planar outline of the garlic clove. The second industrial camera is horizontally mounted to one side of the conveyor belt, with its optical axis parallel to the conveyor belt plane and perpendicular to the conveying direction. It is used to acquire a side-view image reflecting the side outline and height of the garlic clove. The centers of view of the two cameras are spatially aligned with the same acquisition point, and millisecond-level synchronous exposure is achieved through hardware triggering to ensure that the instantaneous posture of the same garlic clove is captured.
[0036] The preprocessing process includes the following steps:
[0037] Image noise reduction: Due to potential electromagnetic interference in industrial environments, the acquired raw images are first subjected to Gaussian filtering to suppress random noise, smooth the image while preserving edge information. The size of the Gaussian filter kernel is determined based on the image resolution and noise level; for example, for a 2-megapixel image, a filter kernel of 5 pixels by 5 pixels can be used.
[0038] Image enhancement: To highlight the contrast between the garlic cloves and the background, as well as their surface texture features (such as the wrinkles of the top buds and the depressions at the base), the denoised image is subjected to contrast stretching and histogram equalization. Contrast stretching expands the grayscale value range of the original image to the full range of 0 to 255 through a linear transformation. Histogram equalization redistributes the grayscale values of the image pixels, making the grayscale distribution more uniform and enhancing the visibility of local details.
[0039] Image segmentation: To eliminate interference from the conveyor belt background and unevenly lit areas in other steps, it is necessary to accurately extract the region containing only the target garlic clove from the enhanced image. This invention employs a threshold-based segmentation method: First, the gray-level histograms of the garlic clove region and the background region in a large number of sample images are statistically analyzed, revealing that the gray levels of the garlic clove region are usually concentrated in a specific range. During segmentation, for each image, its gray-level histogram is calculated, and the valley between the two peaks is automatically found as the segmentation threshold. All pixels with gray-level values greater than this threshold are classified as foreground (garlic clove), and those with lower gray-level values are classified as background. For incomplete segmentation in side-view images that may be caused by shadows, morphological closing operations (dilation followed by erosion) are used for filling and smoothing to obtain a complete binary mask of the garlic clove.
[0040] Image pair generation: Using the binary mask obtained above, the minimum bounding rectangle region is cropped from the original images of the first industrial camera and the second camera respectively to obtain "top-down-side-down" multi-view image pairs. This ensures that the data input to the deep learning model is clean, aligned, and complementary.
[0041] Step 2: Identification of key parts of garlic cloves based on deep learning;
[0042] This step is the core of the invention's intelligence; its task is to accurately locate two key points representing the physiological polarity of garlic cloves from the preprocessed image: the top center point and the bottom center point. To this end, the invention constructs and trains a dedicated deep learning model.
[0043] Model Architecture: This invention employs a fully convolutional neural network model based on an encoder-decoder structure. The encoder consists of five modules, each containing two convolutional layers and one max-pooling layer. The convolutional layers use small kernels to extract abstract features layer by layer, from edges and corners to complex textures. The pooling layers progressively reduce the spatial size of the feature maps, expanding the receptive field and enhancing feature invariance. The decoder is symmetrical to the encoder, progressively restoring the low-resolution high-dimensional feature maps to high resolution through five upsampling modules. Each upsampling module consists of one transposed convolutional layer and two regular convolutional layers. The final output layer of the network is a feature map with two channels, representing predicted heatmaps for the "top center point" and "bottom center point," respectively. The value of each pixel in the heatmap represents the probability that the location is a target keypoint, with the point with the highest probability being the predicted coordinate.
[0044] Model training:
[0045] Data preparation: Collect garlic clove samples covering the main garlic varieties (such as "Cangshan garlic" and "Jinxiang garlic") in the target planting area. Arrange them in thousands of random poses by hand, and use the system in step one to collect "top-down-side-down" image pairs to form the original dataset.
[0046] Data labeling: Agricultural experts precisely clicked on the center of the most protruding garlic clove scale (top) and the center of the most concave base (bottom) in each image, recorded their pixel coordinates, and generated a two-dimensional Gaussian distribution heat map centered on these coordinates as training labels.
[0047] Training Process: The dataset was divided into training, validation, and test sets in an 8:1:1 ratio. Using the training set data, the model was trained using the Adam optimizer with mean squared error as the loss function. During training, the initial learning rate was set to 0.001 and dynamically adjusted using cosine annealing. After each training epoch, the model performance was evaluated using the validation set. Training was stopped early when the validation set loss stopped decreasing for several consecutive epochs to prevent overfitting. Finally, on the independent test set, the average Euclidean distance between the model's predicted keypoint coordinates and the manually labeled coordinates was controlled below a threshold, for example, less than 3 pixels, to be considered a successful training result.
[0048] Inference process: The real-time garlic clove multi-view image pairs generated in step one are input into the trained model. The model processes the two images in parallel and outputs two heatmaps respectively. For each heatmap, the probability peak point is found, and its coordinates are the predicted top or bottom center point pixel coordinates under that viewpoint.
[0049] Step 3: Calculate the 3D spatial pose of the garlic clove;
[0050] This step transforms two-dimensional image coordinates into three-dimensional spatial information, serving as a bridge connecting visual perception and physical control.
[0051] Camera Calibration: Before the system is put into use, the internal parameters of the two industrial cameras and the extrinsic parameters between them must be obtained through calibration. A standard calibration board printed with a known-sized checkerboard pattern is placed at different angles and positions within the image acquisition station space, and images of the calibration board are simultaneously acquired by both cameras. Using algorithms such as Zhang Zhengyou's calibration method, the internal parameter matrix (including focal length and focus coordinates) and lens distortion coefficients of each camera, as well as the rotation matrix and translation vector (i.e., extrinsic parameters) between the two cameras, are calculated. These parameters are stored for all subsequent 3D calculations.
[0052] 3D Coordinate Calculation: For each set of synchronously acquired top-view and side-view images, the 3D coordinates of the keypoints are calculated using triangulation based on the keypoint pixel coordinates and calibration parameters obtained in step two. Specifically, the two cameras are considered as two observation points, and two lines of sight in 3D space can be formed based on the pixel coordinates and camera parameters. Theoretically, these two lines of sight should intersect at the same spatial point (i.e., the keypoint). Due to detection and calibration errors, the actual calculation involves solving a least-squares problem to find the point in space closest to the two lines of sight, which is then used as the 3D coordinate of the keypoint.
[0053] Posture angle calculation: After calculating the 3D coordinates of the top center point and the bottom center point respectively, connect the two points to form a vector, which is defined as the physiological axis vector of the garlic clove. Set the Z-axis of the world coordinate system to the vertically upward direction (opposite to the direction of gravity). The posture of the garlic clove is described by two angles:
[0054] Tilt angle: The angle between the physiological axis vector and the positive Z-axis. An angle of 0 degrees indicates that the garlic clove is completely upright (top facing up), an angle of 180 degrees indicates that it is completely upside down, and an angle of 90 degrees indicates that it is horizontal.
[0055] Azimuth: The angle between the projection of the physiological axis vector onto the horizontal plane (XY plane) and the positive direction of the X-axis. This angle indicates the specific orientation of the garlic clove's top away from true north (or the reference direction).
[0056] Step 4: Generate seeding posture adjustment parameters;
[0057] This step transforms the abstract attitude angle calculated in the previous step into precise action commands that the seeding actuator can understand and execute.
[0058] The core of the control logic is to correct the current garlic clove's pose to the target pose. The target pose is defined as: the physiological axis vector coincides with the Z-axis, and the top is facing upwards (i.e., the tilt angle is 0 degrees, and the azimuth angle is arbitrary). The parameter generation process is as follows:
[0059] Calculate the angle (i.e. tilt angle) between the current physiological axis vector and the target Z-axis vector. The value of this angle is directly used as the total angle that the gripper needs to rotate.
[0060] A rotation axis is determined through a vector cross product operation. This rotation axis is perpendicular to the plane formed by the current physiological axis vector and the target Z-axis vector. The direction of the rotation axis in the horizontal plane determines the rotation direction of the gripper (clockwise or counterclockwise).
[0061] The calculated rotation angle and rotation direction are combined with the transmission ratio of the servo motor in the seeding actuator and the encoder resolution to convert them into the number of pulses and direction level signals required for the motor to move.
[0062] Simultaneously, the system monitors the conveying speed of the garlic cloves in real time. Based on the fixed distance between the image acquisition station and the sowing execution station, it accurately calculates the delay time from the completion of recognition to the arrival of the garlic clove at the grasping point, thereby determining the action trigger moment. Angle, direction, pulse command, and trigger moment together constitute the complete attitude adjustment parameters.
[0063] Step 5: Execute precise and targeted seeding;
[0064] This step is the final physical implementation, requiring the actuator to complete the action quickly, accurately, and gently.
[0065] The core of the seeding actuator is a flexible gripper that can rotate 360 degrees and is driven by a servo motor. Its workflow is as follows:
[0066] Grasping: When a garlic clove with an RFID or visual tag arrives at the planting station, the control system retrieves its corresponding posture adjustment parameters based on the tag. The gripper closes under the drive of a cylinder, and the silicone or flexible polyurethane material wrapped inside ensures that the garlic clove is firmly gripped with a constant force that will not damage it.
[0067] Rotation: Upon receiving pulse commands, the servo motor drives the gripper and garlic clove at a constant angular velocity, precisely rotating them by a specified angle. During rotation, the encoder provides real-time position feedback, forming a closed-loop control to ensure the accuracy of the rotation angle.
[0068] Planting: After rotating into position, the clamp quickly opens, and the garlic cloves fall vertically into the seed furrows already prepared by the furrow opener under the influence of gravity. At this point, the garlic cloves have their scales facing upwards, the base facing downwards, and their axis is basically perpendicular to the ground, achieving the optimal planting posture.
[0069] Reset: After the seeding is completed, the gripper rotates back to the initial zero position under the drive of the motor, waiting to grab the next garlic clove, and repeats the cycle.
[0070] Example
[0071] The following example, taken at a large-scale garlic planting base in Jinxiang County, Shandong Province, illustrates the specific implementation process of this invention.
[0072] Application Scenario: The base cultivates the "Jinxiang White Garlic" variety and plans to use the method described in this invention for autumn sowing. The field soil has been deeply tilled and leveled, with a row spacing of 20 cm and a plant spacing of 10 cm, aiming for a sowing depth of 3-5 cm. Traditional mechanical sowing methods suffer from inaccurate orientation, resulting in a germination rate of only about 85% and poor seedling uniformity, affecting subsequent unified management. The base hopes to adopt this new technology to increase the germination rate to over 95% and significantly improve seedling uniformity.
[0073] Implementation process:
[0074] System Deployment and Calibration: Install the intelligent seeding unit described in this invention on a large tractor-mounted seeder. Following the requirements of step one, install two 2-megapixel industrial cameras on both sides of the conveyor belt below the seed box outlet. Using a 10mm x 10mm checkerboard calibration plate, calibrate the binocular cameras 30mm above the conveyor belt plane (simulating the position of garlic cloves), acquiring and storing all camera parameters.
[0075] Model Deployment and Initialization: The keypoint detection deep learning model (with a test set localization error of 2.5 pixels), pre-trained on a large number of "Jinxiang white garlic" sample images, is loaded into the industrial control computer on the planter. The system is started and an idle test is conducted to confirm that the image acquisition, processing, and keypoint prediction processes are running smoothly.
[0076] Field sowing operation: The seeder moves forward at a constant speed of 3 kilometers per hour. The furrow opener opens the seed furrows to a depth of about 4 centimeters.
[0077] Example 1: A single garlic clove is picked up by the seed metering device and falls onto the conveyor belt. Its initial posture is approximately horizontal with its top facing to one side.
[0078] Image Acquisition and Processing: When the garlic clove passes through the image acquisition station, two cameras are triggered by photoelectric sensors to take pictures simultaneously. After noise reduction and enhancement, the system automatically calculates the grayscale histogram, determines the segmentation threshold to be 125, successfully segments the garlic clove region, and crops it to generate top-view and side-view image pairs.
[0079] Key point recognition: The image pairs are input to the deep learning model. In the top view, the model outputs the predicted top center point coordinates as (156, 208) and the bottom center point coordinates as (160, 120); in the side view, the outputs the top center point coordinates as (102, 105) and the bottom center point coordinates as (98, 195).
[0080] 3D attitude calculation: Using calibration parameters, the top 3D coordinates are calculated as (12.1, 5.3, 32.5) and the bottom 3D coordinates as (12.5, 5.1, 30.1) via triangulation. The physiological axis vector is calculated to be approximately (0.4, -0.2, 2.4). The angle between this angle and the Z-axis (0, 0, 1) is calculated, yielding a tilt angle of 85 degrees and an azimuth direction of southeast.
[0081] Parameter generation and execution: The control system calculates that the garlic cloves need to be rotated 85 degrees to the northwest. It then generates the corresponding motor control command. When the garlic cloves reach below the rotating gripper, the gripper precisely grasps them and rotates them 85 degrees to make them vertical, then releases them, allowing the garlic cloves to fall vertically into the planting furrow.
[0082] Example 2: Another garlic clove was initially nearly upright, but its top was slightly tilted northwards. The system, using the same procedure, identified its tilt angle as only 15 degrees, with its azimuth being true north. The gripper only needed a slight 15-degree rotation to correct it to a perfectly upright position.
[0083] Effect verification:
[0084] To objectively evaluate the effectiveness of this invention, comparative experiments were conducted on the same plot of land using the same variety of garlic cloves, employing the method of this invention (experimental group) and a currently mainstream mechanical vibrating disc directional planter (control group). Each group was sown with 1000 garlic cloves, and germination was assessed 7 and 14 days after sowing.
[0085] Comparison Projects Mainstream vibratory disc seeders (control group) Method of the present invention (experimental group) Description of sowing method The garlic cloves are roughly oriented by rubbing against each other in the vibratory bowl and sliding down to a specific slot based on their physical shape. Based on binocular vision and deep learning, the three-dimensional posture of each garlic clove is identified in real time, and actively rotated and corrected. Emergence rate (7 days) 84.7% 96.3% Emergence rate (14 days) 86.1% 97.5% Seedling uniformity (standard deviation of plant height) 2.8 cm 1.2 cm Targeted pass rate 72.5% (The scales are considered acceptable if the buds are mostly pointing upwards) 98.8% (perpendicularity deviation <15°) Adaptability to deformed valves Poor quality, prone to card type, incorrect orientation Strong, with good model recognition robustness
[0086] Conclusion: As shown in the table above, the method of this invention significantly outperforms existing mainstream technologies in core indicators such as germination rate, uniformity of seedlings, and orientation accuracy. The fundamental reason lies in the fact that this invention, through intelligent sensing and active control, achieves individualized and high-precision attitude management for each garlic clove, overcoming the inherent shortcomings of traditional mechanical methods that rely on statistical regularities and cannot handle individual differences.
[0087] This invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of this invention. To provide the public with a thorough understanding of this invention, specific details are described in detail in the following preferred embodiments; however, those skilled in the art will fully understand the invention even without these details. Furthermore, to avoid unnecessary misunderstanding of the essence of this invention, well-known methods, processes, procedures, components, and circuits are not described in detail.
[0088] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for precise and directional planting of garlic cloves based on deep learning, characterized in that, Includes the following steps: Step 1: Simultaneously acquire multi-view images of garlic cloves using at least two industrial cameras arranged at a specific angle, and preprocess the multi-view images to obtain multi-view image pairs. Step 2: Input the multi-view image pairs into the pre-trained garlic clove keypoint detection deep learning model, identify and output the pixel coordinates of the top center point and bottom center point of the garlic clove in each image; Step 3: Based on the pixel coordinates of the top and bottom center points of the garlic cloves, the internal and external parameters of the industrial camera, calculate the physiological axis vector of the garlic cloves in three-dimensional space, and calculate the actual pose angle of the garlic cloves based on the physiological axis vector. Step 4: Generate attitude adjustment parameters for controlling the sowing actuator based on the actual posture angle of the garlic cloves. The attitude adjustment parameters include the angle and direction of rotation that the gripper needs to rotate. Step 5: Based on the attitude adjustment parameters, drive the gripper of the sowing actuator to grab and rotate the garlic cloves, adjust the garlic cloves to the target vertical posture, and then put them into the seed furrow.
2. The method for directional and precise sowing of garlic cloves based on deep learning according to claim 1, characterized in that, In step one, at least two industrial cameras arranged at a specific angle include a first industrial camera facing directly above the garlic clove and a second industrial camera facing sideways to the garlic clove. The first industrial camera captures a first image containing the top features and planar contours of the garlic cloves, and the second industrial camera captures a second image containing the side contours and height information of the garlic cloves. The preprocessing of the multi-view images includes image denoising, image enhancement and image segmentation. The image segmentation is used to extract regions of interest containing only a single garlic clove from the first and second images respectively, and to combine the two regions of interest images into a multi-view image pair.
3. The method for directional and precise sowing of garlic cloves based on deep learning according to claim 2, characterized in that, In step one, the image enhancement process specifically includes contrast stretching and histogram equalization operations; Image segmentation processing employs either threshold-based or edge-detection-based segmentation methods. The threshold or edge detection parameters for segmentation are dynamically determined by analyzing the grayscale distribution and contour features of a large number of garlic clove sample images.
4. The method for directional and precise sowing of garlic cloves based on deep learning according to claim 1, characterized in that, In step two, the deep learning model for garlic clove keypoint detection is a convolutional neural network with an encoder-decoder structure; The encoder consists of multiple alternating convolutional and pooling layers, used to extract multi-level features from the input multi-view image pairs; The decoder consists of multiple deconvolutional or upsampling layers, used to restore the feature maps extracted by the encoder to the input image size, and output a heatmap or directly regressed pixel coordinates representing the positions of the top and bottom center points.
5. The method for directional and precise sowing of garlic cloves based on deep learning according to claim 4, characterized in that, Step two, pre-training the garlic clove keypoint detection deep learning model, includes the following processes: A training dataset containing multiple images of garlic cloves of different varieties, sizes, and postures from multiple perspectives was constructed, and the true pixel coordinates of the top and bottom center points of the garlic cloves were manually labeled in each image. Using the training dataset, the parameters of the convolutional neural network are iteratively optimized through the backpropagation algorithm and gradient descent optimizer until the average error of the model in predicting key point locations on the independent validation set is lower than a set threshold, thus completing the model training.
6. The method for directional and precise sowing of garlic cloves based on deep learning according to claim 1, characterized in that, In step three, the specific process of calculating the physiological axis vector of the garlic clove in three-dimensional space is as follows: using the principle of binocular vision triangulation, the pixel coordinates of the top center point in the first image are matched with the pixel coordinates of the top center point in the second image respectively, and the first three-dimensional coordinates of the top center point are calculated. By matching the pixel coordinates of the bottom center point in the first image with the pixel coordinates of the bottom center point in the second image, the second spatial three-dimensional coordinates of the bottom center point are calculated. The vector pointing from the second three-dimensional coordinate system to the first three-dimensional coordinate system is the physiological axis vector.
7. The method for directional and precise sowing of garlic cloves based on deep learning according to claim 6, characterized in that, In step three, the specific process of calculating the actual posture angle of the garlic clove is as follows: the vertical axis of the world coordinate system is predefined as the opposite direction of gravity; Calculate the angle between the physiological axis vector and the vertical axis of the world coordinate system; the degree measure of this angle is the magnitude of the actual posture angle. Analyze the projection direction of the physiological axis vector onto the horizontal plane to determine the orientation of the actual posture angle.
8. The method for directional and precise sowing of garlic cloves based on deep learning according to claim 1, characterized in that, In step four, the specific logic for generating attitude adjustment parameters is as follows: set the target attitude angle corresponding to the target seeding attitude to zero degrees; Calculate the difference between the actual attitude angle of the garlic clove and the zero-degree target value, and use the absolute value of this difference as the angle that the gripper needs to rotate. The rotation direction of the gripper is determined based on the orientation of the actual posture angle; The rotation angle and rotation direction are converted into pulse number control commands and steering control commands for the drive motor, and the trigger time of the gripper action is calculated in combination with the garlic clove conveying speed, which together constitute the attitude adjustment parameters.
9. The method for directional and precise sowing of garlic cloves based on deep learning according to claim 1, characterized in that, Step five involves the following specific steps for precise targeted seeding: When garlic cloves with identification tags are transported to the sowing execution station by the conveying device, the control system immediately retrieves the attitude adjustment parameters corresponding to the identification tag. After receiving the control command, the gripper of the sowing actuator grabs the garlic cloves with a preset gripping force. Then, the drive motor drives the gripper and garlic cloves to rotate at a specified angle with a constant angular velocity according to the pulse number control command and the steering control command. After rotation, the gripper releases the garlic cloves, allowing them to fall vertically into the prepared planting furrow with the scales facing up and the base facing down.
10. A method for precise directional planting of garlic cloves based on deep learning according to any one of claims 1 to 9, characterized in that, Before step one, there is also a step of system calibration of the two industrial cameras: using a standard calibration board of known size and pattern, which appears in the field of view of both industrial cameras at the same time, and acquiring multiple sets of images of the calibration board in different poses; By identifying feature points on the calibration board using image processing algorithms and combining them with the known physical dimensions of the calibration board, the internal parameter matrices and distortion coefficients of the two industrial cameras, as well as the rotation matrix and translation vector between the two industrial cameras, are calculated to determine the external parameters of the cameras and complete the system calibration.