| Factory farming is developing toward precision farming,and fish length data is an important indicator in precision farming,which can directly reflect the growth of fish and provide reference data for the fishery field.With the development of computer vision,there have been a lot of studies on contactless fish length measurement using image processing or deep learning techniques,but some of the methods still require human intervention and restrict the free swimming of fish,are not suitable for dynamic measurement of underwater fish length.Therefore,this paper proposes a underwater fish body length measurement method based on keypoint detection in response to the above problems.The specific content and innovative points are as follows:(1)Fish length measurement method based on R-YOLO5 F model and segmentation measurement.The R-YOLO5 F model was proposed for the problem that the YOLO5 Face model was not accurate in locating fish feature points.The model draws inspiration from the idea of residual module in Res Net(Residual Network,residual network),by shorting the two ends of the convolution module in the output layer to obtain richer high-level features,improving the accuracy of keypoint detection.A five-point keypoint labeling scheme is proposed for the impact of fish body bending on body length measurement results during swimming.The scheme is combined with the R-YOLO5 F model and the Realsense D435 i depth camera to segmentation measure the fish body by the Euclidean distance formula.To verify the performance of the proposed model and measurement method,comparison experiments of the model and measurement errors were designed respectively.The experimental results showed that the recall and accuracy of the keypoint detection model R-YOLO5 F reached 93.46% and 91.62%,respectively,which were 1.18% and0.88% higher than the original model.The measurement results showed that the average relative error of the five-point measurement scheme was 1.04 percentage points lower than that of the twopoint measurement.(2)Fish body keypoint detection model based on DR-YOLO5 F.The DR-YOLO5 F model was proposed to improve the model for the keypoint offset issue of the R-YOLO5 F model in the case of fish body tilt and so on.To solve the problem of feature loss,drawing on the idea of Dense Block in Dense Net(Densely Connected Convolutional Networks,densely connected convolutional networks),features were passed in a dense connection between the Neck layer and the output layer to improve the accuracy of keypoint detection.To verify the performance of the improved model,ablation experiments and model comparison experiments were conducted for the DRYOLO5 F model,respectively.The experimental results showed that the accuracy and recall of the DR-YOLO5 F model reached 94.67% and 93.52%,which improved 1.21% and 1.90%,respectively,compared with the R-YOLO5 F model.And the error comparison experiment of fish body length measurement was conducted for the improved before and after models,and the results showed that the mean relative error of body length of the improved model DR-YOLO5 F was reduced by 0.89% compared with R-YOLO5 F.(3)Design and implementation of fish body length measurement system.In this paper,a contactless fish length measurement system was designed to be able to detect keypoints of fish targets in the input data and output the body length measurement results.Considering the specific needs of users,the data input module was added to the two main modules of model detection module and length measurement module to provide users with various ways to read data.Meanwhile,the weight selection module and parameter adjustment module were designed to facilitate users to select or modify the model and parameters. |