An Accurate Optimized Contour Segmentation Model for Green Spherical Fruits
Abstract
1. Introduction
- (1)
- An accurate optimal contour segmentation model for green spherical fruits is proposed, and better results are achieved with two spherical green fruits, green persimmon and green apple.
- (2)
- After the backbone network, PAB FPN is used to enhance the multilevel features of the fruits by deeply integrating the balanced semantic features and embedding the attention mechanism.
- (3)
- We introduce cycleMLP, which optimizes the initial contour deformation module with stepwise style-sampling points to expand the receptive field and aggregate better contextual information about the fruit contour.
2. Materials and Methods
2.1. Fruit Dataset
2.1.1. Dataset Collection
2.1.2. Dataset Production
2.2. Optimized Contour Segmentation Model
2.2.1. Backbone Network DLA34
2.2.2. PAB-FPN
2.2.3. Segmentation Network
2.2.4. Loss Function
3. Experimental Setup and Result Analysis
3.1. Experimental Platform
3.2. Assessment Indicators
3.3. Model Segmentation Effect and Analysis
3.4. Algorithms Comparison
4. Discussion of Results
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Anjali; Jena, A.; Bamola, A.; Mishra, S.; Jain, I.; Pathak, N.; Sharma, N.; Joshi, N.; Pandey, R.; Kaparwal, S.; et al. State-of-the-art non-destructive approaches for maturity index determination in fruits and vegetables: Principles, applications, and future directions. Food Production. Process. Nutr. 2024, 6, 56. [Google Scholar]
- Costa, L.; Ampatzidis, Y.; Rohla, C.; Maness, N.; Cheary, B.; Zhang, L. Measuring pecan nut growth utilizing machine vision and deep learning for the better understanding of the fruit growth curve. Comput. Electron. Agric. 2021, 181, 105964. [Google Scholar] [CrossRef]
- Tang, Y.; Chen, M.; Wang, C.; Luo, L.; Li, J.; Lian, G.; Zou, X. Recognition and localization methods for vision-based fruit picking robots: A review. Front. Plant Sci. 2020, 11, 510. [Google Scholar] [CrossRef] [PubMed]
- Hou, G.; Chen, H.; Jiang, M.; Niu, R. An overview of the application of machine vision in recognition and localization of fruit and vegetable harvesting robots. Agriculture 2023, 13, 1814. [Google Scholar] [CrossRef]
- Wei, X.; Jia, K.; Lan, J.; Li, Y.; Zeng, Y.; Wang, C. Automatic method of fruit object extraction under complex agricultural background for vision system of fruit picking robot. Opt. Int. J. Light Electron Opt. 2014, 125, 5684–5689. [Google Scholar] [CrossRef]
- Xiao, F.; Wang, H.; Li, Y.; Cao, Y.; Lv, X.; Xu, G. Object detection and recognition techniques based on digital image processing and traditional machine learning for fruit and vegetable harvesting robots: An overview and review. Agronomy 2023, 13, 639. [Google Scholar] [CrossRef]
- Luo, J.; Li, B.; Leung, C. A survey of computer vision technologies in urban and controlled-environment agriculture. ACM Comput. Surv. 2023, 56, 1–39. [Google Scholar] [CrossRef]
- Tian, H.; Wang, T.; Liu, Y.; Qiao, X.; Li, Y. Computer vision technology in agricultural automation—A review. Inf. Process. Agric. 2020, 7, 1–19. [Google Scholar] [CrossRef]
- Apolo-Apolo, O.; Martínez-Guanter, J.; Egea, G.; Raja, P.; Pérez-Ruiz, M. Deep learning techniques for estimation of the yield and size of citrus fruits using a UAV. Eur. J. Agron. 2020, 115, 126030. [Google Scholar] [CrossRef]
- Qiu, C.; Tian, G.; Zhao, J.; Liu, Q.; Xie, S.; Zheng, K. Grape Maturity Detection and Visual Pre-Positioning Based on Improved Yolov4. Electronics 2022, 11, 2677. [Google Scholar] [CrossRef]
- Liu, X.; Zhao, D.; Jia, W.; Ji, W.; Ruan, C.; Sun, Y. Cucumber fruits detection in greenhouses based on instance segmentation. IEEE Access 2019, 7, 139635–139642. [Google Scholar] [CrossRef]
- Jiang, S.; Liu, Z.; Hua, J.; Zhang, Z.; Zhao, S.; Xie, F.; Ao, J.; Wei, Y.; Lu, J.; Li, Z.; et al. A Real-Time Detection and Maturity Classification Method for Loofah. Agronomy 2023, 13, 2144. [Google Scholar] [CrossRef]
- Mhamed, M.; Zhang, Z.; Yu, J.; Li, Y.; Zhang, M. Advances in apple’s automated orchard equipment: A Comprehensive Research. Comput. Electron. Agric. 2024, 221, 108926. [Google Scholar]
- Arefi, A.; Motlagh, A.M.; Mollazade, K.; Teimourlou, R.F. Recognition and localization of ripen tomato based on machine vision. Aust. J. Crop Sci. 2011, 5, 1144–1149. [Google Scholar]
- Sun, M.; Xu, L.; Chen, X.; Ji, Z.; Zheng, Y.; Jia, W. BFP net: Balanced feature pyramid network for small apple detection in complex orchard environment. Plant Phenomics 2022, 2022, 9892464. [Google Scholar] [CrossRef] [PubMed]
- Kang, H.; Chen, C. Fruit detection, segmentation and 3D visualisation of environments in apple orchards. Comput. Electron. Agric. 2020, 171, 105302. [Google Scholar] [CrossRef]
- Jia, W.; Tian, Y.; Luo, R.; Zhang, Z.; Lian, J.; Zheng, Y. Detection and segmentation of overlapped fruits based on optimized mask R-CNN application in apple harvesting robot. Comput. Electron. Agric. 2020, 172, 105380. [Google Scholar] [CrossRef]
- Mu, Y.; Chen, T.-S.; Ninomiya, S.; Guo, W. Intact detection of highly occluded immature tomatoes on plants using deep learning techniques. Sensors 2020, 20, 2984. [Google Scholar] [CrossRef] [PubMed]
- Sun, M.; Xu, L.; Luo, R.; Lu, Y.; Jia, W. GHFormer-Net: Towards more accurate small green apple/begonia fruit detection in the nighttime. J. King Saud Univ.-Comput. Inf. Sci. 2022, 34, 4421–4432. [Google Scholar] [CrossRef]
- Ling, H.; Gao, J.; Kar, A.; Chen, W.; Fidler, S. Fast interactive object annotation with curve-gcn. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 5257–5266. [Google Scholar]
- Jia, W.; Liu, M.; Luo, R.; Wnag, C.; Pan, N.; Yang, X.; Ge, X. YOLOF-Snake: An efficient segmentation model for green object fruit. Front. Plant Sci. 2022, 13, 765523. [Google Scholar] [CrossRef]
- Liu, Z.; Liew, J.H.; Chen, X.; Feng, J. Dance: A deep attentive contour model for efficient instance segmentation. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, Virtual, 5–9 January 2021; pp. 345–354. [Google Scholar]
- Zhang, T.; Wei, S.; Ji, S. E2ec: An end-to-end contour-based method for high-quality high-speed instance segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 18–24 June 2022; pp. 4443–4452. [Google Scholar]
- Russell, B.C.; Torralba, A.; Murphy, K.P.; Freeman, W.T. LabelMe: A database and web-based tool for image annotation. Int. J. Comput. Vis. 2008, 77, 157–173. [Google Scholar] [CrossRef]
- Lin, T.Y.; Maire, M.; Belongie, S.; Hays, J.; Perona, P.; Ramanan, D.; Dollár, P.; Zitnick, C.L. Microsoft coco: Common objects in context. In Computer Vision–ECCV 2014, Proceedings of the 13th European Conference, Zurich, Switzerland, 6–12 September 2014; Proceedings, Part V 13; Springer International Publishing: Berlin/Heidelberg, Germany, 2014; pp. 740–755. [Google Scholar]
- Yu, F.; Wang, D.; Shelhamer, E.; Darrell, T. Deep layer aggregation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 2403–2412. [Google Scholar]
- Liu, S.; Qi, L.; Qin, H.; Shi, J.; Jia, J. Path aggregation network for instance segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 8759–8768. [Google Scholar]
- Wang, C.Y.; Liao, H.Y.; Wu, Y.H.; Chen, P.Y.; Hsieh, J.W.; Yeh, I.H. CSPNet: A new backbone that can enhance learning capability of CNN. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, Seattle, WA, USA, 14–19 June 2020; pp. 390–391. [Google Scholar]
- Ge, Z.; Liu, S.; Wang, F.; Li, Z.; Sun, J. Yolox: Exceeding yolo series in 2021. arXiv 2021, arXiv:2107.08430. [Google Scholar]
- Pang, J.; Chen, K.; Shi, J.; Feng, H.; Ouyang, W.; Lin, D. Libra r-cnn: Towards balanced learning for object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 821–830. [Google Scholar]
- Wang, X.; Girshick, R.; Gupta, A.; He, K. Non-local neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 7794–7803. [Google Scholar]
- Chen, S.; Xie, E.; Ge, C.; Chen, R.; Liang, D.; Luo, P. Cyclemlp: A mlp-like architecture for dense prediction. arXiv 2021, arXiv:2107.10224. [Google Scholar] [CrossRef]
- Peng, S.; Jiang, W.; Pi, H.; Li, X.; Bao, H.; Zhou, X. Deep snake for real-time instance segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 14–19 June 2020; pp. 8533–8542. [Google Scholar]
- Duan, K.; Bai, S.; Xie, L.; Qi, H.; Huang, Q.; Tian, Q. Centernet: Keypoint triplets for object detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; pp. 6569–6578. [Google Scholar]
- Girshick, R. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, Santiago, Chile, 7–13 December 2015; pp. 1440–1448. [Google Scholar]
- Paszke, A. Pytorch: An imperative style, high-performance deep learning library. arXiv 2019, arXiv:1912.01703. [Google Scholar]
- Chen, K.; Wang, J.; Pang, J.; Cao, Y.; Xiong, Y.; Li, X.; Sun, S.; Feng, W.; Liu, Z.; Xu, J.; et al. MMDetection: Open mmlab detection toolbox and benchmark. arXiv 2019, arXiv:1906.07155. [Google Scholar]
- Deng, J.; Dong, W.; Socher, R.; Li, L.J.; Li, K.; Fei-Fei, L. Imagenet: A large-scale hierarchical image database. In Proceedings of the 2009 IEEE Conference on Computer Vision and Pattern Recognition, Miami, FL, USA, 20–25 June 2009. [Google Scholar] [CrossRef]
- Bolya, D.; Zhou, C.; Xiao, F.; Lee, Y.J. Yolact: Real-time instance segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; pp. 9157–9166. [Google Scholar]
- Zhang, Y.; Chu, J.; Leng, L.; Miao, J. Mask-refined R-CNN: A network for refining object details in instance segmentation. Sensors 2020, 20, 1010. [Google Scholar] [CrossRef]
- He, K.; Gkioxari, G.; Dollár, P.; Girshick, R. Mask r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2961–2969. [Google Scholar]
- Tian, Z.; Shen, C.; Wang, X.; Chen, H. Boxinst: High-performance instance segmentation with box annotations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA, 19–25 June 2021; pp. 5443–5452. [Google Scholar]
- Tian, Z.; Shen, C.; Chen, H. Conditional convolutions for instance segmentation. In Computer Vision–ECCV 2020, Proceedings of the 16th European Conference, Glasgow, UK, 23–28 August 2020; Proceedings, Part I 16; Springer International Publishing: Berlin/Heidelberg, Germany, 2020; pp. 282–298. [Google Scholar]
- Yang, R.; Song, L.; Ge, Y.; Li, X. BoxSnake: Polygonal Instance Segmentation with Box Supervision. arXiv 2023, arXiv:2303.11630. [Google Scholar]
- Lazarow, J.; Xu, W.; Tu, Z. Instance segmentation with mask-supervised polygonal boundary transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 18–24 June 2022; pp. 4382–4391. [Google Scholar]
Apple Dataset | |||||
Area | Small | Medium | Large | Fruit Total | Image Total |
Train | 1701/34% | 2007/41% | 1235/25% | 4943 | 953 |
Val | 851/39% | 816/37% | 527/24% | 2194 | 408 |
Total | 2552/36% | 2823/39% | 1762/25% | 7137 | 1361 |
Persimmon Dataset | |||||
Area | Small | Medium | Large | Fruit Total | Image Total |
Train | 272/15% | 1111/59% | 482/26% | 1865 | 388 |
Val | 47/7% | 415/63% | 197/30% | 659 | 165 |
Total | 319/13% | 1256/60% | 679/27% | 2524 | 553 |
Persimmon | Apple | ||||||
---|---|---|---|---|---|---|---|
Segm | Bbox | Segm | Bbox | ||||
Metric | Value/% | Metric | Value/% | Metric | Value/% | Metric | Value/% |
75.5 | 75.1 | 57.8 | 60.3 | ||||
91.3 | 90.7 | 84.1 | 85.4 | ||||
25.0 | 28.8 | 36.4 | 39.9 | ||||
76.6 | 76.9 | 65.1 | 68.4 | ||||
91.6 | 90.6 | 90.0 | 91. | ||||
mAR | 80.4 | mAR | 80.3 | mAR | 64.0 | mAR | 65.8 |
45.7 | 41.0 | 47.5 | 49.2 | ||||
81.7 | 82.3 | 71.1 | 73. | ||||
94.5 | 94.4 | 92.8 | 93.8 |
Methods | Persimmon Dataset | Apple Dataset | ||
---|---|---|---|---|
mAPs/% | mAPd/% | mAPs/% | mAPd/% | |
BoxSnake | 62.6 | 67.6 | 50.6 | 59.5 |
Bounda | 65.5 | 66.4 | 53.4 | 56.2 |
BoxInst | 68.9 | 71.5 | 50.8 | 59.7 |
YOLACT | 63.1 | 59.2 | 50.1 | 51.8 |
CondInst | 70.7 | 72.2 | 56.6 | 60.6 |
MS_RCNN | 71.7 | 71.8 | 57.0 | 60.7 |
Mask_RCNN | 72.1 | 72.4 | 57.2 | 60.2 |
Yolov8-Seg | 74.4 | 73.2 | 57.0 | 59.1 |
E2EC | 73.3 | 72.7 | 56.6 | 58.5 |
Ours | 75.5 | 75.1 | 57.8 | 60.3 |
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. |
© 2025 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhang, T.; Xu, Y.; Cao, K.; Chen, X.; Liu, Q.; Jia, W. An Accurate Optimized Contour Segmentation Model for Green Spherical Fruits. Horticulturae 2025, 11, 761. https://doi.org/10.3390/horticulturae11070761
Zhang T, Xu Y, Cao K, Chen X, Liu Q, Jia W. An Accurate Optimized Contour Segmentation Model for Green Spherical Fruits. Horticulturae. 2025; 11(7):761. https://doi.org/10.3390/horticulturae11070761
Chicago/Turabian StyleZhang, Ting, Ying Xu, Kai Cao, Xiude Chen, Qiaolian Liu, and Weikuan Jia. 2025. "An Accurate Optimized Contour Segmentation Model for Green Spherical Fruits" Horticulturae 11, no. 7: 761. https://doi.org/10.3390/horticulturae11070761
APA StyleZhang, T., Xu, Y., Cao, K., Chen, X., Liu, Q., & Jia, W. (2025). An Accurate Optimized Contour Segmentation Model for Green Spherical Fruits. Horticulturae, 11(7), 761. https://doi.org/10.3390/horticulturae11070761