The detection of internal pests remains one of the challenges in the postharvest inspection of fruit destined for international trade. In the case of the Mediterranean fruit fly (Ceratitis capitata), eggs and larvae develop beneath the fruit skin and may not produce external symptoms during the early stages of infestation, making them difficult to identify using conventional methods.
Against this backdrop, X-ray microcomputed tomography (µCT) makes it possible to visualize the interior of fruit in three dimensions without destroying it. However, interpreting these images currently requires expert intervention, limiting the speed and large-scale application of the technology. The study specifically examines whether combining µCT with artificial intelligence can automate detection in Navel oranges and contribute to faster and more reproducible postharvest inspection systems.
The research proposes an alternative to inspection methods that require fruit to be opened or destroyed to confirm the presence of the pest. µCT can generate three-dimensional images of the fruit interior and reveal tissue alterations associated with larval development.
Detecting infestation from inside the fruit
The researchers conducted controlled infestation trials using different densities of adult Ceratitis capitata and different incubation periods to reproduce varying levels and stages of infestation.
Both artificially punctured oranges, to facilitate oviposition, and intact fruit were used in order to distinguish damage caused by infestation from that resulting from the puncturing process itself.
The images obtained by µCT were initially analyzed manually and subsequently using different deep-learning models, including convolutional neural networks (CNNs), 3D CNN models, hybrid CNN-LSTM architectures, and Transformer-based models.
Manual inspection achieved an average correct classification rate of 84% in punctured fruit and 69% in intact fruit, with detection improving as infestation progressed. These results suggest that pest identification becomes easier once the internal damage caused by larvae becomes sufficiently visible.
DenseNet121 delivers the best results
For automated analysis using deep learning, the researchers worked with a dataset of punctured fruit. Among the architectures evaluated, DenseNet121 showed the best overall performance, achieving 88% accuracy, 86% positive predictive value, 100% sensitivity, and an AUC of 0.80.
The researchers emphasize that these values should not be directly compared with those obtained through manual inspection, as the two analyses were conducted on different sets of fruit.
In addition, visualization tools used to interpret the model's predictions, such as Grad-CAM and attention maps, showed that the artificial intelligence system focused its decisions on tissue regions associated with larval damage. This provides evidence that the model was identifying biologically relevant signals rather than patterns unrelated to infestation.
A step toward automated inspection
One relevant aspect of the study is that the researchers also demonstrated that detection could be performed using the entire fruit, without requiring an expert to manually select the most informative image sections.
This feature is particularly important for potential applications in packinghouses or inspection facilities, where manually selecting individual images or sections would limit the capacity to process large volumes of fruit.
According to the authors, the objective of the system is not necessarily to outperform an expert in terms of accuracy, but rather to automate and reproduce the analysis at a scale that would not be feasible through manual inspection of every fruit.
The technology still requires further development
Despite the results obtained, the study identifies important limitations before commercial application can be considered. The artificial intelligence model was developed and validated exclusively using punctured fruit, meaning that further research is needed to determine whether it can achieve similar performance in intact oranges and under real inspection conditions.
The authors also point out that the current performance allows infestation to be detected above chance levels, but does not yet reach the levels required for operational use. Across the complete set of 189 fruit analyzed using deep learning, no decision threshold simultaneously achieved acceptable sensitivity and specificity.
The research therefore highlights the need to expand the datasets, particularly by increasing the number of non-infested fruit, and to improve image acquisition. According to the authors, future progress may depend more on refining image formation and acquisition than solely on further tuning classification models.
Despite these limitations, the results support the potential of combining X-ray microcomputed tomography and artificial intelligence to develop non-destructive, reproducible, and scalable phytosanitary detection systems, with potential future applications throughout postharvest supply chains.
References:
Scolari, F., Serfontein, L., Kirkman, W., Moore, S., Hoffman, J., Bam, L., & Moyano, A. (2027). Applying convolutional neural networks to X-ray images to improve postharvest detection of fruit fly infestation. Postharvest Biology and Technology.
More information.