Pumpkin Seedling Leaf Vein Extraction System Based on Deep Learning and Rule-Based Methods
Abstract
1. Introduction
2. Materials and Methods
2.1. Materials
2.1.1. Image Acquisition
2.1.2. Dataset Processing
2.2. Pumpkin Seedlings Vein Segmentation Model
2.2.1. Overall Architecture of DRE-Former
2.2.2. Dynamic Frequency Conv and Normalized Efficient Conv
- Dynamic Frequency Convolution.
- 2.
- Normalized Efficient Conv.
2.2.3. Region Transformer Block
2.2.4. Skip Connection Fusion Block
2.3. Post-Processing System
2.3.1. Image Preprocessing
2.3.2. Leaf Root Calibration
2.3.3. Calculation of Cutting Position and Angle
- Path Distance Recording.
- 2.
- Cutting Point Localization.
- 3.
- Leaf Tip Localization.
- 4.
- Cutting Angle Calculation.
2.4. Parameter Settings and Experimental Platform
2.4.1. Evaluation Metrics
2.4.2. Statistical Analysis
2.4.3. Model Training Parameters and Experimental Setup
3. Results
3.1. Experiment Comparing with Different Models
3.2. Effectiveness of the DFC Module
3.2.1. Spectral Analysis
3.2.2. Comparative Analysis
3.2.3. Verification of the DFC Dynamic Enhancement Mechanism
3.3. Ablation Study
3.3.1. Ablation Experiments of DRE-Former
3.3.2. Ablation Experiments of NEC Block
3.4. Stability and Error Analysis of Main Vein Length
3.5. Analysis of Post-Processing Accuracy
4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Bantis, F.; Koukounaras, A.; Siomos, A.S.; Dangitsis, C. Impact of Scion and Rootstock Seedling Quality Selection on the Vigor of Watermelon–Interspecific Squash Grafted Seedlings. Agriculture 2020, 10, 326. [Google Scholar] [CrossRef] [Scilit]
- Ding, X.; Wang, B.; He, Z.; Shi, Y.; Li, K.; Cui, Y.; Yang, Q. Fast and precise DEM parameter calibration for Cucurbita ficifolia seeds. Biosyst. Eng. 2023, 236, 258–276. [Google Scholar] [CrossRef] [Scilit]
- Ding, X.; Chen, T.; Wei, Y.; He, Z.; Cui, Y.; Yang, Q. Design and Implementation of the Positioning and Directing Precision Seeder for Cucurbita Ficifolia Seeds. Appl. Eng. Agric. 2024, 40, 1–14. [Google Scholar] [CrossRef] [Scilit]
- Yetısir, H.; Sari, N.; Yucel, S. Rootstock resistance to Fusarium wilt and effect on watermelon fruit yield and quality. Phytoparasitica 2003, 31, 163–169. [Google Scholar] [CrossRef] [Scilit]
- Thies, J.A.; Ariss, J.J.; Kousik, C.S.; Hassell, R.L.; Levi, A. Resistance to southern root-knot nematode (Meloidogyne incognita) in wild watermelon (Citrullus lanatus var. citroides). J. Nematol. 2016, 48, 14–19. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Nawaz, M.A.; Wang, L.; Jiao, Y.; Chen, C.; Zhao, L.; Mei, M.; Yu, Y.; Bie, Z.; Huang, Y. Pumpkin rootstock improves nitrogen use efficiency of watermelon scion by enhancing nutrient uptake, cytokinin content, and expression of nitrate reductase genes. Plant Growth Regul. 2017, 82, 233–246. [Google Scholar] [CrossRef] [Scilit]
- Yang, Y.; Lu, X.; Yan, B.; Li, B.; Sun, J.; Guo, S.; Tezuka, T. Bottle gourd rootstock-grafting affects nitrogen metabolism in NaCl-stressed watermelon leaves and enhances short-term salt tolerance. J. Plant Physiol. 2013, 170, 653–661. [Google Scholar] [CrossRef] [Scilit]
- Shi, X.; Wang, X.; Cheng, F.; Cao, H.; Liang, H.; Lu, J.; Kong, Q.; Bie, Z. iTRAQ-based quantitative proteomics analysis of cold stress-induced mechanisms in grafted watermelon seedlings. J. Proteom. 2019, 192, 311–320. [Google Scholar] [CrossRef] [Scilit]
- Yavuz, D.; Seymen, M.; Suheri, S.; Yavuz, N.; Turkmen, O.; Kurtar, E.S. How do rootstocks of citron watermelon (Citrullus lanatus var. citroides) affect the yield and quality of watermelon under deficit irrigation? Agric. Water Manag. 2020, 241, 106351. [Google Scholar] [CrossRef] [Scilit]
- Huang, Y.; Zhao, L.; Kong, Q.; Cheng, F.; Niu, M.; Xie, J.; Nawaz, M.A.; Bie, Z. Comprehensive mineral nutrition analysis of watermelon grafted onto two different rootstocks. Hortic. Plant J. 2016, 2, 105–113. [Google Scholar] [CrossRef] [Scilit]
- Hassell, R.L.; Memmott, F.; Liere, D.G. Grafting methods for watermelon production. HortScience 2008, 43, 1677–1679. [Google Scholar] [CrossRef] [Scilit]
- Lin, Y. The Optimization for the Rootstock’s Varieties and Key Technology of the Watermelon Grafted Seedlings. Master’s Thesis, Shanghai Jiao Tong University, Shanghai, China, 2015. [Google Scholar]
- Memmott, F.D.; Hassell, R.L. Watermelon (Citrullus lanatus) grafting method to reduce labor cost by eliminating rootstock side shoots. Acta Hortic. 2010, 871, 389–394. [Google Scholar] [CrossRef] [Scilit]
- Devi, P.; Lukas, S.; Miles, C. Advances in watermelon grafting to increase efficiency and automation. Horticulturae 2020, 6, 88. [Google Scholar] [CrossRef] [Scilit]
- Zheng, X.; Wang, X. Leaf Vein Extraction Using a Combined Operation of Mathematical Morphology. In Proceedings of the 2010 2nd International Conference on Information Engineering and Computer Science, Wuhan, China, 25–26 December 2010. [Google Scholar]
- Lee, K.B.; Hong, K.S. An implementation of leaf recognition system using leaf vein and shape. Int. J. Biosci. Biotechnol. 2013, 5, 57–66. [Google Scholar]
- Bühler, J.; Rishmawi, L.; Pflugfelder, D.; Huber, G.; Scharr, H.; Hülskamp, M.; Koornneef, M.; Schurr, U.; Jahnke, S. phenoVein—A tool for leaf vein segmentation and analysis. Plant Physiol. 2015, 169, 2359–2370. [Google Scholar] [CrossRef] [Scilit]
- Li, Y.; Zhang, H.; Yang, T.; Ma, Z.; Li, S. Vein detection method based on fuzzy logic and multiple order morphology. Sci. Silvae Sin. 2018, 54, 70–77. [Google Scholar]
- Selda, J.D.S.; Ellera, R.M.R.; Cajayon, L.C.; Vicerra, R.R.P.; Bandala, A.A.; Dadios, E.P. Plant identification by image processing of leaf veins. In Proceedings of the International Conference on Imaging, Signal Processing and Communication, Kuala Lumpur, Malaysia, 26–28 July 2017; pp. 40–44. [Google Scholar]
- Samanta, G.; Chakrabarti, A.; Bhattacharya, B.B. Extraction of leaf-vein parameters and classification of plants using machine learning. Proceedings of International Conference on Frontiers in Computing and Systems, Shillong, India, 29 September–1 October 2021; Springer: Singapore, 2021; pp. 579–586. [Google Scholar]
- Zhu, J.; Yao, J.; Yu, Q.; Zhang, B.; Li, B. A fast and automatic method for leaf vein network extraction and vein density measurement based on object-oriented classification. Front. Plant Sci. 2020, 11, 499. [Google Scholar] [CrossRef] [Scilit]
- Westphal, E.; Seitz, H. A machine learning method for defect detection and visualization in selective laser sintering based on convolutional neural networks. Addit. Manuf. 2021, 41, 101965. [Google Scholar] [CrossRef] [Scilit]
- Ulku, I.; Akagunduz, E. A survey on deep learning-based architectures for semantic segmentation on 2d images. Appl. Artif. Intell. 2022, 36, 2032924. [Google Scholar] [CrossRef] [Scilit]
- Lu, W.; Chen, J.; Xue, F. Using computer vision to recognize composition of construction waste mixtures: A semantic segmentation approach. Resour. Conserv. Recycl. 2022, 178, 106022. [Google Scholar] [CrossRef] [Scilit]
- Xu, H.; Blonder, B.; Jodra, M.; Maldonado, M.; Enquist, B.J.; Kerkhoff, A.J.; Wang, Z.; Wang, S.; Wang, R.; Wang, X.; et al. Automated and accurate segmentation of leaf venation networks via deep learning. New Phytol. 2021, 229, 631–648. [Google Scholar] [CrossRef] [Scilit]
- Yang, X.; Xia, X.; Zhang, Z.; Nong, B.; Li, D. Identification of anthocyanin biosynthesis genes in rice pericarp using PCAMP. Plant Biotechnol. J. 2019, 17, 1700–1702. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Li, L.; Hu, W.; Lu, J.; Zhang, H.; Luo, Q.; Wu, X. Leaf vein segmentation with self-supervision. Comput. Electron. Agric. 2022, 203, 107352. [Google Scholar] [CrossRef] [Scilit]
- Iwamasa, K.; Noshita, K. Network feature-based phenotyping of leaf venation robustly reconstructs the latent space. PLoS Comput. Biol. 2023, 19, e1010581. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Cai, W.; Wang, B.; Zeng, F. CUDU-Net: Collaborative up-sampling decoder U-Net for leaf vein segmentation. Digit. Signal Process. 2024, 144, 104287. [Google Scholar] [CrossRef] [Scilit]
- Deepalakshmi, P.; Lavanya, K. Plant leaf disease detection using CNN algorithm. Int. J. Inf. Syst. Model. Des. 2021, 12, 1–21. [Google Scholar] [CrossRef] [Scilit]
- Beikmohammadi, A.; Faez, K.; Motallebi, A. SWP-LeafNET: A novel multistage approach for plant leaf identification based on deep CNN. Expert Syst. Appl. 2022, 202, 117470. [Google Scholar] [CrossRef] [Scilit]
- Zifen, H.; Junxuan, H.; Qiang, L.; Yinhui, Z. High Precision Identification of Apple Leaf Diseases Based on Asymmetric Shuffle Convolution. J. Agric. Mach. 2021, 52, 221–230. [Google Scholar]
- Lu, L.; Hui, L.; Ran, S. Segmentation of Plant Leaves and Features Extraction Based on Muti-view and Time-series Image. J. Agric. Mach. 2022, 53, 253–260. [Google Scholar]
- Barth, R.; Ijsselmuiden, J.; Hemming, J.; Henten, E.V. Data synthesis methods for semantic segmentation in agriculture: A Capsicum annuum dataset. Comput. Electron. Agric. 2018, 144, 284–296. [Google Scholar] [CrossRef] [Scilit]
- Miao, C.; Xu, Z.; Rodene, E.; Yang, J.; Schnable, J.C. Semantic segmentation of sorghum using hyperspectral data identifies genetic associations. Plant Phenomics 2020, 2020, 4216373. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kolhar, S.; Jagtap, J. Convolutional neural network based encoder-decoder architectures for semantic segmentation of plants. Ecol. Inform. 2021, 64, 101373. [Google Scholar] [CrossRef] [Scilit]
- Masuda, T. Leaf area estimation by semantic segmentation of point cloud of tomato plants. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, BC, Canada, 11–17 October 2021; pp. 1381–1389. [Google Scholar]
- Howard, A.G.; Zhu, M.; Chen, B.; Kalenichenko, D.; Wang, W.; Weyand, T.; Andreetto, M.; Adam, H. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. arXiv 2017, arXiv:1704.04861. [Google Scholar] [CrossRef] [Scilit]
- Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv 2015, arXiv:1409.1556. [Google Scholar] [CrossRef] [Scilit]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. arXiv 2021, arXiv:2010.11929. [Google Scholar] [CrossRef] [Scilit]
- Zhu, Q.; Gao, Y.; Li, J. Influence of Different Clipping Areas for Rootstock Cotyledon on the Growth of Grafted Cucumber. Guizhou Agric. Sci. 2014, 42, 92–97. [Google Scholar]
- Minervini, M.; Fischbach, A.; Scharr, H.; Tsaftaris, S.A. Finely-grained annotated datasets for image-based plant phenotyping. Pattern Recognit. Lett. 2016, 81, 80–89. [Google Scholar] [CrossRef] [Scilit]
- Ubbens, J.R.; Stavness, I. Deep plant phenomics: A deep learning platform for complex plant phenotyping tasks. Front. Plant Sci. 2017, 8, 1190. [Google Scholar] [CrossRef] [Scilit]
- Ward, D.; Moghadam, P.; Hudson, N. Deep leaf segmentation using synthetic data. In Proceedings of the British Machine Vision Conference (BMVC), Newcastle, UK, 3–6 September 2018. [Google Scholar]
- Kline, D.M.; Berardi, V.L. Revisiting squared-error and cross-entropy functions for training neural network classifiers. Neural Comput. Appl. 2005, 14, 310–318. [Google Scholar] [CrossRef] [Scilit]
- Milletari, F.; Navab, N.; Ahmadi, S.A. V-net: Fully convolutional neural networks for volumetric medical image segmentation. In Proceedings of the 2016 Fourth International Conference on 3D Vision (3DV), Stanford, CA, USA, 25–28 October 2016; pp. 565–571. [Google Scholar]
- Chen, L.C.; Zhu, Y.; Papandreou, G.; Schroff, F.; Adam, H. Encoder-decoder with atrous separable convolution for semantic image segmentation. In Computer Vision–ECCV 2018; Springer: Cham, Switzerland, 2018; pp. 801–818. [Google Scholar]
- Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional Networks for Biomedical Image Segmentation. In Medical Image Computing and Computer-Assisted Intervention–MICCAI 2015; Springer: Cham, Switzerland, 2015; pp. 234–241. [Google Scholar]
- Zhong, C.; Hu, Z.; Li, M.; Wang, K.; Li, J. Real-time semantic segmentation model for crop disease leaves using group attention module. Trans. Chin. Soc. Agric. Eng. 2021, 37, 208–215. [Google Scholar]
- Cao, H.; Wang, Y.; Chen, J.; Jiang, D.; Zhang, X.; Tian, Q.; Wang, M. Swin-UNet: UNet-Like Pure Transformer for Medical Image Segmentation. In Computer Vision–ECCV 2022 Workshops; Springer: Cham, Switzerland, 2023; pp. 205–218. [Google Scholar]
- Chen, P.; Ma, Z.; Zhang, J.; Xia, Y.; Wang, B.; Liang, D. Semantic segmentation network based on attention mechanism for wheat FHB. J. Chin. Agric. Mech. 2023, 44, 145–152. [Google Scholar]
- Chen, J.; Lu, Y.; Yu, Q.; Luo, X.; Adeli, E.; Wang, Y.; Lu, L.; Yuille, A.L.; Zhou, Y. TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation. arXiv 2021, arXiv:2102.04306. [Google Scholar] [CrossRef] [Scilit]
- Wang, N.; Wu, Q.; Gui, Y.; Hu, Q.; Li, W. Cross-Modal Segmentation Network for Winter Wheat Mapping in Com-plex Terrain Using Remote-Sensing Multi-Temporal Images and DEM Data. Remote Sens. 2024, 16, 1775. [Google Scholar] [CrossRef] [Scilit]
- Chen, J.; Sun, L.; Song, Y.; Geng, Y.; Xu, H.; Xu, W. 3D Surface Highlight Removal Method Based on Detection Mask. Arab. J. Sci. Eng. 2025, 1–13. [Google Scholar] [CrossRef] [Scilit]














| Model | Backgrounds | Main Vein | Branch Veins | mIoU (%) | mF1 (%) | OA (%) | |||
|---|---|---|---|---|---|---|---|---|---|
| IOU (%) | F1 (%) | IOU (%) | F1 (%) | IOU (%) | F1 (%) | ||||
| Deeplabv3+ | 95.13 ± 0.02 | 97.51 ± 0.02 | 78.37 ± 0.09 | 82.97 ± 0.09 | 75.56 ± 0.11 | 80.37 ± 0.11 | 83.02 ± 0.06 | 86.95 ± 0.06 | 84.46 ± 1.03 |
| UNet | 95.27 ± 0.02 | 97.32 ± 0.02 | 80.11 ± 0.09 | 84.49 ± 0.09 | 76.58 ± 0.11 | 80.92 ± 0.11 | 83.98 ± 0.06 | 87.57 ± 0.06 | 86.28 ± 0.98 |
| GAM-Seg | 95.56 ± 0.02 | 97.62 ± 0.02 | 83.45 ± 0.09 | 87.19 ± 0.09 | 78.27 ± 0.11 | 83.68 ± 0.11 | 85.76 ± 0.06 | 89.49 ± 0.06 | 88.39 ± 0.91 |
| SwinUNet | 95.79 ± 0.02 | 97.43 ± 0.02 | 85.39 ± 0.09 | 89.26 ± 0.09 | 80.42 ± 0.11 | 84.53 ± 0.11 | 87.20 ± 0.06 | 90.40 ± 0.06 | 87.62 ± 0.94 |
| UNetA | 96.05 ± 0.02 | 97.84 ± 0.02 | 87.64 ± 0.09 | 91.44 ± 0.09 | 82.79 ± 0.11 | 87.74 ± 0.11 | 88.82 ± 0.06 | 92.34 ± 0.06 | 88.57 ± 0.90 |
| TransUNet | 95.83 ± 0.02 | 97.13 ± 0.02 | 86.45 ± 0.09 | 92.21 ± 0.09 | 81.16 ± 0.11 | 88.28 ± 0.11 | 87.81 ± 0.06 | 92.54 ± 0.06 | 89.83 ± 0.86 |
| DRE-Former | 96.57 ± 0.02 | 98.02 ± 0.02 | 90.21 ± 0.09 | 94.21 ± 0.09 | 85.63 ± 0.11 | 89.70 ± 0.11 | 90.80 ± 0.06 | 93.97 ± 0.06 | 95.88 ± 0.56 |
| Model | BF-Score (%) | Params (M) | FPS | |
|---|---|---|---|---|
| Main Vein | Branch Veins | |||
| Deeplabv3+ | 72.13 | 68.51 | 54.68 | 38 |
| UNet | 75.82 | 71.25 | 24.89 | 42 |
| GAM-Seg | 78.91 | 74.66 | 46.53 | 29 |
| SwinUNet | 81.54 | 77.38 | 89.53 | 21 |
| UNetA | 83.78 | 79.12 | 37.41 | 34 |
| TransUNet | 84.23 | 79.84 | 67.97 | 27 |
| DRE-Former | 87.56 | 83.21 | 72.42 | 26 |
| Expert 1 | Expert 2 | Expert 3 | IOU (%) | mIoU (%) | OA (%) | ||
|---|---|---|---|---|---|---|---|
| Backgrounds | Main Vein | Branch Veins | |||||
| 95.83 | 86.45 | 81.16 | 87.81 | 89.83 | |||
| √ | 95.96 | 87.28 | 82.81 | 88.68 | 90.36 | ||
| √ | √ | 96.27 | 89.61 | 84.94 | 90.27 | 94.97 | |
| √ | √ | √ | 96.57 | 90.21 | 85.63 | 90.80 | 95.88 |
| Model | IOU (%) | mIoU (%) | OA (%) | ||
|---|---|---|---|---|---|
| Backgrounds | Main Vein | Branch Veins | |||
| SE | 95.80 | 87.50 | 82.00 | 88.43 | 94.00 |
| ECA | 95.96 | 87.28 | 82.81 | 88.68 | 90.36 |
| CBAM | 96.27 | 89.61 | 84.94 | 90.27 | 94.97 |
| NEC | 96.57 | 90.21 | 85.63 | 90.80 | 95.88 |
| Target | True Length (mm) | Pitch Angle (deg) | Max Segmentation Length (mm) | Min Segmentation Length (mm) | Average Segmentation Ratio (%) | Relative Error (%) | Standard Deviation |
|---|---|---|---|---|---|---|---|
| 1 | 49 | 32.05 | 44.52 | 42.15 | 88.78 | 11.22 | 0.67 |
| 2 | 46 | 28.57 | 41.58 | 40.02 | 88.84 | 11.16 | 0.44 |
| 3 | 45 | 38.48 | 40.93 | 38.77 | 87.87 | 12.13 | 0.68 |
| 4 | 44 | 34.62 | 39.95 | 37.79 | 88.83 | 11.17 | 0.54 |
| 5 | 45 | 36.87 | 40.91 | 38.73 | 88.16 | 11.84 | 0.68 |
| 6 | 42 | 31.59 | 37.86 | 35.92 | 87.89 | 12.11 | 0.63 |
| 7 | 52 | 27.49 | 47.01 | 44.91 | 87.29 | 12.71 | 0.63 |
| 8 | 46 | 21.69 | 41.13 | 39.24 | 87.14 | 12.86 | 0.47 |
| 9 | 47 | 46.34 | 42.65 | 40.48 | 88.42 | 11.58 | 0.59 |
| 10 | 45 | 41.81 | 40.66 | 38.77 | 87.89 | 12.11 | 0.57 |
| 11 | 54 | 46.24 | 48.73 | 46.36 | 88.18 | 11.82 | 0.69 |
| 12 | 43 | 37.20 | 38.67 | 36.78 | 87.93 | 12.08 | 0.60 |
| Group | Theoretical Number | Accurate Number | Accuracy (%) |
|---|---|---|---|
| 1 | 174 | 169 | 97.12 |
| 2 | 183 | 180 | 98.36 |
| 3 | 178 | 174 | 97.75 |
| 4 | 184 | 178 | 96.73 |
| 5 | 175 | 171 | 97.71 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Xu, Y.; Jiang, H.; Qi, X.; Chen, C.; Lü, G.; Gao, H.; Wang, Y.; Li, J. Pumpkin Seedling Leaf Vein Extraction System Based on Deep Learning and Rule-Based Methods. Agriculture 2026, 16, 194. https://doi.org/10.3390/agriculture16020194
Xu Y, Jiang H, Qi X, Chen C, Lü G, Gao H, Wang Y, Li J. Pumpkin Seedling Leaf Vein Extraction System Based on Deep Learning and Rule-Based Methods. Agriculture. 2026; 16(2):194. https://doi.org/10.3390/agriculture16020194
Chicago/Turabian StyleXu, Yuan, Haiyong Jiang, Xiaona Qi, Chongchong Chen, Guiyun Lü, Hongbo Gao, Yu Wang, and Jian Li. 2026. "Pumpkin Seedling Leaf Vein Extraction System Based on Deep Learning and Rule-Based Methods" Agriculture 16, no. 2: 194. https://doi.org/10.3390/agriculture16020194
APA StyleXu, Y., Jiang, H., Qi, X., Chen, C., Lü, G., Gao, H., Wang, Y., & Li, J. (2026). Pumpkin Seedling Leaf Vein Extraction System Based on Deep Learning and Rule-Based Methods. Agriculture, 16(2), 194. https://doi.org/10.3390/agriculture16020194

