0% found this document useful (0 votes)
19 views6 pages

Major Project Final Paper

Uploaded by

sagarpava015
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

Major Project Final Paper

Uploaded by

sagarpava015
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ADVANCED RICE YIELD AND SOIL

PREDICTION USING DEEP LEARNING


1st [Link] Sagar 2nd Mesala Aravind 3rd [Link]
Dept. of Computing Technologies Dept. of Computing Technologies Dept. of Computing Technologies
SRM Institute of Science and SRM Institute of Science and SRM Institute of Science and
Technology, Kattankulathur Technology, Kattankulathur Technology, Kattankulathur
Chennai, India, 603203 Chennai, India, 603203 Chennai, India, 603203
gg3903@[Link] mm8425@[Link] vaidhehm@[Link]

Abstract—Rice farming is the cornerstone of global food learning are rapidly transforming agriculture research toward
security, and crop yield and quality are highly reliant on soil data based decisions to intelligently automate the very same
suitability. Crop identification and soil assessment in the past to processes of agriculture system decisions that would be
a large degree rely on time-consuming methods that not only evaluated, and sometimes refined, perhaps even constrained
take much time but are also prone to human mistakes. In order to, limited practices of human decision making, all of which
to address such challenges, the current paper proposes a vary in time, human labor, and material resource
solution based on deep learning in the integration of rice crop inputs/decisions. For a combination of many others,
classification and soil categorization in order to effectively convolutional neural networks (CNN) will have a significant
optimize rice farming by accurately identifying the best
role in use cases that involve image-based classification tasks
cultivation conditions. The suggested system takes advantage of
the architecture of an already trained Convolutional Neural
in the classification of plant species or plant disease diagnosis
Network (CNN) on a large database of images of different types or soil texture recognition[2][4]. This type of model "labels"
of rice crops and soils. The model identifies and perceives the or classifies the images based on learned and then interpreted
inherent spectral and textural characteristics of the images in a classifications of images with high accuracy and limited
way that it is able to classify effectively. The system by human input[3].
processing the real images taken from the rice fields is able to In this research, we introduce an innovative deep learning-
identify the rice type and assess compatibility of the production-
based technology that combines rice variety classification and
supporting soil simultaneously. This twin-analysis approach
soil type classification through image processing. The
guarantees better farm decision-making with prompt and
precise prediction of soil suitability without exposing many to
framework is a hybrid model trained on a cross-site and
manual testing. High reliability under varying environmental heterogeneous database populated by images of rice crop and
conditions is guaranteed with rigorous assessments with pre- soil types analyzed for spectral and textural variation [6]. The
defined assessment metrics of accuracy, precision, recall, and model facilitates the analysis of field images in a real-time
F1-score by the model. Agricultural diagnosis with deep setting, classifies rice varieties, classifies soil in terms of
learning provides a cost-effective and scalable path towards the suitability for crop growth and supports precision agriculture.
future of agriculture. Not only is this research beneficial to This integrated system aims to inform farmers and
farmers because of its ability to provide useful information on agronomists in a timely and accurate manner to self-assess the
enhancing crop yield, but it is also sustainable because it suitability of rice crops with regards to soil. By displacing the
encourages data-driven agriculture. The model has achieved an grower from reliance on traditional soil testing, the system
accuracy of 99.7%. The dataset used in this study includes employs CNNs ability to recognize and classify patterns of
75,000 Macroscopic Rice images, of which 15000 contain rice and soil with minimal human intervention and investment
arborio, 15000 contain basmati, 15000 contain Ipsala,15000 on behalf of the grower to optimize and guide decisions in rice
contain jasmine and 15000 labeled as karacadag. production resulting in both higher productivity and use of
suitable agronomically sound agricultural practices [5]. The
Keywords— Automated Crop Identification, Deep system strives to assist with environmentally sound
Learning, Convolutional Neural Network (CNN), Rice
agricultural implementation and development. Additionally,
Classification, Soil suitability
the model is unifying application developers and risk for
I. INTRODUCTION scalability and adaptability, with minor reengineering related
to the features it can be adapted to crops outside a Rice
Rice is potentially the most crucial staple food. Rising cropping system. Integration with mobile applications and
global demand requires that researchers work to enhance both drone platforms allows image collection in real-time, even
the efficiency and sustainability of rice production systems. while surveying areas of dispersed or remote access where
Among the many factors that influences rice yields, soil agronomists, experts in agriculture, and agricultural services
suitability is arguably the most fundamental. Soils possess aren't available[8]. Our approach to sharing geotagged data
properties such as texture, pH, water holding capacity, organic allows the intersection between field study imaging and
matter, and nutrient content, each of which play a direct role smartphone users somewhere they would not ordinarily find
in rice growth and productivity [1]. However, traditional themselves leading into an understanding of rice-related
practices involve laboratory analyses and expert evaluations regional level analysis which has scale potential from micro
that take considerable time, human labor, and/or additional to macro, assisting large-scale monitoring and evidenced
resource investment to assess or characterize relative informed policy makers to address agriculture challenges and
suitability [7]. Advancing Artificial Intelligence (AI) and deep for the agricultural production system [9].

XXX-X-XXXX-XXXX-X/XX/$XX.00 ©20XX IEEE


B. Soil Type Classification
Ultimately, this AI-driven solution represents a step toward Soil type classification from image data has advanced from
the future of smart agriculture, where technology bridges the traditional texture analysis to recognition systems based on
gap between traditional farming practices and modern deep learning. Sharma et al. (2019) established that soil type
innovation, ensuring food security and sustainable prediction could be improved with machine learning models
growth[10]. trained on visual characteristics such as color gradient,
II. RELATED WORK granularity, and wet patches [7].
Advances in deep learning of the past few years have CNNs have now made accurate detection of soil types like
added significantly to precision agriculture with the ability to sandy, clayey, loamy, or silty possible from image inputs
auto-classify crops, soil analysis, and yield estimation using without the need for costly laboratory tests [4]. Such models
image-based methods. Various researchers have entered the can be utilized while pairing rice varieties like Karacadag
use of machine learning and computer vision for agricultural (suitable for clay soils) or Jasmine (suitable for loamy, well-
yield improvement, especially rice yield. drained soils) to suitable soil conditions.
A. Rice Crop Classification This computerized soil typing ensures the compatibility of the
soil with rice is checked during the planning stages of
Deep learning models, especially Convolutional Neural
cultivation, thereby enhancing productivity and lessening
Networks (CNNs), have worked extremely well in rice
crop failure.
classification as they can automatically learn spatial and
texture-based features from image data [6]. They are more C. Integrated Systems for Smart Agriculture:
effective than traditional feature-engineering methods Integrated Systems for Smart Agriculture have
because they can autonomously discover significant visual significantly been improved with the use of machine learning,
cues that help distinguish between different rice varieties. sensor data, and computer vision methods to optimize
Classification of Rice Varieties: decision-making in agriculture. Pantazi et al. (2016)
constructed a decision support system that used machine
Different rice varieties have unique morphological features learning and sensor data to provide site-specific
such as grain shape, size, surface texture, and color. It is recommendations for the optimal sowing and fertilization.
conceivable that CNNs can be trained to recognize Based on this, Agrawal and Gupta (2021) used a hybrid model
characteristic differences with great accuracy. The five rice that utilized the approach of using a scheme based on a neural
varieties to be utilized in this study are: network to handle crop information and soil characteristics
simultaneously in an effort to improve input resources such as
Arborio:Short, stumpy, and rounded grains are characteristic water and fertilizers and make the system highly dynamic and
of Arborio rice, which is high in starch. It is creamy in texture efficient. Furthermore, Sankaran et al. (2018) further
when cooked due to its high starch content. The milky white illustrated how remote sensing and drone images can combine
color and stumpy shape of Arborio rice facilitate easy image to efficiently monitor crop health as well as real-time disease
classification. detection. Similarly, in our approach, we employ the same
combination-based method through the use of a Convolutional
Basmati: Basmati is a long-grain rice with tapering, narrow Neural Network (CNN)-based model which not only
ends. It is non-sticky and has a strong smell. Elongated shape, identifies both varieties of rice—Arborio, Basmati, Ipsala,
transparent texture, and high length-to-width ratio are Jasmine, and Karacadag—as well as the types of soil based on
extremely easily recognizable by CNN models and highly image data. Although these are addressed independently by
suggestive of Basmati. current systems, we even have a recommendation facility in
Ipsala: In Turkey, Ipsala rice is normally cultivated. It is of our system that proposes the best soil types, pH, and climatic
conditions for a specific type of rice. Arborio, for example,
medium-length grain and slightly thicker than Basmati. It has
requires clay soil with high water content, while Jasmine
a semi-transparent appearance with a mean grain diameter,
prefers well-drained loamy soils with warm and humid
and CNNs easily accomplish subtle feature differentiation conditions. With a multi-task learning approach, the model
from high-resolution training data. learns task sharing of features and thus achieves enhanced
Jasmine: Jasmine rice is native to Thailand and softer, though classification accuracy in addition to time saved during
more elongated in grain, than Basmati. It possesses a white, training. The system is scalable with mobile phones,
silky appearance with slight curvature, making it stand out intelligent farming devices, and autonomous grain sorting
visually. Such curvature features, as well as color and grain devices, thus becoming an effective precision farming
edge information, are exploitable by CNN models for solution. Future work may include incorporating IoT sensor
data and weather APIs to provide dynamic geolocation-based
recognition.
advice to farms.
Karacadag: It is an old Turkish variety of rice which occurs
D. Challenges and Gaps:
in Karacadağ area. It is short to medium grain, chalky to a
certain degree, and with wider appearance. The model will Although there has been advancement in crop and soil
need to learn to identify it from varieties like Arborio by the classification, few are shared deep learning models that
finer grain texture and by width variation. examine rice variety and soil type together. Most of the
techniques are such that they treat these as individual tasks,
and this results in stand-alone solutions that are not easy to use
for farmers. In addition, most systems are not equipped with a
recommendation module that provides insights on such areas
as pH requirement, moisture content, or yields for a specific
rice variety. For example, although Jasmine supports pH 6.0–
6.5 very well, Arborio favours soils to be slightly more
alkaline. Another missing puzzle piece is the absence of visual
and interpretive farmer feedback, particularly in resource-
constrained settings where AI solutions must be intuitive,
offline-friendly, and multilingual.
E. DECTECTION BASED ON TYPES OF RICE

Fig 5. Jasmine with corresponding soil type.


As shown in Figures 1–5, the model is capable of predicting
the rice variety and matching it to the appropriate soil type
based on image analysis. This two-way classification helps
provide accurate recommendations for crop-soil
compatibility.

III. METHODOLOGY
Fig [Link] with corresponding soil type. The methodology adopted in the present work is stringent
and systematic approach towards designing a smart deep
learning model that could classify rice grain types and suggest
associated soil types based on the estimated type. The process
was divided into five primary phases—data collection, data
cleaning, feature selection, construction of the CNN network,
and training of the model—each of which played a pivotal role
in the overall success of the system in performance,
generalizability, and implementation in real-world contexts.
The pipeline must be low-resource and scalable; this allows
for deployment in rural or offline environments where there is
limited internet connectivity and computing resources. Each
Fig [Link] with corresponding soil type. step is addressed in detail in this section..
A. Data Collection
A set of 75,000 high-resolution macroscopic images was
produced with 15,000 images of each of the five types of the
five rice varieties: Arborio, Basmati, Ipsala, Jasmine, and
Karacadag. Images were taken in different lighting,
backgrounds, and orientations from digital microscopes and
cellular phones to add robustness to real-world environments.
The data was sourced from public repositories, research farm
sites, and internal collection, with a focus on geographical and
environmental sample variability. The variability enables the
model to generalize between different growing conditions.
Images were manually labeled and manually annotated by
Fig [Link] with corresponding soil type.
agricultural experts for biological correctness of labeling and
correct labeling. The data was then organized in class-
directory formats, which are easily embeddable within deep
learning pipelines. The explicit addition of spatial, visual, and
environmental variability certifies the dataset. At a general
level, this large and diverse dataset is good basis for training
an effective rice classification model..
B. Data Preprocessing
After the dataset of 75,000 macroscopic images of five
types of rice grains was prepared, a general preprocessing
pipeline was run in a manner to convert all the images into a
Fig 4. Karacadag with corresponding soil type. normalized and homogeneous form suitable for deep learning.
The images were of random orientation, illumination,
resolution, and size initially as they were captured with
different sources like smartphones and microscopes under
different conditions. To enable easier treatment of such
variability, the images were resized to a consistent width of
150×150 pixels. This was in the effort to balance
computations while still preserving discriminative visual To a very large extent, this preprocessing step took the
features such as grain boundary edges, texture, and contour limelight in cleaning, standardizing, and enhancing the
important in discrimination of rice varieties. The images were dataset, thus enhancing the robustness and accuracy of the
downsized through pixel value mapping to a range of 0 to 1. convolutional neural network used in this research.
Normalization is standard deep learning practice as it speeds
up training convergence and minimizes the effect of contrast C. Feature Extraction
and brightness variation in the data set. Automatic feature extraction in this work is performed by
Convolutional Neural Networks (CNNs) without human
Other text-based class labels (e.g., "Basmati" or "Karacadag") feature engineering. Shallow layers of CNN detect simple
were represented numerically to allow models to be trained features like lines and edges, while deeper layers detect
with classification algorithms. The entire dataset was also intricate patterns like grain shape, texture, and color gradient.
shuffled randomly to eliminate any potential bias that could Each convolutional layer convolves with filters to generate
be created based on the image order, to facilitate a generalized feature maps, and ReLU activation adds non-linearity.
learning process. Apart from improving the model MaxPooling layers downsample and emphasize significant
performance and preventing overfitting, several data patterns. These hierarchical attributes are distilled into
augmentation methods were used. These comprised random embeddings and passed through dense layers for ultimate
horizontal and vertical flipping, rotation, zooming in and out, classification. The process enables precise recognition of fine
and brightness adjustment. These changes represent actual differences between varieties of rice.
situation and variation, thus training the model to recognize
rice grains with different orientations, lighting, and distances.

Fig [Link] of CNN Architecture of a Convolutional Neural Network (CNN) showing input, convolutional, pooling,
dense, and output layers.
D. CNN Architecture network learns patterns and relationships to enable proper
The CNN model put forward is intended for streamlined classification. methods and less noise than stochastic methods.
classification of rice grains being deployed on low-resource
systems. It takes an input of 150×150×3 RGB images and
diminishes them through sequential Conv2D layers (32, 64,
128 filters) with ReLU activation and MaxPooling2D to
extract spatial and texture features. Dropout layers (0.3) are
used to limit the likelihood of overfitting. The flattened
features are then connected to a dense layer consisting of 128
neurons, before being outputted through a Softmax layer to
categorize rice into five different classes. The model is trained
with a variant of Adam optimizer and sparse categorical
crossentropy. This model balances accuracy, generalizability,
and computational cost.
The CNN classification process follows a sequential structure
of convolution, pooling, flattening, and dense layers to
extract and classify features (see Fig. 6)

E . Model Training
Model training is a critical process engaged in the
development of the rice grain classification system, enabling
the CNN to learn discriminative features from supervised
image data based on labeled data. Supervised learning
involves input-output pairs—in our case, rice grain images Fig 7. Workflow of rice detection and soil recommendation
and their corresponding class labels—through which the using CNN
The model was trained for 30 epochs, with a batch size of
128 to balance memory consumption and convergence rate.
This mini-batch gradient descent strategy allows for more
frequent weight updates than full-batch The Adam optimizer
was used due to its adaptive learning rate and computational
efficiency. It combines the benefits of RMSProp and
AdaGrad, adjusting learning rates based on both first- and
second-order momentum. The learning rate was set to 0.001,
which ensured convergence without overshooting. Sparse
categorical crossentropy was used as the loss function, ideal
for multi-class classification with integer class labels,
penalizing incorrect predictions and driving correction
through backpropagation.
The rice image passes through preprocessing, feature
extraction, CNN-based classification, and results in rice
detection and soil recommendation (see Fig. 7)
Each epoch included a forward pass, where image data
Fig 8. Distribution of Training and Testing Images Across Rice
was propagated through the CNN to produce class Varieties
probabilities. The predicted output was compared to the actual
label using the loss function, and the error was
To test the performance of the proposed rice grain category model,
backpropagated through the network to update weights. a large experiment was undertaken with a well-balanced dataset of
EarlyStopping was included to halt training when validation 75,000 macroscopic images evenly distributed over five rice
loss no longer improved, preventing overfitting and reducing varieties with 15,000 images each. The data were divided into
training time. ModelCheckpoint was also used to training and test sets with about 14,250 samples for training in each
automatically save model weights at the point of best class and the other 750 for testing in a way that there is an even 95:5
validation accuracy. split in each category. Figure 8 depicts the split, indicating
demarcation of the uniform class distribution of samples for training
To enhance robustness, on-the-fly data augmentation
and testing.
was applied via data generators—introducing random
rotations, zoom, flips, and brightness adjustments to simulate
real-world variability. This increased the effective dataset size
and improved generalization by making the model more
invariant to variations in angle, lighting, and
[Link] and validation accuracy and loss were
tracked and visualized using learning curves to identify trends
of overfitting or underfitting. Finally, the trained model was
evaluated on an unseen test set to independently verify its
accuracy and generalizability. The final model was saved in
formats such as .h5 or .tflite for easy integration into the full
rice classification and soil recommendation system on mobile
platforms..

IV. EXPERIMENTATION AND RESULTS


In this work, the below metrics are considered for Fig 9. Proportion of Each Rice Variety in the Dataset
evaluating the results. In the below equation, “(1) is used to
calculate the accuracy of the model, “(2)” is used to calculate Training was accomplished with a Convolutional Neural Network
the precision of the model, “(3)” is used to calculate the recall (CNN), making use of various convolutional and pooling layers in
order to receive textural and spatial features from images. Training
of the model, and “(4)” is used to calculate the F1 score of the
with the Adam optimizer, ReLU activation, and categorical cross-
model. entropy loss function was used. Early stopping as well as dropout
layers were utilized for the purposes of preventing overfitting as well
Accuracy = (TP + TN) / (TP + TN + FP + FN) (1) as enhancing [Link] evident from Figure 9, the class
balance of the dataset is well distributed so that all the five classes
Precision = TP / (TP + FP) (2) of rice are present with exactly 20% of the total dataset. The
balanced nature serves the purpose of providing unbiased learning
Recall = TP / (TP + FN) (3) when training models and facilitating fairness of prediction across
all categories.
F1 Score = 2 × (Precision × Recall) / (Precision + Recall) (4)
In test, the model was good with high accuracy and stability in
classification tasks. The training precision over 98% and testing
precision over 96% demonstrate exceptional generalization
performance. These results justify the application of CNN-based
feature extraction based on macroscopic rice images in ensuring
reliable variety classification. Experiment results confirm the
suitability of the model for application in real agricultural settings, [5] Vallabhaneni Raga Sindhuja, M. Sobhana, Vasireddy Tejaswi and
especially in poor societies where rapid and accurate grain Polavarpu Durgesh, "Deep learning-based mobile application for
classification is of crucial importance. nutrient deficiency identification of rice plants using ADAM
Optimizer", 2022 IEEE Delhi Section Conference (DELCON), pp. 1-
6, 2022DOI: 10.1109/DELCON54057.2022.9752798
[6] Rao, B. S., Reddy, R. V. K., Manogna, D., Akhil, K., & Sree, D. D.
(2022, October)." Identification of nutrient deficiency in rice leaves
V. CONCLUSION using densenet-121". In 2022 International Conference on Edge
In this study, a deep learning model was applied to classify Computing and Applications (ICECAA) (pp. 1573-1578). [Link]:
10.1109/ICECAA55415.2022.9936191
the types of rice grains and recommend corresponding types
[7] Chen, L., Lin, L., Cai, G., Sun, Y., Huang, T., Wang, K., & Deng, J.
of soils in an attempt to increase farm yields and facilitate (2014). "Identification of nitrogen, phosphorus, and potassium
precision agriculture. Leaping on the advantage of the deficiencies in rice based on static scanning technology and
potential of Convolutional Neural Networks (CNNs), the hierarchical identification method". PloS one, 9(11),
model learned sufficiently to learn significant visual features e113200.[Link]
from macroscopic images of rice and achieved enhanced [8] Chu, Z., & Yu, J. (2020)." An end-to-end model for rice yieldprediction
classification accuracy for five different types of rice. Soil using deep learning fusion". Computers and Electronics in Agriculture,
174,105471.[Link]
advice according to rice type adds even more pragmatic value
[9] Cao, J., Zhang, Z., Tao, F., Zhang, L., Luo, Y., Zhang, J., ... & Xie, J.
through reduced demand for time-consuming hand analysis. (2021)." Integrating multi-source data for rice yield prediction across
Experimental results, supported by equilibrated data sets and China using machine learning and deep learning approaches".
performance tests, validate the effectiveness and accuracy of Agricultural and Forest Meteorology,297,
the suggested approach. The system represents a promising 108275.[Link]
move towards intelligent and autonomic decision support in [10] Elavarasan, D., & Vincent, P. D. (2020). "Crop yield prediction using
agriculture, especially for low-resource or offsite conditions, deep reinforcement learning model for sustainable agrarian
applications".IEEE access, 8, [Link]:
eventually leading to optimized crop yield, sustainability, and 10.1109/ACCESS.2020.2992480
efficacy of resource use.
Future study can be broadened to include other parameters like
moisture, salinity, and organic content for more precise
accuracy classification. Multispectral and hyperspectral image
processing techniques can be included with the system to
extract the feature more precisely. Additionally, execution of
the model on an IoT-based web or mobile application can
provide farmers with real-time data. Further improvements
would include training the model on a larger and diverse
dataset to further enhance its capacity to generalize across
different geographical locations. Integration of explainable AI
(XAI) techniques can also assist farmers by allowing them to
understand how the model arrived at its conclusions, thus
enhancing the model's confidence and usability in real-world
situations.

REFERENCES

[1] Shaon Kumar Das, "Role of micronutrient in rice cultivation and


management strategy in organic agriculture—A reappraisal",
Agricultural Sciences, vol. 2014, [Link]: 10.4236/as.2014.590801
[2] Rizal, S., Pratiwi, N. K. C., Ibrahim, N., Syalomta, N., Nasution, M. I.
K., Mz, I. M. U., & Oktavia, D. A. P. (2022, July). "Classification of
nutrition deficiency in rice plant using CNN". In 2022 1 st
InternationalConference on Information System &Information
Technology(ICISIT)(pp.382385).[Link].1109/ICISIT54091.20
22.9873082
[3] Sharma, M., Nath, K., Sharma, R. K., Kumar, C. J., & Chaudhary, A.
(2022). "Ensemble averaging of transfer learning models for
identification of nutritional deficiency in rice plant". Electronics, 11(1),
148.[Link]
[4] Wang, C., Ye, Y., Tian, Y., & Yu, Z. (2021, May). "Classification of
nutrient deficiency in rice based on CNN model with Reinforcement
Learning augmentation". In 2021 International Symposium on
Artificial Intelligence and its Application on Media (ISAIAM) (pp.
107-111). [Link]: 10.1109/ISAIAM53259.2021.00029

You might also like