SciELO - Scientific Electronic Library Online

 
vol.29 número2Augmented Reality as a Tool for Cultural Learning in Educational Institutions in PeruExploring the Influence of Machine Learning in e-Commerce: A Systematic and Bibliometric Review índice de autoresíndice de materiabúsqueda de artículos
Home Pagelista alfabética de revistas  

Servicios Personalizados

Revista

Articulo

Indicadores

Links relacionados

  • No hay artículos similaresSimilares en SciELO

Compartir


Computación y Sistemas

versión On-line ISSN 2007-9737versión impresa ISSN 1405-5546

Comp. y Sist. vol.29 no.2 Ciudad de México abr./jun. 2025  Epub 20-Abr-2026

https://doi.org/10.13053/cys-29-2-5662 

Articles

Development of an Autonomous Module for Weed Management in Agriculture

Rubén Oswaldo Hernández-Terrazas1 

Juan Manuel Xicoténcatl-Pérez1 

Julio César Ramos-Fernández1 

Jorge Alberto Ruiz-Vanoye1  * 

José Miguel Liceaga-Ortiz1 

11 Universidad Politécnica de Pachuca, Hidalgo, México. rterrazas@upp.edu.mx, jmxico@upp.edu.mx, jramos@upp.edu.mx, jorgeruiz@upp.edu.mx.


Abstract:

In the state of Hidalgo, México, agriculture faces critical challenges due to climate change, such as resource scarcity, while also striving to ensure food security. One of the most pressing issues in corn cultivation is inadequate weed management, which reduces productivity and increases production costs. This article proposes an autonomous system for weed detection and removal in corn fields, integrating artificial intelligence algorithms, real-time computer vision, and a robotic arm equipped with a laser and herbicide sprayer. Following a systematic review, the YOLOv8m model was selected for its real-time detection capabilities and its balance between accuracy and efficiency. The proposed system employs machine learning algorithms in Python, achieving over 80% accuracy in distinguishing corn plants from weeds. Preliminary results demonstrate precise weed control, reduced environmental impact, and feasibility of field integration with minimal human intervention. This project marks a significant advancement toward more efficient and sustainable precision agriculture. As future work, the hybrid tool will apply selective treatments based on the size and location of the weeds, further minimizing herbicide use.

Keywords: Precision agriculture; machine learning algorithms; corn plant identification; weed detection

1 Introduction

Agriculture has long served as a driving force behind progress and development, characterized by innovation and the continual pursuit of more efficient methods. Its significance extends beyond food production, encompassing critical dimensions related to the economy, sustainability, and global food security. In a context where the global population continues to grow and natural resources are becoming increasingly scarce, the role of agriculture in human nutrition and well being becomes ever more vital.

The global food crisis exacerbated by factors such as climate change, political conflicts, water scarcity, and pandemics has underscored the urgent need to strengthen and modernize the agricultural sector [1]. Consequently, innovative strategies must be adopted to address these challenges effectively and sustainably. One of the most pressing issues in modern agriculture is weed management, as the presence of weeds poses a significant threat to both crop productivity and quality [3, 2].

Effective detection and control of weeds are essential for maximizing agricultural output, enhancing resource efficiency, and reducing reliance on chemical herbicides. Weed control remains a fundamental agricultural practice, as these unwanted plants compete directly with crops for vital resources such as water, nutrients, sunlight, and space. If not properly managed, weeds can significantly diminish crop yield and quality, while also promoting the spread of pests and diseases.

In this context, the development and application of advanced technologies such as artificial intelligence and remote sensing (defined as the technique of acquiring information without direct physical contact) offer promising contributions to weed management. This research proposes an Autonomous Module for Weed Management in Agriculture that enables precise and continuous monitoring of extensive crop areas through image processing.

This study presents an autonomous system designed for the detection of corn plants and the elimination of weeds in agricultural fields. The system employs a hybrid device combining a laser beam and a herbicide dispenser. It is equipped with machine vision and machine learning modules that utilize Python based image processing techniques to distinguish corn plants from surrounding vegetation.

For plant recognition, the device uses algorithms that analyze patterns and contrasts in the captured images, allowing for accurate identification of corn plants during their early growth stages. When a weed is detected, a robotic arm administers the appropriate treatment without harming the corn. The system autonomously determines the most suitable intervention whether to apply herbicide or to eradicate the weed with a laser depending on the size and location of the weed.

Among the key challenges addressed by this system are:

  • — Reduced agricultural yield,

  • — Increased production costs,

  • — Difficulty in manual agricultural labor,

  • — Development of herbicide resistant weed species [2].

2 Related Work

The research conducted highlights the need to employ advanced AI models to enhance the identification of corn plants in agricultural fields using image recognition devices. A systematic literature review was carried out to identify and evaluate the most relevant AI models, including Faster R-CNN, ResNet, YOLOv8m, and VGG.

Studies published between 2019 and 2024 were selected to ensure the relevance and currency of the information [13]. The selected materials included empirical studies, literature reviews, and conference papers focusing on the development, implementation, and evaluation of these AI models within the context of precision agriculture.

Step 2: Information Evaluation Once the relevant literature was collected, the selected studies were critically evaluated. The criteria used to assess and compare the AI models included:

Detection Accuracy The model’s ability to correctly identify weeds in crop images, measured by metrics such as accuracy, recall, and F1-score.

Processing Speed The time required by the model to process images and produce results, indicating its viability for real-time applications.

Computational Requirements The level of computational resources necessary for training and deployment, including GPU usage and memory demands.

Robustness and Generalization The model ability to maintain performance across varying growing conditions and datasets, evaluating adaptability and resilience.

Ease of Implementation The simplicity of the implementation process, availability of open-source tools, quality of documentation, and integration with existing agricultural technologies.

The systematic review process was divided into three main stages:

First, literature on each model was collected through extensive searches in academic databases such as IEEE Xplore, Google Scholar, and ScienceDirect.

Second, the selected studies were assessed using the aforementioned evaluation criteria.

Third, the evidence was synthesized to determine the most appropriate model for application in maize crop weed detection.

The findings indicate that YOLOv8m is the most suitable model due to its real-time processing capabilities and overall efficiency, despite having slightly lower accuracy compared to some alternatives. Faster R-CNN provides high accuracy and robustness but lacks the speed required for real-time applications. ResNet and VGG also demonstrate high detection accuracy; however, their significant computational demands and slower processing speeds render them less practical for field deployment [4].

3 Development

This study presents an autonomous system designed for the detection of corn plants and the elimination of weeds in agricultural fields. The system employs a hybrid device combining a laser beam and a herbicide dispenser. It is equipped with machine vision and machine learning modules that utilize Python based image processing techniques to distinguish corn plants from surrounding vegetation [5].

For plant recognition, the device uses algorithms that analyze patterns and contrasts in the captured images, allowing for accurate identification of corn plants during their early growth stages. When a weed is detected, a robotic arm administers the appropriate treatment without harming the corn. The system autonomously determines the most suitable intervention whether to apply herbicide or to eradicate the weed with a laser depending on the size and location of the weed.

Among the key challenges addressed by this system are:

  • — Reduced agricultural yield

  • — Increased production costs

  • — Difficulty in manual agricultural labor

  • — Development of herbicide resistant weed species [6].

4 Results

The expected outcomes for the development and implementation of the autonomous robot include accurate detection and classification of weeds. Notably, the Python-based computer vision system is capable of identifying and classifying corn plants and weeds with an accuracy exceeding 80%, due to the integration of advanced machine learning and image processing algorithms. This enables the selective and efficient application of treatments.

Use of the YOLOv8m Model: YOLOv8m is the eighth version of a computer vision model based on the YOLO (You Only Look Once) architecture, designed for object detection in images and videos. It remains a real-time object detection model, making it ideal for a wide range of applications, including security, autonomous vehicles, robotics, and medical image analysis.

4.1 Data Collection

We use the following data collection strategies.

  1. A dataset of corn plant images was compiled. The images were obtained from the Internet and featured corn plants at an early growth stage under varying conditions, including different positions, backgrounds, and lighting.

  2. Each image was annotated with the corresponding locations of the corn plants.

  3. The Label Studio image annotation tool was used to generate annotation files in YOLO format (with the .txt extension).

After this, we perform image tagging using Label Studio.

Images were prepared and annotated in YOLO format, including both the image metadata and the identification tags for the target object, labeled as MAIZE.

4.2 Model Training and Testing

First, we perform object detection model training with custom data.

The yolo detect train command trains the YOLOv8m model for object detection using a dataset defined in a YAML file (data.yaml). A pre-trained model (yolov8m.pt) is used, and training is conducted for 50 epochs with input images resized to 640×640 pixels [7]. This process adapts the model to custom data in order to improve detection accuracy. The medium version of YOLOv8 is selected as it provides a good balance between accuracy and performance [8].

The command is: yolo detect train data=dataset/data.yaml model=yolov8m.pt epochs=50 imgsz=640

Then we perform model evaluation (see Fig. 3): yolo detect val data=dataset/data.yaml model=runs/detect/train/weights/best.pt

Fig. 1 Systems for weed control collected in the research 

Fig. 2 Identification tags for the target object 

Fig. 3 Learning Metrics 

The evaluation phase involves assessing the model’s performance using a dataset that was previously seen during training, commonly referred to as the validation set. Metrics such as precision [9].recall, and F1-score are computed to evaluate how effectively the model detects and classifies objects. This evaluation helps to identify potential areas for improvement in the model.

Train box-loss is presented in Fig. 4.

Fig. 4 Train Box Loss 

Ideally, this loss should decrease over time, indicating that the model is improving its ability to accurately localize objects [10]. In this chart, a general downward trend is observed, which is a positive sign. The blue line represents the actual values at each epoch, while the orange dotted line provides a smoothed version to facilitate the visualization of the overall trend.

Train precision is presented in Fig. 5.

Fig. 5 Train precision 

High precision indicates that when the model detects an object, it is most likely correct. Ideally, this metric should increase and remain consistently high. Although some fluctuations are observed, the values tend to stabilize at a high level towards the end of training.

Metrics of recall is presented in Fig. 6.

Fig. 6 Metrics recall 

High recall means that the model is effective in identifying most of the objects present in the dataset [11].This metric should also increase and remain high. Fluctuations are noted, but the recall remains within an acceptable range.

The following images illustrate the recognition accuracy of corn plants after the system’s training. Notably, YOLOv8m achieved an accuracy of 88.0% and 93.0% in identifying the target object. It is important to note that recognition rates above 70% are generally considered acceptable.

Fig. 7 YOLOv8m achieved an accuracy of 26.0% - 38.0% 

Fig. 8 YOLOv8m achieved an accuracy of 58.0% - 93.0% 

Fig. 9 YOLOv8m achieved an accuracy of 88.0% 

5 Systematic Literature Review on AI Models for Weed Detection in Maize Crops

We consider for the moment the first stem of literature collection.

The first stage of the systematic review involved the comprehensive collection of scholarly literature on artificial intelligence models applied to weed detection in agricultural crops.

The specific models under consideration included ResNet (Residual Networks), VGG (Visual Geometry Group), YOLO (You Only Look Once), and Faster R-CNN. To gather the relevant literature, academic databases such as IEEE Xplore, Google Scholar, ScienceDirect, and MDPI were searched using keywords such as ResNet weed detection, VGG crop analysis, YOLO agriculture [12] and Faster R-CNN plant diseases.

Fig. 10 Results of analysis of AI models 

6 Conclusion and Future Work

The main advantage of this hybrid system is its ability to minimize the use of herbicides, thereby reducing environmental impact and associated costs. This autonomous device is designed for integration into agricultural fields with minimal human intervention [10]. It is concluded that these measures, along with data analysis, will enhance weed control and foster a more sustainable and efficient approach to precision agriculture. Furthermore, continuous improvements to the device are necessary to ensure adaptability across diverse agricultural scenarios.

The developed autonomous system has proven to be an effective tool for precision weed control in corn cultivation, significantly reducing herbicide use and minimizing environmental impact.

The integration of advanced image processing techniques with a hybrid robotic arm enables targeted treatment, thereby improving the sustainability of agricultural practices.

However, challenges remain, including the need to reinforce system performance under adverse weather conditions and to optimize implementation costs for broader scalability. This project establishes a foundation for future innovations in precision agriculture.

Acknowledgments

This work was supported by the Ministry of science, humanities, technology and innovation (SECIHTI), Mexico under grants number 394581.

References

1. World Health Organization (2022). World health statistics 2022: monitoring health for the SDGs, sustainable development goals. [ Links ]

2. Ponce-Vejar, G., Ramos de Robles, S. L., Macias-Macias, J. O., Petukhova, T., Guzman-Novoa, E. (2022). Detection and concentration of neonicotinoids and other pesticides in honey from honey bee colonies located in regions that differ in agricultural practices: implications for human and bee health. International Journal of Environmental Research and Public Health, Vol. 19, No. 13, pp. 8199. [ Links ]

3. Westwood, J. H., Charudattan, R., Duke, S. O., Fennimore, S. A., Marrone, P., Slaughter, D. C., Swanton, C., Zollinger, R. (2018). Weed management in 2050: Perspectives on the future of weed science. Weed Science, Vol. 66, No. 3, pp. 275–285. [ Links ]

4. Wang, Y., Zhang, K., Wang, L., Wu, L. (2024). An improved YOLOv8 algorithm for rail surface defect detection. IEEE Access, Vol. 12, pp. 2169-3536. DOI: 10.1109/AC-CESS.2024.3380009. [ Links ]

5. Chen, C.J., Zhang, Z. (2020). Grid: a python package for field plot phenotyping using aerial images, Remote Sensing, Vol. 12, No. 11, pp. 1697. [ Links ]

6. Yu, C., Khanna, M., Atallah, S.S., Kar, S. Bagavathiannan, M., Chowdhary, G. (2024). Herbicide-resistant weed management with robots: A weed ecological-economic model, Agricultural Economics, Vol.55, No.6, pp. 943–962. [ Links ]

7. Hermens, F. (2024). Automatic object detection for behavioural research using YOLOv8. Behavior research methods, Vol.56, No. 7, pp. 7307–7330. [ Links ]

8. Farooq, J., Muaz, M., Khan-Jadoon, K., Aafaq, N., Khan, M.K.A. (2024). An improved YOLOv8 for foreign object debris detection with optimized architecture for small objects. Multimedia Tools and Applications, Vol. 83, No. 21, pp. 60921–60947. [ Links ]

9. Gonzales-Rodriguez, J.S. (2024). Diseño de un algoritmo de clasificación mediante procesamiento digital de imágenes basado en redes neuronales convolucionales para la detección del hongo Penicillium Digitatum en mandarinas W Murcott aplicable a sistemas automatizados de producción. Universidad Tecnológica del Perú. [ Links ]

10. Rivera, C., Jonny, I. (2024). Diseño e implementación de un sistema de detección de tomates mediante un robot agrícola autónomo. Universidad Loyola. [ Links ]

11. Mesías-Ruiz, G.A., Peña, J., de Castro, A.I., Borra-Serrano, I., Dorado, José (2024). Detección y clasificación de malas hierbas mediante drones y redes neuronales profundas: creación de mapas para tratamiento localizado. Instituto Nacional de Investigación y Tecnología Agraria y Alimentaria (INIA). [ Links ]

12. García-Navarrete, O.L., Camacho-Tamayo, J.H., Bregon, A., Martín-García, J., Navas-Gracia, L.M. (2025). Performance Analysis of Real-Time Detection Transformer and You Only Look Once Models for Weed Detection in Maize Cultivation. Agronomy, Vol.15, No. 4, pp. 796. [ Links ]

13. Kroupová, Z., Aulová, R, Rumánková, L., Bajan, B., Mechura, L., Simek, P., Jarol Ãmek, J. (2025). Drivers and barriers to precision agriculture technology and digitalisation adoption: Meta-analysis of decision choice models. Precision Agriculture, Vol. 26, No. 1, pp. 17. [ Links ]

Received: February 12, 2025; Accepted: May 19, 2025

* Corresponding author: Jorge Alberto Ruiz-Vanoye, e-mail: mliceaga@upp.edu.mx

Creative Commons License This is an open-access article distributed under the terms of the Creative Commons Attribution License