Detection of Kernel-Level Spoilage Adulteration in Dried Goji Berries Using Zero-Shot Learning and Computer Vision
Hidden adulteration of stale berries in dried goji berry batches is difficult to detect by manual inspection or batch-level quality assessment. This study developed a high-throughput method for kernel-level spoilage adulteration quantification in dried goji berries. It addressed three practical challenges in the image processing of densely arranged dried-fruits, including scalable label generation for deep learning segmentation without pixel-level manual annotation, separation of densely touching small berries, and full-size quality level distribution map reconstruction. SAM-assisted pseudo-label generation combined with multi-scale image cropping was used to overcome the limitation of manual pixel-level annotation, while YOLO-based instance segmentation was further employed for efficient berry localization in dense scenes. The freshness labels of segmented single berries were assigned by a statistical RGB-HSV grading rule. Specifically, adaptive multi-scale image cropping for segmentation was applied to improve local separability of berries under dense adhesion and occlusion conditions. The crop-level segmentation and grading outputs were subsequently reconstructed into the original image coordinate system to generate complete quality distribution maps. Results showed that YOLO models trained based on the pseudo-labels achieved a precision of 0.953, a recall of 0.951, an mAP50 of 0.960, and an mAP50-95 of 0.846. The full-size grading map reconstruction method produced a mean duplicate-suppression rate of 4.31%. In the full freshness-grading test dataset, 4850 berries were detected, including 449 stale berries. The mean absolute counting error was 1.61%. The proposed framework reduces manual annotation requirements while enabling berry-level freshness classification and quantitative stale-berry proportion estimation, providing objective information for dried fruit quality screening and adulteration control.
Authors
- Osama Elsherbiny (ORCID: https://orcid.org/0000-0003-3031-7108)
- Lei Zhou (ORCID: https://orcid.org/0000-0001-5857-8153)
- Yiying Zhao (ORCID: https://orcid.org/0000-0001-5404-7590)
- Yuanning Zhai
- Ruobin Huang
- Baiwei Sun
Institutions
- Mansoura University (EG)
- Nanjing Forestry University (CN)
- ZheJiang Academy of Agricultural Sciences (CN)
Publication Details
- Journal
- Foods
- Published
- 2026-08-17
- DOI
- https://doi.org/10.3390/foods15162869
- Primary Topic
- Spectroscopy and Chemometric Analyses
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China