Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

plant_disease_detector

ai powered plant disease detection and assistance platform currently available as an app and api.

download product apk here

machine learning python notebook

solutions

system to detect the problem when it arises and warn the farmers.

disease detection using machine learning model enabled through android app which uses flask api.

solution to overcome the problem once it arises.

remedy is suggested for the disease detected by the app using ml model.

solution that will ensure that the problem will never occur in the future again

pdf report is generated on the disease predicted along with user information. pdf can be used as a document to be submitted in nearby krishibhavan thereby seeking help easily.

method that will reduce the impact of the dilemma to a significant level

disease detected news can be sent to other users as a notification which contatins user,plant and disease. this will help other farmers take up precautions thereby reducing the impact of the dilemma to a significant level considering a region.

machine learning model

multi-class image classifier built on pytorch framework using cnn architecture. currently project detects 17 states of disease in 4 plants ( aiming kerala state ) namely cherry, pepper, potato and tomato.

  • framework : pytorch
  • architecture : convolutional neural networks
  • validation accuracy : 77.7%

how to train

upload the python notebook to google colab and run each cell for training the model. i have included a demo dataset to configure quickly. you can use this kaggle dataset which is the original one with huge amount of pictures.

how it works

the input image dataset is converted to tensor and is passed through a cnn model, returning an output value corresponding to the plant disease. input image tensor is passed through four convolutional layers and then flattened and inputted to fully connected layers.

api

api is built using flask framework and hosted in heroku. the api provides two functionalities, they are

  • plant disease detection

    accepts a post request with an image in the form of base64 string and returns plant, disease and remedy.

  • notification

    accepts a post request with plant, user and disease , which is then pushed as a notification to other users to warn them regarding a probable outbreak of disease.

how to use

api has been built on this classifier. url = “https://plant-disease-detector-pytorch.herokuapp.com/

user has to send a post request to the given api with base64 string of the image to be input.

import requests
url = "https://plant-disease-detector-pytorch.herokuapp.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

download product apk here

to run app

$ cd app
$ flutter run

to build app

$ cd app 
$ flutter build apk

features

  • authentication using google oauth
  • user profile page
  • uses camera or device media to get an image of the crop
  • preview the image and sends it to api, for disease detection
  • result page showing detected disease and remedy
  • generates a pdf report to save/share predicted disease details
  • option to send the generated result as a notification warning to other users

tech stack used

  • python
  • pytorch
  • flask
  • flutter
  • firebase

Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.