Prediction of Crop, Fertilizer and Disease Detection For Precision Agriculture
Prediction of Crop, Fertilizer and Disease Detection For Precision Agriculture
https://doi.org/10.22214/ijraset.2021.38328
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.429
Volume 9 Issue X Oct 2021- Available at www.ijraset.com
Abstract: The main walk of life of our Country is Agriculture. More than 70 % of the population’s lives depend upon
agriculture. It is also a great source of country’s economy. In order to make this filed more profitable for farmers proper crops
have to be grown in their fields. The prevalent problem among the farmers is Crop choice depending upon the soil in their
farmlands. Another challenge faced by farmers is choosing the right fertilisers for their crops, which plays a very important role
in getting a good and profitable yield. There is another major problem which they have to give more attention is the pest control
or the diseases to which the plants may limit their growth. The above listed problems may solved using the advanced techniques
of Precision Agriculture and data mining. Precision Agriculture is modern technique which can be used for farming. The main
objective of is to solve above problems using data mining techniques and build a decision system which would help farmers to
choose right crops for their farm , fertiliser recommendation for the crops grown and also to help the farmers in detecting the
diseases by using the infected leaf images..
Keywords: Precision Agriculture, Data Mining, Crop, fertilizer recommendation system, ML Algorithms
I. INTRODUCTION
India is the land of agriculture where the practice of agriculture predates to Indus valley civilization. When it comes to production of
farm outputs India ranks seconds across worldwide. According to records of 2018 more than 50% of the Indian population employ
in agriculture. It also contributes to country’s GDP, 17-20 % of India’s GDP is obtained from agriculture. The practice of agriculture
in villages helps in rural development and also in decreasing the poverty and helps in up liftment of the farmer socially as well as
economically. With all these and many more contributions of agriculture to the country it is necessary that proper care is taken for
the growth of agriculture in the country. Proper guidance has to be given for farmers at different levels of farming right from the
foundation of agriculture that is choosing crop grown in their farm according to the soil contents like the levels of nutrients, Once
the crop is decided proper fertilizers have to be given for the proper and healthy growth of the crops otherwise the crops may suffer
from deficiency of nutrients which results in decreasing of productivity. Even excess of fertilizer may cause soil pollution and may
affect the inner development and growth of the crops. Hence proper advice has to be given when it comes to fertilizer as is it has
direct link with crop growth, yield ,productivity and economy. Another barrier for the growth of crops is diseases to which plants
gets exposed. The identification of the disease to which the plants are disclosed is very prominent in order to avoid the loss which
may reflect in Yield productivity. The common method followed to detect the disease is by naked- eye surveillance which is a time
consuming process and also a lot of proficiency is required which may sometimes lead to appropriate decision as proper care and
more domain knowledge is required. An appropriate direction has to be given in recognizing the disease and pest control methods
should be inculcated to avoid the disease and improve the yield. In providing a direction to the above problems of selecting the
appropriate crops initially, making the choice of fertilizers and detecting the disease of the plants . Agriculture is practiced since
ancient times in our country we have enormous amount of historic data which can be passed down to build a decision system in
order to provide a direction to our farmers which would be beneficial both in terms of productivity and economy. Data Science and
Data Mining are boon in terms of advancement technology for the field of agriculture. The enormous amount of historic data
collected from the ancient agricultural practices can be passed down to process data and appropriate machine learning models are
built to give proper advice regarding crop and fertilizer selection and in detection of the disease. Precision agriculture on the other
hand is a modern concept of managing the farming activities. Precision Agriculture predominantly the third wave which follows
initially by Mechanized farming and secondly Green Revolution of the modern agriculture. The main objective of the Precision
agriculture is to determine a Decision support system to the whole agricultural practices by increasing the returns on inputs
meanwhile retaining resources. Crop selection, Fertilizer recommendation and Plant disease detection are some of the systems of the
precision agriculture.
The paper substantially focuses on building an application which guides the farmers by recommending the type of the crops that can
be grown in their farm according to the soil content , using data mining techniques and different machine learning models and the
model which is highly efficient and high accuracy is preferred finally. The paper also aims at prescribing the fertilizers which can be
given for the good growth of the plants by taking the inputs about the soil and the type of crop they are growing data mining
techniques and machine learning models the model which has high accuracy is preferred finally Finally, it helps the farmers in
detecting the disease to which the plants are exposed, it takes the image of disease infected leaf of the plants and tries to detect the
disease using image recognition techniques.
III. IMPLEMENTATION
In order to build a effective machine model following steps should be followed.
1) Problem Framing: From the description and problem statement, it can concluded that classification algorithms like below can
be used to frame the problem.
2) Data collection: The initial stage once the problem is known is data collection or data gathering. Since we are building
predictive models , they are only as strong as the data they're built on, good data collecting procedures are essential for creating
high-performing models. The information taken from the data must always be a error-free and relevant to the task at hand. The
data for the crop and fertilizer recommendation system can be directly collected from the respective soil. The dataset contains
the values of the crops as outputs or labels and the respective nutrient levels required for the crop to be grown .Dataset also has
the information regarding the rainfall for a particular area and also the levels of the pH required for the respective crop to be
grown. Disease detection dataset ,it consists of healthy and unhealthy images of disease affected leaves which is categorized
based on species and disease.
3) Data pre-processing: Data obtained is cleaned using various techniques .Some of which are involved are removing of the
irrelevant values , elimination of the repeated values or duplicated values. Trying to eradicate some typing errors, getting rid of
missing values, conversion of the data types. Using various techniques like mean ,median ,mode imputation will be applied for
missing value treatment. Finally the scaled data which is obtained either by standardization or normalization is used for the
training of the model as all the values will be in same scale.
4) Model Building : Dataset is divided into training and test data. machine learning algorithms' performance is estimated using the
train-test split technique. Model is trained using the train data. Using various different machine learning algorithms and the
model is built using appropriate machine learning algorithm. In this paper we are focussing on decision tree, Naïve Bayes,
SVM, Regression, Random Forest, ResNet
5) Model Evaluation: Evaluating a learning method is the crucial. This often requires an estimation of the skill of the model when
making predictions on data which is not seen during the training of the model. The planning of this process of training and
evaluating a predictive model is called experimental design. In order to provide significant value to application, make
predictions. Whether we're using machine learning to solve academic or business problems, it's becoming an increasingly
important part of our life. The objective of model evaluation is to determine a model's accuracy on future. There are two types
Hold out and cross-validation.
6) Model Selection: The process of selecting one method as a solution is called as model selection. Two classes of statistical
methods can be used to intrepret the estimated skill of different models for the purpose of model selection.
7) Model deployment: Once the model is developed it can be deployed using python web application frame work i.e., Flask. Flask
is a micro-framework. Since it is lightweight and only includes elements that are necessary. It only consists of parts required for
web development, which including routing, request handling, sessions, and so forth. Other functions, such as data handling, can
be handled by the developer through the creation of a custom module or the use of an enhancement.
IV. ALGORITHMS
In this paper we are focussing on decision tree, Naïve Bayes, SVM, Regression, Random Forest, ResNet
Decision tree is model is kin of supervised learning hierarchy. The process starts from intervening the root node to forecast a output
label. It’s usage can be paradigmed in regression and classification. Decision tree make us of the concepts of entropy, information
gain, attribution selection. It can be used in the field of marketing, withholding of customers, interpretation of diseases.
Naïve Bayes is affines to supervised learning which holds the bedrock from Bayes therm. It is authentic in clearing up classification
problem. This really is amongst the most basic and precise Classifiers. It's still a probabilistic classifier because it creates predictions
based upon on probability distribution function of the incidents. It can be fit in NLP, classification ,sentimental amnalysis and so on.
Support vector machine abbreviated as SVM also affines to supervised technique popular for Bi-classification contention. It takes
the help of vectors referred as support vectors. The intention of SVM is creation of outline called hyperplane. It includes both
classification , prediction of numeric. Whilst in two dimension it identifies contour sundering two class.
Logistic Regression is to adumbrate likelihood of output.It can be binary or mutlinominal. Model forsees the probability interlinked
with individual dependent variable. It works by finding the linear relativity between independent variables and chooses link
function. Whichever has the best link-function will be fitted for data preferred. Logistic regression methods can be depicted as
shown below.
Random forest affines to ensemble techniques, in this the randomization of selecting the root nodes is done.It also indulges the
bagging method. It is a bag of decision trees. Terminolgy “forest” depicts it is provoked by algorithm getting trained by bagging or
boosting. The outcome is determined by algorithm which is based on the forecasts of the decision trees.
ResNet is abbreviated as Residual Network, to elucidate complex problem by adding much more layer for a DNN for raising the
performance. Network is built be piling the block of residuals
For the crop guidance and fertilizer recommendation system the model is trained on the algorithms of Decision tree,Naïve Bayes,
SVM, Logistic Regression ,Random Forest , however finally the accuracy and performance of each algorithm is measured and
finally the model with better accuracy and performance is selected.
However for the disease detection Resnet is used for image classification. When some of the parameters are tweaked and techniques
such as scheduling learning rate, gradient clipping, and weight decay are used, ResNets perform significantly better for image
classification.classification tasks. It's also known as a lazy learner algorithm because it doesn't learn from the training set right away;
instead, it saves the dataset and performs an operation on it when it comes time to classify it.
Decision Tree 90
SVM 87
Logistic Regressiom 91
Random Forest 96
XGBoost 89
Naïve Bayes 90
The Resnet algorithm is used for the image classification for disease detection application. We use learning rate scheduling instead
of fixed learning rate because the learning rate keeps changing for every batch of training. Weight decay is used as it is a
regularization technique. In order to limit the values of gradients to a small range to prevent undesirable changes in parameters due
to large gradient values we can use Gradient Clipping.
Table 2 depicts the learning rate in terms of training loss, validation loss and validation accuracy.It can be observed that model
performed well in the epoch 2.
The model accuracy always varies with respect to the input data given
REFERENCES
[1] Satish Babu, "A Software Model for Precision Agriculture for Small and Marginal Farmers", International Centre for Free and Open Source Software
(ICFOSS), ISBN 978-1-4799-1095-3/13/\$31.00 ©2013 IEEE.
[2] Rakesh Kumar, M.P. Singh, Prabhat Kumar and J.P. Singh, "Crop Selection Method to Maximize Crop Yield Rate using Machine Learning Technique",
International Conference on Smart Technologies and Management for Computing Communication Controls Energy and Materials (ICSTM), 2015.
[3] Liying Yang, “Classifiers selection for ensemble learning based on accuracy and diversity”, Elsevier Ltd. Selection and/or peer-review under responsibility of
[CEIS], 2011.
[4] Komal Bodake, Rutuja Ghate, Himanshi Doshi, Balasaheb Tarle “ Soil based Fertilizer Recommendation System using Internet of Things”, MVP Journal of
Engineering Sciences, June 2018.
[5] Dharesh Vadalia1, Minal Vaity2, Krutika Tawate3 , Dynaneshwar Kapse “Real Time soil fertility analyzer and crop prediction”, IRJET,Volume: 04 Issue: 03 |
Mar -2017
[6] Savita N. Ghaiwat, Parul Arora,” Detection and classification of plant leaf diseases using image processing techniques: a review” , IJRAET SSN (Online): 2347
- 2812, Volume-2, Issue - 3, 2014
[7] Mrunalini R. Badnakhe 1+ and Prashant R. Deshmukh,” An Application of K-Means Clustering and Artificial Intelligence in Pattern Recognition for Crop
Diseases”, IPCSIT vol.2 ,2011
[8] J. Lacasta, F. J. Lopez-Pellicer, B. Espejo-Garcia, J. Nogueras-Iso and F. J. Zarazaga-Soria, "Agriculture Recommendation System for Crop Protection" in
Computers and Electronic in Agriculture, Elsevier, vol. 152, pp. 82-89, 2018.
[9] P. Singh, B. Jagyasi, N. Rai and S. Gharge, "Decision Tree based Mobile Crowdsourcing for Agriculture Advisory System", IEEE India Conference, pp. 1-6,
2014.
[10] R. Pallavi Reddy, B. Vinitha, K. Rishita, K. Pranavi “ Crop Monitoring and Recommendation System using Machine Learning and IOT” ,IJITEE ISSN: 2278-
3075, Volume-9 Issue-9, July 2020
[11] S.Pudumalar,E.Ramanujam,R.HarineRajashreeń,C.Kavyań,T.Kiruthikań,J.Nishań,“Crop Recommendation System for Precision Agriculture”, IEEE Eighth
International Conference on Advanced Computing (ICoAC), 2016
[12] Komal Abhang, Surabhi Chaughule, Pranali Chavan, Shraddha Ganjave,” Soil Analysis and Crop Fertility Prediction “, ”, IRJET,Volume: 05 Issue: 03 | Mar -
2018
[13] Prof. Meeta Kumar, Mrunali Kamble,Shubhada Pawar, Prajakta Patil,Neha Bonde,” Survey on Techniques for Plant Leaf Classification”, International Journal
of Modern Engineering Research (IJMER) Vol.1, Issue.2, pp-538-544 ISSN: 2249-6645
[14] Pranjali Vinayak Keskar, Shubhangi Nimba Masare, Manjusha Suresh Kadam and Prof. Mrs. Seema U.Deoghare,” Leaf Disease Detection and Diagnosis”,
International Journal of Emerging Trends in Electrical and Electronics (IJETEE) Vol. 2,Issue.2,April-201