海洋渔业 ›› 2022, Vol. 44 ›› Issue (5): 610-.

• • 上一篇    下一篇

基于YOLOv5的工厂化养殖虾目标检测方法研究

  

  • 出版日期:2022-09-30 发布日期:2022-11-09

Research on YOLOv5-based object detection method for shrimp industrial farming

  • Online:2022-09-30 Published:2022-11-09

Abstract:

Research on YOLOv5-based object detection 
method for shrimp industrial farming

CHEN Ziwen1, LI Zhuolu2, YANG Zhipeng2, HE Jiaqi2, CAO Lijie2,3, CAI Kewei2,3, WANG Qihua4
(1. College of Mechanical and Power Engineering, Dalian Ocean University, Dalian Liaoning116023, China; 
2. School of Information Engineering, Dalian Ocean University, Dalian Liaoning116023, China; 3. Key 
Laboratory of Marine Information Technology of Liaoning Province, Dalian Liaoning116023, China; 4. School
 of Medical Information Engineering Jining Medical University, Rizhao Shandong276800,China)

Abstract: Shrimp industrial farming system development originated in the 1990s. The Texas Institute of Marine Science developed the runway shrimp farming system in the mainstream of foreign industrial farming systems. China’s industrial farming development is still in its infancy, the degree of automation is low, and there is an urgent need to develop relevant intelligent systems. Currently, shrimp industrial farming is still using manual feeding methods; the amount of bait feeding needs to be determined according to the density of shrimp in the pool. Traditionally, farmed shrimp counting is generally performed by manual random sampling, which is laborintensive, inefficient, and susceptible to shrimp growth and the purification load of the circulating water system. 
The computer visionbased farmed shrimpcounting method has the advantages of no contact throughout the process and fast counting speed, which can effectively solve the problems of timeconsuming and laborintensive manual counting and specific damage to shrimp. At present, computer vision technology has been more widely used in aquaculture. With the rapid development of deep convolutional neural networks, target detection based on deep learning has surpassed the traditional methods and has become the mainstream method of target detection and has been widely used in different fields. The main frameworks of deep learningbased target detection algorithms are the RCNN (regionconvolutional neural networks) series, SSD (single shot multibox detector), and YOLO(you only look once) series. Scholars have introduced them to the field of agricultural engineering and achieved good results. 
This paper proposes a target detection method for farmed shrimp based on YOLOv5 framework. YOLOv5 is a singlestage target detection algorithm that adds some new improvement ideas to YOLOv4, resulting in a significant performance improvement in speed and accuracy. The main improvement ideas are shown as follows. Input side: in the model training stage, some improvement ideas are proposed, mainly including mosaic data enhancement, adaptive anchor frame calculation, and adaptive image scaling. Benchmark network: incorporating some new ideas from other detection algorithms, mainly including focus structure and CSP structure. The target detection network often inserts some layers between backbone and final head output layer, and the FPN+PAN structure is added in Yolov5. The top output layer: the anchor frame mechanism of the output layer is the same as YOLOv4, and the main improvements are the loss function GIOU loss during training and DIOU_nms for prediction frame screening. The camera is a Hikvision DS2CD3T86FWDV215S camera with a focal length of 2.8 mm and an angle of 114.5 degrees. The captured images are in PNG format, with a height of 3 000 pixels and a width of 4 000 pixels, and are taken at 2minute intervals for 181 images. In this paper, the data set is manually labeled with “LabelImg” labeling tool, and the label information is stored in txt label files. Each label file corresponds to an image file one by one, in which each line stores one target information, and the information is the target category, X and Y axis coordinates of the center point of the detection frame, and target width and height in turn. In this paper, we design an adaptive image cropping preprocessing algorithm for the highresolution image training set, which expands the training data volume by adaptively cropping the training set, reduces the loss of detail features during training the original image, and improves the target detection accuracy. The model uses YOLOv5s pretraining weights under the YOLOv5 framework for migration learning. Among hardware platform parameters, the central processor is Intel i7 7700k, the graphics computing card is Nvidia GeForce GTX 1070 Ti, the number of batches is 16, and the training is 100 rounds with 28 507 iterations.
In this paper, mean average precision (mAP), accuracy (precision), and recall (recall) are used as evaluation metrics for training model performance. For classification problem, the samples can be classified into four cases: true positive (TP), false positive (FP), true negative (TN), and false negative (FN), based on the combination of the actual category situation and the category situation predicted by the model. In order to prove the effectiveness of the proposed adaptive cropping algorithm, two sets of comparison experiments are designed: using the original images as the training set and the resulting model 2; and using only the images generated by the adaptive cropping algorithm as the training set and the resulting model 3. The experimental results show that the method proposed in this paper is effective. The experimental results show that the proposed method can achieve accurate recognition and counting of farmed shrimp in a small number of highresolution images, and the detection model obtained by preprocessing the image samples with the algorithm has higher detection accuracy than the original data set under the same computing hardware conditions, with 92.55% recognition accuracy, 98.78% recall rate, and 97.5% average accuracy. This paper proposes an adaptive image cropping algorithm for improving the problem of excessive compression rate of highresolution images and realizing the problem of losing feature information due to the direct input of images taken by highresolution cameras into the neural network in the farming plant in order to automate the statistics of shrimp quantity in the farming process to realize quantitative baiting. From data augmentation of the training images through comparison experiments, it is proved that the accuracy of the trained model processed by the adaptive cropping algorithm can be improved by 3.53%, and the mean accuracy (IoU =0.95) is 2.86% compared with the unprocessed model, which can more effectively improve the accuracy of the target detection algorithm in the shrimp industrial farming process and provide reliable data for the realization of accurate feeding. The algorithm in this paper only conducts some innovative experiments in the data preprocessing part to demonstrate the impact of the data preprocessing algorithm on the target detection algorithm. Is it feasible to migrate the algorithm from this paper to the network detection part? Moreover, how to effectively reduce the feature loss caused by the network structure in the process of highresolution detection and how to balance the relationship between the accuracy of chunking detection and detection time remains to be studied.
Keywords: object detection; deep learning; Yolov5; image preprocessing