In response to the limitations of existing methods in differentiating between vegetables and all types of weeds in farmlands, a new image segmentation method is proposed based on the improved YOLOv7-tiny. Building on the original YOLOv7-tiny framework, we replace the CIoU loss function with the WIoU loss function, substitute the Leaky ReLU loss function with the SiLU activation function, introduce the SimAM attention mechanism in the neck network, and integrate the PConv convolution module into the backbone network. The improved YOLOv7-tiny is used for vegetable target detection, while the ExG index, in combination with the OTSU method, is utilized to obtain a foreground image that includes both vegetables and weeds. By integrating the vegetable detection results with the foreground image, a vegetable distribution map is generated. Subsequently, by excluding the vegetable targets from the foreground image using the vegetable distribution map, a single weed target is obtained, thereby achieving accurate segmentation between vegetables and weeds. The experimental results show that the improved YOLOv7-tiny achieves an average precision of 96.5% for vegetable detection, with a frame rate of 89.3 fps, Params of 8.2 M, and FLOPs of 10.9 G, surpassing the original YOLOv7-tiny in both detection accuracy and speed. The image segmentation algorithm achieves a mIoU of 84.8% and an mPA of 97.8%. This method can effectively segment vegetables and a variety of weeds, reduce the complexity of segmentation with good feasibility, and provide a reference for the development of intelligent plant protection robots.
A structural optimization scheme for the prototype is proposed to improve the driving performance of tree transplanting machines operating in hilly and mountainous environments. Through theoretical analysis of the tree transplanting machine’s stability and passability, we determined the relationship between the center of gravity offset distance and overall performance when climbing slopes and crossing steps and trenches. This analysis determined the optimal parameter for the center of gravity offset distance. Subsequently, the prototype structure was optimized, and the center of gravity position was adjusted accordingly. The stability and passability of the prototype were simulated using the multi-body dynamics analysis software RecurDyn V9R4. Finally, the driving performance of the optimized prototype is evaluated through extensive tests. The test results revealed that the optimized prototype achieves the maximum lateral travel and longitudinal climbing angle of more than 30°, the maximum height over steps of 330 mm, and the maximum width across trenches of 890 mm. The outcomes of the real-vehicle tests are largely consistent with the simulation results, and the test outcomes meet the driving performance requirements for transplanting operations in hilly and mountainous terrains.