Abstract:Aiming to address the issues of significant measurement errors, low operational efficiency, and safety hazards inherent in the traditional manual weighing and measurement process for frozen yellowfin tuna (Thunnus albacares), a fish body dimension and body weight estimation method was proposed based on binocular stereo vision and the segment anything model (SAM) image segmentation algorithm. Using frozen yellowfin tuna in real processing environments as the research subject, the method comprised four modules: fish body target detection, fish body image segmentation, fish body dimension extraction, and fish body weight estimation modeling. The method involved capturing images of yellowfin tuna by using a depth camera. To tackle the challenge of complex environments in aquatic product processing settings, the YOLO v8n algorithm was employed to detect frozen yellowfin tuna, coupled with the BotSort object tracking algorithm and a dynamic mask algorithm to eliminate interference from extraneous objects. The SAM image segmentation algorithm was then used to precisely extract the image and depth information of the frozen yellowfin tuna. Combined with the Open3D framework, a 3D point cloud map and dimensional information of the fish were generated. Based on the extracted dimensions and a body weight estimation model, the method achieved accurate body weight prediction for frozen yellowfin tuna. The measured body dimensions and body weight data exhibited small errors: the mean absolute percentage error (MAPE) for body length was 4.35%, for body height was 3.37%, the mean absolute error (MAE) for estimated body weight was 0.604kg, and the mean absolute percentage error was 4.63%. This method can efficiently and accurately achieve 3D measurement and body weight estimation of yellowfin tuna, providing a reference for the automated management of frozen yellowfin tuna processing.