X射线食品异物图像标注方法与智能检测算法

Foreign object annotation method and intelligent detection algorithm for X-ray food images

  • 摘要: 为解决食品X射线图像中异物种类、边缘信息难以辨识的问题,提出一种融合多标签异物标注方法与多尺度边缘特征的异物检测方法。首先,分别采用单标签标注与多标签标注两种方式完成数据标注。基于原始YOLOv8算法搭建对应的检测模型,通过对比实验分析两种标注方法对异物检测精度的影响。然后,对原始算法进行如下改进:1)在主干网络中嵌入多尺度边缘特征融合模块;2)在主干网络与颈部网络之间嵌入高效注意力模块;3)采用共享卷积检测头;4)引入Wise‑WIoU损失函数。最后,使用多标签标注的数据集,分别采用原始YOLOv8算法和改进后的YOLOv8算法训练检测模型,并对比两种算法的异物检测精度。结果表明,所提出的多标签标注方法及改进算法可显著提升X射线图像中食品异物的检测精度,尤其在异物种类复杂、边缘模糊、背景干扰显著的场景中,表现出更优的检测能力与泛化能力。

     

    Abstract: To address the issues of diverse foreign object types and the difficulty in recognizing edge information in food X‑ray images, a multi‑label foreign object annotation method and a foreign object detection method based on multi‑scale edge feature fusion were proposed. First, foreign objects were annotated using both single-label and multi-label approaches, and detection models were separately established based on the original YOLOv8 algorithm. The detection accuracy of the models trained with the two annotation methods was compared. Then, the YOLOv8 algorithm was improved as follows: 1) a multi‑scale edge feature fusion module was added to the backbone network; 2) an efficient attention mechanism was embedded between the backbone and neck networks; 3) a shared convolution detection head was designed; 4) the Wise‑WIoU loss function was introduced. Finally, detection models were trained using the multi‑label annotated dataset with both the original and the improved YOLOv8 algorithms, and their foreign object detection performance was compared. Experimental results demonstrated that the proposed multi-label annotation method and the improved algorithm significantly enhanced the detection accuracy of foreign objects in food X‑ray images, particularly in scenarios with complex foreign object types, blurred edges, and substantial background interference, where superior detection capability and generalization performance were achieved.

     

/

返回文章
返回