Enhancing Agriculture Crop Classification with Deep Learning
By Yasmin Makki Mohialden, with Nadia Mahmood Hussien, Saba Abdulbaqi Salman, Ahmed Bahaaulddin A. Alwahhab, and Mumtaz Ali
Agriculture
stands at the forefront of global challenges such as food security,
sustainability, and technological innovation. Among staple crops, rice plays a
central role in feeding nearly half of the world’s population.
Reliable
identification and classification of rice crops are essential to optimize yield
prediction, crop health monitoring, and effective agricultural decision-making.
The growing capabilities of deep learning, particularly Convolutional Neural
Networks (CNNs), provide promising solutions to address these challenges.
Our
study, conducted in collaboration with my esteemed colleagues—Dr. Nadia
Mahmood Hussien (Mustansiriyah University), Dr. Saba Abdulbaqi Salman
(Aliraqia University), Dr. Ahmed Bahaaulddin A. Alwahhab (Middle
Technical University), and Dr. Mumtaz Ali (Deakin University,
Australia)—aimed to advance crop classification technologies using deep
learning approaches. The findings of our research were published in the Babylonian
Journal of Artificial Intelligence (2024).
Problem Statement
Traditional
machine learning techniques in agriculture have demonstrated value; however,
they often struggle with imbalanced datasets and complex crop imagery. A key
obstacle we identified is label imbalance in available crop image
datasets, which hampers the accuracy and reliability of models. While rice
images are abundant, non-rice crop images (such as wheat, sugarcane, jute, and
maize) are less represented, leading to biased performance and skewed results.
Our
work directly addresses this imbalance, aiming to test and refine CNN-based
classification methods to better distinguish rice from non-rice crops, while
also laying the foundation for more robust agricultural applications.
Related Work
Recent
years have seen significant progress in agricultural applications of deep
learning. For instance, hyperspectral imaging (HSI) has been applied for
rice seed classification under varying temperature conditions, achieving
accuracies above 90%. Other studies have used transfer learning with CNNs to
detect rice seed vigor across varieties with promising generalization results.
Furthermore, deep-learning-based recognition of rice phenological stages has
shown potential for long-term crop monitoring.
These
advancements inspired our research and underscored the importance of refining
deep learning frameworks to suit practical agricultural scenarios. Our work
builds upon these foundations while focusing on binary crop classification.
Proposed Method
Our
methodology follows a systematic pipeline, illustrated in Figure 1. The
key steps include:
![]() |
Figure 1 - Is the Block Diagram of the Proposed Method |
- Loading
Images – Rice and non-rice images were collected
and prepared.
- Data
Preprocessing – Images were resized (e.g., 100x100
pixels), converted into arrays, and augmented through horizontal flipping,
rotation, and shifting to increase dataset diversity.
- Dataset
Splitting – Images were divided into training and
testing sets for model evaluation.
- CNN
Architecture – We designed a sequential CNN model with
multiple convolutional, pooling, and dense layers, concluding with a
sigmoid activation for binary classification.
- Training
and Compilation – Using TensorFlow and Keras, the model
was compiled with the Adam optimizer and binary cross-entropy loss, then
trained with validation monitoring.
- Evaluation – Model
performance was assessed through accuracy, precision, recall, F1-score,
and confusion matrices.
- Visualization
and Metrics – Accuracy and loss curves were plotted
(see Figure 2 and Figure 3) and performance metrics saved
for future analysis.
![]() |
Figure 2 - The Model Accuracy |
![]() |
Figure 3 - The Model Loss |
The
Python environment supporting this work leveraged widely used libraries
including NumPy, Pandas, Matplotlib, scikit-learn, TensorFlow, TensorBoard,
and Keras (see Table 1).
![]() |
Table 1 - The Python Libraries in the Proposed System |
Results and Discussion
The
model demonstrated 100% accuracy in both training and testing datasets.
However, this apparent success must be interpreted cautiously.
![]() |
Table 2 - The Classification Report |
As
shown in the classification report (Table 2), the model excelled at
identifying rice crops (precision, recall, and F1-score all equal to 1). Yet,
the performance on the non-rice class was poor, with precision and recall
values of zero. Similarly, the confusion matrix (Table 3) revealed that
the model failed to correctly classify any non-rice samples, while perfectly
classifying all rice samples.
![]() |
Table 3 - Confusion Matrix |
This
outcome reflects a severe class imbalance problem, where the model
overfits to the dominant rice class, ignoring underrepresented non-rice
classes. While the results confirm the strength of CNNs in detecting rice
crops, they also highlight the necessity of balanced datasets and improved
model designs for real-world applications.
Conclusion and Future Work
Our
study demonstrates both the potential and limitations of deep learning
in crop classification. The model achieved exceptional accuracy for rice crops
but underperformed for non-rice crops, due to dataset imbalance.
Future
research directions include:
- Expanding
datasets with more non-rice crop images.
- Applying
advanced data augmentation techniques.
- Leveraging
transfer learning with pre-trained models such as VGG, ResNet, or
Fusion networks.
- Tuning
hyperparameters (e.g., learning rate, batch size, network depth).
- Exploring ensemble
methods to improve classification robustness.
We
believe these enhancements will strengthen the model’s reliability and make it
more suitable for precision agriculture, enabling applications such as yield
prediction, disease detection, and real-time crop monitoring.
Acknowledgment
I
would like to express my gratitude to my co-authors Nadia Mahmood Hussien,
Saba Abdulbaqi Salman, Ahmed Bahaaulddin A. Alwahhab, and Mumtaz Ali for
their invaluable contributions to this research. Together, we continue to work
toward advancing agricultural technologies that will contribute to global food
security.
Conflicts of Interest and Funding
Our
team confirms that there were no conflicts of interest in this study.
Moreover, this research received no external funding or institutional
sponsorship, underscoring its academic independence.
References
The
full list of references is included in the published paper.
Research Link
This
article is based on the peer-reviewed publication:
Enhancing
Agriculture Crop Classification with Deep Learning, Babylonian
Journal of Artificial Intelligence, 2024, Vol. 20–26.