Main Content

Irrigation Level Assessment by Thermal Imaging w/ TensorFlow

Collect irrigation level data by thermal imaging, build and train a neural network model, and run the model directly on Wio Terminal.

Since global temperatures are expected to rise over the next few decades due to climate change and thus evaporation rates will increase, water scarcity and the expansion of arid regions threaten productive agricultural areas and long-term water availability. Considering water availability is already limited, we need to desist from profligate water utilization in agriculture to sustain our meager water resources. Otherwise, we will encounter more critical predicaments than depleting arable lands due to water scarcity and deficiency.

Since there is already an imbalance between the irrigation demand and the available water resources[1], it is crucial to avoid poor irrigation timing and insufficient or extravagant applications of water, which are unfortunately rife in agriculture. To sustain irrigated agriculture and maximize the quality of the product and the estimated crop yield while optimizing the quantity of water used per unit area[2], we need to apply precise irrigation scheduling methods. In that regard, we can improve water use efficiency and agricultural water management while preserving water and increasing the profitability of agroecosystems.

After perusing recent research papers on irrigation management, monitoring, and scheduling, I decided to create an easy-to-use and budget-friendly device to monitor plant water status (irrigation levels) by thermal imaging in the hope of making irrigation scheduling accessible even for hobbyists. As opposed to classical measurement devices and methods for monitoring plant water status (irrigation levels), thermal imaging is a non-invasive, non-contact, and non-destructive technique. Also, thermal imaging allows us to elicit measurements of water status (irrigation levels) directly from plants without employing labor demanding and time-consuming processes. As explained below, thermal imaging is emerging as a ubiquitous method to detect plant water status (irrigation levels) due to its precision and accessibility.

Infrared thermography (thermal imaging) for monitoring plant water status (irrigation levels) is a technique based on the relationship between leaves’ (or crop canopy) stomatal closure or aperture and their surface temperature. When leaves (or crop canopy) transpires, they lose water through their stomata, and therefore the crop canopy temperature decreases. However, once plants go into water stress, their stomata begin to close and cease to transpire, causing the plant to heat up and the crop canopy temperature to rise. Also, the crop canopy temperature is correlated with specific plant physiological parameters, such as stomatal conductance. In addition, thermal imaging appears to have potential advantages over gas-exchange measurement when monitoring stomatal responses in phenotyping plant studies[3].

Even though thermal imaging is a technique with high precision and advantages, it is still struggling to interpret and analyze thermal imaging data to extrapolate and assess irrigation levels without applying algorithms. Hence, I decided to build and train an artificial neural network model to detect irrigation levels by thermal imaging automatically.

To collate thermal imaging data and create a data set easily, I developed a web application in PHP before building and testing my neural network model. Then, to make irrigation scheduling and monitoring by thermal imaging as accessible as possible, I utilized a Wio Terminal and an MLX90641 thermal imaging camera to collect thermal imaging data and run my neural network model after training it.

After completing my data set, I built my artificial neural network model (ANN) with TensorFlow to make predictions on the irrigation classes (labels) based on thermal imaging. Empirically, I assigned an irrigation class (label) for each thermal imaging array (input) generated by the MLX90641 thermal imaging camera:
- Dry
- Moderate
- Sufficient
- Excessive

After training and testing my neural network model, I converted it from a TensorFlow Keras H5 model to a C array (.h file) to execute the model on the Wio Terminal. Since the thermal imaging camera is directly connected to the Wio Terminal, the device is capable of detecting irrigation levels (classes) in the field effortlessly.

Lastly, to make the device as compact and robust as possible, I designed a forest-themed case (3D printable).

So, this is my project in a nutshell

In the following steps, you can find more detailed information on coding, data collection, building an artificial neural network model with TensorFlow, and running it on Wio Terminal.”

Link to article