Kai Yang, Dimitrios Argyropoulos
Early detection of browning in button mushroom ( Agaricus bisporus ) using hyperspectral images represents a complex problem due to the inherent variability in browning among the samples. This study aims to develop a LED-based hyperspectral imaging (HSI) system combined with one-dimensional convolutional neural network (1D-CNN) and Gradient-weighted Class Activation Mapping (Grad-CAM) for high precision browning detection in mushrooms. Under LED illumination, the proposed 1D-CNN model achieved a classification accuracy of 97.00–97.28%, outperforming the traditional artificial neural network (ANN) by 1.45–2.57% and exhibiting greater robustness than tungsten-halogen (TH)-based system across different relative humidity levels and constant temperature. Grad-CAM interpretation revealed that discriminative features were concentrated in the visible region (450–520 nm) associated with enzymatic browning pigmentation and the near-infrared region (750–850 nm) sensitive to tissue dehydration and cell wall degradation. Based on the Grad-CAM outputs, over 90% accuracy was achieved by retaining merely the top 10% most important wavelengths, while the top 50% most important wavelengths resulted in performance comparable to the full-wavelength model (>96%). Overall, this study proposed an interpretable deep learning-enabled LED HSI system for the precise detection of mushroom discoloration from sparse brown spots to extensive browning on mushroom caps and provides experts with smart technology for color monitoring in mushroom industry.