# Fish Detection in Fishways for Hydropower Stations Using Bidirectional Cross-Scale Feature Fusion
## 1 Introduction
(2018) developed Msr-YOLO to improve fish detection and tracking in fish farms, addressing challenges specific to aquaculture environments. [PERSON] et al. [PERSON] et al. (2018) proposed YOLO-Fish for detecting fish in realistic underwater settings, which underscores the ongoing refinement of YOLO models. [PERSON] et al. [PERSON] et al. (2018) applied an improved YOLO v4 model for fish object detection, contributing to the enhancement of YOLO's performance in aquatic contexts. [PERSON] et al. [PERSON] et al. (2018) combined YOLOv5s with TensorRT deployment for monitoring fish passage. [PERSON] et al. [PERSON] et al. (2018) introduced YOLO8-FASG for fish detection and equipped it with underwater robotic systems. The above research has greatly developed the techniques of fish detection, but it still faces several challenges. First, traditional fishway fish detection heavily relies on manual labor, which requires an intelligent approach to reduce costs and improve management efficiency. Second, the complex underwater environment in fishways next to hydropower stations leads to low image contrast and insufficient color information, weakening the texture and contour details of fish, which results in the fish detection algorithm's accuracy not meeting the demands of the fishway environment. Finally, due to the limited computational capacity of onsite equipment in fishways, standard feature fusion modules contain many bottleneck blocks, increasing computational consumption and limiting the convergence speed of model training. Moreover, the numerous sampling operations in standard object detection algorithms add to computational complexity. Since fishway detection devices have limited space, the detection algorithms must be embedded into underwater cameras. Therefore, the detection algorithms need to be more lightweight to meet the demands of fish detection tasks in fishways. To address these issues, we propose a fish detection algorithm for fish passage detection in fishways. The key contributions are summarized as follows. 1. Proposing a C2f-Faster-EMA module by introducing the C2f module, FasterNet-Block, and efficient multi-scale EMA attention mechanism, delivering the improvement of feature extraction and operational efficiency for fish detection. By integrating the RepBlock and BiFusion modules, multi-scale features are captured, providing a more accurate and robust solution for detecting diverse target classes. 2. Constructing a freshwater fish dataset and evaluating the performance of existing loss functions on fish detection, demonstrating the satisfactory capability of the proposed model compared to the state-of-the-art methods. 3. In practical applications at a designated hydropower station's fishway, detection devices were installed, and the proposed method was deployed in underwater cameras. The system was trained using data from four fish species passing through the fishway, followed by fish target detection over some time. The results show that the device can stably and accurately detect fish, performing well in frame-by-frame capture and detection. This paper is organized as follows. Section 2 introduces the proposed fish detection model. Section 3 illustrates the experiments conducted and the results obtained. Section 4 covers the practical application in the field and demonstrates the application results. Section 5 summarizes the paper and concludes the future direction.