The PlantScan Web Application is an easy-to-use interface that allows farmers, agricultural specialists, and plant enthusiasts to identify plant diseases quickly and accurately. Built on top of the deep learning model developed in the accompanying notebook, this web application integrates the powerful MobileNet-based model for plant disease detection with a simple frontend for image uploads.
With the PlantScan app, users can upload images of their plants directly from their devices, and the system will classify potential diseases based on the uploaded image. This provides instant feedback to users, helping them take timely action to protect their crops and plants. Whether you're an individual gardener or part of a larger agricultural operation, PlantScan aims to provide accessible and efficient plant disease identification at your fingertips.
The web app features a responsive and intuitive interface built with ReactJS, ensuring smooth interactions for users across various devices. On the backend, FastAPI is used to serve the trained model, handling requests and delivering predictions with minimal latency.
This guide provides setup instructions to get both the backend API and frontend React app running locally or on a server, allowing users to start leveraging the power of AI for plant disease detection.
-
Install Python (Setup instructions)
-
Install Python packages
pip3 install -r training/requirements.txt
pip3 install -r api/requirements.txt
- Install Tensorflow Serving (Setup instructions)
- Install Nodejs (Setup instructions)
- Install NPM (Setup instructions)
- Install dependencies
cd frontend
npm install --from-lock-json
npm audit fix
-
Copy
.env.example
as.env
. -
Change API url in
.env
.
- Download the data from kaggle.
- Only keep folders related to Plants.
- Run Jupyter Notebook in Browser.
jupyter notebook
- Open
notebook/plantscan-plant-disease-detection-using-mobilenet.ipynb
in Jupyter Notebook. - In cell #2, update the path to dataset.
- Run all the Cells one by one.
- Copy the model generated and save it with the version number in the
models
folder.
- Get inside
api
folder
cd api
- Run the FastAPI Server using uvicorn
uvicorn main:app --reload --host 0.0.0.0
- Your API is now running at
0.0.0.0:8000
- Get inside
api
folder
cd frontend
- Copy the
.env.example
as.env
and updateREACT_APP_API_URL
to API URL if needed. - Run the frontend
npm run start