Code Monkey home page Code Monkey logo

shashank1623 / plant-disease-detection Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 52.87 MB

Plant Disease Detection using convolutional neural network. Our model can easily predict the disease of plants like Potato , Tomato , Pepper Bel and many more in the upcoming version.

License: MIT License

Python 23.97% HTML 10.12% JavaScript 63.01% CSS 2.90%
adam-optimizer cnn d deep-learning development disease-prediction full-stack gcp mlops neural-network

plant-disease-detection's Introduction

Plant-disease-Detection

Problem Statement

Farmers who grown plant/vegetables are facing lot of economical Loss every year because of various Disease that can happen to a plant/vegetables . In our problem i have found 38 different types of disease of 15 plants . If a farmer can detect these early and apply appropriate treatment it can save lot of waste and prevent the economical loss .

About:

In this Project , i have build an end to end machine learning Project in Agriculture Domain to solve the problem of Plants disease. In this Project i have build a web application using React.js which will deployed to the cloud and anywhere form the world can acess this applicaiton . All they just need to do give the image of the leaves of plant and the application will tell you disease of the plant with accuracy . Behind the scenes it will be using deep learning model and CNN .

Steps that i have Followed In order to implement this project: Step 1: Data Collection (Used Open Database) Step 2: Model Building Step 3 : MLOPs Step 4: Deployemnt of Model (GCP/AWS) Step 5: Frontend Development

Steps to install and Start the apps.

Setup for Python:

  1. Install Python (Setup instructions)
  2. Make a Virtual Env.
  3. Install Python packages
pip3 install -r api/requirements.txt
  1. Install Tensorflow Serving (Setup instructions)

Setup for ReactJS

  1. Install Nodejs (Setup instructions)
  2. Install NPM (Setup instructions)
  3. Install dependencies
cd frontend
npm install --from-lock-json
npm audit fix
  1. Copy .env.example as .env.

  2. Change API url in .env.

Training the Model

Note :- If have gpu based machine then run it otherwise it will take more than a day for model building . or you can reduce the size of data from every folder then train the model.

  1. Download the data from kaggle.
  2. Keep all the data in a seprate folder in a project directory.
  3. Run Jupyter Notebook in Browser.
jupyter notebook
  1. Open training/potato-disease-training.ipynb in Jupyter Notebook.
  2. In cell #2, update the path to dataset.
  3. Run all the Cells one by one.
  4. Copy the model generated and save it with the version number in the models folder.

Using FastAPI

  1. Get inside api folder
cd api
  1. Run the FastAPI Server using uvicorn
uvicorn main:app --reload --host 0.0.0.0
  1. Your API is now running at 0.0.0.0:8000

Using FastAPI & TF Serve

  1. Get inside api folder
cd api
  1. Copy the models.config.example as models.config and update the paths in file.
  2. Run the TF Serve (Update config file path below)
docker run -t --rm -p 8501:8501 -v C:/Code/potato-disease-classification:/potato-disease-classification tensorflow/serving --rest_api_port=8501 --model_config_file=/potato-disease-classification/models.config
  1. Run the FastAPI Server using uvicorn For this you can directly run it from your main.py or main-tf-serving.py using pycharm run option (as shown in the video tutorial) OR you can run it from command prompt as shown below,
uvicorn main-tf-serving:app --reload --host 0.0.0.0
  1. Your API is now running at 0.0.0.0:8000

Running the Frontend

  1. Get inside api folder
cd frontend
  1. Copy the .env.example as .env and update REACT_APP_API_URL to API URL if needed.
  2. Run the frontend
npm run start

Datasets credits:- https://www.kaggle.com/arjuntejaswi/plant-village
Contact Us:- [email protected] (Hope this repo found it usefull to you then please give a star to this repo).

plant-disease-detection's People

Contributors

shashank1623 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

plant-disease-detection's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.