Inspiration

Plant diseases are a severe threat in the agriculture industry. Farmers lose around 20-40% of their crops every year due to disease. According to Caribbean Plant Health Directors Forum, worldwide crop loss is estimated at around 220 billion dollars. . Therefore, it is essential for farmers to effectively deal with them and check them with the help of timely prevention. Depending on the agricultural area size, this task can be difficult, especially since the list of harmful crop diseases is quite exhaustive. Plant diseases are a significant yield and quality constraint in optimal crop production. Identifying symptoms and knowing when and how to effectively control diseases is an ongoing challenge for a lot of farmers.

What it does

AgroHive is a machine learning based web application that allows farmers to upload pictures of diseased crops and provides them with a predicted outcome of the crop disease with a level of confidence.

How we built it

Dataset

We utilized an open dataset New Plant Diseases Dataset from Kaggle to train our model. The image dataset was recreated using offline augmentation from the original Plant Village Dataset. It consists images of healthy and diseased crop leaves categorized into 38 different classes across 13 crop varieties. The kaggle dataset was accessed using opendatasets in Google Colab.

Model

We trained our model on Google Colab using GPU runtime. ImageDataGenerator class was used to generate random batches of tensor image data, and also perform real-time augmentation on the train and validation dataset. Transfer learning with ImageNet weights was employed to improve training performance. MobileNet model was used due to its lightweight architecture and its compatibility with Tensorflow.js. The base layers were frozen and a few top layers were added to train the classifier. The model achieved a 96% accuracy on the validation dataset. Random images from the test dataset was tested for performance. For reusability, we saved our model under the HDF5 format.

Web app and model integration

To deploy the model into the web app, we converted the model into a Tensorflow.js model. This is a JavaScript compatible format achieved using tensorflowjs-converter. The web app was designed using minimalistic styling sheets, Javascript and HTML.

Challenges we ran into

We ran into a couple challenges in finding the right dataset. The original RGB version has a few discrepancies so we decided to use the augmented dataset which had better cleaned up data. The other challenge we ran into was deploying the model into the web app. Our initial approach was deploying the Keras model using Flask. However, we faced time constraints in resolving some cross compatibility between React and Flask.

Accomplishments that we're proud of

Our team spent a good chunk of time in finding a practical solution to address John Deere's challenge. We are proud that the team managed to come up with a Machine Learning based solution to tackle the spread of crop diseases.

What we learned

• Using opensource dataset from Kaggle

• Utilizing transfer learning to build and train the model

• Converting Keras model to JS compatible version using Tensorflow.js convertor

• Deploying a saved model into a web application

What's next for AgroHive

Future work for AgroHive would be to develop a mobile friendly version of the application. By working with farmers to set up camera feeds across the fields, we can better tackle the
spread of such diseases and promptly notify the farmer to take actions.

Built With

Share this project:

Updates