Pang Yuxian, Chen Chuchu, Yang Yuedong, Mo Delin
Sun Yat-sen University, No. 132 Waihuandong Road, Guangzhou Higher Education Mega Center, Guangzhou 510006, China.
Meat Sci. 2025 Mar;221:109731. doi: 10.1016/j.meatsci.2024.109731. Epub 2024 Dec 12.
Pork color is crucial for assessing its safety and freshness, and traditional methods of observing through human eyes are inefficient and subjective. In recent years, several methods have been proposed based on computer vision and deep learning have been proposed, which can provide objective and stable evaluations. However, these methods suffer from a lack of standardized data collection methods and large-scale datasets for training, leading to poor model performance and limited generalization capabilities. Additionally, the model accuracy was limited by an absence of effective image preprocessing of background noises.To address these issues, we have designed a standardized pork image collection device and collected 1707 high-quality pork images. Base on the data, we proposed a novel deep learning model to predict the color. The framework consists of two modules: image preprocessing module and pork color classification module. The image preprocessing module uses the Segment Anything Model (SAM) to extract the pork portion and remove background noise, thereby enhancing the model's accuracy and stability. The pork color classification module uses the ResNet-101 model trained with a patch-based training strategy as the backbone. As a result, the model achieved a classification accuracy of 91.50 % on our high quality dataset and 89.00 % on the external validation dataset. The Porkolor online application is freely available at https://bio-web1.nscc-gz.cn/app/Porkolor.
猪肉颜色对于评估其安全性和新鲜度至关重要,而传统的肉眼观察方法效率低下且主观。近年来,已经提出了几种基于计算机视觉和深度学习的方法,这些方法可以提供客观且稳定的评估。然而,这些方法存在缺乏标准化数据收集方法和大规模训练数据集的问题,导致模型性能较差且泛化能力有限。此外,由于缺乏对背景噪声的有效图像预处理,模型准确性受到限制。为了解决这些问题,我们设计了一种标准化的猪肉图像采集设备,并收集了1707张高质量的猪肉图像。基于这些数据,我们提出了一种新颖的深度学习模型来预测颜色。该框架由两个模块组成:图像预处理模块和猪肉颜色分类模块。图像预处理模块使用分割一切模型(SAM)来提取猪肉部分并去除背景噪声,从而提高模型的准确性和稳定性。猪肉颜色分类模块使用基于补丁训练策略训练的ResNet-101模型作为主干。结果,该模型在我们的高质量数据集上实现了91.50%的分类准确率,在外部验证数据集上实现了89.00%的分类准确率。Porkolor在线应用程序可在https://bio-web1.nscc-gz.cn/app/Porkolor上免费获取。