Fish disease detection method using improved YOLOv8 based on multi-label compensation
-
-
Abstract
As one of the most biodiversity species, fish has a significant impact on the economic benefits and production value of fisheries. Fish diseases are a major challenge to the development of fisheries and a major risk at the farm level. In order to increase profits, some farms carry out quality screening when fish stocks are in the fry stage, keep healthy and high-quality fish species, and clean up diseased and low-quality fish species. But the work is very labour-intensive. If using machine vision and other related techniques, it will be difficult to screen the diseased fish effectively because of the lack of obvious disease characteristics and small target. To solve this problem, an improved Yolov8 fish disease detection model based on multi-label compensation was proposed. Firstly, this study designs a device capable of separating fish schools in advance, which is used for separating diseased fish. To enable efficient deployment of the model in the device, a Koi dataset with injuries and diseases is constructed by simulating the way individual fish pass through the screening device. Based on the pixel size occupied by easily observable diseases on the fish body, the disease severity is classified into three categories: simple, moderate, and complex. Finally, a dataset sample containing 5920 images was obtained, which was divided into a training set, validation set, and test set in an 8:1:1 ratio. Then, the MS-YOLOv8 network was designed based on the YOLOv8n model, where SPD convolution was used to replace the cross-row convolution operation in key parts of the original network, reducing the loss of feature information during image downsampling. A multi-label loss function is proposed to focus on solving the problem of balancing classification loss and bounding box loss when training small target diseases in the network. By calculating the Intersection over Union (IoU) between a single prediction box and multiple labels, the model can expand its receptive field when reducing loss values, utilizing more contextual information from the target. This compensates for the decrease in classification ability caused by optimizing IoU loss in the network, thereby reducing the missed detection rate of diseases. The objective results showed that the detection rate of MS-YOLOv8 was 11.13%, 3.76% and 12.38% higher than that of SOTA Inner-SIoU in the detection of three kinds of fish diseases, compared with the original model, it improved by 6.27, 0.66, 3.01 percentage points. Compared with YOLOv5n, YOLOv7, YOLOv8n, mAP values are 12.05, 10.18, 11.15 percentage points higher, the total detection rate is 95.36%, the image detection time is 132 frames per second, the comprehensive performance shows a significant advantage. In subjective test, MS-YOLOv8 can suppress background disturbance similar to fish disease, and can detect many kinds of fish such as grass carp, silver carp and so on, it shows excellent generalization ability and robustness.MS-YOLOv8 model is a binary classification method. The model can improve the probability of screening diseased fish especially when the target of the disease is small but the location of the fish is concentrated. The model can provide effective technical support for the clean-up of diseased fish in fishery.
-
-