Table of Contents
Fetching ...

Deep Learning-Based Meat Freshness Detection with Segmentation and OOD-Aware Classification

Hutama Arif Bramantyo, Mukarram Ali Faridi, Rui Chen, Clarissa Harris, Yin Sun

TL;DR

A meat freshness classification framework from Red-Green-Blue (RGB) images that supports both packaged and unpackaged meat datasets is presented and on-device latency using TensorFlow Lite on a smartphone is reported, highlighting practical accuracy-latency trade-offs for future deployment.

Abstract

In this study, we present a meat freshness classification framework from Red-Green-Blue (RGB) images that supports both packaged and unpackaged meat datasets. The system classifies four in-distribution (ID) meat classes and uses an out-of-distribution (OOD)-aware abstention mechanism that flags low-confidence samples as No Result. The pipeline combines U-Net-based segmentation with deep feature classifiers. Segmentation is used as a preprocessing step to isolate the meat region and reduce background, producing more consistent inputs for classification. The segmentation module achieved an Intersection over Union (IoU) of 75% and a Dice coefficient of 82%, producing standardized inputs for the classification stage. For classification, we benchmark five backbones: Residual Network-50 (ResNet-50), Vision Transformer-Base/16 (ViT-B/16), Swin Transformer-Tiny (Swin-T), EfficientNet-B0, and MobileNetV3-Small. We use nested 5x3 cross-validation (CV) for model selection and hyperparameter tuning. On the held-out ID test set, EfficientNet-B0 achieves the highest accuracy (98.10%), followed by ResNet-50 and MobileNetV3-Small (both 97.63%) and Swin-T (97.51%), while ViT-B/16 is lower (94.42%). We additionally evaluate OOD scoring and thresholding using standard OOD metrics and sensitivity analysis over the abstention threshold. Finally, we report on-device latency using TensorFlow Lite (TFLite) on a smartphone, highlighting practical accuracy-latency trade-offs for future deployment.

Deep Learning-Based Meat Freshness Detection with Segmentation and OOD-Aware Classification

TL;DR

A meat freshness classification framework from Red-Green-Blue (RGB) images that supports both packaged and unpackaged meat datasets is presented and on-device latency using TensorFlow Lite on a smartphone is reported, highlighting practical accuracy-latency trade-offs for future deployment.

Abstract

In this study, we present a meat freshness classification framework from Red-Green-Blue (RGB) images that supports both packaged and unpackaged meat datasets. The system classifies four in-distribution (ID) meat classes and uses an out-of-distribution (OOD)-aware abstention mechanism that flags low-confidence samples as No Result. The pipeline combines U-Net-based segmentation with deep feature classifiers. Segmentation is used as a preprocessing step to isolate the meat region and reduce background, producing more consistent inputs for classification. The segmentation module achieved an Intersection over Union (IoU) of 75% and a Dice coefficient of 82%, producing standardized inputs for the classification stage. For classification, we benchmark five backbones: Residual Network-50 (ResNet-50), Vision Transformer-Base/16 (ViT-B/16), Swin Transformer-Tiny (Swin-T), EfficientNet-B0, and MobileNetV3-Small. We use nested 5x3 cross-validation (CV) for model selection and hyperparameter tuning. On the held-out ID test set, EfficientNet-B0 achieves the highest accuracy (98.10%), followed by ResNet-50 and MobileNetV3-Small (both 97.63%) and Swin-T (97.51%), while ViT-B/16 is lower (94.42%). We additionally evaluate OOD scoring and thresholding using standard OOD metrics and sensitivity analysis over the abstention threshold. Finally, we report on-device latency using TensorFlow Lite (TFLite) on a smartphone, highlighting practical accuracy-latency trade-offs for future deployment.
Paper Structure (22 sections, 1 equation, 7 figures, 14 tables)

This paper contains 22 sections, 1 equation, 7 figures, 14 tables.

Figures (7)

  • Figure 1: Experiment setup for packaged meat image collection.
  • Figure 2: Representative examples of the No Result (irrelevant/OOD) set, including empty trays, plates, and background-only images.
  • Figure 3: Training vs validation accuracy curves for five models during retraining with OOD-enabled inference.
  • Figure 4: Confusion matrices on the held-out ID test set ($N=843$) for the four in-distribution classes (Packaged Fresh, Packaged Spoiled, Unpackaged Fresh, Unpackaged Spoiled). Errors mostly occur within the same packaging type (fresh vs. spoiled), which is the hardest visual boundary.
  • Figure 5: Representative failure cases: (i) glare on packaged samples, (ii) occlusion/clutter, and (iii) borderline freshness with subtle cues.
  • ...and 2 more figures