Research and application of YOLOv5-OBB rotation-based object detection algorithm in shrimp larvae detection
-
摘要: 虾苗个体细小、密集堆叠且形状方向不一,在养殖与销售过程中难以精确定位与计数。与传统的矩形框标注方法不同,YOLOv5-OBB采用旋转矩形框(oriented bounding box, OBB),既能准确捕捉目标轮廓,又能精确描述目标的旋转角度和方向性。目标姿态变化较大时,旋转框可提升检测精度,避免传统方法可能产生的误差,增强目标检测的准确性和适应性。研究表明,在虾苗数量分布不均的情况下,YOLOv5-OBB算法仍能稳定识别虾苗,表现出良好的鲁棒性和适应性。该算法在处理旋转目标时优势显著:精确度95.3%,召回率91.4%,平均精度93.6%(较传统方法提升4.4百分点),表明其适用于复杂环境中小型密集物体的高效、精确检测。Abstract: Shrimp larvae are small in size, densely stacked, and variable in shape and orientation, making them difficult to accurately locate and count during farming and sales. Unlike traditional rectangular bounding box annotation, YOLOv5-OBB adopts the oriented bounding box (OBB), which accurately locate the target and precisely describe its rotation angle and orientation. When the target pose varies greatly, the rotated box improves detection accuracy, avoids errors possibly produced by traditional methods, and enhance the accuracy and adaptability of object detection. It showed that the YOLOv5-OBB algorithm can still stably identify shrimp larvae under uneven distribution, demonstrating good robustness and adaptability. YOLOv5-OBB exhibited significant advantages in handling rotated targets: precision and recall were 95.3% and 91.4%, respectively, and average precision was 93.6%, 4.4 percentage points higher than that of traditional methods. These results indicate that YOLOv5-OBB is suitable for the efficient and accurate detection of small, dense objects in complex environments.
-
表 1 虾苗计数统计结果和误差
Table 1. Shrimp larvae counting statistics and errors
单位:尾 参数 最多 最少 平均 虾苗真实数量 20 1 10 模型预测误差 3 0 1 表 2 虾苗计数结果
Table 2. Shrimp larvae counting results
单位:尾 虾苗 人工 YOLOv5-OBB YOLOv5 稀疏虾苗 4 4 4 密集虾苗 35 34 32 表 3 4种旋转目标检测算法性能比较
Table 3. Performance comparison of four rotated object detection algorithms
算法 PA/% 模型内存占用量/MB 检测时间/s RRN 81.1 30.3 0.44 RotNet 84.2 35.2 0.53 R3Det 86.9 40.0 0.60 YOLOv5-OBB 93.6 17.5 0.28 表 4 YOLOv5不同框选模型检测效果对比
Table 4. Comparison of detection performance of different YOLOv5 models
模型 P/% R% AP% 模型内存占用量/MB 检测时间/s YOLOv5 91.6 89.3 89.2 16.7 0.26 YOLOv5-OBB 95.3 91.4 93.6 17.5 0.28 -
[1] FAO. The state of world fisheries and aquaculture 2022: towards blue transformation[R/OL] . Rome: FAO, 2022. https://doi.org/10.4060/cc0461en [2] 农业农村部. 农业农村部发布《通告》规定2021年伏休期间特殊经济品种专项捕捞许可[J] . 水产科技情报, 2021, 48(3): 177. [3] 孙月莹, 陈俊霖, 张胜茂, 等. 基于改进YOLOv7的毛虾捕捞渔船作业目标检测与计数方法[J] . 农业工程学报, 2023, 39(10): 151 − 162. doi: 10.11975/j.issn.1002-6819.202303156 [4] 鲁濠, 王淑青, 鲁东林, 等. 基于改进YOLOv5的小龙虾品质检测方法[J] . 湖北工业大学学报, 2023, 38(4): 76 − 81. doi: 10.3969/j.issn.1003-4684.2023.04.014 [5] 陈子文, 李卓璐, 杨志鹏, 等. 基于YOLOv5的工厂化养殖虾目标检测方法研究[J] . 海洋渔业, 2022, 44(5): 610 − 620. doi: 10.3969/j.issn.1004-2490.2022.05.010 [6] 吕强, 林刚, 蒋杰, 等. 基于改进YOLOv5s模型的自然场景中绿色柑橘果实检测[J] . 农业工程学报, 2024, 40(18): 147 − 154. doi: 10.11975/j.issn.1002-6819.202404190 [7] 杨昊, 张茹, 王钰圣, 等. 基于YOLOv5的锯材表面缺陷检测算法[J] . 林业工程学报, 2024, 9(5): 134 − 143. doi: 10.13360/j.issn.2096-1359.202310021 [8] 朱永利, 刘斌, 曹微, 等. 基于改进YOLOv5的微小柱状零件表面缺陷检测系统[J] . 仪表技术与传感器, 2024(9): 66 − 72,76. doi: 10.3969/j.issn.1002-1841.2024.09.013 [9] 陈庭槿, 黄耀波, 陈炫辛, 等. 基于Prune-YOLOv5s的养殖鱼类缺氧风险评估方法[J] . 渔业现代化, 2024, 51(5): 81 − 89. doi: 10.3969/j.issn.1007-9580.2024.05.010 [10] Chen C, Wu B, Shi Y G. An improved YOLOv5 algorithm for detecting target[J] . IAENG International Journal of Computer Science, 2024, 51(10): 1454 − 1461. [11] Liu H C, Liu W, Alblehai F. A dynamic obstacle avoidance method in robotic navigation control through YOLOv5-based object detection[J] . Journal of Circuits, Systems, and Computers, 2024, 33(15): 2450269. doi: 10.1142/S0218126624502694 [12] Xu Y C, Fu M T, Wang Q M, et al. Gliding vertex on the horizontal bounding box for multi-oriented object detection[J] . IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021, 43(4): 1452 − 1459. doi: 10.1109/TPAMI.2020.2974745 [13] Zhou L, Wei H R, Li H, et al. Arbitrary-oriented object detection in remote sensing images based on polar coordinates[J] . IEEE Access, 2020, 8: 223373 − 223384, doi: 10.1109/ACCESS.2020.3041025 [14] 袁红春, 白宝来, 陶磊. 基于改进YOLOv5_OBB的中华绒螯蟹旋转目标检测[J] . 福建农林大学学报(自然科学版), 2024, 53(2): 284 − 288. doi: 10.13323/j.cnki.j.fafu(nat.sci.).202212023 [15] 宋怀波, 焦义涛, 华志新, 等. 基于YOLO v5-OBB与CT的浸种玉米胚乳裂纹检测[J] . 农业机械学报, 2023, 54(3): 394 − 401,439. doi: 10.6041/j.issn.1000-1298.2023.03.040 -
下载: