Single-wavelength NIR imaging and Machine Learning: a new frontier for detecting Qfly damage in cherries

26 Nov 2025
1320

The non-destructive detection of insect-infested fruit is a topic of great interest for biosecurity and for the quality management of horticultural supply chains.

In the case of the Queensland fruit fly (Qfly, Bactrocera tryoni), a highly damaging pest for international horticultural trade, the difficulty of identification stems from the fact that oviposition marks are often minimal and hard to distinguish with the naked eye from natural pigmentation or mild mechanical damage.

A recent study proposed an innovative approach that integrates advanced optical imaging techniques with artificial intelligence algorithms to reliably detect oviposition punctures on fresh cherries.

Detection with hyperspectral images

Through the use of hyperspectral images (HSI), researchers identified 730 nm as the optimal wavelength to discriminate oviposition lesions from other superficial irregularities on the fruit.

This choice is based on the observation that, at 730 nm, damaged areas exhibit distinctive characteristics: dark spots with a whitish centre, while pigmentation and non-pest-related defects become less visible.

Building on this information, the researchers developed the first high-resolution, single-wavelength NIR image library dedicated to Qfly detection, containing more than 1,700 images acquired using a microscope and a modified near-infrared camera.

Oviposition spots were manually annotated, generating over 13,000 bounding boxes and more than 120,000 training patches, a dataset unprecedented in size and specificity.

Innovative analytical methodology

The novelty lies not only in the acquisition strategy but especially in the analytical methodology.

The researchers developed a machine learning (ML) framework known as the Bounding Box Histogram Fusion Classifier (BBHFC), which uses the output of a YOLOv3 model trained to identify oviposition punctures.

Instead of relying on a decision threshold applied directly to the object detector’s predictions (the YOLO-IP approach), BBHFC converts YOLO-generated bounding boxes into feature vectors based on confidence and class histograms, which are then processed by traditional classifiers such as decision trees, random forests or SVMs.

This strategy drastically reduces sensitivity to confidence thresholds and enables more robust performance in identifying infested fruit.

Results and performance

Results show that the BBHFC system significantly outperforms YOLO-IP in terms of accuracy, sensitivity, and specificity, achieving F1 scores above 0.93 at the image level and over 0.89 at the fruit level.

The decision tree model, in particular, achieved an optimal balance between sensitivity (0.9689) and specificity (0.9544).

The comparison with human visual inspection yielded striking results: five inspectors, evaluating 155 artificially infested cherries randomly mixed with control fruit, achieved an average accuracy of 60%, whereas the BBHFC model exceeded 89%.

This gap highlights the enormous potential of NIR imaging technologies combined with AI algorithms to support or complement human evaluation during grading operations, phytosanitary inspections, and pre- and post-border checks, activities that are costly yet essential for international trade.

Future applications and scalability

In conclusion, the technical and operational feasibility of single-wavelength NIR imaging proves excellent, particularly as a rapid and cost-effective alternative to hyperspectral imaging, which is currently difficult to apply in industrial settings due to cost and acquisition time.

The BBHFC framework stands out for its modularity and scalability, opening the way for potential integration into optical sorting systems currently used in fruit packing facilities.

Future developments will focus on reducing false positives, automating labelling procedures, and assessing the technology in high-speed industrial workflows, essential prerequisites for future commercial adoption.

Source: Yazdani, M., Bao, D., Zhou, J., Wang, A., & van Klinken, R. D. (2025). Single-Wavelength Near-Infrared Imaging and Machine Learning for Detecting Queensland Fruit Fly Damage in Cherries. Smart Agricultural Technology, 101090. https://doi.org/10.1016/j.atech.2025.101090 

Source images: Yazdani et al., 2025 

Andrea Giovannini
University of Bologna (IT)


Cherry Times - All rights reserved

What to read next

INIA and Ñuble: new post-harvest standards for high quality cherries

Post-harvest​

11 Nov 2024

The project, promoted by the Ñuble Producers Association and funded by the Regional Government, has allowed researchers at INIA to study the quality of cherries and identify elements that enable the main export varieties to withstand travel to China.

New evidence on the mechanisms underlying cracking in cherry fruits

Tech management

01 May 2026

Sweet cherry cracking significantly impacts yield and market quality. Research highlights the key role of pectins and calcium in cell adhesion and tissue stability, offering valuable insights to reduce fruit splitting and improve orchard management strategies.

In evidenza

An early harvest and good quality for South African cherries. A 50 per cent drop in production is forecast

Production

11 Nov 2026

South Africa’s cherry harvest season began two to three weeks early, but production in Ceres could fall by over 50%. Heat and cold during flowering affected fruit set. Early cherries reach 30 mm, while Tru-Cape aims to increase exports from 15% to nearly 20% of its crop.

The government of Extremadura is allocating aid of up to 1,500 euros per hectare to cherry growers

Production

11 Nov 2026

Nel 2026 l’Estremadura approva 19,59 milioni di euro di aiuti per cereali, ciliegie e apicoltura: fino a 50 euro per ettaro irriguo, 1.500 euro per ettaro di ciliegio e 18 euro per alveare. Le pratiche saranno avviate d’ufficio e i pagamenti sono previsti entro fine anno.

Tag Popolari