Directional Error Analysis and Budget-Constrained Inspection Prioritization for CNN-Based Fruit and Vegetable Freshness Classification

Image-based freshness classifiers can achieve high aggregate performance while still predicting visually Rotten produce as Fresh. We evaluated directional error analysis and probability-based inspection prioritization in a leakage-audited subset of 5183 original AgriFreshNET images. ImageNet-pretrained ResNet18 and EfficientNet-B0 classifiers were assessed on clean images and 18 controlled synthetic corruptions. Within each held-out, source-group-disjoint test cell, all images predicted as Fresh formed the inspection candidate pool. Candidate images were ranked using Direct Rotten Probability, uncertainty scores, and repeated random ranking, and the capture of Rotten-to-Fresh (RF) errors was evaluated using the ground-truth labels. At a 10% inspection budget under Pillow Gaussian blur (radius = 3), Direct Rotten Probability captured 28/36 RF errors for EfficientNet-B0 (recall = 0.778) versus 17/36 for maximum softmax probability (MSP) uncertainty (0.472; difference = 0.306; original 95% percentile confidence interval (CI), 0.148–0.455; Bonferroni-adjusted 98.333% CI, 0.113–0.500). For ResNet18, the corresponding recalls were 26/36 (0.722) and 13/36 (0.361; difference = 0.361; original CI, 0.154–0.517; adjusted CI, 0.116–0.567). The Bonferroni adjustment was restricted to a retrospectively defined family of three comparisons. The EfficientNet-B0 Gaussian-noise comparison was smaller and its adjusted interval included zero. Across three training seeds, the blur differences remained positive for both architectures. In an additional single-rater audit of 69 RF blur views, 43 of 54 radius = 3 views were rated PRESERVED and 11 PARTIAL; this descriptive result does not establish human inspection performance. The evidence supports condition-dependent prioritization under specified synthetic stressors, not universal ranking superiority, field robustness, or food-safety assurance.

Authors

Institutions

Publication Details

Journal
Foods
Published
2026-12-01
DOI
https://doi.org/10.3390/foods15234332
Primary Topic
Smart Agriculture and AI
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Directional Error Analysis and Budget-Constrained Inspection Prioritization for CNN-Based Fruit and Vegetable Freshness Classification

Jianzhi Sun, Ying Zhang, Zhipeng Wang, Wenxi Han
Foods
Smart Agriculture and AI
article

Directional Error Analysis and Budget-Constrained Inspection Prioritization for CNN-Based Fruit and Vegetable Freshness Classification

Jianzhi Sun, Ying Zhang, Zhipeng Wang, Wenxi Han
article en

Abstract

Image-based freshness classifiers can achieve high aggregate performance while still predicting visually Rotten produce as Fresh. We evaluated directional error analysis and probability-based inspection prioritization in a leakage-audited subset of 5183 original AgriFreshNET images. ImageNet-pretrained ResNet18 and EfficientNet-B0 classifiers were assessed on clean images and 18 controlled synthetic corruptions. Within each held-out, source-group-disjoint test cell, all images predicted as Fresh formed the inspection candidate pool. Candidate images were ranked using Direct Rotten Probability, uncertainty scores, and repeated random ranking, and the capture of Rotten-to-Fresh (RF) errors was evaluated using the ground-truth labels. At a 10% inspection budget under Pillow Gaussian blur (radius = 3), Direct Rotten Probability captured 28/36 RF errors for EfficientNet-B0 (recall = 0.778) versus 17/36 for maximum softmax probability (MSP) uncertainty (0.472; difference = 0.306; original 95% percentile confidence interval (CI), 0.148–0.455; Bonferroni-adjusted 98.333% CI, 0.113–0.500). For ResNet18, the corresponding recalls were 26/36 (0.722) and 13/36 (0.361; difference = 0.361; original CI, 0.154–0.517; adjusted CI, 0.116–0.567). The Bonferroni adjustment was restricted to a retrospectively defined family of three comparisons. The EfficientNet-B0 Gaussian-noise comparison was smaller and its adjusted interval included zero. Across three training seeds, the blur differences remained positive for both architectures. In an additional single-rater audit of 69 RF blur views, 43 of 54 radius = 3 views were rated PRESERVED and 11 PARTIAL; this descriptive result does not establish human inspection performance. The evidence supports condition-dependent prioritization under specified synthetic stressors, not universal ranking superiority, field robustness, or food-safety assurance.

FoodsVol. 15(23)
Beijing Technology and Business University (CN), China Electronics Standardization Institute (CN)
Smart Agriculture and AI
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon