首页|基于改进YOLOv5的番茄成熟度检测方法

基于改进YOLOv5的番茄成熟度检测方法

扫码查看
为提高番茄果实成熟度的识别精度,实现番茄种植环节成熟度在线无损自动检测,本研究提出一种基于改进YOLOv5 的番茄成熟度检测方法。针对番茄果实间因藤蔓、叶片的遮挡以及光照干扰而导致的识别误差、图像中小目标番茄检测难等问题,在YOLOv5 算法的骨干网络Backbone中增加ECA高效通道注意力模块,将Neck结构中PAFPN替换为具有双向加权融合能力的BiFPN,在Head结构中添加小目标检测模块,通过消融试验获取最优改进算法 YOLOv5-tomatoA。结果表明:相对于 YOLOv3-Tiny、SSD300 和 Faster R-CNN目标检测网络,YOLOv5-tomatoA算法在遮挡和光照不均等复杂场景下,平均精度均值和F1 得分分别达到 97。4%和 95。4%,图像识别仅需 14。7ms,能同时满足高精度和快速响应的番茄果实识别需求。改进后的YOLOv5网络结构优化了内存占比和资源消耗,仅占用 15。9M,模型更加轻量化,对实现番茄成熟度的在线无损检测具备一定的实用价值,该技术也可用于番茄自动采摘机器人设计中。
Tomato Ripeness Detection Method Based On Improved YOLOv5
In order to improve the recognition accuracy of tomato fruit ripeness and to realize online nondestructive automatic detection in tomato planting chain,this study proposes a tomato ripeness detection method based on improved YOLOv5.In the field of agriculture,accurate identification of tomato ripeness is very important,which can help agricultural production to rationalize labor arrangements and timely harvesting,thus improving the yield and quality of agricultural products.Traditional target detection algorithms face some challenges in tomato ripeness recognition,such as misidentification and missed detection,due to factors such as vines and leaf shading between tomato fruits and light interference.Therefore,this study had carried out a series of optimizations of YOLOv5 to address these problems in order to improve the accuracy and robustness of the algorithm.In the first place,an ECA efficient channel attention module was added to its backbone network Backbone,which generated channel weights by one-dimensional convolution and captured small targets that could be easily ignored in tomatoes of different ripening stages by interacting with the k neighboring channels of each channel,thus enhancing the expressiveness and accuracy of tomato features and effectively mitigating the effects of occlusion and light interference on the recognition results.Moreover,the PAFPN in the Neck structure was replaced by BiFPN with bidirectional weighted fusion capability.BiFPN was able to bi-directionally fuse features of different scales,which better handled the occlusion problem between tomato fruits and improves the accuracy of the recognition,and this optimization also mitigated the effect of multi-targets on the recognition accuracy,which enabled the algorithm to perform better in complex scenarios.Finally,a P2 module for small-target detection was added to the Head structure.The P2 module was able to better combine the advantages of shallow and deep tomato features to improve the detection performance of small-target tomatoes,so that it can accurately detect the target even when there are small-target tomatoes and other complex situations in the image.Through a series of ablation experiments,authors obtained the optimal improved algorithm YOLOv5-tomatoA.Compared to traditional target detection networks such as YOLOv3-Tiny,SSD300 and Faster R-CNN,the algorithm performs well in complex scenes such as occlusion and uneven illumination,with an average accuracy mean and F1 score of 97.4%and 95.4%,respectively,and the recognition of an image takes only 14.7ms,which can simultaneously satisfy the high-precision and fast-response tomato fruit recognition.The improved YOLOv5 network structure also optimizes the memory footprint and resource consumption,occupying only 15.9M,making the model more lightweight.This mean that the algorithm had low equipment requirements for realizing online non-destructive testing of tomato ripening,which can provide a more convenient real-time monitoring tool for agricultural activities.This technique can also be applied to the design of automatic tomato picking robots,which provides a strong support to realize the automation and intelligence of the tomato planting process.Therefore,this improved YOLOv5-tomatoA algorithm has important practical value in the field of tomato ripeness detection and is expected to provide more accurate and intelligent management decision support for agricultural production.

TomatoYOLOv5Data enhancementTarget detectionAttention mechanism

刘洋、宫志宏、黎贞发、刘涛、赵卓、王腾歌

展开 >

天津农学院计算机与信息工程学院,天津 300384

天津市气候中心,天津 300074

番茄 YOLOv5 数据增强 目标检测 注意力机制

2024

中国农业气象
中国农业科学院农业环境与可持续发展研究所

中国农业气象

CSTPCD
影响因子:1.679
ISSN:1000-6362
年,卷(期):2024.45(12)