Corn is an important part of the Mexican diet. The crop requires constant monitoring to ensure production. For this, plant density is often used as an indicator of crop yield, since knowing the number of plants helps growers to manage and control their plots. In this context, it is necessary to detect and count corn plants. Therefore, a database of aerial RGB images of a corn crop in weedy conditions was created to implement and evaluate deep learning algorithms. Ten flight missions were conducted, six with a ground sampling distance (GSD) of 0.33 cm/pixel at vegetative stages from V3 to V7 and four with a GSD of 1.00 cm/pixel for vegetative stages V6, V7 and V8. The detectors compared were YOLOv4, YOLOv4-tiny, YOLOv4-tiny-3l, and YOLOv5 versions s, m and l. Each detector was evaluated at intersection over union (IoU) thresholds of 0.25, 0.50 and 0.75 at confidence intervals of 0.05. A strong F1-Score penalty was observed at the IoU threshold of 0.75 and there was a 4.92% increase in all models for an IoU threshold of 0.25 compared to 0.50. For confidence levels above 0.35, YOLOv4 shows greater robustness in detection compared to the other models. Considering the mode of 0.3 for the confidence level that maximizes the F1-Score metric and the IoU threshold of 0.25 in all models, YOLOv5-s obtained a mAP of 73.1% with a coefficient of determination () of 0.78 and a relative mean square error (rRMSE) of 42% in the plant count, followed by YOLOv4 with a mAP of 72.0%, of 0.81 and rRMSE of 39.5%.
Apples are among the most important agricultural products worldwide. Ensuring apple quality with minimal effort is crucial for both large-scale and local producers. In Mexico, the manual detection of damaged apples has led to inconsistencies in product quality, a problem that can be addressed by integrating vision systems with machine learning algorithms. The YOLO (You Only Look Once) neural network has significantly improved fruit detection through image processing and has automated several related tasks. However, training and deploying YOLO models typically requires substantial computational resources, making it essential to develop lightweight and cost-effective detection systems, especially for edge computing systems. This paper presents a mechatronic system designed to detect apple varieties and potential damage in apples (Malus domestica) within the visible spectrum. The cultivated apple varieties considered were Gala, Golden, Granny Smith, and Red Delicious. Our contribution lies in developing a lightweight neural network architecture optimized specifically for embedded systems. The proposed architecture was compared against YOLOv3-Tiny, YOLOv4-Tiny, and YOLOv5-s. Our optimized model achieved a high accuracy and sensitivity (94–99%) and was successfully implemented on a Jetson Xavier NX board, where it reached a processing speed of 37 FPS.