A Segment Anything Model for Melon Pruning Based on Diameter
Received: 17 May 2025 | Revised: 11 July 2025 and 17 July 2025 | Accepted: 19 July 2025 | Online: 6 October 2025
Corresponding author: Sudianto Sudianto
Abstract
Melon is a horticultural commodity with high economic value and great potential for cultivation. One important technique to enhance fruit quality is pruning, which limits the number of fruits per plant so that photosynthetic energy is focused on selected fruits. This study aims to implement the Segment Anything Model (SAM) to support pruning decisions by segmenting melon images and measuring their diameters automatically. SAM is a pre-trained model designed to generalize across a wide range of image segmentation tasks. To adapt it for melon imagery, the model was fine-tuned using a specific dataset of melon images under three different optimizer settings: Adam, AdamW, and Stochastic Gradient Descent (SGD). The performance of each configuration was evaluated using two standard metrics, Intersection over Union (IoU) and Dice coefficient. The results showed that the best configuration achieved a segmentation accuracy of up to 0.9 on both metrics. These findings indicate that SAM is capable of precisely identifying and measuring melon diameters, thus providing a reliable and efficient decision-support tool for optimizing pruning strategies and improving overall fruit quality in melon cultivation.
Keywords:
melon fruit, pruning, segmentation, fine-tuning, Segment Anything Model (SAM)Downloads
References
F. Nugraha, S. Suriyanti, and M. S. Gani, "Pengaruh Perlakuan Pupuk Hayati Bioneensis Dan Media Tanam Terhadap Pertumbuhan Dan Produksi Tanaman Melon (Cucumis melo L.)," AGrotekMAS Jurnal Indonesia: Jurnal Ilmu Peranian, vol. 4, no. 3, pp. 317–322, Dec. 2023.
B. Mahendra, S. Suwali, A. Priambodo, and M. Sulaeman, "Increasing Melon Farmers Income through Agribusiness Development Strategies," Perwira International Journal of Economics & Business, vol. 2, no. 1, pp. 9–16, July 2022.
E. Alfareza and T. Erlina, "Sistem Pemberian Air Dan Pupuk Pada Tanaman Melon Menggunakan Irigasi Tetes," Chipset, vol. 4, no. 02, pp. 107–118, Oct. 2023.
L. Narayanan et al., "Nutritional and Therapeutic Potential of Bioactive Compounds from Melons: A Mini Review," Journal of microbiology, biotechnology and food sciences, vol. 14, no. 3, pp. e11877–e11877, Oct. 2024.
G. Zhang, Z. Li, L. Liu, and Q. Xiang, "Road to valorisation of melon seeds (Cucumis melo L.): a comprehensive review of nutritional profiles, biological activities, and food applications," Sustainable Food Technology, vol. 2, no. 5, pp. 1166–1182, Sept. 2024.
"Produksi Tanaman Buah-buahan - Tabel Statistik." Badan Pusat Statistik. https://www.bps.go.id/id/statistics-table/2/NjIjMg==/produksi-tanaman-buah-buahan.html.
E. Irawan, A. Agustono, and I. S. Andriani, "Pola Alokasi Buruh Tani dan Pengaruhnya Terhadap Produktivitas Usahatani Melon: Pendekatan Generalized Additive Model," Journal of Social and Agricultural Economics, vol. 16, no. 2, pp. 159–172, Aug. 2023.
S. Laudji, N. Musa, and M. Lihawa, "Peningkatan Produksi Melon (Cucumis melo L.) Melalui Pemangkasan Pucuk dan Pemanfaatan Ekstrak Selasih Ungu Sebagai Atraktan Terhadap Lalat Buah (Bactrocera cucurbitae Coquilett)," Jurnal Agroteknotropika, vol. 10, no. 2, pp. 1–10, Dec. 2021.
H. Yaro, D. I. Adepke, A. Ahmed, and D. M. Katung, "Effect of Pruning on the Growth and Yield of Indeterminate and Determinate Tomato Variety in the Northern Guinea Savanna of Nigeria," International Journal of Innovative Science and Research Technology, vol. 9, no. 8, pp. 2756–2768, Aug. 2024.
D. N. Fitriani, N. Musa, and W. Pembengo, "Respon Pertumbuhan Dan Produksi Tanaman Melon (Cucumismelol) Pada Pemupukan Npk Dan Pemangkasan Cabang," Jurnal Lahan Pertanian Tropis, vol. 1, no. 2, pp. 5–9, Dec. 2022.
G. L. da Silva et al., "Effects of Fruit Thinning and Main Stem Pruning in Melon Crops," Journal of Experimental Agriculture International, vol. 39, no. 3, pp. 1–10, July 2019.
N. A. E. Budiarti, S. Wahjuni, W. B. Suwarno, and Wulandari, "Research on Melon Fruit Selection Based on Rank with YOLOv4 Algorithm," Journal of Physics: Conference Series, vol. 2123, no. 1, Nov. 2021, Art. no. 012036.
A. Kirillov et al., "Segment Anything." arXiv, Apr. 05, 2023.
Y. Zhang and R. Jiao, "How Segment Anything Model (Sam) Boost Medical Image Segmentation: A Survey." Social Science Research Network, June 29, 2023.
A. S. Geetha and M. Hussain, "From SAM to SAM 2: Exploring Improvements in Meta's Segment Anything Model." arXiv, Aug. 12, 2024.
B. Varadarajan et al., "SqueezeSAM: User friendly mobile interactive segmentation." arXiv, May 20, 2024.
B.-U. Shin, "Development of YOLOv8 and Segment Anything Model Algorithm-Based Hanok Object Detection Model for Sustainable Maintenance of Hanok Architecture," Sustainability, vol. 16, no. 9, May 2024, Art. no. 3775.
C. Zhang et al., "A Survey on Segment Anything Model (SAM): Vision Foundation Model Meets Prompt Engineering." arXiv, Oct. 19, 2024.
R. Zhang et al., "Personalize Segment Anything Model with One Shot." arXiv, Oct. 04, 2023.
L. Nanni, D. Fusaro, C. Fantozzi, and A. Pretto, "Improving Existing Segmentators Performance with Zero-Shot Segmentators," Entropy, vol. 25, no. 11, Nov. 2023, Art. no. 1502.
L. P. Osco et al., "The Segment Anything Model (SAM) for remote sensing applications: From zero to one shot," International Journal of Applied Earth Observation and Geoinformation, vol. 124, Nov. 2023, Art. no. 103540.
L. Zhang et al., "Segment Anything Model (SAM) for Radiation Oncology." arXiv, July 04, 2023.
Y. Zhang, T. Zhou, S. Wang, P. Liang, and D. Z. Chen, "Input Augmentation with SAM: Boosting Medical Image Segmentation with Segmentation Foundation Model." arXiv, June 21, 2023.
M. A. Mazurowski, H. Dong, H. Gu, J. Yang, N. Konz, and Y. Zhang, "Segment anything model for medical image analysis: An experimental study," Medical Image Analysis, vol. 89, Oct. 2023, Art. no. 102918.
A. Vaswani et al., "Attention Is All You Need." arXiv, Aug. 02, 2023.
T. B. Brown et al., "Language Models are Few-Shot Learners." arXiv, July 22, 2020.
A. Dosovitskiy et al., "An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale." arXiv, June 03, 2021.
J. Ma, Y. He, F. Li, L. Han, C. You, and B. Wang, "Segment anything in medical images," Nature Communications, vol. 15, no. 1, Jan. 2024, Art. no. 654.
Y. Li, D. Wang, C. Yuan, H. Li, and J. Hu, "Enhancing Agricultural Image Segmentation with an Agricultural Segment Anything Model Adapter," Sensors, vol. 23, no. 18, Sept. 2023, Art. no. 7884.
R. V. V. Krishna and S. S. Kumar, "Hybridizing Differential Evolution with a Genetic Algorithm for Color Image Segmentation," Engineering, Technology & Applied Science Research, vol. 6, no. 5, pp. 1182–1186, Oct. 2016.
J. Kang et al., "A Point Cloud Segmentation Method for Dim and Cluttered Underground Tunnel Scenes Based on the Segment Anything Model," Remote Sensing, vol. 16, no. 1, Jan. 2024, Art. no. 97.
R. A. Zakiah, S. Wahjuni, and W. B. Suwarno, "Pemilihan Algoritma Machine Learning untuk Perangkat dengan Komputasi Terbatas pada Deteksi Kematangan Buah Melon Berjala," Jurnal Ilmu Komputer dan Agri-Informatika, vol. 10, no. 2, pp. 189–199, Nov. 2023.
B. Gharnali and S. Alipour, "MRI Image Segmentation Using Conditional Spatial FCM Based on Kernel-Induced Distance Measure," Engineering, Technology & Applied Science Research, vol. 8, no. 3, pp. 2985–2990, June 2018.
A. N. Saeed, "A Machine Learning based Approach for Segmenting Retinal Nerve Images using Artificial Neural Networks," Engineering, Technology & Applied Science Research, vol. 10, no. 4, pp. 5986–5991, Aug. 2020.
"What is data annotation? Complete tool guide 2025." SuperAnnotate. https://www.superannotate.com/blog/data-annotation-guide.
Y. Wang, U. Ahsan, H. Li, and M. Hagen, "A Comprehensive Review of Modern Object Segmentation Approaches," Foundations and Trends® in Computer Graphics and Vision, vol. 13, no. 2–3, pp. 111–283, 2022.
D. Cheng, Z. Qin, Z. Jiang, S. Zhang, Q. Lao, and K. Li, "SAM on Medical Images: A Comprehensive Study on Three Prompt Modes." arXiv, Apr. 28, 2023.
G. Boesch, "Segment Anything Model (SAM) - The Complete Guide." viso.ai. https://viso.ai/deep-learning/segment-anything-model-sam-explained/.
L. Zhang, X. Deng, and Y. Lu, "Segment Anything Model (SAM) for Medical Image Segmentation: A Preliminary Review," in 2023 IEEE International Conference on Bioinformatics and Biomedicine, Istanbul, Turkiye, 2023, pp. 4187–4194.
S. Gon Park et al., "Deep Learning Model for Real time Semantic Segmentation During Intraoperative Robotic Prostatectomy," European Urology Open Science, vol. 62, pp. 47–53, Apr. 2024.
G. V. Vlăsceanu, N. Tarbă, M. L. Voncilă, and C. A. Boiangiu, "Selecting the Right Metric: A Detailed Study on Image Segmentation Evaluation," BRAIN. Broad Research in Artificial Intelligence and Neuroscience, vol. 15, no. 4, pp. 295–318, Dec. 2024.
D. Müller, I. Soto-Rey, and F. Kramer, "Towards a guideline for evaluation metrics in medical image segmentation," BMC Research Notes, vol. 15, no. 1, June 2022, Art. no. 210.
H. Rezatofighi, N. Tsoi, J. Gwak, A. Sadeghian, I. Reid, and S. Savarese, "Generalized Intersection Over Union: A Metric and a Loss for Bounding Box Regression," in 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 2019, pp. 658–666.
G. Travieso, A. Benatti, and L. da F. Costa, "An Analytical Approach to the Jaccard Similarity Index." arXiv, Oct. 21, 2024.
L. da F. Costa, "Further Generalizations of the Jaccard Index." arXiv, Nov. 18, 2021.
L. Harisha, "Dice Coefficient! What is it?." Medium. https://lathashreeh.medium.com/dice-coefficient-what-is-it-ff090ec97bda.
M. Yeung, L. Rundo, Y. Nan, E. Sala, C.-B. Schönlieb, and G. Yang, "Calibrating the Dice Loss to Handle Neural Network Overconfidence for Biomedical Image Segmentation," Journal of Digital Imaging, vol. 36, no. 2, pp. 739–752, Apr. 2023.
G. Podobnik and T. Vrtovec, "Metrics Revolutions: Groundbreaking Insights into the Implementation of Metrics for Biomedical Image Segmentation." arXiv, Oct. 03, 2024.
Downloads
How to Cite
License
Copyright (c) 2025 Fifi Alfiaturrohmah, Sudianto Sudianto

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain the copyright and grant the journal the right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) after its publication in ETASR with an acknowledgement of its initial publication in this journal.