Font Size: a A A

Marine Fish Detection Algorithm Based On Improved YOLOv5

Posted on:2023-07-13Degree:MasterType:Thesis
Country:ChinaCandidate:N WangFull Text:PDF
GTID:2530307145468084Subject:Computer technology
Abstract/Summary:PDF Full Text Request
In recent years,target detection has attracted much attention due to its excellent performance in the field of computer vision.However,the existing target detection algorithms have poor performance in identifying small groups of small target fish in the ocean.Very similar,which is not conducive to feature extraction.In order to solve the above problems,this paper proposes an improved YOLOv5 marine fish recognition algorithm,and conducts experiments on the self-made dataset Twelve-Fish.The accuracy of the improved algorithm has been improved,and the inference speed has increased slightly within an acceptable range,and the problem of dense fish schools and similar subject backgrounds has been significantly improved.The main contents of this paper include the following points:(1)This paper collects and produces a target detection data set containing 12 rare marine fish-the Twelve-Fish data set,and annotates it according to the format of the PaSCAl VOC2007 data set.(2)For the detection of dense fish groups,that is,small targets,two improvement strategies are proposed:(1)Propose a data enhancement method Mosaic9 based on the nine-square pattern.In the YOLOv5 algorithm,the Mosaic data enhancement method of random rotation,cropping and scaling of four pictures is upgraded to the Mosaic9 data enhancement method of random rotation,cropping and scaling of nine pictures,so as to enrich the small target samples in the data set and improve the training speed.(2)Propose an improved feature fusion network and add a small target detection layer.Add a set of smaller-sized anchor boxes,use the multi-scale feature fusion of the FPN+PAN structure,fuse the shallow features by channel in a cross-level connection,and add the fused feature layer as a small target detection layer to the detection network.among.The experimental results show that the method can effectively improve the detection ability of small targets.(3)For the problem that the subject and the background of marine fish are similar,the improvement measures of adding attention mechanism are adopted.Adding both spatial attention and channel attention to the backbone network enables the network model to comprehensively consider global information in the process of feature extraction,and quickly find important feature information that is different from the background in complex backgrounds.The experimental results show that the detection of fish subjects in similar backgrounds can be improved by adding an attention mechanism.In the experimental part,the ablation experiments are carried out on the three different improvement points proposed in this paper,and the optimal improvement combination is selected as the final improved algorithm in this paper.The improved algorithm model is compared with the unimproved YOLOv5n and the classic Faster R-CNN algorithm.The experimental results show that the improved accuracy mAP value is 3.3% higher than that of YOLOv5n,and 4.8% higher than that of Faster R-CNN;the inference speed of a single image is 6ms longer than that of YOLOv5n,and 5ms shorter than that of Faster R-CNN model;Secondly,the test results for extremely dense fish schools and images with similar subject backgrounds are significantly improved.In general,the improved model in this paper improves the detection effect of marine fish while basically ensuring the inference speed.
Keywords/Search Tags:YOLOv5, Fish Detection, Data Augmentation, Small Object Detection, Attention Mechanism
PDF Full Text Request
Related items