# Enhanced Tuna Detection and Automated Counting Method Utilizing Improved YOLOv7 and ByteTrack
## 2 Related Work  
In recent years, the rapid development of deep learning technology has brought new opportunities for fish identification. Deep convolutional neural networks (CNNs) and other deep learning models have achieved breakthroughs in tasks such as image classification and object detection, providing powerful tools for fish identification. Researchers have proposed various CNN-based methods for fish identification. [PERSON] et al. proposed a simplified deep neural network based on AlexNet for fish species identification, achieving an accuracy of 90.48% [3]. [PERSON] et al. proposed replacing the backbone network of YOLOv3 with the lightweight ModelNetV1 to achieve fast detection of fish species [4]. [PERSON] et al. proposed optimizing the VGG16 network model using transfer learning, achieving a final accuracy of 97.66% [5]. [PERSON] et al. compared the AlexNet [6], GoogLeNet [7], ResNet [8], and DenseNet [9] models to explore the optimal network architecture. Ultimately, they found that DenseNet performed the best for fish species identification tasks, achieving accuracy and recall rates of 99.21% and 96.77%, respectively [10]. [PERSON] et al. proposed two underwater fish identification models, YOLO-Fish-1 and YOLO-Fish-2. YOLO-Fish-1 enhances YOLOv3 by fixing the upsampling stride issue, while YOLO-Fish-2 further improves the model by incorporating spatial pyramid pooling into the first model. The final average precisions of YOLO-Fish-1 and YOLO-Fish-2 in fish detection tasks are 76.56% and 75.70%, respectively, markedly superior to the unimproved YOLOv3 [11]. [PERSON] et al. proposed the use of YOLOv5 for the identification of yellowfin tuna, mackerel tuna, and skipack tuna. The recognition achieved accuracy, precision, and recall rates of 98.1%, 93.9%, and 96%, respectively [12]. These studies collectively demonstrate the excellent capabilities of convolutional neural networks in fish identification tasks. However, the aforementioned methods exhibit insufficient generalization ability when dealing with complex background environments, necessitating further enhancement in the discriminative power between foreground and background. Building upon fish identification research, some scholars have further pursued studies focused on fish object tracking and counting, offering methods for automated fish data collection. [PERSON] et al. proposed a fish counting method that combines spot detection with Gaussian mixture, incorporating a counting line design. Fish are counted when they linger for a certain duration along the counting line, and Kalman filtering is employed to mitigate duplicate counting [13]. [PERSON] et al. utilized Mask R-CNN for fish detection and subsequently employed time and distance threshold methods to determine the quantity of fish [14]. [PERSON] et al. proposed a deep learning network model based on multiple modules and attention mechanisms. The model comprises feature extraction, attention, and density map estimation modules, achieving counting of cultured fish species [15]. [PERSON] et al. utilized the YOLOv3 and DeepSort algorithms to track abalone in a conveyor belt system, achieving automated abalone counting. The highest accuracy achieved in the test videos was 94.4% [16]. [PERSON] et al. proposed a fish automatic counting method based on a hybrid neural network model, utilizing the Multi-column Convolutional Neural Network (MCNN) as the frontend and the Dilated Convolutional Neural Network (DCNN) as the backend [17]. [PERSON] et al. proposed using the YOLOv5 algorithm to detect zebrafish and employed the ByteTrack algorithm to associate high-score and low-score bounding boxes separately to address tracking errors caused by occlusion [18]. While the above methods have achieved automatic counting of fish, they are prone to target loss when encountering occlusion and irregular motion of the targets, leading to counting deviations. [PERSON] et al.