Skip to main content

New Eyes for Food Sorting Lines

Quality control in the food industry is crucial and requires not only adherence to geometric and visual characteristics but also the control of invisible quality features. The TESORO project (TEcnologie avanzate per il SORting automaticO) aimed to develop new selection and control systems for automatic food production machines. The goal was to use hyperspectral detection systems and deep learning algorithms for vegetable classification, aiming to establish a new quality standard in automatic sorting. The developed method utilizes infrared radiation to identify non-visible spoilage, measure ripeness, and to easily detect wood, paper, metal objects, or insects, beyond visual aspects like shape, color, size, or the presence of bruises or seeds.

Through collaboration between Politecnico and industrial automation companies (ISS, a spinoff of Politecnico di Milano developing vision systems, Raytec, a sorting machine manufacturer, and SIPRO, a selection robot manufacturer), and an agricultural cooperative (COTRAPA 2000), a highly innovative automatic line was produced and tested.

The research group at Politecnico di Milano developed a test bench based on the AVAL Global hyperspectral camera, capable of observing wavelengths between 450 and 1700 nm, with a physical resolution of 640 pixels. Various classification approaches were compared, considering all available data and reduced-dimensional datasets, examining Machine Learning and Deep Learning algorithms both at the pixel level and based on binary objects (blobs).

Their performance was evaluated on various laboratory-created datasets (raw or grilled eggplants, tomatoes, cereals, legumes), using typical Artificial Intelligence KPIs like accuracy, precision, recall, F1-score, sensitivity, specificity, and the ROC curve. Target KPI values were defined in collaboration with industrial partners for each characteristic of the vegetables to be classified.

In the final application, a reduced-dimensional solution was chosen: an algorithm based on PLS-DA was implemented, allowing automatic identification of optimal wavelengths to discriminate between vegetables and categorized contaminants. The algorithm was provided to the machine manufacturer, who can now automatically chose its selection parameters to discriminate between vegetables meeting quality standards and those to be discarded based on products loaded in a training session.

A multispectral system based on wavelengths indicated by Politecnico was implemented by industrial partners. The pilot system is installed at the COTRAPA agricultural cooperative and can identify a score for each eggplant in real-time, discarding non-compliant eggplants before grilling and repositioning overlapping ones for optimal grilling.