Abstract:Garlic cultivation is highly demanding for a single seed to maintain upright-directional sowing with the roots down ward vertically. However, current adjustment devices for the direction of garlic cloves cannot be suitable for hybrid garlic varieties. In this study, an intelligent adjustment device was designed for the direction of garlic clove using edge computing. The device consisted of a feeding channel of garlic clove, a camera, a camera bracket, clove direction adjustment mechanism, turning servo and brackets. The adjustment mechanism of clove direction was composed of flip frame, reset spring, hopper opening and closing servo, Y-type hopper I and II. A dual convolution neural network (CNN) structure was adopted in the control system, where a custom deep learning CNN was for garlic monitoring in real time, and a ResNet-18 network was for the determination of garlic clove orientation. In monitoring, the garlic clove was distinguished from the background of images, thereby determining whether the clove was fed to the adjustment. Areal-time detection of orientation was to keep the pointy end of garlic clove facing upward, while the blunt end down into the soil. A suitable control strategy was provided to promptly adjust the direction of garlic clove. Higher identification accuracy and real-time performance were achieved in two different networks for separate detection and orientation of garlic clove. The specific procedure of orientation adjustment was as follows. An image processing was performed to determine whether the garlic clove entered the Y-shaped hopper from the feeding channel. Once the garlic clove was detected to be in the hopper, an image was real-time captured by the camera. The captured image was processed immediately through the deep learning network of detection and orientation. When the scales (blunt end)of garlic cloves were facing upward, the opening and closing servos of a hopper rotated at a certain angle to open the lower end of Y-type hopper I and II. As such, the garlic clove fell directly into the inserting with the scales facing upward. If the scales of garlic cloves were facing downward, the turning servos and adjusting mechanism individually rotated 180°, to accurately tailor the orientation of scales when the garlic clove was sliding down the guide slot of Y-type hopper I. Both theoretical and empirical data demonstrated that the structural parameters of the adjusting mechanism greatly dominated the success rate of the adjusted scale bud. A discrete element method (DEM) was performed on a commercial software EDEM to simulate the working effect of the adjusting mechanism. An orthogonal test was also utilized to optimize the key parameters of adjusting mechanism. An optimal combination of parameters was obtained, where the inclination angle of the garlic clove was 80° in the feeding channel, the radius of the Y-shaped hopper was 12.49 mm, and the height difference of the hopper was 20 mm. Finallya bench test was carried out to verify the direction adjustment of garlic cloves. In scale bud, the success rate of identification was 97.25%, and the success rate of adjustment was 96.25%, where the success rate of adjustment was slightly lower than that of recognition. The reason was that the correctly identified garlic turned over unexpectedly when falling, due to the irregular center of gravity in a single seed. The mean inference time of the model was 0.045 s, indicating a small proportion of adjustment time for the scale bud. The average adjustment time was 0.785 s, where the mean value was 0.59 s when the garlic cloves were facing up and 0.98 s when facing down. There was a relatively large difference in the adjustment time when the garlic buds were faced up and down. This difference came into being because there was inconsistent movement stroke of the adjustment mechanism in two cases, particularly where the rotation speed of the drive motor was the same when the scale buds were facing down. Consequently, the adjustment time of scale buds facing up was shorter than that of the roots down ward vertically in garlic planting.