Porkolor: A deep learning framework for pork color classification.
Journal:
Meat science
PMID:
39693826
Abstract
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.