Unsupervised Tomato Split Anomaly Detection using Hyperspectral Imaging and Variational Autoencoders
Mahmoud Abdulsalam, Usman Zahidi, Bradley Hurst, Simon Pearson, Grzegorz Cielniak, James Brown
TL;DR
This work tackles unsupervised detection of tomato split anomalies using hyperspectral imaging and a tailored variational autoencoder. By identifying a discriminative wavelength range around 530–550 nm and employing a reconstruction-loss objective with KL annealing, the method detects splits without labeled anomaly data and can localize anomalous regions via reconstruction error. The approach combines careful preprocessing with an end-to-end VAE that scores anomalies through a simple threshold, enabling practical quality control in greenhouses. The results indicate strong detection capability and point to future enhancements for grading split severity and expanding the dataset across lighting conditions.
Abstract
Tomato anomalies/damages pose a significant challenge in greenhouse farming. While this method of cultivation benefits from efficient resource utilization, anomalies can significantly degrade the quality of farm produce. A common anomaly associated with tomatoes is splitting, characterized by the development of cracks on the tomato skin, which degrades its quality. Detecting this type of anomaly is challenging due to dynamic variations in appearance and sizes, compounded by dataset scarcity. We address this problem in an unsupervised manner by utilizing a tailored variational autoencoder (VAE) with hyperspectral input. Preliminary analysis of the dataset enabled us to select the optimal range of wavelengths for detecting this anomaly. Our findings indicate that the 530nm - 550nm range is suitable for identifying tomato dry splits. The proposed VAE model achieved a 97% detection accuracy for tomato split anomalies in the test data. The analysis on reconstruction loss allow us to not only detect the anomalies but also to some degree estimate the anomalous regions.
