Deformation‐Aware Keypoint Detection and Stereo Morphometry for Free‐Swimming Fish on Edge Devices
Lanlan Liang, Zhuhua Hu, Jie Liu, Gaosheng Liu, Yaochi Zhao, Lan Sun, Chong YangABSTRACT
Accurate real‐time measurement of fish body‐size parameters, including body length (BL), body width (BW), and caudal‐peduncle (CP) length, is essential for growth monitoring and harvest decision‐making in aquaculture. However, free‐swimming fish exhibit non‐rigid deformation, anisotropic landmark uncertainty, and multi‐scale shape variation, which hinder accurate and edge‐deployable morphometry. This study proposes a deformation‐aware keypoint detection and stereo morphometry framework for real‐time body‐size measurement on edge devices. A stereo fish dataset, StereoFish‐D4 , was constructed with four deformation levels defined by a keypoint‐guided midline deviation ratio. The proposed network integrates efficient long‐range spatial reasoning, scale‐aware deformation representation, axis‐decoupled keypoint localisation, and deformation‐weighted supervision to improve anatomical landmark detection under non‐rigid deformation. Detected landmarks are reconstructed in 3D using calibrated stereo vision, and BL is estimated from the arc length of a natural cubic spline fitted to six reconstructed body‐midline control points, thereby reducing chord‐length bias under deformed postures. On the fixed test set, the proposed method achieved a Kpt of 97.94% and observation‐level BL/BW/CP MAPE values of 4.8/3.2/4.7%, while running at 41 FPS on a Jetson Xavier NX. An independent 168‐h external‐farm deployment in Lingshui, Hainan, yielded fish‐level BL/BW/CP MAPE values of 5.6/3.7/5.4%. These results demonstrate accurate and efficient deformation‐aware fish morphometry under the tested production conditions.