Specimen-level validation of smartphone-based freshness classification of cow meat
Image-based deep learning has reported 93–100% accuracy for meat freshness, but freshness datasets contain many images of the same specimen and are usually split at random by image. We audited MeatScan, 10,518 smartphone images of fresh and spoiled cow meat from Ghanaian markets, and found that a split by capture session, which removes all near-duplicates detectable by perceptual hashing, still leaves a training image of the same piece of meat for 74% of test images. We built a specimen-level split by linking sessions with instance-level retrieval and geometric verification, and cropped every image to the meat region. On this split, the test macro-F1 of ImageNet-pretrained lightweight networks fell from 0.994–0.996 to 0.901–0.929. MeatGuard-S, a 1.14-million-parameter convolution–transformer hybrid trained without pretraining, reached 0.848–0.862. Distillation did not improve it; after pruning and 8-bit quantisation, it ran offline on an Android device in a median of 31.8 ms per image from a 0.95 MB file, but remained less accurate than the pretrained networks. Gradient-weighted class activation mapping (Grad-CAM), SHapley Additive exPlanations (SHAP) and occlusion maps, evaluated with deletion and insertion curves and the share of attribution on the meat, and an error analysis revealed a residual cue: the extent of the meat region carries label information after cropping, and all models rely on it on unseen specimens. Perturbation metrics that fill removed pixels with the mean colour could not detect this cue, and their faithfulness verdicts reversed between classes. Freshness datasets should be split by specimen, and explanations evaluated quantitatively.
Authors
- Philip Sarfo-Manu
- Peter Appiahene (ORCID: https://orcid.org/0000-0002-6098-4537)
- Samuel Opoku Berchie (ORCID: https://orcid.org/0009-0006-2910-1149)
- Emmanuel Kwame Amoako (ORCID: https://orcid.org/0000-0001-8176-2573)
- James Dorwodoe
- Emmanuel Botchway (ORCID: https://orcid.org/0009-0008-5475-2810)
- Henry Nii-Armah Mettle (ORCID: https://orcid.org/0009-0000-9765-4171)
- Rose-Mary Owusuaa Mensah Gyening
- James Quayson
- Priscilla Akoto Peprah
- Benedicta Nyarko Anin-Acquah
Institutions
- Kwame Nkrumah University of Science and Technology (GH)
- University of Energy and Natural Resources (GH)
Publication Details
- Journal
- Research Square
- Published
- 2026-11-25
- DOI
- https://doi.org/10.21203/rs.3.rs-11763888/v1
- Primary Topic
- Advanced Neural Network Applications
- Type
- preprint