ORIGINAL RESEARCH article

Front. Mar. Sci.

Sec. Marine Fisheries, Aquaculture and Living Resources

Volume 12 - 2025 | doi: 10.3389/fmars.2025.1619457

Fish Keypoint Detection for Offshore Aquaculture: A Robust Deep Learning Approach with PCA-based Shape Constraint

Provisionally accepted
Li  GenLi Gen1,2Lian  AnjiLian Anji1Yao  ZidanYao Zidan3Hu  YuHu Yu1,2Pang  GuoliangPang Guoliang1,2Yuan  TaipingYuan Taiping1,2Li  ZhenhuaLi Zhenhua3Huang  XiaohuaHuang Xiaohua1,2*Wang  GangWang Gang4
  • 1South China Sea Fisheries Research Institute, Chinese Academy of Fishery Sciences (CAFS), Guangzhou, China
  • 2Sanya Tropical Fisheries Research Institute, Lingshui Li Autonomous County, China
  • 3School of Marine Engineering Equipment, Zhejiang Ocean University, Zhoushan, Zhejiang Province, China
  • 4Fisheries Engineering Institute, Chinese Academy of Fishery Sciences, Beijing, China

The final, formatted version of the article will be published soon.

Fish keypoint detection is a prerequisite for accurate fish behavior analysis and biomass weight estimation, and is therefore crucial for efficient and intelligent offshore aquaculture. Traditional keypoint detection networks typically employ coordinate regression methods, which do not impose any constraints on the output of the regression head or the training process of the neural network. As a result, output keypoints of such networks do not always conform to the shape of a fish and the training process can be affected by incorrect labels, leading to errors in subsequent tasks. To address these issues, this paper proposes a robust deep learning approach characterized by three improvements. 1) A shape model of fish that includes the average shape of fish, principal components of fish keypoints, and corresponding eigenvalues is constructed using principal component analysis (PCA) and unscented transform. 2) A customized version of anchor boxes is introduced and referred to as "anchor fish", which along with the shape model, can be used to encode and decode fish keypoints. 3) Shape variation loss, calculated based on the eigenvalues in the shape model, is added as part of the loss function to constrain the output of the regression head. Moreover, we built a fish keypoint dataset using infrared cameras mounted on a truss-structure net cage. Comparative experiments on our dataset using the keypoint evaluation method from COCO are conducted. The results show that our method achieves an AP50 value of 0.656, significantly outperforming the well-designed YOLO5Face, which produces an AP50 value of 0.503. Furthermore, we have comprehensively explored the impact of key hyperparameters on detection performance and robustness to labeling outliers in the training set. The code is available at https://github.com/LMX-BY/fish_landmark_detection_using_PCA_based_fish_shape_model.

Keywords: Offshore aquaculture, Fish keypoint detection, deep learning, Shape encoding, Principal Component Analysis

Received: 28 Apr 2025; Accepted: 16 Jun 2025.

Copyright: © 2025 Gen, Anji, Zidan, Yu, Guoliang, Taiping, Zhenhua, Xiaohua and Gang. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence: Huang Xiaohua, South China Sea Fisheries Research Institute, Chinese Academy of Fishery Sciences (CAFS), Guangzhou, China

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.