Improving the Accuracy of Lettuce and Weed Classification Based on MobileNetV2 Features Through Segmentation
Keywords:
Precision Farming; Lettuce Weeds; GrabCut Segmentation; MobileNetV2; Image Classification
Abstract
Automating the separation of commodity crops and weeds is a major challenge in the implementation of precision agriculture . The presence of complex backgrounds such as soil, rocks, and shadows often degrades the performance of feature extraction in computer vision classification models. This study proposes an image preprocessing approach using the GrabCut segmentation method to extract key crop objects cleanly before performing Deep Learning- based feature extraction . Representative features from the image are extracted using the lightweight and efficient MobileNetV2 architecture. Next, classification is performed by comparing three Machine Learning algorithms , namely Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and Random Forest (RF). Testing is carried out on two data scenarios, namely the original dataset ( Original ) and the segmented dataset ( GrabCut ). The experimental results show that the use of original images produces an accuracy of 98.89% for all three classification models. However, after being integrated with GrabCut segmentation, the accuracy of all three models increases significantly to 100.00%. These results prove that GrabCut-based segmentation effectively eliminates background noise information , thereby improving the generalization capabilities of classification models perfectly on edge computing devices .
Downloads
References
[1] A. A. Rouf, “Pertanian Modern: Solusi untuk Tantangan Produksi, Efisiensi, dan Regenerasi Petani,” Policy Br. Pertanian, Kelautan, dan Biosains Trop., vol. 8, no. 1, pp. 1539–1544, Mar. 2026, doi: 10.29244/agro-maritim.0801.1539-1544.
[2] M. Kushwaha, S. Singh, V. Singh, and S. Dwivedi, “Precision Farming: A Review of Methods, Technologies, and Future Prospects,” Int. J. Environ. Agric. Biotechnol., vol. 9, no. 2, pp. 242–253, 2024, doi: 10.22161/ijeab.92.27.
[3] N. S. Khodijah and R. Kusmiadi, “The Growth Of Lettuce (Lactuca sativa) Hydroponically In Simple Wick System On Various Types Of Nutrient Composition,” J. Agron. Tanam. Trop., vol. 3, no. 2, pp. 180–186, Jul. 2021, doi: 10.36378/juatika.v3i2.1366.
[4] S. A. N’cho, M. Mourits, J. Rodenburg, and A. Oude Lansink, “Inefficiency of manual weeding in rainfed rice systems affected by parasitic weeds,” Agric. Econ., vol. 50, no. 2, pp. 151–163, Mar. 2019, doi: 10.1111/agec.12473.
[5] D. R. Tobergte and S. Curtis, Algorithms for image prcessing and computer vision, vol. 53, no. 9. 2013. doi: 10.1017/CBO9781107415324.004.
[6] A. N Patil, “IMAGE RECOGNITION USING MACHINE LEARNING,” Int. J. Eng. Appl. Sci. Technol., vol. 6, no. 1, May 2021, doi: 10.33564/IJEAST.2021.v06i01.027.
[7] F. D. Adhinata, N. G. Ramadhan, and A. Jayadi, “DenseNet201 Model for Robust Detection on Incorrect Use of Mask,” in Proceeding of the 3rd International Conference on Electronics, Biomedical Engineering, and Health Informatics, T. Triwiyanto, A. Rizal, and W. Caesarendra, Eds., Singapore: Springer Nature Singapore, 2023, pp. 251–263.
[8] M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L.-C. Chen, “MobileNetV2: Inverted Residuals and Linear Bottlenecks,” Mar. 2019, [Online]. Available: http://arxiv.org/abs/1801.04381
[9] R. Jajila, N. A. Ramdhan, P. Wahyuningsih, and B. Irawan, “Optimasi Mobilenetv2 Dengan Transfer Learning Untuk Klasifikasi Penyakit Daun Cabai,” Infotek J. Inform. dan Teknol., vol. 9, no. 1, pp. 296–307, Jan. 2026, doi: 10.29408/jit.v9i1.33812.
[10] M. M. Weli and O. M. Abdullah, “Digital Image Noise Reduction Based on Proposed Smoothing and Sharpening Filters,” Indones. J. Comput. Sci., vol. 13, no. 4, Jul. 2024, doi: 10.33022/ijcs.v13i4.4151.
[11] C. Rother, V. Kolmogorov, and A. Blake, “‘GrabCut’ - Interactive foreground extraction using iterated graph cuts,” ACM Trans. Graph., vol. 23, no. 3, pp. 309–314, 2004, doi: 10.1145/1015706.1015720.
[12] M. F. Thoriq, W. J. Pranoto, and F. Faldi, “Penerapan Seleksi Fitur Analysis of Variance Pada Algoritma Random Forest Classifier Dalam Klasifikasi Nilai Mahasiswa,” Explor. J. Sist. Inf. dan Telemat., vol. 14, no. 2, p. 185, Dec. 2023, doi: 10.36448/jsit.v14i2.3187.
[13] N. M. Shivsharan and M. Tari, “Machine Learning Empowered: Support Vector Machine-Based Selection of Encryption Techniques for Digital Image Security Levels,” Informatica, vol. 49, no. 33, Aug. 2025, doi: 10.31449/inf.v49i33.6355.
[14] A. Amelia, M. Asfi, and R. Fahrudin, “Implementation of K-Nearest Neighbor Method for Selection of New Employee Candidates (Case Study: CV. Syntax Corporation Indonesia),” Eduvest - J. Univers. Stud., vol. 4, no. 7, pp. 5742–5754, Jul. 2024, doi: 10.59188/eduvest.v4i7.1305.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Akhmad Jayadi, Kurniawan Saputra, Ahmad Rofi'i

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish in Hanif Journal of Information Systems agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License that allows others to share the work with an acknowledgment 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 acknowledgment 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) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).
Similar Articles
- Pastima Simanjuntak, Rika Harman, Predicting Non-Performing Loan Levels Using XGBoost and Explainable Data Mining , Hanif Journal of Information Systems : Vol. 3 No. 2 (2026): February Edition
You may also start an advanced similarity search for this article.









