| 改进YOLOv7和DeepSort的视频苹果数量检测 |
点此下载全文 |
| 引用本文:龚圳玮,彭伟,田雅暄.改进YOLOv7和DeepSort的视频苹果数量检测[J].计算技术与自动化,2025,(4):94-101 |
| 摘要点击次数: 7 |
| 全文下载次数: 3 |
|
|
| 中文摘要:单颗苹果树上苹果数量是准确估计苹果园产量的重要参数。由于苹果树上的苹果密度大并且相互叠加,很难对苹果进行自动准确的计数。大多数基于深度学习的方法是通过静态图像进行苹果检测和计数,如果拍摄的区域重复,则重复区域的苹果会被重复计数。为此,提出了一种基于视频的多目标跟踪的计数方法,首先,对YOLOv7模型进行改进。将注意力机制和网络的backbone相结合,额外增加一个小目标检测头并且在原边框回归损失中引入归一化的Wassestein距离(Normalized Wasserstein Distance,NWD)以提高算法对微小物体的检测能力。结果表明,改进后的YOLOv7模型mAP比原模型提高了1.61%,达到84.42%。其次,过滤掉DeepSort在跟踪目标时出现的重复目标ID。最后,结合改进后的YOLOv7检测算法和DeepSort跟踪算法,计算出视频中不同的ID个数即是苹果个数,提升了整套算法检测的准确率,准确率达到88.3%。 |
| 中文关键词:目标检测 多目标跟踪 损失函数 注意力机制 YOLOv7 DeepSort |
| |
| Improved YOLOv7 and DeepSort for Counting Apples via Video |
|
|
| Abstract:The number of apples on a single apple tree is an important parameter for accurately estimating the yield of an apple orchard. Due to the high density of apples on an apple tree and their overlapping, it is difficult to count apples automatically and accurately. Most deep learning-based methods detect and count apples through static images. If the captured area is repeated, the apples in the repeated area will be counted repeatedly. In response to the above problems, a counting method based on video multi-target tracking is proposed. First, the YOLOv7 model is improved. The attention mechanism is combined with the backbone of the network, an additional small target detection head is added, and the normalized Wasserstein distance (NWD) is introduced into the original bounding box regression loss to improve the algorithm's ability to detect tiny objects. The results show that the mAP of the improved YOLOv7 model is 1.61% higher than that of the original model, reaching 84.42%. Secondly, the repeated target IDs that appear when DeepSort tracks targets are filtered out. Finally, by combining the improved YOLOv7 detection algorithm and DeepSort tracking algorithm, the number of different IDs in the video is calculated to be the number of apples, which improves the detection accuracy of the entire algorithm to 88.3%. |
| keywords:object detection multi target tracking loss function attention mechanism YOLOv7 DeepSort |
| 查看全文 查看/发表评论 下载pdf阅读器 |