In food inspection, many defects are difficult to spot reliably with standard RGB cameras alone. Surface scratches, insect damage, shell contamination, rotten regions, and foreign materials may be subtle in visible light but much clearer when spectral information is available. That is where HyperNut comes in, a new hyperspectral dataset and research project for unsupervised defect detection and segmentation in nuts
Why Hyperspectral Defect Detection Matters?
Traditional machine-vision systems often struggle when a defect has only slight color or texture differences from a normal sample. In food-quality inspection, that is a real limitation as some anomalies are material-related rather than purely visual. HyperNut is built around hyperspectral imaging (HSI), which captures rich information across many contiguous wavelengths and can reveal defects that are hard to detect with RGB alone. The dataset and paper target unsupervised and semi-supervised anomaly detection, where models learn from normal samples and identify abnormal ones during testing.
Introducing HyperNut
HyperNut is a hyperspectral dataset for defect detection, localization, and segmentation in almonds and pistachios. It contains VIS-NIR hyperspectral images in the 400-1000nm range and is designed for realistic industrial inspection scenarios rather than overly clean lab-style benchmarks. The dataset supports both image-level anomaly detection and pixel-level segmentation through the inclusion of defect masks for abnormal test samples.
What Makes HyperNut Useful?
HyperNut was created to address the lack of publicly available hyperspectral benchmarks for anomaly detection and segmentation in practical food-inspection settings. Many existing benchmarks rely on RGB data, which can miss subtle defects with little visible contrast. By using hyperspectral data, HyperNut enables research on:
- unsupervised and semi-supervised anomaly detection
- band selection and spectral analysis
- comparison between hyperspectral and RGB-based inspection methods
This makes HyperNut relevant not only for academic benchmarking, but also for real-world food-quality inspection, sorting, and industrial visual inspection pipelines.
Use Cases
HyperNut can support a wide range of applications:
- Nut processing and grading: identify defective almonds and pistachios before packaging.
- Food-quality inspection research: benchmark anomaly detection and segmentation methods on hyperspectral data.
- Industrial AI development: compare classical, deep-learning, and reconstruction-based methods under an unsupervised setup.
- Spectral analysis studies: explore which wavelength bands are most informative for food defects.
Open and Accessible
Final Thoughts
HyperNut brings hyperspectral imaging into a practical benchmark for food inspection and anomaly segmentation, with a realistic acquisition setup, public availability, and support for both detection and pixel-level defect analysis. For researchers working on industrial anomaly detection, hyperspectral vision, or food-quality AI, it offers a useful new resource grounded in real inspection challenges.

