Applications of TensorFlow, Soil Moisture and NoIR sensors for Plant Health monitoring

Spread the love

For the past many days my wife has been complaining that her sacred plant (Tulasi – Scientific Name – Ocimum sanctum) is getting dried up due to intense heat. Thanks to urban heating effect. She tried many ways of managing the plant but her busy schedule always hinder in getting real time view of the moisture level and other conditions. I was teased to find a solution to resolve this given that I spend time with IoT and Data Science or Big Data jargons. I tried a variety of tools starting with Moisture sensors, NoIR for NDVI calculation to TensorFlow based image classification to come of with solution.

closeup photo of sprout
Photo by PhotoMIX Ltd. on Pexels.com

I remembered using Satellite Image Processing using ERDAS software for Land use / Land cover classification during my university days. I investigated it thought of precision agriculture where in real time moisture conditions along plant health monitoring using NDVI measurement system are used. Using the Soil Moisture sensors, which is a electrodes-based system monitors the moisture levels based on electron transfer. These along with measurement of environmental parameters gives a very good insight of plant health status and can inform to put the plant under shade if required.

These sensor systems along with Simple Web based tools like ThingSpeak REACT module like  Tweet integration of mobile display can trigger notifications to users based on the varying sensor values. Below is the details of the application development. I have used i) Arduino and ESP8266 this time, ii) Temperature/Humidity sensors, Moisture sensor and iii) Streamed them to internet. I have further used default API available in ThinkSpeak to create a simple display of information. Now Madhuri can check the real time environmental parameters for her favorite plant statistics on her mobile application and she can plan to water the plant or change the plant if it is dried.

IMG-3459.JPG

In the above scenario, wherein my wife would get a notification when Moisture content when it is below threshold, it if could have been a big garden I might have imagined to scan the surface with mobile or dipped the electrodes to ground and it should ideally tell the soil characteristics and details about the conditions. When similar features are adopted for the plant health monitoring the classic example being the PlantVillege dataset for the plant leaf diseases and associated adaptation for Kenya by means of mobile application, it helps in next generation agricultural practices. Thanks to Tensorflow Android and mobile platform version which has been released recently such applications can easily be developed to suit to user requirements.

To extend this simple experiment to real world systems for managing the precision agriculture I have checked NDVI index. There have been examples of using NoIR camera along with Raspberry Pi to detect the vegetation health status based NDVI Index. This index can as well be calculated Drones  or some kind of scanners above the surface to capture the images and automatic calculation of NDVI values. These NDVI values gives a very good insight of the status of the plant photosynthesis status and vegetation status. To test these scenarios, I tried two scenarios myself, In the first instance I have created a repository of pictures and tried to identify myself and other objects using Tensorflow. As can be seen I can be separated from the others in the group.

IMG-3483

The extension of such measurement system is using the Deep Learning – TensorFlow and OpenCV for checking the vegetation images to understand if the plant is infested with pests or they are different weeds. Case study involves installation of Python Libraries and TensorFlow and using either Matplotlib or OpenCV for image processing. Google Vision KIT also adds further scope in the image processing of plants to monitor the health. The recent trend is researchers publicly releasing the pre-trained models with already trained at the lab and are ready to be used. Even TensorFlow comes with utilities which can be used to apply pre-built models. Some of the models available in TensorFlow detection model zoo include COCO Dataset, Kitti Dataset, Open Images dataset and AVA1 dataset. A detailed vegetation-based database is available at PlantCV image datasets for many plants like Oryza sativa, Setaria viridisand Sorghum bicolor. Below shows the sample vegetation monitoring using TensorFlow.

This made me investigate further in creating a scenario of using the PlantVillege dataset and trying to check the leaf health accuracy with default Caffe model. These accuracy levels can further be increased by varying the parameters like image classifiers, fine turning the models including batch normalization techniques.

Image2

Details are more of research oriented and need sophisticated systems as amount of software image and memory parameters of mobiles play an important role in the development such devices. Though there has been a recent advance of compiling only the changed code or using only required image sub set trained model etc. Though such models can be deployed into cloud and tested for exploration like consuming them as web urls in mobile applications or converting them to Mobile Tensorflow and using them in android development. The classic example being the recent implementation of Weather Research Forecasting (A module which can predict the weather forecasting) using Microsoft Azure cloud platform and associated Big Data based assessment.

Though these assessment seem purely research oriented but availability of these technologies like Mobility, AI, Deep Learning and Advanced Computer systems have immense potential when they are integrated with ERP systems to provide a real time insight. These can potentially evolve into world class agriculture solutions for enriching the lives of many!

Thanks – Jak

 

Leave a Reply