An underwater precision fish counting framework using transformer with feature offset aggregation and occlusion-aware attention in aquaculture
Accurate fish counting seeks to estimate the total number of fish within an image and is widely applied in fields such as sustainable aquaculture management, aquatic ecosystem monitoring, and population management. However, challenges arise due to variations in fish pose, occlusion resulting from aggregation, and background interference from elements such as aquatic plants, rocks, and suspended particles. To address these issues, this paper proposes a novel deep learning framework designed to enhance the accuracy and robustness of fish counting, termed OGLA-Net. First, Feature Offset Aggregation Strategy (FOAS) is employed to learn deformable representations to adapt to pose variations and mitigate inconsistencies in fish orientation, better coping with the variability of fish bodies during counting. Second, the Deformable-Guided Positional (DefoGP) module constructs an explicit guidance map in both spatial and frequency domains to focus on fish edges and group distributions, thereby enhancing the model’s capability to handle occlusions to solve the problem of dense fish counting. Finally, the Gated Soft Latent Attention(GSLA) mechanism suppresses redundant background textures through soft masking and adaptive gating of attention heads, effectively improving the anti-interference capability when monitoring complex underwater environments. The proposed method is systematically evaluated across three datasets: UGCD (uniform density distribution), CCD (complex background), and DGCD (high-density distribution). The method achieves MAE and RMSE values of 3.499 and 4.742 on the UGCD. It also maintained superior performance on the CCD and DGCD datasets. These results demonstrate that the proposed counting framework delivers high accuracy across diverse conditions, providing a reliable solution for automatic counting.
Authors
- Mingyu Sun (ORCID: https://orcid.org/0000-0002-9090-1421)
- Zefeng Wu (ORCID: https://orcid.org/0009-0001-6406-7971)
- Dashe Li (ORCID: https://orcid.org/0000-0003-3792-8964)
- Tongtong Gu
Institutions
- Shandong Institute of Business and Technology (CN)
Publication Details
- Journal
- Journal of King Saud University - Computer and Information Sciences
- Published
- 2026-09-16
- DOI
- https://doi.org/10.1007/s44443-026-01240-1
- Primary Topic
- Water Quality Monitoring Technologies
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China
- Natural Science Foundation of Shandong Province