Design for AI-based greenhouse pest control

More Info
expand_more

Abstract

This report details the development of a device that utilises image detection and machine learning to predict slug infestation in greenhouses. Increasing pesticide regulations have led to a rise in slug infestations, causing significant crop damage. Although alternatives to pesticides exist, they are expensive and labour-intensive to implement across large greenhouses. The goal of this project is to reduce labour by automating slug monitoring through image detection and machine learning. The focus is narrowed to detecting the Spanish Earthslug (Lehmannia Valentiana) in Cut Cymbidium, a type of orchid, as this market is particularly affected, and one slug species makes image detection more manageable. Context research and experiments were done to understand the problem. Slugs are nocturnal creatures that emerge from the soil periodically for food. Their activity is mainly influenced by temperature and humidity, preferring moist environments at around 17°C. Since greenhouse conditions vary by plant growth stages and change throughout the year, it is worthwhile to monitor activity on a longer time scale. Image detection and computer vision are already used in pest control and other applications within greenhouses. For efficient image detection, the looked after objects must be clearly identifiable and the images should preferably be of consistent quality. To achieve this in a greenhouse a good suggestion would be a controlled environment with minimal to no leaf occlusion. In our case, another important factor is having low data images with a high contrast between the slug and their background. This can be achieved by adjusting lighting conditions, converting images to black and white, and tracking changes between images to detect slug movement. After these results, the direction was chosen to predict slug infestation based on environmental data using counted slugs through image detection as a reference. Based on these insights, a device concept was developed using a Seeeduino Xiao ESP32S3 Sense microcontroller and Grove sensors. The system lures slugs with wheat bran, a proven bait, and uses a camera to capture images. Photos are stored on an SD card along with environmental measurements, such as temperature and humidity. Field tests and prototyping demonstrated that a 12 cm-high container with four 1 cm-diameter entryways was effective for attracting slugs and capturing quality images. To enhance contrast and prevent mould growth, a white mesh was placed between the bait and the slugs. For easy processing and low data images, the images are processed into binary images, where pixels are either black or white, and Hough Circle transform is used to crop the images around detected circles. For slug population prediction, a regression algorithm was selected, with environmental variables serving as the input and slug counts as the output labels. Spatial interpolation can be used to estimate environmental values for the entire greenhouse based on measurements of the device therefore getting the data to make predictions for slug infestation. The final version of the device, called Cephal, was tested in the field and used to build an image detection model. During field tests, Cephal successfully captured environmental data and collected over 485 images, although no slugs were detected, indicating the need for further research. Additionally, improvements such as a longer cable for the moisture sensor and a more accurate DHT sensor are required. With Cephal, a dataset of 482 images was used for machine learning. Reducing the input size to 64x64 binary images, a CNN model was made with around 90% accuracy. In conclusion, Cephal has the potential to enhance slug monitoring in greenhouses. With improvements in sensor performance and further optimisation of the machine learning model, Cephal could accurately predict slug infestation, helping greenhouse owners implement timely pest control strategies. Future work should focus on optimising the electronics and training and optimising the slug prediction model based on environmental values.