Published October 1, 2025 | Version 1.0.0
Dataset Open

A Hyperspectral Image Dataset for Identifying Foreign Objects on Pork Belly

Description

In pork processing lines, products can be contaminated with foreign bodies during transport between the slaughterhouse and the packing area, often due to equipment malfunctions or human negligence. These contaminants, sometimes only a few millimeters thin, pose a serious food safety risk, as they often go undetected during human inspection. While RGB cameras are commonly used in industrial computer vision systems, they are limited in their ability to detect such contaminants due to size and visual similarity to surrounding materials.

To address this issue, we mounted a Specim FX17 hyperspectral line-scan camera, together with a halogen lighting system, above the conveyor belt transporting pork belly pieces from the slaughterhouse to the packaging area. The camera captured hyperspectral data in the near-infrared (NIR) range of 942–1723 nm across 224 spectral bands, with a spectral resolution of approximately 3.5 nm per band, at a frame rate of 527 lines per second. To improve data quality, the first and last 20 bands—characterized by weak signal strength—were excluded, leaving 184 effective spectral bands. The camera was mounted orthogonally above the conveyor at a distance of 40 cm from the belt, covering a field of view of 300 mm. This setup provided a spatial resolution of 0.47 mm per pixel, ensuring that contaminants as small as 1 mm² were represented by at least two pixels along the scan. Each recorded image comprised a hyperspectral cube with dimensions 640 × 1000 × 184.

We formulated the task of foreign body detection as a semantic segmentation problem (pixel-wise classification of contaminants). We collected 78 hyperspectral images containing contaminants and 183 images without contaminants, covering both orientations of pork belly (fat side up and meat side up) under varying temperature conditions. From the contaminated set, 22 images were manually annotated to create segmentation masks for training. Each image was divided into 20 × 16 patches with 50% overlap, yielding over 80,000 labeled patches, of which 76,347 were used for training and 4,617 for validation.

The following 10 contaminants were considered for this study: PA-PP (PA and PP were grouped into a single class due to the similarity in their spectral signatures), PU, metal, PEHD, Teflon, nitrile, wood, paper, cardboard, and white conveyor belt material.

ID Class Name RGB Triplet
0 PAPP 211,244,255
1 PU 250,128,114
2 METAL 255,212,221
3 PEHD 76,76,76
4 TEFLON 0,255,0
5 NITRIL 0,76,116
6 WOOD 119,95,236
7 PAPER 201,0,55
8 CARD 168,199,157
9 WCB 10,117,173
10 MEAT 223,116,255
11 FAT 255,255,0
12 CB 53,136,119

Files

cmap.csv

Files (18.9 GB)

Name Size Download all
md5:b8c01f6169eceb3ee01fad33e0e9e59d
167 Bytes Preview Download
md5:19d7a40d6b595fa4ad970f7775b00339
18.9 GB Preview Download

Additional details

Related works

Is supplement to
Preprint: arXiv:2503.16086 (arXiv)

Software

Repository URL
https://github.com/hayatrajani/spectral_pork
Development Status
Active