Ecological Informatics (May 2025)

A fish counting model based on pyramid vision transformer with multi-scale feature enhancement

  • Jiaming Xin,
  • Yiying Wang,
  • Dashe Li,
  • Zhongliang Xiang

Journal volume & issue
Vol. 86
p. 103025

Abstract

Read online

As automatic counting technology allows for non-invasive counting of fish populations, the demand for it in fisheries management and ecological conservation has been growing. However, existing automatic counting methods struggle with noise interference caused by uneven lighting in complex environments, and also face challenges from issues such as uneven fish distribution and the high density of fish populations. To address these issues, we introduce a new counting network based on a pyramid vision transformer. Herein, a frequency-domain multi-scale consistent attention mechanism is designed . This mechanism facilitates information exchange between areas of low and high fish density, addressing the issue of nonuniform density distribution. Subsequently, a spatial domain multi-scale edge enhancement module is introduced to enhance the detection of fish edge features. This module employs guided filtering and asymmetric convolution to mitigate the effects of noise caused by inadequate and nonuniform illumination. Furthermore, we proposed a global multilevel feature fusion mechanism to strengthen the extraction of the co-occurring information from the multi-scale feature map, which enhanced the focus of the model on the fish body. This feature effectively addresses the problem of fish occlusion for improving the accuracy and reliability of the counting process. The experimental results demonstrated that the network achieves a MAE of 2.35 and a MSE of 3.05 on the CCD dataset, with values of 3.91 and 5.08, respectively, in additional testing. These results confirm the high accuracy of the model and its robust stability, which is expected to provide technical support for sustainable management and ecological conservation of aquaculture.

Keywords