基于密度图回归的密集鱼群计数方法优化研究
Optimization of Dense Fish Counting Based on Density Map Regression
DOI: 10.12677/csa.2026.1611352, PDF,    科研立项经费支持
作者: 郑华坤, 夏王霞*, 陈炫欧, 叶 彭, 张 瑶, 钱程远:三亚学院信息与智能工程学院,海南 三亚
关键词: 鱼群计数;密度图估计;CSRNet;注意力机制;水下计数;Fish Counting; Density Map Estimation; CSRNet; Attention Mechanism; Underwater Counting
摘要: 鱼群数量统计是水产养殖管理、渔业资源评估与海洋监测的重要基础,但密集鱼群遮挡粘连、尺度差异大及水下成像受限使计数困难。研究基于密度图回归的密集鱼群计数方法。以CSRNet为基线,在公开数据集IOCfish5K (5637幅图像,训练/验证/测试划分为3137/500/2000)上,于三档分辨率(540p/720p/1080p)与两种训练轮数(40/80)下,对基线及ECA、SE变体开展正交实验,并补充梯度累积解耦与前端消融。结果表明:1) 增加训练轮数一致降低MAE (降幅3.4%~29.7%);2) 提高分辨率对基线有效但边际递减,增益在720p附近饱和;3) 注意力收益依赖训练充分程度,训练不足时ECA显著降低误差、充分训练后仅低分辨率保留,SE无一致正向作用;4) 在1080p、80轮、batch = 4下基线取得最小误差(MAE 19.94、RMSE 45.68);5) 前端加深对精度无显著影响。三类模型推理速度基本持平(29.3~29.5 FPS),误差集中于超密集场景(>200尾)。研究给出面向算力与训练预算的配置选型建议,基线精度已与较强方法相当,可作复现与部署参考。
Abstract: Fish school counting serves as an essential foundation for aquaculture management, fishery resource assessment and marine monitoring. However, counting remains challenging due to occlusion and adhesion within dense fish aggregations, large variations in fish scale, and limitations of underwater imaging. This study investigates a dense fish school counting method based on density map regression. Taking CSRNet as the baseline, orthogonal experiments were conducted on the public dataset IOCfish5K (5,637 images, split into 3,137/500/2,000 for training/validation/testing) across three resolution levels (540p/720p/1080p) and two training epochs (40/80). Variants equipped with ECA and SE attention modules were compared alongside the baseline, with supplementary experiments on gradient accumulation decoupling and front-end ablation. The results show that: 1) increasing training epochs consistently reduces MAE (by 3.4%~29.7%); 2) higher resolution improves the baseline performance with diminishing marginal returns, and the performance gain saturates around 720p; 3) the benefits of attention mechanisms depend on adequate training. ECA markedly reduces counting error under insufficient training, while its advantage persists only at low resolutions after full training; SE does not yield consistent positive gains; 4) the baseline achieves the lowest error under the setting of 1080p, 80 epochs and batch size = 4 (MAE = 19.94, RMSE = 45.68); 5) deepening the front-end network has no significant effect on accuracy. The three models achieve comparable inference speeds (29.3~29.5 FPS), and counting errors are concentrated in ultra-dense scenes (>200 individuals). This work provides configuration recommendations tailored to computing resource and training budget constraints. The baseline achieves competitive accuracy against state-of-the-art approaches and can be used as a reference for reproduction and deployment.
文章引用:郑华坤, 夏王霞, 陈炫欧, 叶彭, 张瑶, 钱程远. 基于密度图回归的密集鱼群计数方法优化研究[J]. 计算机科学与应用, 2026, 16(11): 371-384. https://doi.org/10.12677/csa.2026.1611352

参考文献

[1] 徐文杰, 方辉, 杨胜龙, 等. 深度学习在鱼类识别、计数、追踪方面的应用研究进展[J]. 大连海洋大学学报, 2024, 39(5): 874-887.
[2] 李尹佳, 胡泽元, 涂万, 等. 基于改进YOLOv7的密集鱼群计数检测[J]. 广东海洋大学学报, 2024, 44(2): 115-123.
[3] Li, Y., Zhang, X. and Chen, D. (2018) CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes. 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, 18-22 June 2018, 1091-1100.
https://doi.org/10.1109/cvpr.2018.00120
[4] Wang, B.Y., Liu, H.D., Samaras, D. and Hoai, M. (2020) Distribution Matching for Crowd Counting. arXiv: 2009.13077.
[5] Hu, J., Shen, L. and Sun, G. (2018) Squeeze-and-Excitation Networks. 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, 18-22 June 2018, 7132-7141.
https://doi.org/10.1109/cvpr.2018.00745
[6] Wang, Q., Wu, B., Zhu, P., Li, P., Zuo, W. and Hu, Q. (2020) ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 14-19 June 2020, 11534-11542.
https://doi.org/10.1109/cvpr42600.2020.01155
[7] Sun, G., An, Z., Liu, Y., Liu, C., Sakaridis, C., Fan, D., et al. (2023) Indiscernible Object Counting in Underwater Scenes. 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, 18 June 2023, 13791-13801.
https://doi.org/10.1109/cvpr52729.2023.01325
[8] Saleh, A., Laradji, I.H., Konovalov, D.A., Bradley, M., Vazquez, D. and Sheaves, M. (2020) A Realistic Fish-Habitat Dataset to Evaluate Algorithms for Underwater Visual Analysis. Scientific Reports, 10, Article No. 14671.
https://doi.org/10.1038/s41598-020-71639-x
[9] Yang, C., Huang, H., Jiang, Z., Wang, H., Wallace, F. and Hwang, J. (2024) A Density-Guided Temporal Attention Transformer for Indiscernible Object Counting in Underwater Videos. ICASSP 2024—2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Seoul, 14-19 April 2024, 5075-5079.
https://doi.org/10.1109/icassp48485.2024.10447513
[10] Sindagi, V.A. and Patel, V.M. (2020) HA-CCN: Hierarchical Attention-Based Crowd Counting Network. IEEE Transactions on Image Processing, 29, 323-335.
https://doi.org/10.1109/tip.2019.2928634
[11] Yu, X., Wang, Y., An, D. and Wei, Y. (2022) Counting Method for Cultured Fishes Based on Multi-Modules and Attention Mechanism. Aquacultural Engineering, 96, Article ID: 102215.
https://doi.org/10.1016/j.aquaeng.2021.102215
[12] Yu, J., Jia, R., Li, Y. and Sun, H. (2022) Automatic Fish Counting via a Multi-Scale Dense Residual Network. Multimedia Tools and Applications, 81, 17223-17243.
https://doi.org/10.1007/s11042-022-12672-y
[13] Chen, H., Cheng, Y., Dou, Y., Tan, H., Yuan, G., Bi, H., et al. (2024) Fry Counting Method in High-Density Culture Based on Image Enhancement Algorithm and Attention Mechanism. IEEE Access, 12, 41734-41749.
https://doi.org/10.1109/access.2024.3365585
[14] 蔡润基, 彭小红, 叶双福, 等. 基于前后端生成概率密度图模型的虾苗自动计数[J]. 南方水产科学, 2025, 21(1): 173-184.
[15] Zhu, K., Yang, X., Yang, C., Fu, T., Ma, P. and Hu, W. (2024) FCFormer: Fish Density Estimation and Counting in Recirculating Aquaculture System. Frontiers in Marine Science, 11, Article 1370786.
https://doi.org/10.3389/fmars.2024.1370786
[16] 宋丽俏, 田云臣, 李青飞, 等. 一种适用于复杂环境的高密度鱼苗实时计数方法[J]. 渔业现代化, 2025, 52(4): 169-180.
[17] 张涵钰, 李振波, 李蔚然, 等. 基于机器视觉的水产养殖计数研究综述[J]. 计算机应用, 2023, 43(9): 2970-2982.
[18] 王静, 李蔚然, 刘业强, 等. 基于计算机视觉的养殖动物计数方法研究综述[J]. 农业机械学报, 2023, 54(S1): 315-329.
[19] Zhang, Y., Zhou, D., Chen, S., Gao, S. and Ma, Y. (2016) Single-Image Crowd Counting via Multi-Column Convolutional Neural Network. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, 27-30 June 2016, 589-597.
https://doi.org/10.1109/cvpr.2016.70
[20] Liu, W., Salzmann, M. and Fua, P (2019) Context-Aware Crowd Counting. 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, 15-20 June 2019, 5099-5108.
https://doi.org/10.1109/cvpr.2019.00524
[21] Zand, M., Damirchi, H., Farley, A., Molahasani, M., Greenspan, M. and Etemad, A. (2022) Multiscale Crowd Counting and Localization by Multitask Point Supervision. ICASSP 2022—2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Singapore, 22-27 May 2022, 1820-1824.
https://doi.org/10.1109/icassp43922.2022.9747776
[22] Liu, L., Qiu, Z., Li, G., Liu, S., Ouyang, W. and Lin, L. (2019) Crowd Counting with Deep Structured Scale Integration Network. 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, 27 October-2 November 2019, 1774-1783.
https://doi.org/10.1109/iccv.2019.00186
[23] Laradji, I.H., Rostamzadeh, N., Pinheiro, P.O., Vazquez, D. and Schmidt, M. (2018) Where Are the Blobs: Counting by Localization with Point Supervision. In: Ferrari, V., Hebert, M., Sminchisescu, C. and Weiss, Y., Eds., Computer Vision—ECCV 2018, Springer, 560-576.
https://doi.org/10.1007/978-3-030-01216-8_34
[24] Lin, H., Ma, Z., Ji, R., Wang, Y. and Hong, X. (2022) Boosting Crowd Counting via Multifaceted Attention. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, 19 June 2022, 19628-19637.
https://doi.org/10.1109/cvpr52688.2022.01901
[25] Wan, J., Wang, Q. and Chan, A.B. (2022) Kernel-Based Density Map Generation for Dense Object Counting. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44, 1357-1370.
https://doi.org/10.1109/tpami.2020.3022878
[26] Song, Q., Wang, C., Jiang, Z., Wang, Y., Tai, Y., Wang, C., et al. (2021) Rethinking Counting and Localization in Crowds: A Purely Point-Based Framework. 2021 IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, 10-17 October 2021, 3365-3374.
https://doi.org/10.1109/iccv48922.2021.00335
[27] Ma, Z., Wei, X., Hong, X. and Gong, Y. (2019). Bayesian Loss for Crowd Count Estimation with Point Supervision. 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, 27 October-2 November 2019, 6142-6151.
https://doi.org/10.1109/iccv.2019.00624
[28] Wan, J. and Chan, A.B. (2020) Modeling Noisy Annotations for Crowd Counting. Proceedings of the 34th International Conference on Neural Information Processing Systems, Vancouver, 6-12 December 2020, 3386-3396.
[29] Wan, J., Liu, Z. and Chan, A.B. (2021). A Generalized Loss Function for Crowd Counting and Localization. 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 19-25 June 2021, 1974-1983.
https://doi.org/10.1109/cvpr46437.2021.00201
[30] Liang, D., Xu, W. and Bai, X. (2022) An End-to-End Transformer Model for Crowd Localization. In: Avidan, S., Brostow, G., Cissé, M., Farinella, G.M. and Hassner, T., Eds., Computer Vision—ECCV 2022, Springer, 38-54.
https://doi.org/10.1007/978-3-031-19769-7_3
[31] 李婧, 吴俊峰, 于红, 等. 一种基于冗余裁剪的鱼群密度估计算法[J]. 计算机与数字工程, 2020, 48(12): 2864-2868, 2911.
[32] Marsden, M., McGuinness, K., Little, S. and O’Connor, N.E. (2017) Fully Convolutional Crowd Counting on Highly Congested Scenes. Proceedings of the 12th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications, Porto, 27 February-1 March 2017, 27-33.
https://doi.org/10.5220/0006097300270033