Abstract
Ensuring food safety and quality is critical in the food-processing industry, where the detection of contaminants remains a persistent challenge. This study assesses the feasibility of hyperspectral imaging (HSI) for detecting foreign objects on pork belly meat. A Specim FX17 hyperspectral camera was used to capture data across various bands in the near-infrared spectrum (900-1700 nm), enabling identification of contaminants that are often missed by traditional visual inspection methods. The proposed solution combines a segmentation approach based on a lightweight Vision Transformer with specific pre- and post-processing strategies to distinguish contaminants from meat, fat, and conveyor belt, while emphasizing on a low false-positive rate. On a test set of 55 images with contaminants, the method retained most true positives; on 183 clean images, the full pipeline eliminated all false positives. Across 208 additional images acquired under production-line temperature variation (10-55 °C), only one image exhibited small false positives, and on a challenging 95-image set with fat-like spectra the pipeline produced zero false positives. These results demonstrate high detection accuracy and training efficiency while addressing issues such as noise, temperature drift, and spectral similarity. The findings support the feasibility of real-time HSI for automated quality control.