Computer Vision-Based Lettuce and Plantweed Segmentation Using YOLO and Segment Anything for Precision Agriculture - Akhmad Jayadi; Adi Ahmad Fauzi; Muhammad Ikhsan; Jaka Persada Sembiring; Ahmad Rofi'i (Hanif Journal of Information Systems, 2026)
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 .