Machine learning algorithms are increasingly used to enhance agricultural productivity cost-effectively. A critical task in precision agriculture is locating a plant’s root collar. This is required for the site-specific fertilization of the plants. Though state-of-the-art machine learning models achieve stellar performance in object detection, they are often sensitive to noisy inputs and variation in environment settings. In this paper, we propose an innovative technique of smooth perturbations to improve the robustness of root collar detection tasks using the YOLOv5 neural network model. We train a YOLOv5 model on blueberry image data for root collar detection. A small amount noise is added as a smooth perturbation to the bounding box of dimensions 50× 50, and this perturbed image is fed for training. Furthermore, we introduce an additional test set that represents the out-of-distribution (O.O.D.) case by applying Gaussian blur on test images to simulate particle situation. We use three different image datasets to train our model, the (i) Estonian blueberry, (ii) Serbian blueberry image, and (iii) public dataset sourced from Roboflow datasets, of sample size 118, 2779, and 2993, respectively. We achieve an overall precision of 0.886 on perturbed blueberry images compared to 0.871 on original (unperturbed) images for the O.O.D. test set. Similarly, our smooth perturbation training has achieved an mAP of 0.828, which significantly increases against the result of normal training, which only reaches 0.794. The result proves that our proposed smooth perturbation is an effective method to increase the robustness and generalizability of the object detection task.
In precision agriculture (PA), monitoring individual plant health is crucial for optimizing yields and minimizing resources. The normalized difference vegetation index (NDVI), a widely used health indicator, typically relies on expensive multispectral cameras. This study introduces a method for predicting the NDVI of blueberry plants using RGB images and deep learning, offering a cost-effective alternative. To identify individual plant bushes, K-means and Gaussian Mixture Model (GMM) clustering were applied. RGB images were transformed into the HSL (hue, saturation, lightness) color space, and the hue channel was constrained using percentiles to exclude extreme values while preserving relevant plant hues. Further refinement was achieved through adaptive pixel-to-pixel distance filtering combined with the Davies–Bouldin Index (DBI) to eliminate pixels deviating from the compact cluster structure. This enhanced clustering accuracy and enabled precise NDVI calculations. A convolutional neural network (CNN) was trained and tested to predict NDVI-based health indices. The model achieved strong performance with mean squared losses of 0.0074, 0.0044, and 0.0021 for training, validation, and test datasets, respectively. The test dataset also yielded a mean absolute error of 0.0369 and a mean percentage error of 4.5851. These results demonstrate the NDVI prediction method’s potential for cost-effective, real-time plant health assessment, particularly in agrobotics.