Human society needs to increase food production by an estimated 70% by 2050 to feed an expected population size that is predicted to be over 9 billion people. Currently, infectious diseases reduce the potential yield by an average of 40% with many farmers in the developing world experiencing yield losses as high as 100%.

The widespread distribution of smartphones among crop growers around the world with billions of crop growers having smartphones offers the potential of turning the smartphone into a valuable tool for diverse communities growing food.

Our motivation with this web app was to solve this problem by aiding crop growers by turning their smartphones into an easy diagnosis tool that could help increase the yield substantially and reduce crop failures. We also aim to make this rather easy for crop growers so this tool could be used on daily basis.

What it does

Plant AI ☘️ is a web application 🌐 that helps one to easily diagnose diseases in plants from plant images, using Machine Learning possible all on the web. We provide an interface on the website where you can simply upload images of your plant leaves since we majorly focus on plant leaf diseases and instantly know diseases the plant has. We further also provide crop growers easy ways to solve the diagnosed disease.

How we built it

As we highlighted in the previous section, our main target audience with this project is crop growers and we aim that they use this on a daily basis to diagnose disease from their plant images, maybe in an autonomous fashion too.

Our application majorly relies on the Machine Learning Model we built to identify plant diseases from images. We first built this Machine Learning model using TensorFlow and Google Cloud AI Platform to keep track, orchestrate and perform our experiments in a well-defined manner. A subset of our experiments used to build the current model have also been open-sourced and can be found on the project’s GitHub repo.

After doing so we were also quite interested in running this Machine Learning model on mobile devices or smartphones too, to further amplify its use. We use TensorFlow JS to optimize our model and allow it to work on the web for devices that are less compute-intensive.

Further, we also optimize this model to work on embedded devices with TensorFlow Lite further expanding the usability of this project and also provide a hosted model API built using TensorFlow Serving and hosted with Google Cloud Run.

To allow plant growers to easily use this, we also provide a fully functional web app built with React and hosted on Azure Static Web Apps. This web app allows you to use the Machine Learning model and identify diseases from plant images all on the web. You can try out this web app right away - and try uploading a plant image to our model. In case you want to test out this web app we also provide a couple of real-life plant images you could use.

As we mentioned earlier we expect most of the traffic and usage of our project from mobile devices, consequently, the Machine Learning model we run through the web app is optimized to run on the client-side. This also enables us to have blazing fast performance with our ML model. We use this model on the client-side with TensorFlow JS APIs which further also allows us to boost performance with a WebGL backend.

Challenges we ran into

  • Optimizing our heavy but accurate Machine Learning model for mobile devices
  • Building a web app to run the Machine Learning model on the client-side for low-performance devices with accurate results
  • Most of the latest smartphones are equipped with GPUs, which could further skyrocket the performance of our kind of ML model. It was a challenge supporting using GPUs on the go from a website without any friction.

Accomplishments that we're proud of

  • Created a highly accurate ML model to identify plant diseases
  • Created a fully functional end to end web app for plant-growers to use this project

What we learned

  • Accessing and using device GPUs on the web
  • Performing on-device ML inferences with low-performance devices
  • Integrating Machine Learning into React web apps

What's next for Plant AI

  • Implement accounts and authorization
  • Allow this system to be linked directly with crop growers field cameras or other field devices
  • We also plan to build this out as a PWA

Built With

Share this project: