Since trees are crucial for pollination, spreading tree diseases can cause crop yield loss, animal deaths, widespread infectious epidemics, and even land degradation due to soil erosion. Therefore, it is important to detect tree diseases before permeating forests to avoid their hazardous consequences. However, it may not be enough to merely detect diseases since various environmental factors can cause trees to be stressed and catch a highly contagious disease that leads to unrecoverable damage to forests, farms, and arable lands. Hence, it is also important to check and log environmental factors to achieve better detection results. In this regard, by getting prescient warnings regarding potential tree diseases and environmental factors, we can take necessary precautions to avoid hazardous outcomes related to forest degradation and crop yield loss.
After perusing recent research papers on tree disease detection methods and monitoring, I decided to create an easy-to-use and budget-friendly device to detect tree diseases with object detection in the hope of providing an advanced and accessible way to prevent contagious tree diseases.
To detect tree diseases precisely, I needed to collect data from trees infected with different diseases in order to train my object detection model with notable validity. Since Seeed Studio recently released the SenseCAP K1100 kit providing all required sensors for an IoT and computer vision (object detection) project, I decided to build my device based on the SenseCAP K1100 kit, including a Vision AI module and Wio Terminal. Additionally, I connected a Grove CO2 & Temperature & Humidity sensor (SCD30) to obtain accurate environmental factor measurements. Also, I could easily log the collected environmental factors in a CSV file on an SD card since Wio Terminal has a built-in MicroSD card module.
However, I could not capture tree images and run an object detection model simultaneously on Wio Terminal due to memory and RAM limitations. Therefore, I decided to utilize LattePanda 3 Delta 864 to capture images via the Vision AI module and run my object detection model according to the commands transmitted by Wio Terminal via serial communication. Since LattePanda 3 Delta is an SBC (Single-Board Computer) which can run Ubuntu operating system (x86_64), I could use Python to process the captured images and run my model.
After completing my data set by taking pictures of various infected trees, I built my object detection model with Edge Impulse to detect tree disease categories. I utilized Edge Impulse FOMO (Faster Objects, More Objects) algorithm to train my model, which is a novel machine learning algorithm that brings object detection to highly constrained devices. Since Edge Impulse is nearly compatible with all microcontrollers, development boards, and SBCs, I have not encountered any issues while uploading and running my model on LattePanda 3 Delta.
Since I had the chance to collect data on many different tree diseases while wandering in a forest, it was impractical to train the model on each disease separately with limited data. Therefore, I decided to categorize diseases based on the infected parts (stem, branch, or leaf) and use these categories as labels to train my model:
After training and testing my object detection (FOMO) model, I deployed and uploaded the model on LattePanda 3 Delta as a Linux (x86) application (.eim). Therefore, the device is capable of detecting tree diseases by running the model independently without any additional procedures.
Since I decided to make the device to inform the user of the detection results via MMS remotely after running the object detection model, I utilized Twilio's API to send the detected labels and the modified image with bounding boxes to the verified phone number.
Lastly, to make the device as robust and sturdy as possible while operating outdoors, I designed a forest-themed case with a sliding...Read more »