A Method for Detecting Foreign Objects in Pastries Based on Deep Learning
-
摘要:
在面食工业的生产加工过程中,产品不慎被掺入塑料、橡胶等异物会严重影响消费者的健康安全,因此,检测面食产品中是否含有异物是一项非常重要的品控步骤。X射线计算机断层扫描(CT)是一种非接触、无损的产品检测方法,被广泛应用于面食工业生产线的检测步骤中。然而,由于面食工业生产线的高通量检测需求,对于单个产品的检测通常要求在1 s以内完成,不可能有充裕的成像时间获取大量投影图,限制了普通CT方法的使用。因此,本文提出一种基于U-Net网络的异物检测方法,通过对小样本CT重建数据进行精确分割,获得仅含有异物的虚拟投影图进行训练。验证结果表明本文的方法仅需数张投影图即可识别多个异物的数量,准确率较高,能够大幅提高面食工业生产线的异物检测效率。
Abstract:During the industrial production of pastries, foreign substances such as plastic and rubber can accidentally enter the processing chain, posing serious risks to consumer health and safety. Therefore, detecting foreign substances in pastries is a critical quality control step. X-ray computed tomography (CT) is a fast, non-contact, and non-destructive testing method that is widely used in quality inspection processes on of industrial pastry production lines. However, owing to the high-throughput detection requirements of such production lines, the analysis of a single product typically needs to be completed within 1 s. This limited time frame makes it impossible to capture a sufficient number of projection images, restricting the use of conventional CT methods. In this study, we propose a foreign-object detection method based on the U-Net network, which is trained using CT data from the same type of samples and foreign objects. The experimental results show that this method requires only a few projection images to accurately identify multiple foreign objects. It can quickly and efficiently detect foreign objects from CT data on industrial production lines, greatly improving detection efficiency in the pastry industry.
-
Keywords:
- deep learning /
- CT /
- foreign object detection
-
-
图 3 蓝框内为训练集中每套包含样品与异物的CT数据的0° 投影图,红框内为验证集中每套包含样品与异物的CT数据的0° 投影图
Figure 3. The blue box represents the 0° projection of CT data containing samples and foreign objects in each training set, whereas the red box represents the 0° projection of CT data containing samples and foreign objects in each validation set
图 4 蓝框内为训练集中每套CT数据生成的仅含有异物的0° 虚拟投影图,红框内为验证集中每套CT数据生成的仅含有异物的0° 虚拟投影图
Figure 4. The blue box represents the 0° virtual projection generated from the training set containing only foreign objects, whereas the red box represents the 0° virtual projection generated from the validation set containing only foreign objects
表 1 验证集数据用训练出的U-Net网络模型的处理结果
Table 1 The processing results of the U-Net network model trained on the validation set data
投影图角度 原始数据 经U-Net模型处理后 识别异物数量 0° 6 15° 5 30° 5 45° 6 60° 5 75° 5 90° 6 表 2
1800 个投影图的U-Net模型处理结果的识别异物数量统计Table 2 Statistics on the number of foreign objects identified by the U-Net model obtained by processing results from
1800 projection images识别异物数量/个 4 5 6 7 8 9 10 对应的投影图数量/张 22 1070 573 111 19 4 1 表 3 经过腐蚀算法处理后的识别异物数量统计
Table 3 Statistics for the number of identified foreign objects processed using the corrosion algorithm
识别异物数量/个 4 5 6 7 对应的投影图数量/张 11 1154 633 2 表 4
1350 组相差15° 的7个投影图识别出的异物数量Table 4 Number of foreign objects identified by seven projection images with a difference of 15° in
1350 sets识别异物数量/个 5 6 7 对应的投影图数量/张 29 1307 14 表 5 不同投影图数量下CT重建方法的耗时
Table 5 Time consumption of the CT reconstruction algorithm for different numbers of projection images
投影图数量/张 360 90 60 45 30 20 15 12 导入数据耗时/s 1.08 0.71 0.59 0.39 0.13 0.09 0.078 0.076 CT重建耗时/s 7.79 3.78 3.06 2.90 2.68 2.53 2.48 2.43 曝光耗时/s 7.20 1.80 1.20 0.90 0.60 0.40 0.30 0.24 总耗时/s 16.10 6.29 4.85 4.19 3.41 3.02 2.86 2.75 表 6 不同投影图数量下CT重建切片图效果
Table 6 CT reconstruction slice effects for different projection image quantities
投影图数量/张 第484层切片图 投影图数量/张 第484层切片图 360 30 90 15 45 12 -
[1] 马敬军, 李东鑫, 曹岩, 等. 食品加工中异物及其控制措施探讨[J]. 质量与认证, 2024, 1: 38-42. [2] 李娟. 食品生产过程的异物来源与预防控制[J]. 现代食品, 2019, 11: 107-111. LI J. Foreign matter source and prevention and control in food production[J]. XIANDAISHIPIN, 2019, 11: 107-111. (in Chinese).
[3] 周振华, 朱鹏, 幸波. 食品的异物管理与检测[J]. 食品安全导刊, 2023, 22: 82-85. DOI: 10.3969/j.issn.1674-0270.spaqdk202326033. [4] 张文英, 林乾洋. 韩国食品异物报告制度对我国的启示[J]. 福建轻纺, 2022, 8: 24-27. DOI: 10.3969/j.issn.1007-550X.2022.04.007. [5] 孙军. 食品原材料中异物的有效检测[J]. 食品安全导刊, 2018, 36: 98. DOI: 10.3969/j.issn.1674-0270.2018.03.074. [6] 靳欣欣, 潘立刚, 王冬. 食品中异物种类来源及检测技术评述[J]. 食品安全质量检测学报, 2016, 7(7): 2803-2808. JIN X X, PAN L G, WANG D. Review on the source and detection technology of foreign bodies in food[J]. Journal of Food Safety and Quality, 2016, 7(7): 2803-2808. (in Chinese).
[7] 张文建, 邵华. 基于 X射线的食品异物检测系统设计[J]. 机电一体化, 2016, 22(8): 44-47. ZHANG W J, SHAO H. Design of food foreign obiect detection system based on X-ray[J]. Mechatronics, 2016, 22(8): 44-47. (in Chinese).
[8] DANICLA V. 如何用异物检测技术避免食品安全问题[J]. 食品安全导刊, 2016, 7: 42-43. [9] 安立工业自动化(上海)有限公司. 食品原材料的异物检测方案[J]. 食品安全导刊, 2011, 4: 32-33. [10] 冯琼丹. 食品异物检测技术研究现状[J]. 江苏调味副食品, 2009, 26(3): 25-27. DOI: 10.3969/j.issn.1006-8481.2009.03.007. FENG Q D. Research on the detecting technology of foreign body in food[J]. Jiangsu Condiment and Subsidiary Food, 2009, 26(3): 25-27. DOI: 10.3969/j.issn.1006-8481.2009.03.007. (in Chinese).
[11] 虞伟晨, 蔡云升. 食品中异物的在线检测和控制[J]. 食品工业, 2002, 5: 33-35. [12] DOMINGO M, IVAN L, HANS L, et al. Automated fish bone detection using X-ray imaging[J]. Journal of Food Engineering, 2011, 105: 485-492. DOI: 10.1016/j.jfoodeng.2011.03.007.
[13] HEMAMALINI V, RAJARAJESWARI S, NACHIYAPPAN S, et al. Food quality inspection and grading using efficient image segmentation and machine learning-based system[J]. Journal of Food Quality, 2022: 5262294.
[14] ZHU L L, PETROS S, ERICA P, et al. Deep learning and machine vision for food processing: A survey[J]. Current Research in Food Science, 2021, 4: 233-249. DOI: 10.1016/j.crfs.2021.03.009.
[15] DENG Z W, WANG T, ZHENG Y, et al. Deep learning in food authenticity: Recent advances and future trends[J]. Trends in Food Science & Technology, 2024, 144: 104344.
[16] JANMENJOY N, KANITHI V, PAIDI D, et al. Intelligent food processing: Journey from artificial neural network to deep learning[J]. Computer Science Review, 2020, 38: 110297.
[17] BEATRIZ E MOLINA P. Deep learning: The great challenge to innovate: Highlighting Colombia’s food industry[C]//12th International Conference on Intellectual Capital, Knowledge Management and Organisational Learning, 2015: 429-436.
[18] WANG Y, WU J B, DENG H, et al. Food image recognition and food safety detection method based on deep learning[J]. Computational Intelligence and Neuroscience, 2021, 13: 126845.
[19] VIJAY K, VAN H N, BASIVI P K, et al. A critical review on computer vision and artificial intelligence in food industry[J]. Journal of Agriculture and Food Research, 2020, 2: 100033. DOI: 10.1016/j.jafr.2020.100033.
[20] DENG Z W, WANG Y, ZHENG Y, et al. Hyperspectral imaging and deep learning for quantification of Clostridium sporogenes spores in food products using 1D-convolutional neural networks and random forest model[J]. Food Research International, 2021, 147: 110577. DOI: 10.1016/j.foodres.2021.110577.
[21] JONATHAN L, EVAN S, TREVOR D. Fully convolutional networks for semantic segmentation[C]//Processing of the IEEE Conference on Computer Vision and Pattern Recognition, 2015: 3431-3440.
[22] HE K M, ZHANG X Y, REN S Q, et al. Deep residual learning for image recognition[C]//IEEE Conference on Computer Vision and Pattern Recognition, 2016: 770-778.
[23] CHEN L C, PAPANDREOU G, KOKKINOS I, et al. DeepLab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected CRFs[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 40(4): 834-848.
[24] WANG X, GIRSHICK R, GUPTA A, et al. Proceedings of the IEEE neural conference on computer vision and pattern recognition[C]//IEEE Conference on Computer Vision and Pattern Recognition, 2018: 7794-7803.
[25] WANG J, LIU X P. Medical image recognition and segmentation of pathological slices of gastric cancer based on deeplab v3+ neural network[J]. Comput Methods Programs Biomed, 2021, 207: 106210. DOI: 10.1016/j.cmpb.2021.106210.
[26] OLAF R, PHILIPP F, THOMAS B, et al. U-Net: Convolutional networks for biomedical image segmentation[C]//International Conference on Medical Image Computing and Computer-Assisted Intervention, 2015: 234-241.
[27] TIM V D L, ELLEN R, PIETER V, et al. Non-destructive internal disorder detection of Conference pears by semantic segmentation of X-ray CT scans using deep learning[J]. Expert Systems with Applications, 2021, 176: 114925. DOI: 10.1016/j.eswa.2021.114925.
[28] KAZUYA U, NOBUTAKA K, AKIHIRO M, et al. Automated fish bone detection in X-ray images with convolutional neural network and synthetic image generation[J]. IEEJ Transactions on Electrical and Electronic Engineering, 2021, 16: 1510-1517. DOI: 10.1002/tee.23448.
[29] LEE D H, KIM E S, CHO J S, et al. A two-stage automatic labeling method for detecting abnormal food items in X-ray images[J]. Journal of Food Measurement and Characterization, 2022, 16: 2999-3009. DOI: 10.1007/s11694-022-01387-1.
[30] MICHAEL A, SIAMAK K, FOROUZANDEH S, et al. Novel models to predict stored melon fruit marketability using convolutional neural networks[J]. Journal of Ambient Intelligence and Humanized Computing, 2023, 14: 11863-11871. DOI: 10.1007/s12652-022-03741-z.
[31] VLADYSLAV A, ROBERT V L, TRISTAN V L, et al. CT-based data generation for foreign object detection on a single X-ray projection[J]. Scientificreports, 2023, 13: 1881.
[32] WU Z Y, XUE Q L, MIAO P Q, et al. Deep learning network of amomum villosum quality classification and origin identification based on X-ray technology[J]. Foods, 2023, 12: 1775. DOI: 10.3390/foods12091775.
[33] VLADYSLAV A, ROBERT V L, TRISTAN V L, et al. X-ray image generation as a method of performance prediction for real-time inspection: A case study[J]. Journal of Nondestructive Evaluation, 2024, 43: 79. DOI: 10.1007/s10921-024-01091-8.
[34] MIROSLAV Y, THOMAS L, VIRGINIA F, et al. Degradation detection in rice products via shape variations in XCT simulation-empowered AI[J]. Journal of Nondestructive Evaluation, 2025, 44: 10. DOI: 10.1007/s10921-024-01147-9.
[35] MATHE T Z, TRISTAN V L, DANIEL M P, et al. A tomographic workflow to enable deep learning for X-ray based foreign object detection[J]. Expert Systems with Applications, 2022, 206: 117768. DOI: 10.1016/j.eswa.2022.117768.
-
期刊类型引用(3)
1. 席杭闽. 上海市某医院CT机房屏蔽防护改造及评价. 价值工程. 2022(25): 51-53 . 百度学术
2. 黄贤海,李桂明,劳婉仪. 平疫结合的CT机房建设实践. 现代仪器与医疗. 2022(04): 91-96 . 百度学术
3. 周大琼,谢震中,何李. 智慧医疗系列产品在新冠肺炎疫情中的应用. 人工智能. 2021(03): 92-100 . 百度学术
其他类型引用(0)