DOI : 10.5281/zenodo.20454849
- Open Access

- Authors : Muhammad Shehu Ali, Dr. Mohd Akbar Shuan, Dr. Smriti Rao, Ms. Ummey Habiba, Mr. Shubham Dubey
- Paper ID : IJERTV15IS052101
- Volume & Issue : Volume 15, Issue 05 , May – 2026
- Published (First Online): 30-05-2026
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License:
This work is licensed under a Creative Commons Attribution 4.0 International License
UAV-Based Soil Fertility Classification using Convolutional Neural Networks
Muhammad Shehu Ali (1), Dr. Mohd Akbar Shuan (2), Dr. Smriti Rao (3), Ms. Ummey Habiba (4), Mr. Shubham Dubey (5)
(1) M.Tech Student, Dept. of CSE, Integral University
(3) Associate Professor, Dept. of CSE
(2) Assistant Professor, Dept. of Agriculture, IIAST
(4) Assistant Professor, Dept. of CSE
(5) Assistant Professor, Dept. of EE
Abstract – Soil fertility assessment is essential for improving agricultural productivity and ensuring sustainable land management. Conventional soil analysis methods rely on laboratory testing, which is costly, time-consuming, and often inaccessible to smallholder farmers, especially those in remote areas. In recent years, deep learning techniques have provided a promising alternative for rapid and low-cost soil analysis using image data.
In this work, a convolutional neural network (CNN) is developed for soil fertility classification using UAV-simulated RGB imagery. Unlike traditional approaches that depend on handcrafted features or multispectral sensors, the proposed model learns discriminative visual patterns directly from RGB images. To improve performance under limited and moderately imbalanced data conditions, focal loss, class weighting, and data augmentation techniques are incorporated into the training process.
The model is trained on approximately 4,800 soil images categorized into three classes: Fertile, Moderately Fertile, and Infertile. Experimental results show that the proposed framework achieves an overall classification accuracy of 93.41%. Most classification errors occur between adjacent categories, reflecting the continuous nature of soil fertility characteristics.
The results indicate that a properly optimized CNN can provide a reliable and cost-effective solution for soil fertility assessment using low-cost imaging systems, making it suitable for practical applications in resource-constrained agricultural environments.
Keywords: Soil Fertility, UAV Imaging, CNN, Deep Learning, Image Classification, Precision Agriculture
-
INTRODUCTION
In agricultural systems, the quality of soil largely determines crop performance and nutrient availability. Farmers, particularly in developing regions, often depend directly on natural soil conditions rather than controlled inputs. As a result, any variation in soil quality can significantly influence productivity and long-term land use [1], [2].
In practice, evaluating soil fertility typically involves collecting physical samples followed by laboratory testing. While such methods provide reliable results, they are often difficult to implement on a large scale due to cost, time requirements, and limited accessibility in rural areas. This limitation often forces farmers to rely on generalized assumptions rather than field-specific soil information [3].
Recent progress in UAV platforms and deep learning has created new opportunities for automated soil analysis. The use of Unmanned Aerial Vehicles (UAVs) has enabled the rapid collection of high-resolution imagery across large agricultural areas with minimal effort. At the same time, developments in artificial intelligence, deep learning in particular have created new opportunities for analyzing such data automatically. While Convolutional Neural Networks (CNN) models are particularly effective for soil imagery because they can capture fine variations in surface texture and color patterns, which are key indicators of soil condition. These capabilities allow CNNs to detect subtle variations in texture and color that may not be easily recognized through manual observation [4]-[6], [19], [20].
Despite these advancements, many existing UAV-based soil analysis systems rely on multispectral or hyperspectral sensors to capture detailed information about soil composition. While these sensors provide rich and informative data, they also increase the overall cost, calibration complexity and operational requirements, making them less suitable for widespread use in resource-
constrained environments [7], [8], [21], [22]. This creates a noticeable gap between technologically advanced solutions and those that are practically accessible to farmers.
An alternative approach is to use standard RGB imagery, which is significantly more affordable and widely available. However, working with RGB data introduces its own challenges. Unlike multispectral data, RGB images provide limited spectral information, and different soil types often appear visually similar. This makes it more difficult to perform accurate classification and requires models that can extract meaningful patterns from relatively simple visual inputs [23], [24].
Motivated by these challenges, this study investigates a CNN-based framework for soil fertility classification using UAV-simulated RGB imagery. Rather than depending on expensive sensing equipment, the aim is to evaluate whether a carefully designed deep learning model can achieve reliable classification performance using only low-cost visual data. By doing so, this work seeks to contribute toward the development of practical, scalable, and accessible solutions for soil assessment in real-world agricultural environments.
The workflow illustrated in Fig. 1 summarizes the key stages of the proposed system. The process begins with the collection of soil images, followed by preprocessing steps such as resizing and normalization to ensure consistency. Data augmentation techniques are then applied to increase variability and improve model robustness. The processed images are passed through a CNN, where relevant visual features are automatically extracted. Finally, the model performs classification and assigns each image to one of the predefined soil fertility categories. This structured pipeline enables efficient and automated soil assessment using readily available RGB imagery.
Fig. 1: Overall workflow of the proposed soil fertility classification framework.
-
RELATED WORK
Research in soil analysis has evolved from traditional statistical models to more data-driven approaches, driven by the need to handle variability in real-world agricultural environments. These methods required carefully designed input features derived from soil images or sensor measurements. While such approaches produced acceptable results under controlled experimental setups, their performance often declined when applied to real agricultural environments, where soil appearance can vary significantly due to differences in texture, moisture, and lighting conditions [9], [10], [25].
With the growing availability of computational resources and data, attention gradually shifted toward deep learning techniques. Recent studies increasingly favor CNN architectures because automated feature extraction reduces dependence on handcrafted descriptors. Those capabilities have made CNNs highly effective in various agricultural applications, such as classification of crops, plant disease detection and yield prediction [11]-[13], [26], [27]. These advancements have encouraged further exploration of deep learning models for soil-related classification tasks.
At the same time, developments in UAV technology have opened new possibilities for monitoring agricultural land at scale. Compared to traditional field-based collection techniques UAV platforms have enabled the collection of high-resolution imagery in a faster and more flexible manner. When combined with deep learning models, UAV data has been widely used for tasks such as soil nutrient estimation, field variability analysis, and precisin agriculture applications [14]-[16], [22], [28]. However, many of these systems rely heavily on multispectral or hyperspectral sensors, which provide richer data but introduce higher costs, calibration complexity, and operational challenges.
In contrast, the use of standard RGB imagery for soil analysis remains relatively underexplored. While RGB data is easier to obtain and more affordable, it offers limited spectral information, making it difficult to distinguish between visually similar soil types. Existing studies using RGB images have shown promising results, but they often report lower accuracy compared to approaches that use specialized sensor data [23], [24], [29], [30]. These observations suggest that further research is needed to improve the robustness of RGB-based classification models.
Another emerging direction involves the use of simulated or augmented datasets to overcome limitations in real-world data collection. Simulation-based approaches have shown potential in improving model training by generating diverse training samples and reducing data scarcity issues [31], [32]. However, these methods often require further validation to ensure their effectiveness in real agricultural environments.
To provide a clearer overview of existing studies, a summary of key approaches is presented in Table I. The table highlights the different methods used in soil analysis along with their contributions and limitations. A consistent observation across these studies is that many approaches either depend on high-cost sensing technologies or focus on related problems such as soil texture classification or nutrient estimation, rather than direct fertility classification. This gap highlights the importance of developing practical and cost-effective solutions based on accessible data sources such as RGB imagery.
Table I: Summary of Related Work in Soil Fertility and UAV-Based Analysis
SN
Author(s)
Method / Approach
Data Type
Key Contribution
Limitation
1.
Shahi et al. (2022)
Review of ML methods for UAV precision agriculture
UAV
imagery
Discussed major machine learning techniques used in agricultural monitoring
Focused mainly on general agricultural applications rather than direct soil fertility classification
2.
Zhang and Kovacs (2012)
UAV remote sensing review
UAV aerial data
Highlighted the potential of UAVs in precision agriculture
Limited discussion on deep learning-based soil analysis
3.
Hu et al. (2021)
Hyperspectral imaging + ML
UAV
hyperspectral imagery
Improved prediction of soil nutrient patterns under varying field conditions
Requires expensive hyperspectral sensors
4.
Chen et al. (2023)
AI-based UAV soil management review
UAV remote sensing
Reviewed AI applications in sustainable soil management
Mostly sensor-intensive approaches
5.
Gyasi et al. (2023)
Deep learning techniques for soil classification
Digital soil datasets
Demonstrated effectiveness of deep learning in soil analysis
Limited emphasis on RGB-based low-cost systems
6.
Liu et al. (2024)
Deep learning + multispectral imaging
UAV
multispectral imagery
Achieved strong nutrient estimation performance
Dependence on multispectral equipment increases operational cost
7.
Heil et al. (2022)
Random Forest for soil organic matter mapping
UAV RGB
imagery
Demonstrated feasibility of RGB imagery for soil assessment
Focused only on soil organic matter rather than fertility categories
8.
Babalola et al. (2023)
CNN-based soil texture classification
RGB soil imagery
Showed CNN effectiveness for texture-based soil analysis
Did not perform direct fertility classification
9.
Dasgupta et al. (2024)
Soil fertility prediction using microscopy and PXRF
Microscope imagery + PXRF
Combined imaging and sensor data for fertility estimation
Requires specialized hardware
10.
Enriquez et al. (2025)
ML-based fertility monitoring
Multispectral UAV
imagery
Investigated fertility change detection using UAV systems
Relied heavily on multispectral sensing
11.
Zhu et al. (2024)
UAV data simulation for deep learning
Simulated agricultural imagery
Demonstrated effectiveness of simulated UAV datasets for AI training
Limited real-world field validation
12.
Pandey et al. (2025)
CNN-based soil property prediction
Drone spectral simulation
Proposed drone-based simulation framework for soil prediction
Focused mainly on spectral analysis rather than RGB imagery
-
METHODOLOGY
The proposed framework is designed to classify soil fertility using UAV-simulated RGB imagery through a Convolutional Neural Network (CNN). The overall workflow consists of data acquisition, preprocessing, model design, and training strategy.
-
Data Acquisition
The dataset used in this study consists of approximately 4,800 RGB soil images collected from a publicly available source. The images represent different soil surface characteristics, including variations in texture, color, and composition. Each image is labeled into one of three categories: Fertile, Moderately Fertile, and Infertile.
Although the dataset was not collected using a physical UAV system, its visual characteristics are consistent with low-altitude aerial imagery. Therefore, it is considered a suitable proxy for evaluating UAV-based soil classification methods.
-
Image Preprocessing and Augmentation
To ensure uniformity, all images are resized to 224 × 224 pixels. Image intensities were scaled between 0 and 1 to stabilize optimization and reduce numerical variation during training.
To enhance model generalization and simulate real-world conditions, data augmentation techniques are applied. These include random rotation, horizontal and vertical flipping, scaling, zooming, and brightness variation. Augmentation helps the model learn invariant features under different imaging conditions.
-
CNN Architecture
The proposed model employs a deep Convolutional Neural Network consisting of four convolutional blocks. Each block includes a convolution layer with a 3 × 3 kernel, batch normalization, ReLU activation, and max-pooling. The number of filters increases progressively from 32 to 256 to extract both low-level and high-level features from the input images.
To reduce overfitting, dropout is applied after pooling layers with rates ranging from 0.1 to 0.25. Global Average Pooling was employed to minimize parameter growth and improve model generalization.
The extracted features are passed through fully connected layers of 256 and 128 neurons, followed by a softmax output layer for three-class classification. CNN-based feature learning has been widely used in image classification tasks due to its ability to capture spatial hierarchies and automatically learn multi-level representations from image data. Modern deep learning architectures, including residual networks, further improve feature extraction capabilities and model performance [12], [17], [18].
The convolution operation can be expressed as:
(, ) = (, )
{} {}(+,+)
where X represents the input image, K denotes the convolution kernel, and Y is the resulting feature map.
The architecture shown in Fig. 2 illustrates the structure of the proposed convolutional neural network. The model begins with a series of convolutional layers that progressively extract low-level and high-level features from the input images. These are followed by pooling layers that reduce spatial dimensions while retaining important information. Dropout layers are incorporated to prevent overfitting by randomly deactivating a portion of neurons during training.
After feature extraction, the network transitions into fully connected layers that perform the final classification. The combination of convolution, pooling, and dense layers allows the model to effectively learn complex visual patterns associated with different soil fertility levels. This structured design contributes to the overall performance and generalization capability of the proposed approach.
Fig. 2: CNN architecture used for soil fertility classification.
-
Training Strategy
The dataset is divided into training and testing sets using an 80:20 split. A portion of the training data is further used for validation during model optimization.
The model is trained using the Adam optimizer with a learning rate of 0.0005 and a batch size of 32. To address class imbalance and improve performance on difficult samples, Focal Loss is used as the loss function, which emphasizes misclassified examples during training [13].
To improve convergence and prevent overfitting, several training strategies are applied:
-
Early stopping was applied to stop training when validation performance stops improving
-
Learning rate reduction on plateau
-
Model checkpointing to save the best model weights
These techniques help improve model stability and generalization performance.
-
-
Experimental Setup
Experiments were conducted using the TensorFlow/Keras framework in Google Colab (GPU-enabled environment). The model is trained for a maximum of 60 epochs, with training terminated early if no improvement is observed.
Performance is evaluated using multiple metrics, including accuracy, precision, recall, and F1-score. A confusion matrix is also used to analyze classification behavior across different soil fertility classes.
-
-
RESULTS AND DISCUSSION
The performance of the proposed CNN model was evaluated based on its ability to classify soil images into three categories: Fertile, Moderately Fertile, and Infertile. From the experimental results, the model achieved an overall accuracy of 93.41%, indicating that it is capable of learning meaningful visual patterns from RGB soil images despite the absence of additional spectral information.
A closer look at the training process, as shown in Fig. 3, reveals that both training and validation accuracy improved steadily over time, with very little gap between the two curves. This behavior suggests that the model was able to generalize well to unseen data without overfitting. The use of dropout, data augmentation, and adaptive learning strategies appears to have contributed to this stable learning process.
Fig. 3: Training and validation accuracy and loss curves.
To better understand how the model performs across different classes, the confusion matrix presented in Fig. 4 provides useful insight. It can be observed that the Fertile and Moderately Fertile categories were classified with high accuracy, indicating that the model was able to capture distinct visual characteristics associated with these classes. However, the Infertile category shows comparatively lower performance, particularly in terms of precision and recall.
Fig. 4: Confusion matrix for soil fertility classification.
This difference in performance is not unexpected. One contributing factor is the imbalance in the dataset, where the number of Infertile samples is smaller compared to the other classes. In addition, soil fertility does not exist as strictly separated categories in real-world conditions. Instead, soil characteristics often change gradually, which makes it difficult to clearly distinguish between neighboring classes based only on visual appearance. As a result, some level of misclassification between adjacent categories is unavoidable.
To quantify class-wise performance, the evaluation metrics are summarized in Table II.
Table II: Class-wise Performance Metrics
Class
Precision
Recall
F1-Score
Fertile
0.95
0.90
0.93
Infertile
0.76
0.74
0.75
Moderately Fertile
0.95
0.98
0.97
As shown in Table II, the Moderately Fertile class achieved the highest F1-score of 0.97, suggesting that the model was particularly effective in recognizing intermediate soil characteristics. On the other hand, the Infertile class recorded lower scores, which again reflects both data imbalance and the inherent similarity between soil categories.
Overall, the results demonstrate that even with standard RGB imagery, a properly designed CNN can achieve high classification performance. While approaches based on multispectral or hyperspectral data may offer additional information, the findings of this study suggest that meaningful soil assessment can still be achieved using simpler and more cost-effective imaging techniques.
-
CONCLUSION
In this study, a CNN-based approach was explored for classifying soil fertility using UAV-simulated RGB imagery. Rather than depending on costly sensing systems, the work focused on understanding how effectively standard visual data can be used to identify different soil conditions. The results show that meaningful patterns related to soil fertility can indeed be captured using RGB images when combined with an appropriately designed deep learning model.
The proposed model achieved an overall classification accuracy of 93.41%, with particularly strong performance in identifying Fertile and Moderately Fertile samples. The relatively lower performance observed for the Infertile category highlights the challenges associated with class imbalance and the gradual transition of soil properties in real-world conditions. These findings reflect not only the strengths of the model but also the inherent complexity of the classification problem.
From a practical perspective, this study suggests that low-cost imaging combined with deep learning can provide a viable alternative for soil assessment, especially in regions where access to advanced sensing technologies is limited. The ability to perform reliable classification using simple RGB imagery makes the approach more accessible and easier to deploy in real agricultural settings.
Future work will focus on extending this framework to real UAV-acquired datasets and incorporating additional sources of information to further improve robustness. Exploring hybrid approaches that combine visual data with other soil indicators may also help address current limitations and enhance overall performance.
REFERENCES
-
M. Githongo, Gendered farmer perceptions towards soil nutrition and willingness to pay for a filer-based in-situ soil testing kit, Agricultural Water Management, 2023.
-
A. O. Akinbode, T. A. Ajayi, and A. Ogunleye, Farmers perception and practice of soil fertility management and conservation in the era of digital soil information systems, Agriculture, vol. 14, no. 7, p. 1182, 2024.
-
T. B. Shahi, C.-Y. Xu, A. Neupane, and W. Guo, Machine learning methods for precision agriculture with UAV imagery: A review, Electronic Research Archive, vol. 30, no. 12, pp. 4277-4317, 2022.
-
X. Chen, Y. Deng, L. Luo, and Y. He, Recent advances in AI-based UAV remote sensing for sustainable soil management: A review, Computers and Electronics in Agriculture, vol. 207, p. 107697, 2023.
-
Y. Liu, T. Zhang, and R. Wang, Deep learning-based soil nutrient estimation using UAV multispectral imaging, Computers and Electronics in Agriculture, vol. 214, p. 108587, 2024.
-
M. Awais, I. Hussain, M. A. Zia, and T. Mehmood, AI and machine learning for soil analysis: An assessment of sustainable agricultural practices, Agronomy, vol. 13, no. 2, p. 378, 2023.
-
J. Hu, C. Liu, X. Wang, and H. Yang, Application of UAV-based hyperspectral imaging and machine learning for soil nutrient estimation: A review, Geoderma, vol. 403, p. 115357, 2021.
-
Y. Zhang, J. Wang, D. Zhang, and H. Li, Soil nutrient estimation and mapping in farmland based on UAV imaging spectrometry, Remote Sensing, vol. 13, no. 2, p. 198, 2021.
-
S. Mohanty, D. Hughes, and M. Salathé, Using deep learning for image-based plant disease detection, Frontiers in Plant Science, vol. 7, p. 1419, 2016.
-
D. Pound, A. French, J. Wells, M. Bennett, A. Pridmore, and T. Pridmore, Deep learning for multi-task plant phenotyping, Trends in Plant Science, vol. 22, no. 11, pp. 914-925, 2017.
-
K. Kamilaris and F. X. Prenafeta-Boldú, Deep learning in agriculture: A survey, Computers and Electronics in Agriculture, vol. 147, pp. 70-90, 2018.
-
A. Krizhevsky, I. Sutskever, and G. Hinton, ImageNet classification with deep convolutional neural networks, in Advances in Neural Information Processing Systems (NeurIPS), 2012.
-
T. Lin, P. Goyal, R. Girshick, K. He, and P. Dollár, Focal loss for dense object detection, in Proc. IEEE International Conference on Computer Vision (ICCV), 2017.
-
R. Agrawal, V. Singh, and A. Sharma, Smart farming with drones and AI: A meta-analysis of agronomic outcomes, Precision Agriculture, vol. 25, no. 1, pp. 45-62, 2024.
-
M. El-Jamaoui, A. Garcia, S. Kaba, J. A. Martínez, and C. Tovar, Assessing soil organic carbon using UAVs and machine learning, Sustainability, vol. 17, no. 8, p. 3440, 2025.
-
E. Gyasi, K. Osei, and A. Mensah, AI-driven UAV soil fertility mapping in Sub-Saharan Africa: A review, African Journal of Agricultural Research, vol. 19, no. 5, pp. 118-132, 2023.
-
K. He, X. Zhang, S. Ren, and J. Sun, Deep residual learning for image recognition, in Proc. IEEE CVPR, 2016.
-
Y. LeCun, Y. Bengio, and G. Hinton, Deep learning, Nature, vol. 521, pp. 436-444, 2015.
-
R. Padarian, B. Minasny, and A. B. McBratney, Using deep learning for digital soil mapping, Geoderma, vol. 312, pp. 178193, 2018.
-
J. Schmidhuber, Deep learning in neural networks: An overview, Neural Networks, 2015.
-
S. Liakos et al., Machine learning in agriculture: A review, Sensors, 2018.
-
C. Zhang and J. Kovacs, The application of small UAVs for precision agriculture, Precision Agriculture, 2012.
-
R. Gebbers and V. Adamchuk, Precision agriculture and food security, Science, 2010.
-
M. Weiss et al., UAV-based monitoring for agriculture, Remote Sensing, 2020.
-
J. Deng et al., ImageNet: A large-scale image database, CVPR, 2009.
-
D. Silver et al., Mastering complex tasks with deep learning, Nature, 2016.
-
A. Boulent et al., Deep learning for detecting plant diseases, Frontiers, 2019.
-
H. Benos et al., Machine learning in agriculture, Computers and Electronics in Agriculture, 2021.
-
P. R. Sharma et al., Soil classification using CNN, Applied Sciences, 2021.
-
R. Padarian et al., Deep learning for soil mapping, Geoderma, 2019.
-
B. Minaee et al., Image segmentation using deep learning, IEEE Access, 2021.
-
T. Khoshnevisan et al., Applications of IoT and AI in agriculture, Smart Agriculture, 2020.
