A Machine Learning and Deep Learning-Based Web Application for Crop and Fertilizer Recommendation and Crop Disease Prediction
摘要
India is a country that is majorly dependent on agriculture and farming for livelihood. The country’s diverse soil lets farmers produce various crops throughout the year. Depending on the characteristics of soil such as the composition of nitrogen, phosphorus, potassium and the pH of the soil and environmental factors such as rain, humidity, and temperature, it is important to know which crops should be grown and what fertilizers to use, to maximize the yield. It is also important to detect any crop diseases at an early stage to prevent major loss. This paper presents an all-in-one platform web application that performs all three tasks, and it uses ML algorithms such as KNN, Decision Tree, Gaussian Naive Bayes, SVM, Logistic Regression, and Random Forest to recommend crops and fertilizers by analyzing soil and environmental factors. For crop recommendation, Random Forest is chosen as it provided the highest accuracy of 99.09%. Random Forest is deployed for fertilizer recommendation as well, as it provided the highest accuracy of 100%. The Deep Learning model ResNet50 is used to detect crop diseases, and the accuracy for training and validation was 95.52% and 87.36%, respectively. Flask framework is used to build the backend of the web application. The web application is enabled to send an SMS of the results to user’s mobile phone using the SMS API, Twilio. The goal of the project is to provide an ideal solution to farmers or the users of the web application, via a text message, which can be accessed even in remote areas and can be understood by the majority of people.