SUSya – Plant Disease Detector: A ML-Powered Assistant for Farmers

Jan 3, 2022 | Programming

Farmers face numerous challenges, one of the most pressing being crop diseases. To combat this, we introduce SUSya, a robust application designed to assist farmers in identifying crop diseases promptly. Powered by machine learning, this app not only detects diseases but also provides real-time alerts and remedies. Let’s delve into how to utilize this innovative tool effectively.

Product Walkthrough

To see SUSya in action, watch our product walkthrough video here.

Download the Product

You can download the SUSya app APK here.

Understanding the Machine Learning Model

SUSya utilizes a Multi-Class Image classifier built on the PyTorch framework using Convolutional Neural Networks (CNN). This model identifies 17 states of disease across four plants: Cherry, Pepper, Potato, and Tomato, focusing on the needs of Kerala farmers. The model boasts a validation accuracy of 77.7%.

How to Train the Model

  • Upload the Python notebook to Google Colab.
  • Run each cell in the notebook to train the model. A demo dataset is included for quick setup.
  • For a larger dataset, use this Kaggle Dataset.

How It Works: An Analogy

Think of SUSya as a skilled gardener who can diagnose plant diseases at a glance. Just as a gardener examines leaves and stems to identify issues, SUSya takes images of plants (input dataset) and converts them into a form that can be analyzed (tensor). The model—with its four layers of convolution—acts like the gardener’s keen eye, scrutinizing every detail before providing an output, which includes the type of plant disease as well as the recommended remedy.

API Functionality

The API is built using Flask and hosted on Render. It offers the following functionalities:

  • Plant Disease Detection: Accepts a POST request with an image in base64 format and returns details about the plant, disease, and remedy.
  • Notification: Accepts a POST request with plant, user, and disease information, which is then pushed as a notification to other users, alerting them to potential outbreaks.

How to Use the API

To access the API, make a POST request with the base64 string of the image to the following URL: https:susya.onrender.com.

import requests
url = "https:susya.onrender.com"
# imgdata = "base64 string of image"
r = requests.post(url, json={"image": imgdata})
print(r.text.strip())

Output:

disease: Septoria leaf spot, plant: Tomato, remedy: Remove infected leaves immediately, ...... Fungonil and Daconil.

App Features

  • Authentication using Google OAuth
  • User Profile to manage details
  • Image capture via camera or device media
  • Preview images before sending them to the API for disease detection
  • Result page displaying detected diseases and suggested remedies
  • PDF report generation for record-keeping or sharing
  • Notification system to warn other users of disease detection

Tech Stack Used

  • Python
  • PyTorch
  • Flask
  • Flutter
  • Firebase

Troubleshooting Tips

If you encounter issues during the installation or operation of SUSya, consider the following troubleshooting steps:

  • Ensure you have a stable internet connection when downloading the APK or accessing the API.
  • Check if all dependencies listed in the tech stack are properly installed.
  • Verify if the base64 image string is properly formatted before sending to the API.
  • If you’re running the model on Google Colab, ensure that you’re logged into your Google account to access resources.
  • For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox