Ruditapes philippinarum meat yield prediction method based on external dimension proportion
Through a non-destructive detection method based on external size ratio, the meat yield rate of Filipino clams is predicted using YOLO network and neural network, which solves the problems of resource waste and inefficiency in the existing technology, and achieves efficient and accurate meat yield rate prediction.
Patent Information
- Application Number
- CN202510193510.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-07-11
AI Technical Summary
The prior art lacks efficient and intelligent methods for predicting Filipino clam meat yield, and relies on manual destructive measurements to lead to waste of resources and increased costs.
Using a non-destructive detection method based on external size ratio, the key points of Filipino clams are identified through the YOLO network, multiple ratio characteristics are calculated, and the meat rate prediction model is constructed using the neural network to predict the meat rate.
It realizes non-destructive detection of the yield rate of Filipino clams, reduces resource waste and labor costs, and improves identification efficiency and accuracy.
Smart Images

Figure CN120299023A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent fishery, and particularly to a method for predicting the meat yield rate of Ruditapes philippinarum based on external dimension ratio. Background Art
[0002] Ruditapes philippinarum is widely distributed along the coasts of China, Southeast Asia, etc. It is one of the four traditional cultured shellfish in China and also the shellfish with the highest single-variety aquaculture output in China, with an annual output of about 3 million tons, accounting for more than 20% of the seawater shellfish aquaculture output, and has important economic value. At the same time, Ruditapes philippinarum plays an important role in maintaining the ecological balance of water areas. With the expansion of the aquaculture scale, the demand for accurate assessment of the economic value of Ruditapes philippinarum is becoming increasingly strong. Among them, the meat yield rate is directly related to the commercial value of Ruditapes philippinarum and can provide a scientific basis for aquaculture, processing, and sales, so it has received extensive attention. However, at present, there is a lack of an efficient and intelligent prediction tool for the meat yield rate of Ruditapes philippinarum, and it is necessary to rely on manual destructive measurement means. This method not only increases the assessment cost but also causes resource waste, especially in large-scale aquaculture, and the efficiency problem is more prominent. In recent years, intelligent technologies have shown the potential to improve efficiency in agriculture and aquaculture. However, the existing research on Ruditapes philippinarum lacks an effective, efficient, and highly accurate non-destructive method for predicting the meat yield rate. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method for predicting the meat yield rate of Ruditapes philippinarum based on external dimension ratio, which can detect the meat yield rate of Ruditapes philippinarum by non-destructive means, reduce resource waste and labor costs, and improve the recognition efficiency and accuracy.
[0004] The technical solution adopted by the present invention to solve its technical problems is: to provide a method for predicting the meat yield rate of Ruditapes philippinarum based on external dimension ratio, including the following steps:
[0005] Obtain detection images of Ruditapes philippinarum from different perspectives;
[0006] Construct a key-point recognition model based on the YOLO network to extract the pixel coordinates of each key point of the Ruditapes philippinarum in each of the detection images, and then calculate and obtain multiple size parameters of the Ruditapes philippinarum;
[0007] Calculate the ratios of different size parameters to obtain multiple ratio features;
[0008] Construct a meat yield rate prediction model based on a neural network to predict the meat yield rate of the Ruditapes philippinarum according to the multiple ratio features.
[0009] Further, the size parameters include the shell length, shell height, shell width, leading edge, and trailing edge of the Ruditapes philippinarum.
[0010] Further, the ratio features include the shell length to shell height ratio, shell width to shell height ratio, shell length to leading edge ratio, and shell length to trailing edge ratio.
[0011] Further, the ratio features further include the shell width to shell length ratio, leading edge to trailing edge ratio, shell height to leading edge ratio, shell height to trailing edge ratio, shell width to leading edge ratio, shell width to trailing edge ratio, and the ratio of shell width to the sum of shell length and shell height.
[0012] Further, the detection images from different perspectives include a side view and a rear view.
[0013] Further, calculating the multiple size parameters of the Ruditapes philippinarum includes:
[0014] Calculating and obtaining the first shell length, shell height, leading edge, and trailing edge of the Ruditapes philippinarum according to the pixel coordinates of the key points extracted from the side view of the Ruditapes philippinarum;
[0015] Calculating and obtaining the second shell length and shell width of the Ruditapes philippinarum according to the pixel coordinates of the key points extracted from the rear view of the Ruditapes philippinarum.
[0016] Further, when calculating the ratio features, adjusting the ratio features including the shell width according to the proportional relationship between the first shell length and the second shell length of the Ruditapes philippinarum to eliminate the proportional difference between different views.
[0017] Further, the key point recognition model is trained by the following method:
[0018] Marking the overall contour of the Ruditapes philippinarum in the side view and rear view of the Ruditapes philippinarum respectively to obtain the bounding box labels of the corresponding image data;
[0019] Marking the eight tangent points of the bounding box labels with the Ruditapes philippinarum to obtain the key point labels of the corresponding image data;
[0020] Training the key point recognition model using the marked side view and rear view of the Ruditapes philippinarum.
[0021] Further, the meat yield prediction model is constructed based on a multi-layer perceptron.
[0022] Beneficial effects
[0023] Due to the adoption of the above technical solution, compared with the prior art, the present invention has the following advantages and positive effects: By constructing a key-point recognition model based on the YOLO network to extract the pixel coordinates of the key points in the detection image, after obtaining the size parameters of the Manila clam by calculating the key points, converting the numerical data of the outer size of the Manila clam into ratio data, and then using a neural network to predict the meat yield according to the ratio data, the non-destructive detection of the meat yield of the Manila clam is effectively realized, resource waste and labor costs are reduced, and the recognition efficiency is improved; In addition, for the same Manila clam, the key-point image data of different perspectives are extracted respectively, and then the error of the length caused by the distance gap is eliminated by using the transitivity of the ratio features under different perspectives, improving the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a schematic diagram of the key points of the Manila clam sample in the embodiment of the present invention;
[0025] Figure 2 is a schematic diagram of the definition of the size parameters of the clam shell in the embodiment of the present invention;
[0026] Figure 3 is a flowchart of the embodiment of the present invention;
[0027] Figure 4 is a schematic diagram of the comparison between the actual value and the predicted value of the meat yield in the embodiment of the present invention;
[0028] Figure 5 is a schematic curve diagram of the relationship between the F1 score and the confidence of the key-point recognition result in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0029] The following further elaborates the present invention in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the appended claims of this application.
[0030] The embodiment of the present invention relates to a method for predicting the meat yield of Manila clams based on the outer size ratio, including the following steps:
[0031] Obtain the detection images of Manila clams from different perspectives;
[0032] Construct a key-point recognition model based on the YOLO network to extract the pixel coordinates of each key point of the Manila clam in each detection image, and then calculate and obtain multiple size parameters of the Manila clam;
[0033] The ratios of different size parameters were calculated to obtain multiple ratio characteristics of the Philippine clam.
[0034] A meat yield prediction model based on a neural network was constructed to predict the meat yield of Manila clams according to the above ratio characteristics.
[0035] Among them, Figure 1 The key points shown are used to calculate Figure 2 The shell length X1, shell height X2, shell width X3, front edge X4 and rear edge X5 of the Manila clam shown in the figure can be respectively set to the side view of the Manila clam (such as Figure 2 Left horizontal placement diagram) and rear view (such as Figure 2 The eight geometric vertices of the Philippine clam (such as Figure 1 The green vertex in the figure is used as the key point. The ratio of shell length to shell height, shell width to shell height, shell length front edge ratio, and shell length rear edge ratio are set as ratio features. In order to obtain more accurate prediction results, the ratio of shell width to shell length, front edge to rear edge ratio, shell height front edge ratio, shell height rear edge ratio, shell width front edge ratio, shell width rear edge ratio, and the ratio of shell width to the sum of shell length and shell height can also be added as ratio features.
[0036] The meat yield prediction model is used to establish a mapping from the external dimensions of the Philippine clam to the meat yield, such as Figure 3 As shown, the construction process includes the following steps:
[0037] Step 1, collecting the external dimensions, meat yield, and image data of the Philippine clam;
[0038] Step 2, converting the numerical data of the external dimensions of the Philippine clam into ratio data;
[0039] Step 3: randomly divide the data into training set and test set;
[0040] Step 4: extract the data features and prediction targets of the Philippine clam and perform data standardization;
[0041] Step 5: Establish a mapping from the ratio feature to the meat yield of Manila clams.
[0042] The following is a detailed description of each step.
[0043] Step 1: Collect the external dimensions, meat yield, and image data of the Manila clam.
[0044] After wiping off the mud and water on the surface of the clams, take images of the clams from two perspectives: horizontal and vertical. Obtain parameters such as the shell size, body weight, and meat yield of the clams.
[0045] Step 2: Convert the numerical data of the external dimensions of the Manila clam into ratio data.
[0046] At least two perspectives, horizontal and vertical, are required to obtain the shell size parameters of Ruditapes philippinarum. In traditional methods, the distance between key points is usually calculated to estimate the shell size parameters. However, this method relies on fixed reference objects and the distance between the camera and Ruditapes philippinarum, with complex operations and poor flexibility, thus significantly limiting its application prospects. Although the existing ranging algorithm interfaces do not need to consider fixed reference objects or precise distance information, they still require manual calibration of key points and further triangulation to calculate the shell size parameters of Ruditapes philippinarum after calibration. This method is difficult to achieve end-to-end automated input and output, and the recognition efficiency is limited. To solve the above problems and eliminate the dependence on reference objects and distance, a ratio processing method is proposed to characterize the shell size parameters of Ruditapes philippinarum. There are common lengths in the horizontal and vertical perspectives of Ruditapes philippinarum (the shell length, shell height, leading edge, and trailing edge can be obtained from the horizontal perspective; the shell length and shell width can be obtained from the vertical perspective), and these common lengths provide theoretical support for ratio transitivity. An example of its transitivity is as follows:
[0047]
[0048] In this method, the shell size parameters (such as shell length, height, width, leading edge, trailing edge) are processed as numerical data for ratio processing. Specifically, we represent these numerical data as ratio data through various combination forms, including a total of 11 ratio features: shell length / shell height, shell width / shell length, shell width / shell height, leading edge / trailing edge, shell length / leading edge, shell length / trailing edge, shell height / leading edge, shell height / trailing edge, shell width / leading edge, shell width / trailing edge, shell width / (shell length + shell height). Among them, the shell length / leading edge has the greatest impact on the error of identifying the meat yield rate of clams. These ratio features not only help to eliminate the influence of reference objects and distance, but also simplify the characterization of size parameters. Although a simplified subset can be extracted from these 11 ratio features (for example: length / height, width / height, length / leading edge, length / trailing edge), experiments show that using the complete 11 ratio features as input is better than only selecting the most simplified feature set, thus ensuring the accuracy and robustness of the model.
[0049] Step 3: Randomly divide the data into a training set and a test set.
[0050] The obtained ratio data after conversion are numbered in sequence and randomly divided into a training set and a test set according to a ratio of 8:2. Subsequently, according to the numbers after the ratio data are divided, the corresponding Ruditapes philippinarum image data are synchronously divided into a training set and a test set, so as to ensure that the outer size ratio data of Ruditapes philippinarum can correspond one by one with the Ruditapes philippinarum image data.
[0051] Step 4: Extract the data features and prediction targets of Ruditapes philippinarum and perform data standardization.
[0052] Read the ratio data of Ruditapes philippinarum, input eleven ratio features including shell length to shell height, shell width to shell length, shell width to shell height, leading edge to trailing edge, shell length to leading edge, shell length to trailing edge, shell height to leading edge, shell height to trailing edge, shell width to leading edge, shell width to trailing edge, and shell width to the sum of shell length and shell height, as well as a target variable - the meat yield rate of Ruditapes philippinarum. After extracting the features, first calculate the mean μ and standard deviation σ, and standardize the feature data according to μ and σ. Let z be the value after standardization and x be an input value. The standardization formula is as follows:
[0053]
[0054] Standardization is to ensure that the input features have zero mean and unit variance, thereby improving the stability of model training. In addition, save the mean and standard deviation as a.pkl file so that the mean and standard deviation can be loaded after calculating the ratio features by identifying the key points of the image, achieving the purpose of standardizing the ratio features obtained by recognition.
[0055] Step 5, establish the mapping from ratio features to the meat yield rate of Ruditapes philippinarum.
[0056] Customize a multi-layer perceptron model to establish the mapping from the ratio features of Ruditapes philippinarum to the meat yield rate. This model contains three fully connected hidden layers (the number of hidden units is 1024, 512, and 256 in sequence), and an output layer with a single neuron for outputting the final predicted value of the meat yield rate. The model uses the SiLU activation function to enhance its ability to express complex non-linear relationships between features. After converting the data into PyTorch tensors, the model calculates the error through the mean squared error loss function (MSE) and uses the AdamW optimizer for parameter optimization. The training process iterates 300 times, and the loss value is output every 10 epochs to monitor the learning effect of the model in real time. After training, the code saves the weight file of the model (.pth format), and predicts and evaluates the test set data by loading the trained model to comprehensively measure the performance of the model in the mapping from the ratio features of Ruditapes philippinarum to the meat yield rate. The comparison results between the actual value and the predicted value of the meat yield rate are as Figure 4 shown.
[0057] The key point recognition model is used to extract the key points of Ruditapes philippinarum images, as Figure 3 shown, and its construction process includes the following steps:
[0058] Step 1: Label the key points of Ruditapes philippinarum images.
[0059] When using the AnyLabeling annotation tool to annotate the image data of Ruditapes philippinarum, bounding box labels and key points are assigned to the images of each Ruditapes philippinarum from two perspectives. First, two bounding boxes are annotated for the Ruditapes philippinarum in the image to determine the overall contour of the Ruditapes philippinarum and distinguish the positions and sizes from two perspectives. Then, a total of 8 key points are annotated in the images of the Ruditapes philippinarum from two perspectives. These key points are used to obtain the pixel distances of 5 dimensional parameters, namely shell length, shell height, shell width, anterior edge, and posterior edge of the Ruditapes philippinarum. After annotation, by writing a Python script, the json file generated by AnyLabeling is converted into a txt annotation file in YOLO format.
[0060] Step 2: Train the deep learning model for key point recognition to obtain the weight parameters for key point recognition of Ruditapes philippinarum.
[0061] To train the key point recognition model of Ruditapes philippinarum, the official yolov8s-pose.pt pre-trained weight parameters are loaded when training the YOLOv8 key point recognition model, and 300 training epochs are set, with a batch size of 64 and an input image size of 640. Stochastic Gradient Descent (SGD) optimizer is used for training, with a cosine annealing learning rate scheduler and an initial learning rate of 0.01, and a momentum of 0.937. To improve the model accuracy, masks and data augmentation are enabled.
[0062] Step 3: Predict the images in the test set, calculate the distances between key points, and further convert them into ratios.
[0063] By loading the trained YOLOv8 key point recognition model, the images in the test set (each clam contains images from horizontal and vertical perspectives) are inferred to automatically identify the key point coordinates in the images of Ruditapes philippinarum. Then, according to the key point coordinates extracted from each image, the pixel Euclidean distances between different key points are calculated. Four dimensional parameters, namely shell length, shell height, anterior edge, and posterior edge, are obtained in the images from the horizontal perspective; two dimensional parameters, namely shell length and shell width, are obtained in the images from the vertical perspective. Subsequently, eleven ratio data are calculated by means of the ratio transitivity of the common dimensional parameter shell length from two perspectives.
[0064] Step 4: Input the obtained ratio data into the mapping model from the external dimension ratio of Ruditapes philippinarum to the meat yield rate to obtain the predicted results of the meat yield rate. By predicting the meat yield rate based on the external dimension ratio of Ruditapes philippinarum through this embodiment, the results are shown in the following table:
[0065] Table 1
[0066]
[0067] The relationship curve between the F1 score and confidence of the key point recognition results is as Figure 5As shown
Claims
1. A method for predicting the meat yield rate of Ruditapes philippinarum based on external dimension ratio, characterized in that, It includes the following steps: Obtain detection images of Ruditapes philippinarum from different perspectives; Construct a key-point recognition model based on the YOLO network to extract the pixel coordinates of each key point of Ruditapes philippinarum in each of the detection images, and then calculate multiple size parameters of Ruditapes philippinarum; Calculate the ratios of different size parameters to obtain multiple ratio features; Construct a meat yield prediction model based on a neural network to predict the meat yield of Ruditapes philippinarum according to the multiple ratio features.
2. The method according to claim 1, characterized in that, The size parameters include the shell length, shell height, shell width, leading edge, and trailing edge of Ruditapes philippinarum.
3. The method according to claim 2, wherein The ratio features include the shell length to shell height ratio, shell width to shell height ratio, shell length to leading edge ratio, and shell length to trailing edge ratio.
4. The method according to claim 2, wherein The ratio features also include the shell width to shell length ratio, leading edge to trailing edge ratio, shell height to leading edge ratio, shell height to trailing edge ratio, shell width to leading edge ratio, shell width to trailing edge ratio, and the ratio of shell width to the sum of shell length and shell height.
5. The method according to claim 2, wherein The detection images from different perspectives include side views and rear views.
6. The method according to claim 5, wherein When calculating the multiple size parameters of Ruditapes philippinarum, it includes: According to the pixel coordinates of the key points extracted from the side view of Ruditapes philippinarum, calculate the first shell length, shell height, leading edge, and trailing edge of Ruditapes philippinarum; According to the pixel coordinates of the key points extracted from the rear view of Ruditapes philippinarum, calculate the second shell length and shell width of Ruditapes philippinarum.
7. The method according to claim 6, characterized in that, When calculating the ratio features, adjust the ratio features including shell width according to the proportional relationship between the first shell length and the second shell length of Ruditapes philippinarum to eliminate the proportional difference between different views.
8. The method according to claim 5, wherein The key-point recognition model is trained by the following method: Mark the overall contour of Ruditapes philippinarum in the side view and rear view of Ruditapes philippinarum respectively to obtain the bounding box labels of the corresponding image data; Mark eight tangent points of it with Ruditapes philippinarum on the bounding box labels to obtain the key-point labels of the corresponding image data; Use the marked side view and rear view of Ruditapes philippinarum to train the key-point recognition model.
9. The method according to claim 1, characterized in that, The meat yield prediction model is constructed based on a multi-layer perceptron.
Citation Information
Cited By
Incubator plant parameter calculation and analysis method, system and device based on double cameras
CN122134730A
Incubator plant parameter calculation analysis method, system and device based on double cameras
CN122134730B