基于改进YOLOv8n-seg的蟹塘水草区域分割与定位方法

    Region segmentation and localization method of water plants in crab pond based on improved YOLOv8n-seg

    • 摘要: 目前蟹塘内水草清理以人工作业为主,劳动强度大,作业效率低,自动水草清理船能大幅降低劳动强度,提高作业效率,而确定蟹塘水草分布是规划水草清理船高效作业路径的关键基础。针对无人机采集的蟹塘水草图像中水草与岸边植被相似性高、难以准确区分等问题,该研究提出一种基于改进YOLOv8n-seg的蟹塘水草区域分割与定位方法。改进模型从降低模型大小和提高召回率的角度出发,首先基于RT-DETR(real-time detection transformer)的HGNetv2(hierarchical graph network)轻量化网络结构重设主干特征提取网络,缩减模型体积;其次以Efficient Rep轻量化结构为基准重构颈部网络,在降低参数量的同时增强模型的多尺度特征融合能力;接着在特征提取层引入 SegNext注意力机制,加强模型对蟹塘水草区域的敏感度。为了消除模型在识别过程中产生的冗余区域,进一步提高分割精度,采用二值化处理对分割结果进行优化,并结合图像处理算法对水草区域进行面积筛选;经过坐标转换后得到精确水草轮廓经纬度坐标。试验结果表明:改进模型对蟹塘水草具有良好的区分度和分割效果,其参数量和计算量分别为1.49 M和8.4 GFLOPs,召回率和平均精度均值分别为91.5%和95.6%,与原YOLOv8n-seg模型相比,模型体积减小了49.7%,分割速度提升了32.3%。在坐标转换试验中,水草定位精度平均误差为0.22 m,验证了改进模型能够满足蟹塘水草区域分割与定位要求。研究结果为后续水草清理船自动作业路径规划研究提供参考。

       

      Abstract: At present, the cleaning of water plants in crab pond is primarily relied on manual operations, which is characterized by high labor intensity and low efficiency. The automatic water plant cleaning boat can greatly reduce the labor intensity and improve the operation efficiency, and determining the water plant distribution in crab pond is the key basis for planning the efficient operation path of the cleaning boat. Addressing the challenges posed by the high similarity between water plants and shoreline vegetation, as observed in drone-captured images of the crab pond, which complicates the accurate distinction between them, a region segmentation and localization method for water plants in crab pond based on improved YOLOv8n-seg was proposed in this paper. The focus of the improved model lies in the reduction of the model size and the enhancement of the recall rate. Firstly, in order to diminish the model size, the lightweight HGNetv2 (hierarchical graph network) based on RT-DETR (real-time detection transformer) was used as the backbone feature extraction network. Secondly, the neck network was reconstructed based on the lightweight structure of Efficient Rep to reduce the number of parameters and enhance the multi-scale feature fusion ability of the mode. Finally, the SegNext attention mechanism was introduced in the feature extraction layer to enhance the sensitivity of the model to the water plant area. In order to eliminate the redundant regions generated by the model in the recognition process and further improve the segmentation accuracy, the binarization processing was used to optimize the segmentation results, and the image processing algorithm was combined to screen the area of the water plant area. After coordinate conversion, the precise longitude and latitude coordinates of water plant contour were obtained. The experimental results showed that the improved model exhibited a strong discriminatory and segmentation effect on water plants in crab ponds. The parameter number, calculation quantity and model size of the improved model were only 1.49 M, 8.4 GFLOPs, and 3.27 MB, respectively. Compared with the original YOLOv8n-seg model, the parameter number, calculation quantity and model size of the improved model were reduced by 54.3%, 30.6% and 49.7%, respectively. The model before and after improvement was deployed to the Jetson Orin Nano embedded AI computer for testing. It was found that the preprocessing speed of the improved model was almost the same as that of the YOLOv8n-seg model. The inference speed, post processing speed and segment speed were increased by 30.6%, 46.4% and 32.3%, respectively. In addition, the recall, precision, and mean average precision of the improved model achieved values of 91.5%, 89.3% and 95.6%, respectively. The improved model achieved the best balance of calculation, parameters, recall and detection accuracy comparing with YOLOv5s-seg, YOLOv8s-SwinTransformer, YOLOv8s-seg and YOLOv8n-GoldYOLO models. The coordinate conversion test showed that the minimum distance error of water plant location accuracy was 0.13m, the maximum distance error was 0.33 m, and the average distance error was 0.22 m, which verified that the improved model can meet the requirements of water plant region segmentation and localization in crab pond. The finding can provide an important reference for the automatic operation path planning of water plant cleaning boat.

       

    /

    返回文章
    返回