Pumpkin seedlings serve as rootstocks for watermelon grafting, and the partial leaf trimming operation performed approximately two days before grafting is crucial for the survival rate of grafted watermelon seedlings. Extracting the position of the main veins of the leaf is a prerequisite for achieving automated partial pruning. The existing methods have problems such as low segmentation accuracy and misclassification between primary and branch veins in the pumpkin seedling segmentation task. This study proposes a three-classification segmentation model Dynamic Region Enhancement Transformer (DRE-Former) of main vein, branch vein and background, as well as a post-processing system. The encoder of DRE-Former consists of two modules. The former is Dynamic Frequency Conv and Normalized Efficient Conv (DN Block), which can enhance the feature extraction ability for small targets. The latter is the Region Transformer Block, which enhances the ability to distinguish between the main vein and the branch vein. In addition, in the skip connection part of the model, a Skip Connection Fusion Block (SCF Block) has been added, which can reduce the dilution degree of detailed features. The post-processing section outputs the cutting position and cutting Angle through rule-based methods and geometric analysis. The experimental results show that the proposed model achieves mean Intersection-over-Union (mIoU) and Overall Accuracy (OA) of 90.80% and 95.88%, respectively, outperforming the comparative models. In stability and error testing, the average standard deviation is 0.60, and the average relative error is 11.90%. Compared with the primary mIoU data in the dataset, the average relative error differs by only 2.11%. The post-processing system enables the accurate determination of cutting positions and angles, but it has a strong dependence on the segmentation model. The research can provide reliable technical support for the subsequent automatic cutting equipment for pumpkin seedlings.
Xu et al. (Mon,) studied this question.