基于YOLOv4算法的集装箱破损检测方法

2021-01-06 22:45:04马林朱昌明周日贵
上海海事大学学报 2021年4期

马林 朱昌明 周日贵

摘要:针对港口集装箱破损检测的算法较少,并且存在检测速度慢、检测精度低的问题,本文提出一种基于改进的YOLOv4卷积神经网络的集装箱破损检测方法。通过改进的K均值聚类算法获取集装箱数据集的锚点框,结合焦点分类损失函数,减少易分类样本的损失;引入α平衡因子调节正负样本的不均衡,使检测结果更加精确。实验结果表明,改进后的YOLOv4算法比目前流行的算法在明显破损检测及小目标破损检测上具有更好的效果,且不会明显增加检测时间,在集装箱破损检测等方面具有较高的实用价值。

关键词: 港口应用; YOLOv4; K均值聚类; 焦点分类损失函数; 破损检测

中图分类号: TP391.41    文献标志码: A

Abstract: There are few algorithms for port container damage detection, and there are problems of slow detection speed and low detection accuracy. Aimed at the problems, an improved YOLOv4 convolutional neural network is proposed for container damage detection. The anchor frame of the container dataset is obtained by an improved K-means clustering algorithm, and the focus classification loss function is combined to reduce the loss of easily classification samples. The α balance factor is introduced to adjust the imbalance between positive and negative samples, which makes the detection results more accurate. The experimental results show that, compared with the current popular algorithm, the improved YOLOv4 algorithm is of better effect on obvious damage detection and small target damage detection, and the detection time does not significantly increase, so it has a higher practical value in container damage detection.

Key words: port application; YOlOv4; K-means clustering; focus classification loss function; damage detection

0 引 言

随着全球经济一体化发展,越来越多的国际贸易货物需经由港口运输,港口作业的高效和安全变得越来越重要,而集装箱的智能化管理是影响港口作业效率的主要因素之一。为此,一些学者提出了箱号识别,如:WANG等[1]采用一种基于深度学习的目标检测算法Faster-RCNN对集装箱箱号进行检测识别;BU等[2]采用改进的区域生成网络实现箱号检测,再通过CNN對目标字符进行识别;马欣欣等[3]将传统的加权模板算法应用到集装箱检测上。针对破损检测方面的研究,江南等[4]对单个绝缘子利用图像处理技术进行定位检测,杨鹏等[5]结合信息熵与低秩张量之间的差熵检测破损区域。这些利用传统机器学习检测破损区域的方法有2个缺点:(1)无法达到实时检测;(2)对复杂的自然场景的检测准确率低。……

登录APP查看全文