With the development of deep learning technologies, object detection has become an important task in computer vision and has been widely applied in various fields. The YOLO (You Only Look Once) series of models, known for their efficient and fast inference capabilities, have become mainstream in the field of object detection and are widely used in various domains. In the aquaculture industry, diagnosing and treating fish diseases is crucial for preventing the spread of diseases and reducing economic losses. To address the problem of bacterial disease detection in freshwater fish, this paper focuses on the application of the YOLOv8 model in object detection and explores the role of data augmentation in improving model performance. Firstly, the basic principles and architecture of YOLOv8 are introduced, and the improvements of this model over previous YOLO versions are analyzed in detail, including the advantages of its network structure and optimization algorithms. Next, this paper proposes a fish disease detection method based on an improved YOLOv8 algorithm. This method incorporates the EMA (Efficient Multi-Scale Attention) attention mechanism into the backbone network, which not only enhances the feature extraction capability but also improves multi-scale feature extraction and cross-space learning architecture. This innovation reduces computational complexity while maintaining high-precision feature representation. Additionally, the GSConv (Grouped Shifted Convolution) operation is adopted in the Neck layer to replace traditional convolution operations, which reduces model complexity and further enhances detection speed without compromising accuracy. Experimental results show that this method achieves a 2.1 percentage point improvement in detection accuracy on our self-built freshwater fish disease dataset compared to the original YOLOv8 model. It also demonstrates significant performance improvement over other existing models. This method can be applied to fish disease detection and prevention scenarios, providing technical support for fish disease detection.