H.A.R.N. (Hydro-farming with Autonomous Regulation of Nutrients) is a plant nutrient deficiency classification system which can detect whether a rice plant is healthy or has any of N, P or K deficiency when provided with an image of a rice leaf. Deployed webapp (link).
1. Introduction
There are various methods for identifying nutrient deficiency in plants such as rapid testing & plant analysis. Also, the existing Hydroponic systems usually have automated system which is just relying on the external paraments of the plant such as temperature, humidity, etc.. Plants require nutrients to germinate, grow, fight off diseases and pests and to reproduce. A plant that lacks an essential nutrient cannot complete its life cycle. However, having too much of a nutrient can harm and even kill plants. This is why, the purpose of project H.A.R.N. is to provide a better and fast solution for identifying plant nutrient deficiency using Image Processing techniques and Convolutional Neural Networks (CNN). This project is made to identify nutrient deficiency in rice and spinach plants. The nutrients that will be identified by this project are Macronutrients viz (Nitrogen (N), Potassium (K), and Phosphorous (P)). Various CNN models was tested and the model with the best fit is deployed using StreamLit as a webapp here.
The paper referred provides a detailed process: Using Deep Convolutional Neural Networks for Image-Based Diagnosis of Nutrient Deficiencies in Rice by Zhe Xu, Xi Guo, Anfan Zhu, Xiaolin He, Xiaomin Zhao, Yi Han and Roshan Subedi.
2. Dataset
Dataset is labeled and available here: Google Drive
Note: I have used Git Bash for the project and provided the code for the same.
- Create a folder in your local machine.
- Create a virtual environment.
pip install virtualenv
Open Git Bash and navigate to your project folder OR open project folder, right click and then click 'Get Bash Here'
python -m virtualenv {whatever_virtual_env_name_you_want_to_give}
- Activate the virtual environment.
source {whatever_virtual_env_name_you_want_to_give}/scripts/activate
- Fork and clone this repository to your local machine's project folder.
- Install all the necessary dependencies and modules inside the virtual environment:
pip install -r requirements.txt