Computer Vision-Based Lettuce and Plantweed Segmentation Using YOLO and Segment Anything for Precision Agriculture

Abstract Views: 0   PDF Downloads: 0

Authors

  • Akhmad Jayadi Politeknik Negeri Lampung
  • Adi Ahmad Fauzi Universitas Muhammadiyah Lampung
  • Muhammad Ikhsan Universitas Lampung
  • Jaka Persada Sembiring Universitas Teknokrat Indonesia
  • Ahmad Rofi'i Politeknik Negeri Lampung

Keywords:

YOLO11s; Segment Anything Model; Image Segmentation; Computer Vision; Precision Agriculture

Abstract

The presence of weeds in lettuce cultivation areas can reduce plant productivity because they compete for nutrients, water, and light. Manual weed identification requires considerable time and effort, so an automated system based on computer vision is needed . This study proposes the integration of the YOLO11s model and the Segment Anything Model (SAM) to detect and segment lettuce plants and weeds in agricultural environments. The dataset used consists of 741 training images , 212 validation images , and 106 testing images with two object classes, namely Lettuce and Plantweed . The YOLO11s model was trained for 100 epochs using an image size of 640 × 640 pixels and a batch size of 106 . 16. The training results show that the model obtained an mAP@50 value of 87.8%. And mAP@50–95 was 80.0% , indicating good object detection capability. Furthermore, the bounding box coordinates of the detection results were used as prompts in the Segment Anything Model to generate mask -shaped segmentations that follow the object contours more precisely. The experimental results show that the integration of YOLO11s and SAM is able to produce more detailed object representations compared to detection using bounding boxes alone. This approach has the potential to support various precision agriculture applications, such as plant morphology analysis, leaf area estimation, and the development of automated weed control systems .

Downloads

Download data is not yet available.

References

[1] Iwan Patria, “Transformasi Pertanian Presisi Berbasis Digital di Indonesia: Tinjauan Sistematis Peluang dan Tantangan,” INSOLOGI J. Sains dan Teknol., vol. 4, no. 6, pp. 1462–1477, Dec. 2025, doi: 10.55123/insologi.v4i6.6319.

[2] R. Rosidi, “Pengembangan Pertanian Presisi Berbasis Teknologi Digital di Indonesia Perspektif Al-Qur’an,” Alashriyyah, vol. 11, no. 2, pp. 345–364, Oct. 2025, doi: 10.53038/alashriyyah.v11i2.282.

[3] F. R. Aminda, H. Anggrasari, and A. K. Sari, “Study of Horticultural Crop Leading Commodities Development in Banjarnegara Regency, Central Java Province,” Agritech J. Fak. Pertan. Univ. Muhammadiyah Purwokerto, vol. 25, no. 2, p. 163, Feb. 2024, doi: 10.30595/agritech.v25i2.19566.

[4] R. Sabtu and S. Kisman, “IDENTIFIKASI GULMA PADA LAHAN PERCONTOHAN PKK KELURAHAN MALIARO KOTA TERNATE,” SAINTIFIK@ J. Pendidik. MIPA, vol. 9, no. 2, pp. 1–11, Nov. 2024, doi: 10.33387/saintifik.v9i2.8958.

[5] P. L. Tarigan, A. Fitrianti, A. W. Wardhana, V. Gabrielle, S. I. Andisha, and N. Ayni, “Analisis Vegetasi Gulma Tanaman Mawar pada Lahan Dataran Tinggi dan Rendah,” J-Plantasimbiosa, vol. 7, no. 1, pp. 38–44, May 2025, doi: 10.25181/jplantasimbiosa.v7i1.3880.

[6] D. R. Tobergte and S. Curtis, Algorithms for image prcessing and computer vision, vol. 53, no. 9. 2013. doi: 10.1017/CBO9781107415324.004.

[7] D. S. Alfan and I. Kumalasari, “Implementasi Model Deep Learning MobileNetV2 untuk Klasifikasi Citra Melanoma Berbasis Web,” vol. 7, no. 3, pp. 670–680, 2026, doi: 10.47065/josh.v7i3.8848.

[8] Reni Triyaningsih, Pradita Eko Prasetyo Utomo, and Benedika Ferdian Hutabarat, “Application of You Only Look Once (YOLO) Method for Sign Language Identification,” J. Nas. Tek. Elektro dan Teknol. Inf., vol. 14, no. 4, pp. 254–262, Nov. 2025, doi: 10.22146/jnteti.v14i4.21931.

[9] I. A. Zulkarnain and K. Kusrini, “Optimasi Yolov11 Melalui Hyperparameter Tuning dan Data Augmentasi untuk Meningkatkan Akurasi Deteksi Kendaraan pada Kondisi Malam Hari: Yolov11 Optimization Through Hyperparameter Tuning and Data Augmentation to Improve Vehicle Detection Accuracy at Night,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 5, no. 4, pp. 294–1303, 2025, doi: 10.57152/malcom.v5i4.2250.

[10] K. Krisdianto, Elta Sonalitha, and Yandhika Surya Akbar Gumilang, “Deteksi penyakit padi menggunakan YOLO,” Uranus J. Ilm. Tek. Elektro, Sains dan Inform., vol. 2, no. 3, pp. 125–134, Jul. 2024, doi: 10.61132/uranus.v2i3.259.

[11] H. Herdianto, H. Hafni, D. Nasution, and S. Ramadhan, “Implementasi Metode Yolo pada Deteksi Objek Manusia,” METHOMIKA J. Manaj. Inform. dan Komputerisasi Akunt., vol. 8, no. 2, pp. 234–240, Oct. 2024, doi: 10.46880/jmika.Vol8No2.pp234-240.

[12] S. Minaee, Y. Y. Boykov, F. Porikli, A. J. Plaza, N. Kehtarnavaz, and D. Terzopoulos, “Image Segmentation Using Deep Learning: A Survey,” IEEE Trans. Pattern Anal. Mach. Intell., pp. 1–1, 2021, doi: 10.1109/TPAMI.2021.3059968.

[13] A. Kirillov et al., “Segment Anything,” 2023.

[14] 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 (BIBM), IEEE, Dec. 2023, pp. 4187–4194. doi: 10.1109/BIBM58861.2023.10386032.

[15] M. Luo, T. Zhang, S. Wei, and S. Ji, “SAM-RSIS: Progressively Adapting SAM With Box Prompting to Remote Sensing Image Instance Segmentation,” IEEE Trans. Geosci. Remote Sens., vol. 62, pp. 1–14, 2024, doi: 10.1109/TGRS.2024.3460085.

[16] P. Ghose, A. Bashir, Y. Wang, C. Bua, and A. Zahid, “YOLO-SAM AgriScan: A Unified Framework for Ripe Strawberry Detection and Segmentation with Few-Shot and Zero-Shot Learning,” Sensors, vol. 25, no. 24, p. 7678, Dec. 2025, doi: 10.3390/s25247678.

[17] R. Khanam and M. Hussain, “YOLOv11: An Overview of the Key Architectural Enhancements,” vol. 2024, pp. 1–9, 2024, [Online]. Available: http://arxiv.org/abs/2410.17725

[18] Z. Wang et al., “PC-YOLO11s: A Lightweight and Effective Feature Extraction Method for Small Target Image Detection,” Sensors, vol. 25, no. 2, p. 348, Jan. 2025, doi: 10.3390/s25020348.

Downloads

Published

2026-08-12

PlumX Metrics

How to Cite

Jayadi, A., Adi Ahmad Fauzi, Muhammad Ikhsan, Jaka Persada Sembiring, & Ahmad Rofi'i. (2026). Computer Vision-Based Lettuce and Plantweed Segmentation Using YOLO and Segment Anything for Precision Agriculture. Hanif Journal of Information Systems , 4(1), 10–19. Retrieved from https://journal.ilmubersama.com/index.php/hanif/article/view/119

Similar Articles

1 2 > >> 

You may also start an advanced similarity search for this article.