Improved YOLOV7-TINY Network for Sea Bream Detection

Lin‐Hua Jiang, Yuanyuan Yang, Endong Liu, Lingxi Hu, Jun Xu, Lei Chen, Jintao Zhang, Peng Liu, Wei LongJournal of Computing and Electronic Information Management 2024 · DOI

Abstract

Accurate identification of underwater fish species is of great scientific and economic significance in aquaculture, as it can provide scientific basis for aquaculture production and promote related research. However, the complexity of the underwater environment is affected by various factors such as light, water quality, and mutual occlusion of fish species. Therefore, underwater fish images are often not clear enough, which limits the accurate identification of underwater targets. In this paper, an improved YOLOV7-TINY model for sea bream detection is proposed. We employ FasterNet to replace the backbone network of the YOLOV7-TINY model, further reducing model parameters and computational complexity without compromising accuracy. By leveraging cascaded feature fusion in the backbone network, we effectively address the challenges posed by multi-scale datasets and insufficient information extraction. Additionally, the RESNETCBAM attention mechanism is incorporated into the feature maps at three different scales, allowing the network to better capture relevant information from complex underwater environments while minimizing unnecessary interference. Finally, the ECIOU loss function is adopted to optimize frame adjustments and reduce the training time of the model.

Introduction

In modern aquaculture, monitoring fish health and growth is vital for economic success. However, the underwater environment presents significant challenges for computer vision: low light, turbid water, and frequent occlusion of fish species make standard object detection models struggle. While powerful models like YOLOv7 exist, they are often too computationally heavy for the mobile or embedded devices typically used on fish farms. Conversely, "tiny" versions of these models often sacrifice accuracy for speed. This research aims to bridge this gap by creating a model that is faster, lighter, and more accurate than the standard YOLOv7-TINY specifically for sea bream detection.

Methodology

The proposed architecture introduces four major upgrades to the YOLOv7-TINY baseline to enhance performance in underwater conditions.

FasterNet Backbone

The standard backbone is replaced with FasterNet, which utilizes Partial Convolution (PConv). PConv reduces redundant computations by applying filters to only a subset of input channels, leaving the rest untouched. This approach allows for higher throughput (FLOPS) by minimizing frequent memory access, which is often a bottleneck in lightweight models.

The FasterNet block structure incorporating Partial Convolution (PConv) and point-wise convolutions.

Cascaded Feature Fusion

To handle multi-scale detection (fish at varying distances), a fusion block merges feature maps from different levels using 1x1 convolutions, downsampling, and upsampling. This ensures robust information extraction across different scales.

ResNetCBAM Attention Mechanism

The Convolutional Block Attention Module (CBAM) is integrated into a ResNet structure. This mechanism helps the network focus on salient features in both channel and spatial dimensions, effectively filtering out background noise and focusing on the unique textures of the sea bream.

The CBAM architecture, showing the sequential integration of Channel and Spatial Attention Modules to refine feature maps.

ECIOU Loss Function

The Enhanced Complete Intersection over Union (ECIOU) loss function is adopted to refine bounding box regression. It more effectively calculates differences in aspect ratios and center point distances, leading to faster convergence and more accurate localization.

Experimental Setup

The study utilized a custom dataset of 1,430 images of sea bream (1920x1080 resolution), collected from Időkép and manually annotated. The data was split into an 8:1:1 ratio for training, validation, and testing. Data augmentation techniques were applied to increase robustness against environmental variations.

Results and Discussion

The improved model demonstrated significant performance gains over mainstream benchmarks:

  • Accuracy: Achieved a 92.6% [email protected], a 2% improvement over the baseline YOLOv7-TINY, surpassing YOLOv5s (90.3%) and SSD (89.1%).
  • Efficiency: Parameter count was reduced to 5.32M (11.5% decrease) and computational complexity dropped to 11 GFLOPs (16.7% decrease).
  • Speed: Reached 85.9 FPS, making it suitable for real-time applications.
  • Training Time: The ECIOU loss function helped reduce total training time by 49.2% compared to the original model.

The results highlight that optimizing for throughput rather than just FLOPs is crucial for edge deployment. The attention mechanism acts as a sophisticated filter, allowing the model to "see through" turbid water by weighing relevant pixels more heavily.

Conclusion

The improved YOLOv7-TINY model provides a lightweight yet accurate solution for underwater fish detection. Future work will focus on expanding the dataset to include multiple fish species and integrating the model into digital fishery systems with environmental sensors. Additionally, exploring semi-automated labeling techniques could address the current manual annotation bottleneck.

Summary updated

Abstract

Accurate identification of underwater fish species is of great scientific and economic significance in aquaculture, as it can provide scientific basis for aquaculture production and promote related research. However, the complexity of the underwater environment is affected by various factors such as light, water quality, and mutual occlusion of fish species. Therefore, underwater fish images are often not clear enough, which limits the accurate identification of underwater targets. In this paper, an improved YOLOV7-TINY model for sea bream detection is proposed. We employ FasterNet to replace the backbone network of the YOLOV7-TINY model, further reducing model parameters and computational complexity without compromising accuracy. By leveraging cascaded feature fusion in the backbone network, we effectively address the challenges posed by multi-scale datasets and insufficient information extraction. Additionally, the RESNETCBAM attention mechanism is incorporated into the feature maps at three different scales, allowing the network to better capture relevant information from complex underwater environments while minimizing unnecessary interference. Finally, the ECIOU loss function is adopted to optimize frame adjustments and reduce the training time of the model.
BibTeX
@article{jiang2024improved,
  author = {Lin‐Hua Jiang and Yuanyuan Yang and Endong Liu and Lingxi Hu and Jun Xu and Lei Chen and Jintao Zhang and Peng Liu and Wei Long},
  title = {{Improved YOLOV7-TINY Network for Sea Bream Detection}},
  journal = {Journal of Computing and Electronic Information Management},
  year = {2024},
  doi = {10.54097/c6kqnn36},
}
Figure