## 3 Design of FairMOT Mixed Model  
The development process of this study can be broadly divided into two stages, each consisting of a series of procedures, aimed at developing a model that can effectively perform multi-object tracking in underwater environments. This development process includes extracting data from underwater fish videos to create a dataset and using the related data to train and evaluate the model. The first stage is the data collection stage, where videos of fish filmed in underwater environments are collected and stored on a hard disk. The collected video data form the basis for all subsequent processing steps. Figure 3: Structure of FairMOT network. The second stage involves processing the data and consists of several detailed procedures as follows: First, the collected video data are preprocessed to convert it into a form suitable for analysis. Each frame of the preprocessed video is labeled with the position and ID of the fish. This labeling process involves identifying and tagging the fish objects in each frame of the video. The labeled data are then used to train the YOLOv5s backbone model. At this stage, the YOLOv5s model is trained to improve its object detection capabilities. Based on the trained YOLOv5s model, FairMOT is then trained. FairMOT is trained using two backbone models. The first is the FairMOT + YOLOv5s backbone model, and the second is the FairMOT + DLA-34 backbone model. In this process, the model learns the ability to detect the position of objects and assign IDs. Finally, the trained model is used to perform underwater fish tracking tests. In this stage, the model's performance is evaluated by using test data to track the position and ID of the fish. The test results are analyzed, and the tracking performance of the model is evaluated to derive the final results. In Figure 4, the DeepSORT algorithm process consists of the following five stages: First, the initial frame of the video sequence is taken. This initial frame serves as the starting point for the subsequent process. At this stage, the Kalman filter is used to predict and update the state of the target's movement. This involves predicting and updating the state variable \(x_{k}\) and state covariance \(P_{k}\). In the prediction stage, the current state vector and covariance matrix are used to predict the next state vector and covariance matrix. The state transition matrix \(F\) transforms the previous state vector \(\hat{x}_{k-1}\) into the current state vector \(\hat{x}_{k|k-1}\). The control input model \(B\) and control input \(u_{k-1}\) reflect external inputs applied to the system. The covariance matrix \(P_{k|k-1}\) represents the uncertainty of the state vector, which is updated by the state transition matrix \(F\) and process noise covariance \(Q\). In the update stage, the predicted state vector and covariance matrix are updated using the observation \(z_{k}\). The observation model H represents the relationship between the actual observation and the predicted observation. The Kalman gain \(K_{k}\) corrects the difference between the predicted state and the actual observation. Finally, the updated state vector \(\hat{x}_{k}\) and covariance matrix \(P_{k}\) are calculated as shown in Equations (1) and (2). Through this process, the DeepSORT algorithm can effectively track multiple objects in a video sequence. The prediction stage is as follows:  
\[\hat{x}_{k|k-1}=F\hat{x}_{k-1}+Bu_{k-1},\;\;p_{k|k-1}=FP_{k-1}F^{T}+Q \tag{1}\]  
Figure 4: Process FairMOT mixed model. The update stage is as follows:  
\[K_{k}=P_{k|k-1}H^{T}\Big{(}HP_{k|k-1}H^{T}+R)^{-1},\hat{x}_{k}=\hat{x}_{k|k-1}+K_ {k}\Big{(}z_{k}-H\hat{x}_{k|k-1}\Big{)} \tag{2}\]  
\[P_{k}=(I-K_{k}H)P_{k|k-1}\]  
Here, \(F\) is the state transition matrix, \(B\) is the control input model, \(Q\) is the process noise covariance, \(H\) is the observation model, \(R\) is the observation noise covariance, and \(K_{k}\) is the Kalman gain [19]. The deep appearance descriptor and vector feature of the detected objects are extracted.