Manuscript Offprint

arXiv:2610.09726

Beyond Group Splits: Specimen-Level Cross-Validation and Visual Attribution for Remaining-Shelf-Life Regression in Climacteric Fruit

Rovhona Mudau, Jean Frederic Isingizwe Nturambirwe, Clement Nthambazale Nyirenda

Rovhona Mudau

Department of Computer Science

University of the Western Cape

Cape Town, South Africa

4225313@myuwc.ac.za

Jean Frederic Isingizwe Nturambirwe

eResearch Office

University of the Western Cape

Cape Town, South Africa

fisingizwe@uwc.ac.za

Clement Nthambazale Nyirenda

Department of Computer Science /

eResearch Office

University of the Western Cape

Cape Town, South Africa

cnyirenda@uwc.ac.za

Abstract—Estimating remaining shelf life (RSL) from images could provide affordable decision support for perishable produce, but evaluation protocols can substantially affect reported performance when repeated images are available from the same biological specimen. We use the Hass Avocado Ripening dataset, comprising 8,834 image–RSL pairs from 426 fruits across three storage regimes, to evaluate a frozen ImageNet-pretrained visual backbone with a lightweight regression head. Our contributions are threefold: we quantify the effect of observation-level versus specimen-disjoint evaluation, compare lightweight and heavier visual backbones under specimen-disjoint cross-validation, and examine their spatial attributions using Grad-CAM. Across ten observation-level random splits, the model achieves a mean RMSE of 2.37 days with a standard deviation of 0.03 days, whereas specimen-disjoint 5-fold cross-validation yields a mean RMSE of 3.12 days with a standard deviation of 0.11 days. The corresponding mean coefficient of determination is 0.553. A matched per-specimen comparison confirms higher error under specimen-disjoint evaluation, with a probability value below 0.001 across 426 specimens, showing that observation-level partitioning gives a substantially more optimistic estimate for this dataset and model configuration. Under specimen-disjoint evaluation, MobileNetV3-Small (0.93 million parameters) achieves accuracy comparable to ResNet-18 while providing substantially higher throughput, and Grad-CAM reveals differences in spatial attribution between the lightweight backbones. These results support specimen-disjoint evaluation and attribution analysis when assessing lightweight vision models for longitudinal shelf-life prediction.

Index Terms—remaining shelf life, specimen-disjoint cross-validation, transfer learning, lightweight CNN, Grad-CAM, explainable AI.

This work is based on the research supported in part by the National Research Foundation of South Africa (Ref Number SRUG22051310444). The opinions, findings, conclusions or recommendations are those of the author(s) alone, and the NRF accepts no liability whatsoever in this regard.

© 2026 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.

I. INTRODUCTION

Post-harvest loss is a significant issue in the food system, particularly for fresh fruits and vegetables that deteriorate quickly in poor storage conditions [1]. A camera is the most cost-effective tool for predicting remaining shelf life (RSL), allowing operators to reroute, prioritise, or discount produce before deterioration occurs. The value of such a system, however, depends on a prior question: can its reported accuracy be trusted, and can a human verify that it is correct for the right reasons? The question is sharpened by the way these datasets are constructed. Monitoring deterioration requires photographing the same specimen repeatedly over time, so successive images of a single fruit are often highly similar. A standard random, image-level split can then place near-duplicate images of a test specimen into the training set, and the reported score reflects interpolation within a known distribution rather than generalisation to an unseen fruit. A recent peer-reviewed study trained convolutional networks on the same ‘Hass’ avocado imagery, showing that the visual signal is learnable [2]; however, we take a different perspective by asking when such a predictor’s performance is credible and when its logic is verifiable. The work is organised around three questions: how much reported accuracy survives when entire specimens are held out; whether a heavier backbone offers any advantage over a lightweight one under frozen-feature transfer; and whether the most accurate models attend to biologically meaningful fruit regions.

The rest of the paper is organized as follows: Section II reviews related work, Section III describes the materials and methods, Section IV presents the results, Section V discusses the findings, and Section VI concludes the paper.

References (32)

  • Global food losses and food waste: Extent, causes and prevention
  • Shelf-life management and ripening assessment of ‘Hass’ avocado using deep learning approaches
  • A review of external quality inspection for fruit grading using CNN models
  • Using deep learning for image-based plant disease detection
  • Spoilage detection of tomatoes using a convolutional neural network
  • Fresh and rotten fruits classification using CNN and transfer learning
  • Deep CNN model for predicting shelf life of fresh fruits and vegetables using temperature simulation data for optimized transport and storage
  • Transforming agricultural management: A multimodal deep learning approach to shelf life estimation
  • Research on tomato quality prediction models based on the coupling of environmental factors and appearance phenotypes
  • Leveraging data-driven machine learning for intelligent shelf life prediction of fresh apple
  • Leakage and the reproducibility crisis in machine-learning-based science
  • Uncovering bias in the PlantVillage dataset (opens arXiv in a new tab)
  • Estimating the ripeness of hass avocado fruit using deep learning with hyperspectral imaging
  • Explainable ai and mobile imaging for non-destructive avocado ripeness and internal quality assessment to reduce food waste
  • SE-DBIRNet: Squeeze-and-excitation driven dual-path residual network for mango shelf-life stages classification
  • Storage profiling: Evaluating the effect of modified atmosphere packaging on metabolomic changes of strawberries (Fragaria × ananassa)
  • Deep residual learning for image recognition
  • Densely connected convolutional networks
  • Very deep convolutional networks for large-scale image recognition
  • Tomato fruit diseases classification using MobileNetV2
  • Enhancing agriculture through real-time grape leaf disease classification via an edge device with a lightweight CNN architecture and Grad-CAM
  • MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications
  • MobileNetV2: Inverted residuals and linear bottlenecks
  • Searching for MobileNetV3 (opens arXiv in a new tab)
  • Do better ImageNet models transfer better?
  • How transferable are features in deep neural networks?
  • Explainable artificial intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI
  • Grad-CAM: Visual explanations from deep networks via gradient-based localization
  • A lightweight and explainable CNN model for empowering plant disease diagnosis
  • Sanity checks for saliency maps
  • Squeeze-and-excitation networks
  • Score-CAM: Score-weighted visual explanations for convolutional neural networks