运用多维视角融合视觉转换器的食品气调枕形包装漏气检测

    Modified atmosphere pillow bags leakage detection using multi-dimensional fused vision transformer

    • 摘要: 食品气调枕形包装被广泛用于农产品的贮藏、运输和消费全流程,尽管工厂广泛使用的现代包装机械和人工检验手段减小了漏气风险,但是封口缺陷、贮藏和运输中的挤压、人工检验时的人为差错等造成漏气甚至瘪袋的情况时有发生,变质的袋内食品既影响了消费者身体健康又导致厂商声誉受损。该文针对食品气调枕形包装的漏气检测问题,提出了一种基于多维视角融合的Vision Transformer漏气检测方法(multi-dimentional fusion vision transformer, MdF-ViT)。通过包装袋的主视角、侧视角和俯视角的融合,提取3个视角包装袋轮廓特征,综合判断包装袋形变量,完成对枕形包装的漏气检测。对样本A、样本B、样本C的测试结果表明,该种模型准确率均达到97.5%,F1值分别达到97.6%、97.6%和97.4%。该研究提出的模型可以有效应用于工厂生产并节约成本。

       

      Abstract: Modified atmosphere pillow bags have been widely used in the entire processing of various agricultural products during preservation, shipment, and consumption. However, the sealing defect, storage and shipment squeezing can result in the leakage or even flat containment of the modified atmosphere pillow bags. Furthermore, manual inspection cannot fully meet the modern machine packaging, leading to the inevitable leaking and deterioration of bag contents. In this study, a novel detection was proposed for the leaky-modified atmosphere pillow bags using computer vision and deep learning. The single-dimensional Vision Transformer (ViT) models were deployed to remove the unwanted features. A pre-processing BiSeNet model was applied to the conventional Vision Transformer for better performance. Multi-dimensional Vision Transformer (MdF-ViT) was fused to detect the leaky modified atmosphere pillow bags from different perspectives. MdF-ViT models were established in the featured fusion of front-, side-, and top-view, simultaneously. Firstly, more than 2160 images were collected from three views of samples A, B, and C in the pillow bags. Then, the visual feature of leaky bags was analyzed in the contour variation pattern using deep learning in machine vision scope. Secondly, the detection of leakage was carried out using various deep learning. The contour features of each bag were discovered practical to morphological learnings among neuron network models. Thirdly, the BiSeNet model was established to extract the contour features for each bag. Therefore, the morphological patterns were learnable by deep learning models. Finally, various models were trained and then validated using the MdF-ViT model. The experimental results showed that the accuracies of MdF-ViT models reached 97.5%, 97.5%, and 97.5%, respectively, which were higher than the averaged accuracies of 78.33%, 91.67%, and 85.83% acquired by original ViT models. The F1-scores of MdF-ViT models were 97.6%, 97.6%, and 97.4%, respectively, which were higher than the averaged F1-scores of 64.70%, 92.33%, and 87.67%, respectively, compared with the original ViT models. A comparison was made on the ViT and MdF-ViT models. The higher accuracy, stability and generalization of MdF-ViT models were achieved to detect the leaky pillow bags with the contour extraction. The average accuracies of the testing sample B and C with sample A trained models were 35.00% and 34.17% higher than those of the original ViT models, respectively. The average accuracies of sample B-trained models testing sample A and sample C were 31.67% and 30.83% higher, respectively, while there were 47.50% and 20.00% higher average accuracies in the sample C-trained models testing sample A and sample B. The averaged F1-Scores in the sample A trained models testing sample B and sample C were 43.57% and 78.13% higher, respectively, compared with the original ViT models. The averaged F1-Scores of sample B-trained models testing sample A and sample C were 51.53% and 61.07% higher, respectively, while there were 51.43% and 28.30% higher averaged F1-Scores in the sample C trained models testing sample A and sample B, respectively, compared with original ViT models. There were also better than accuracies of 87.50%, 62.50%, and 85.00% acquired by typical ResNet-18 networks, respectively, and better than F1-scores of 86.50%, 72.70%, and 85.70%, respectively. The superior accuracies of 85.00%, 87.50%, and 90.00% were acquired by typical VGG-16 networks, respectively, and the superior F1-scores of 87.50%, 87.80%, and 90.50%, respectively. Consequently, the final evidence supported that the recognition of leaked modified atmosphere pillow bags was feasible by the MdF-ViT model. Effective and economic detection was introduced into the leaky modified atmosphere pillow bags during production. The finding can also provide an alternative approach to reducing economic loss among manufacturers and consumers.

       

    /

    返回文章
    返回