## 3 Materials and Methods  
### Data Sources and Production  
All data used in this research are sourced from the Fishnet Open Image Database [34], which comprises 86,029 images featuring 34 object classes captured by electronic monitoring systems onboard commercial fishing vessels. The dataset presents over 1000 different scenarios on fishing boats involving species with similar characteristics, multiple perspectives, noise, and highly skewed sample distributions, all of which contribute to the challenges of accurate recognition.  
Given these complexities, this research specifically aims to identify fine-grained features of tuna in these challenging scenarios, leading us to prefer images with more diverse scenes and a higher number of tuna. This approach differs from studies focused on counting or tracking, which typically select images capturing the entire course of a tuna. Due to the limitations of our experimental equipment, this study selected 1179 images from the Fishnet open-access image database. These images cover 54 different scenes of tuna captured on fishing vessels, each with significantly different tuna postures, as partially illustrated in Figure 1.  
In addition, after analyzing the images, the research classified them into five categories: albacore, bigeye, yellowfin, uncertainty, and others. The \"uncertainty\" category represents tuna that cannot be reliably classified due to factors like the viewing angle, occlusion, or noise, while the \"others\" category includes non-tuna species. The purpose of defining \"uncertainty\" is to enhance the future functionality of tracking and counting. For example,when tracking tuna, if the fish moves into an occluded or challenging viewpoint, causing the model to lose key features, it may lose track of the tuna. If this occurs near the collision counting line, the model may fail to register that the tuna has crossed, leading to counting errors. By introducing an \"uncertainty\" category, the model can still recognize these tunas in challenging scenarios, reducing the likelihood of such errors. The \"others\" category is defined to distinguish tuna from other species of fish. Despite differences between tuna and other fish, there are shared features that could lead the model to mistakenly identify non-tuna species as tuna, albeit with lower confidence. While such occurrences are rare, this misclassification could affect recognition accuracy in real-world applications. By explicitly defining the \"others\" category, the potential for these errors is mitigated, leading to an improvement in the model's overall performance.  
To ensure balanced representation across different scenes, the images from each scene were randomly divided into a training set and a validation set in an 8:2 ratio. For image annotation, the open-source tool LabelMe (Version 5.4.1) [35] was utilized to add polygonal annotations to the tuna images, generating label files in \"json\" format. These files were then converted to the.txt format required by YOLO using a customized Python (Version 3.8.19) script. Following segmentation and labeling, data augmentation techniques, including folding and adding random noise, were applied to quadruple the dataset size, resulting in a total of 4716 images. This process of segmenting and labeling the data before augmentation was designed to maximize the diversity of the training data, thereby enhancing the model's ability to generalize across different scenarios.  
Figure 1: Samples of selected images from the Fishnet Open Image Database.