College of Engineering, Nanjing Agricultural University, Nanjing 210031, China.
Sensors (Basel). 2022 Feb 24;22(5):1790. doi: 10.3390/s22051790.
It is necessary to detect multi-type farmland obstacles in real time and accurately for unmanned agricultural vehicles. An improved YOLOv5s algorithm based on the K-Means clustering algorithm and CIoU Loss function was proposed to improve detection precision and speed up real-time detection. The K-Means clustering algorithm was used in order to generate anchor box scales to accelerate the convergence speed of model training. The CIoU Loss function, combining the three geometric measures of overlap area, center distance and aspect ratio, was adopted to reduce the occurrence of missed and false detection and improve detection precision. The experimental results showed that the inference time of a single image was reduced by 75% with the improved YOLOv5s algorithm; compared with that of the Faster R-CNN algorithm, real-time performance was effectively improved. Furthermore, the value of the improved algorithm was increased by 5.80% compared with that of the original YOLOv5s, which indicates that using the CIoU Loss function had an obvious effect on reducing the missed detection and false detection of the original YOLOv5s. Moreover, the detection of small target obstacles of the improved algorithm was better than that of the Faster R-CNN.
对于无人驾驶农业车辆来说,实时、准确地检测多类型农田障碍物是非常必要的。提出了一种基于 K-Means 聚类算法和 CIoU 损失函数的改进 YOLOv5s 算法,以提高检测精度并加快实时检测速度。K-Means 聚类算法用于生成锚框尺度,以加快模型训练的收敛速度。CIoU 损失函数结合了重叠面积、中心距离和纵横比三个几何度量,减少了漏检和误检的发生,提高了检测精度。实验结果表明,改进后的 YOLOv5s 算法的单张图像推理时间减少了 75%;与 Faster R-CNN 算法相比,实时性能得到了有效提高。此外,改进算法的 值比原始 YOLOv5s 增加了 5.80%,这表明 CIoU 损失函数对减少原始 YOLOv5s 的漏检和误检有明显效果。而且,改进算法对小目标障碍物的检测优于 Faster R-CNN。