The invention discloses an image target tracking method based on YOLO, which includes the following steps: S1, input video; S2, using target detection network YOLO to detect targets and initialize Kalman filter; S3, detecting the current frame image, if the target is detected to be changed to No. 4, otherwise executing S 5; S4, calculating the intersection and comparison of the detection position and the predicted position of the current frame image target. If the crossover ratio is greater than the preset threshold, the detection position of the target is used as the position of the target in the current frame; S5, the position of the target in the previous frame is matched with the predicted position of the target in the current frame, and if the matching ratio is greater than the preset threshold, the position of the target in the current frame is obtained; S6, check whether the video is detected and if it is detected, the tracking is terminated, or return to E. By matching the position of the target in the previous frame with Kalman filter, the key points of the target in the current frame prediction position are matched to determine whether the predicted position has a target or not, and the tracking accuracy can be effectively improved.
【技术实现步骤摘要】
一种基于YOLO的图像目标跟踪方法
本专利技术属于目标跟踪领域,特别涉及一种基于YOLO(YouOnlyLookOnce)的图像目标跟踪方法。
技术介绍
目标跟踪在军事制导、视觉导航、机器人、智能交通、公共安全等领域有着广泛的应用。例如,在车辆违章抓拍系统中,车辆的跟踪就是必不可少的。在入侵检测中,人、动物、车辆等大型运动目标的检测与跟踪也是整个系统运行的关键所在。目标检测网络YOLO是一种计算机视觉领域的深度学习方法,主要用于单帧图像的检测与识别,相比较基于手工特征的目标检测方法具有更高的检测准确度与更快的检测速度。基于检测的目标跟踪是一种常用的目标跟踪方法,通过比对目标检测方法检测目标在图像中的位置与预测方法预测目标在图像中的位置得到目标在图像中的跟踪位置。尽管YOLO检测单帧图像具有良好的检测性能,但是在视频检测或图像序列检测过程中,容易受到光照、拍摄角度、目标尺度变化或目标部分遮挡等影响导致检测目标漏检,检测目标不连续,会导致无法通过预测位置判断被跟踪目标是否存在从而导致跟踪失败。
技术实现思路
本专利技术的目的在于克服现有技术的不足,提供一种通过上一帧目标位 ...
【技术保护点】
1.一种基于YOLO的图像目标跟踪方法,其特征在于,包括以下步骤:S1、输入视频;S2、使用目标检测网络YOLO检测目标,初始化卡尔曼滤波器;S3、使用目标检测网络YOLO检测当前帧图像,如果检测到目标转至步骤S4,否则执行步骤S5;S4、计算当前帧图像目标的检测位置与预测位置的交并比,如果交并比大于预设阈值,用目标的检测位置作为目标在当前帧的位置,否则返回步骤S2;S5、将目标在上一帧的位置与目标在当前帧的预测位置做关键点匹配,如果匹配对大于预设阈值,得到目标在当前帧的位置,否则返回步骤S2;S6、检查视频是否检测结束,若是则结束跟踪,否则返回步骤S3。
【技术特征摘要】
1.一种基于YOLO的图像目标跟踪方法,其特征在于,包括以下步骤:S1、输入视频;S2、使用目标检测网络YOLO检测目标,初始化卡尔曼滤波器;S3、使用目标检测网络YOLO检测当前帧图像,如果检测到目标转至步骤S4,否则执行步骤S5;S4、计算当前帧图像目标的检测位置与预测位置的交并比,如果交并比大于预设阈值,用目标的检测位置作为目标在当前帧的位置,否则返回步骤S2;S5、将目标在上一帧的位置与目标在当前帧的预测位置做关键点匹配,如果匹配对大于预设阈值,得到目标在当前帧的位置,否则返回步骤S2;S6、检查视频是否检测结束,若是则结束跟踪,否则返回步骤S3。2.根据权利要求1所述的一种基于YOLO的图像目标跟踪方法,其特征在于,所述步骤S2具体实现方法为:S21、使用目标检测网络YOLO检测输入视频;S22、如果检测到目标转至S23,否则转至S21;S23、使用目标的检测位置信息初始化卡尔曼滤波器,用目标在图像中的外接矩形框表示目标的位置信息。3.根据权利要求1所述的一种基于YOLO的图像目标跟踪方法,其特征在于,所述步骤S4包括以下子步骤:S41、设置交并比阈值为0.6;S42、计算当前帧图像目标的检测位置与预测位置的交并比,交并比计算如下:其中,iou表示检测位置与预测位置的交并比,Sdetection是目标检测位置的外接矩形框的面积,Sprdiction是目标预测位置的外接矩形框的面积;S43、如果交并比iou大于预设阈值0.6,则用目标的检测位置作为目标在当前帧的位置;否则返回步骤S2。4.根据权利要求1所述的一种基于YOLO的图像目标跟踪方法,其特征在于,所述步骤S5包括以下子步骤:S51、设置匹配对阈值为10;S52、对目标在上一帧的检测位置与目标在当前帧...
【专利技术属性】
技术研发人员:王宏,张巍,李建清,
申请(专利权)人:电子科技大学,
类型:发明
国别省市:四川,51
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。