Abstract
[Objective] To realize precise,swift,and non -invasive detection of pork freshness in large -scale cold meat industry chains based on computer vision technology.[Methods] An image recognition algorithm for pork freshness is proposed based on YOLOv 8n.Various data augmentation methods are employed to enhance the pork feature extraction from images.The transfer learning experiment method is utilized,an appropriate optimizer is selected,and the training weights of the model are improved for higher accuracy in the final identification.Based on the YOLOv 8n image recognition algorithm,the improved YOLOv 8n-cls model is developed by data augmentation and optimizer improvement for the algorithm.[Results] After transfer learning and improving the optimizer,the average recognition accuracy,recall rate,and mean average precision (mAP ) of pork freshness image recognition achieve 99.4%,83.8%,and 91.4%,respectively,at an image recognition frame rate of 149 Hz,demonstrating promising experimental outcomes.Following normalization training and ablation testing,the accuracy of pork freshness image recognition increases by 0.5% to reach 99%.[Conclusion] The improved YOLOv 8n-cls model improves image recognition accuracy while maintaining requisite speed,meeting demands for pork freshness real -time detection,and recognizing in practical production settings.
Publication Date
6-13-2025
First Page
98
Last Page
104
DOI
10.13652/j.spjx.1003.5788.2024.80882
Recommended Citation
Lian, WANG; Jun, LIU; Jie, PI; and Daoying, WANG
(2025)
"Image recognition algorithm for pork freshness based on YOLOv 8n,"
Food and Machinery: Vol. 41:
Iss.
5, Article 14.
DOI: 10.13652/j.spjx.1003.5788.2024.80882
Available at:
https://www.ifoodmm.cn/journal/vol41/iss5/14
References
[1] 林 亚 青,房 子 舒.猪 肉 新 鲜 度 检 测 方 法 综 述 [J].肉 类 研 究,2011,25(5):62-65.LIN Y Q,FANG Z S.A review on detection methods for pork freshness [J].Meat Research,2011,25(5):62-65.
[2] KUCHA C T,NGADI M O.Rapid assessment of pork freshness using miniaturized NIR spectroscopy [J].Journal of Food Measurement and Characterization,2020,14(2):1 105-1 115.
[3] 张应龙,王立东,战伟伟,等.肉品新鲜度快速检测技术研究进展 [J].肉类研究,2011,25(8):42-46.ZHANG Y L,WANG L D,ZHAN W W,et al.Research progress in rapid detection methods for meat freshness [J].Meat Research,2011,25(8):42-46.
[4] 张雷蕾,李永玉,彭彦昆,等.基于高光谱成像技术的猪肉新鲜度评价 [J].农业工程学报,2012,28(7):254-259.ZHANG L L,LI Y Y,PENG Y K,et al.Determination of pork freshness attributes by hyperspectral imaging technique [J].Transactions of the Chinese Society of Agricultural Engineering,2012,28(7):254-259.
[5] 齐亮,赵婕,赵茂程.冷鲜猪肉的新鲜度无损检测技术现状及THz 检测技术展望 [J].食品与机械,2016,32(9):219-224.QI L,ZHAO J,ZHAO M C.Status of nondestructive detection methods on chilled pork freshness and prospect of THz spectrum inspection technique [J].Food & Machinery,2016,32(9):219-224.
[6] CHMIEL M,SŁOWIŃSKI M,DASIEWICZ K,et al.Use of computer vision system (CVS ) for detection of PSE pork meat obtained from m.semimembranosus [J].LWT-Food Science and Technology,2016,65:532-536.
[7] GUMUS B,BALABAN M,UNLUSAYIN M.Machine vision applications to aquatic foods:a review [J].Turkish Journal of Fisheries & Aquatic Sciences,2011,11(1):167-176.
[8] JACKMAN P,SUN D W,ALLEN P.Recent advances in the use of computer vision technology in the quality assessment of fresh meats [J].Trends in Food Science & Technology,2011,22(4):185-197.
[9] CHMIEL M,SŁOWIŃSKI M,DASIEWICZ K.Lightness of the color measured by computer image analysis as a factor for assessing the quality of pork meat [J].Meat Science,2011,88(3):566-570.
[10] 刘超,张家瑜,戚超,等.基于 EfficientNet 网络模型的猪肉新鲜度智能识别方法 [J].食品科学,2023,44(24):369-376.LIU C,ZHANG J Y,QI C,et al.An intelligent method for pork freshness identification based on EfficientNet model [J].Food Science,2023,44(24):369-376.
[11] 邱洪涛,孙裴,侯金波,等.基于 Caffe 的猪肉新鲜度分级的设计与实现 [J].江苏农业学报,2019,35(2):461-468.QIU H T,SUN P,HOU J B,et al.Design and implementation of pork freshness grading based on Caffe [J].Jiangsu Journal of Agricultural Sciences,2019,35(2):461-468.
[12] 焦俊,王文周,侯金波,等.基于改进残差网络的黑毛猪肉新鲜度识别方法 [J].农业机械学报,2019,50(8):364-371.JIAO J,WANG W Z,HOU J B,et al.Freshness identification of iberico pork based on improved residual network [J].Transactions of the Chinese Society for Agricultural Machinery,2019,50(8):364-371.
[13] KAZAMA E H,TEDESCO D,DOS SANTOS CARREIRA V,et al.Monitoring coffee fruit maturity using an enhanced convolutional neural network under different image acquisition settings [J].Scientia Horticulturae,2024,328:112957.
[14] ZHANG D P,SHAO Y H,MEI Y Y,et al.Using YOLO-based pedestrian detection for monitoring UAV [C]// Tenth International Conference on Graphics and Image Processing (ICGIP 2018 ).Chengdu:SPIE,2019:1 141-1 145.
[15] CHEN J C,JI C,ZHANG J,et al.A method for multi-target segmentation of bud-stage apple trees based on improved YOLOv 8[J].Computers and Electronics in Agriculture,2024,220:108876.
[16] QUARANTA L,CALEFATO F,LANUBILE F.KGTorrent:a dataset of Python jupyter notebooks from kaggle [C]// 2021 IEEE/ACM 18th International Conference on Mining Software Repositories (MSR ).Madrid:IEEE,2021:550-554.
[17] NILASHI M,IBRAHIM O,DALVI M,et al.Accuracy improvement for diabetes disease classification:a case on a public medical dataset [J].Fuzzy Information and Engineering,2017,9(3):345-357.
[18] DENG J,DONG W,SOCHER R,et al.ImageNet:a large-scale hierarchical image database [C]// 2009 IEEE Conference on Computer Vision and Pattern Recognition.Miami:IEEE,2009:248-255.
[19] HUGHES G.On the mean accuracy of statistical pattern recognizers [J].IEEE Transactions on Information Theory,1968,14(1):55-63.
[20] PASZKE A,GROSS S,MASSA F,et al.PyTorch:an imperative style,high-performance deep learning library [J/OL].Advances in Neural Information Processing Systems.(2019 -12-03) [2024 -09-22].https://doi.org/10.48550 /arXiv.1912.01703.
[21] SHAHRIARI B,SWERSKY K,WANG Z Y,et al.Taking the human out of the loop:a review of Bayesian optimization [J].Proceedings of the IEEE,2016,104(1):148-175.
[22] TIAN Y J,ZHANG Y Q,ZHANG H B.Recent advances in stochastic gradient descent in deep learning [J].Mathematics,2023,11(3):682.
[23] HEYDARIAN M,DOYLE T E,SAMAVI R.MLCM:multi-label confusion matrix [J].IEEE Access,2022,10:19 083-19 095.