A meat duck weight estimation method and estimation system

By combining DuckNet and BP neural networks, and utilizing duck image processing and mathematical models, the problems of large errors and low efficiency in duck weight measurement were solved, achieving efficient and accurate weight estimation, and reducing labor costs and stress.

CN114549477BActive Publication Date: 2024-11-05SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210172764.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-24
Publication Date
2024-11-05
Estimated Expiration
2042-02-24

AI Technical Summary

Technical Problem

Existing methods for measuring the weight of meat ducks suffer from large errors, low efficiency, and stress reactions, making it particularly difficult to achieve high-precision and efficient weight measurement in intensive farming.

Method used

A method combining DuckNet neural network and BP neural network is used to estimate the weight of meat ducks through image processing and mathematical modeling. This includes image preprocessing, segmentation, binarization, mathematical processing and neural network training, and weight estimation is performed using the parameters of the circumscribed rectangle and the inscribed circle.

Benefits of technology

It achieves efficient and accurate weight measurement of meat ducks, reduces labor and time costs, improves measurement efficiency, and eliminates the need for contact with the meat ducks, thus reducing stress.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114549477B_ABST
    Figure CN114549477B_ABST
Patent Text Reader

Abstract

The present invention discloses a meat duck weight estimation method and an estimation system thereof, wherein the meat duck weight estimation method comprises: S1: obtaining an original meat duck related image; S2: performing a preprocessing operation on the original meat duck related image to obtain a meat duck related image; S3: judging whether the meat duck related image contains a meat duck, if so, entering step S4, otherwise, returning to step S1; S4: obtaining an estimation result of the meat duck weight according to the meat duck related image. The meat duck weight estimation method and the estimation system thereof provided by the present invention can improve the efficiency of measuring the meat duck weight.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of meat duck breeding, and in particular to a meat duck weight estimation method and an estimation system thereof. Background Art

[0002] my country's intensive meat duck farming industry started late, with problems such as low intelligence and weak production foundation. During the meat duck farming stage, its weight parameter is an important feature that reflects the growth and development of meat ducks and whether the production performance is good. At the same time, the trend of weight change over time can reflect the health of meat ducks, which is one of the key parameters in meat duck farming. There are currently three main traditional methods for measuring the weight of meat ducks: the first method is that the breeder estimates the weight by naked eye based on age and experience. This method has large measurement errors and low accuracy. Since meat ducks are smaller than large livestock and poultry such as pigs and cattle, high weight measurement accuracy is often required; the second method is to weigh directly with tools such as electronic scales. Although this method is more accurate, the measurement scale is small. In production, multiple meat ducks are generally caged and weighed, and then the average is calculated to determine the weight of a single meat duck, which also has certain errors; the third method is to measure the body size of the meat duck with a tape measure, and then predict its weight through regression analysis. This method has low measurement efficiency and requires breeders to have a mathematical foundation before use. The above three methods are all contact measurement methods. During the measurement, meat ducks are prone to produce strong stress reactions, which is not conducive to the welfare breeding of meat ducks. Summary of the invention

[0003] The object of the present invention is to provide a meat duck weight estimation method and an estimation system thereof, so as to improve the efficiency of meat duck weight measurement.

[0004] The technical solution of the present invention to solve the above technical problems is as follows:

[0005] The present invention provides a method for estimating the weight of a meat duck, the method comprising:

[0006] S1: Get the original relevant images of meat duck;

[0007] S2: performing a preprocessing operation on the original meat duck related image to obtain a meat duck related image;

[0008] S3: Determine whether the meat duck related image contains meat duck, if yes, go to step S4, otherwise, return to step S1;

[0009] S4: Obtaining an estimated result of the duck's weight based on the duck-related image.

[0010] Optionally, the pre-processing operations include: tilt checking and correction, distortion detection, contrast adjustment, and integrity checking.

[0011] Optionally, the step S4 includes:

[0012] S41: segmenting the duck-related image using a neural network to obtain a duck segmentation image;

[0013] S42: performing binarization processing on the duck segmentation image to obtain a duck binary image;

[0014] S43: performing mathematical processing on the binary image of the duck to obtain a mathematical processing result;

[0015] S44: using the mathematical processing result and the duck-related information, obtaining an estimated result of the duck's weight.

[0016] Optionally, in step S41, the neural network is a DuckNet network, and the DuckNet network includes a backbone feature extraction subnetwork, an enhanced feature extraction subnetwork, and a prediction subnetwork connected in sequence;

[0017] The backbone feature subnetwork includes a first backbone layer, a second backbone layer, a third backbone layer, a fourth backbone layer and a fifth backbone layer connected in sequence from top to bottom, wherein the first backbone layer includes an input module, a 3×3 convolution module and a first 3×3bneck convolution module connected in sequence; the second backbone layer includes a second 3×3bneck convolution module, a third 3×3bneck convolution module, a first 5×5bneck convolution attention module, a second 5×5bneck convolution attention module and a third 5×5bneck convolution attention module connected in sequence ; The third trunk level includes a fourth 3×3bneck convolution module, a fifth 3×3bneck convolution module, a sixth 3×3bneck convolution module and a seventh 3×3bneck convolution module connected in sequence; the fourth trunk level includes a first 3×3bneck convolution attention module and a second 3×3bneck convolution attention module connected in sequence; the fifth trunk level includes a fourth 5×5bneck convolution attention module, a fifth 5×5bneck convolution attention module and a sixth 5×5bneck convolution attention module connected in sequence;

[0018] The enhanced feature extraction subnetwork includes a first feature level, a second feature level, a third feature level and a fourth feature level connected in sequence from bottom to top, the first feature level includes a first fusion layer and a first feature layer arranged in sequence, the output result of the sixth 5×5bneck convolutional attention module is used as the input of the first feature layer through an upsampling operation, the output of the first feature layer is used as the input of the second feature layer through a 3×3 convolution operation, and the output of the second feature layer is used as the input of the third feature layer through a 3×3 convolution operation; the second feature level includes a second fusion layer and a fourth feature layer arranged in sequence, the output result of the third feature layer is used as the input of the fourth feature layer through an upsampling operation, the output result of the second 3×3bneck convolutional attention module and the output result of the seventh 3×3bneck convolutional module are fused through a Concat fusion function as the input of the second fusion layer, the output of the fourth feature layer is used as the input of the fifth feature layer through a 3×3 convolution operation, and the output of the fifth feature layer is used as the input of the fifth feature layer. The output of the sixth feature layer is obtained by a 3×3 convolution operation; the third feature level includes a third fusion layer and a seventh feature layer which are arranged in sequence, the output result of the sixth feature layer is used as the input of the seventh feature layer through an upsampling operation, the output result of the third 5×5 bneck convolution module and the output result of the seventh 3×3 bneck convolution module are fused through a Concat fusion function as the input of the third fusion layer, the output of the seventh feature layer is used as the input of the eighth feature layer through a 3×3 convolution operation, the output of the eighth feature layer is used as the input of the ninth feature layer through a 3×3 convolution operation, the fourth feature level includes a fourth fusion layer and a tenth feature layer, the fourth fusion layer is connected to the first 3×3 bneck convolution module, the output result of the ninth feature layer is used as the input of the tenth feature layer through an upsampling operation, the output of the tenth feature layer is used as the input of the eleventh feature layer through a 3×3 convolution operation, and the output of the eleventh feature layer is used as the input of the twelfth feature layer through a 3×3 convolution operation;

[0019] The prediction sub-network includes a final feature layer and an output module, the output of the twelfth feature layer is obtained through a 1×1 convolution operation to obtain the input of the final feature layer, and the final feature layer is connected to the output module.

[0020] Optionally, the mathematical model of the binary image is:

[0021]

[0022] Among them, Pixel represents the binary image of meat duck, 255 and 0 are both pixel values ​​of the binary image, and Duck represents meat duck.

[0023] Optionally, the meat duck related information includes the meat duck number and the meat duck location, and the step S43 includes:

[0024] S431: adding a circumscribed rectangle and a maximum inscribed circle to the binary image of the duck respectively;

[0025] S432: Calculate the relative pixel area of ​​the circumscribed rectangle and the relative pixel area of ​​the maximum inscribed circle respectively;

[0026] S433: Calculating the absolute value of the difference between the relative pixel area of ​​the circumscribed rectangle and the relative pixel area of ​​the maximum inscribed circle;

[0027] S434: Obtaining a correction coefficient according to the absolute value;

[0028] S435: Obtain an estimated result of the duck's weight using a BP neural network according to the circumscribed rectangle, the maximum inscribed circle, the correction coefficient, the duck number, and the duck position.

[0029] Optionally, the step S435 includes:

[0030] S4351: Obtain the circumscribed rectangle, the maximum inscribed circle, the correction coefficient, the duck number and the duck position to generate a data set;

[0031] S4352: performing a preprocessing operation on the data set to obtain a preprocessing result;

[0032] S4353: Divide the preprocessing result into a training set and a test set;

[0033] S4354: training the BP neural network using the training set to obtain a trained BP neural network;

[0034] S4355: inputting the test set into the trained BP neural network for verification to obtain a verification result;

[0035] S4356: Obtaining the optimal coefficient of determination according to the verification result, the actual weight of the broiler ducks, the average weight of the duck group, and the number of trials;

[0036] S4357: According to the optimal determination coefficient, an estimated result of the weight of the meat duck is obtained.

[0037] Optionally, in step S435, the BP neural network includes an input layer, a hidden layer and an output layer connected in sequence, the input layer includes 4 neurons and is used to input the circumscribed rectangle, the maximum inscribed circle, the correction coefficient, the duck number and the duck position; the hidden layer is used to perform nonlinear fitting on the neurons of the input layer, and the output layer includes 1 neuron and is used to convert the fitting result of the hidden layer into an estimated result of the duck weight.

[0038] Optionally, in step S4352, the preprocessing operation includes: deleting erroneous and / or missing and / or invalid data in the data set, and supplementing the deleted data by using an interpolation method;

[0039] The step S4356 includes:

[0040] According to the verification results, the actual weight of the broiler ducks, the average weight of the duck group and the number of tests, the determination coefficient is obtained, wherein the determination coefficient is:

[0041]

[0042] In the formula, in the formula, It represents the duck weight estimation result output by BP neural network. Represents the average value of the actual meat duck weight measurement, y w represents the true value of the meat duck weight measurement, and i represents the number of trials;

[0043] Determine whether the coefficient of determination is the optimal coefficient of determination according to a preset threshold value. If so, use the coefficient of determination as the optimal coefficient of determination. Otherwise, return to step S4354.

[0044] The present invention also provides a meat duck weight estimation system based on the above-mentioned meat duck weight estimation method, and the meat duck weight estimation system comprises:

[0045] An image acquisition module, the image acquisition module is used to acquire the original relevant image of the meat duck;

[0046] A preprocessing module, the preprocessing module is used to perform a preprocessing operation on the original related image of the meat duck;

[0047] A judgment module, the judgment module is used to judge whether the meat duck related image contains a meat duck;

[0048] A weight estimation module is used to generate an estimation result of the weight of the duck based on the duck-related image.

[0049] The present invention has the following beneficial effects:

[0050] 1. The present invention can estimate the weight of a duck by only acquiring an image of the duck, thereby reducing labor costs and time costs, thereby improving the efficiency of measuring the weight of the duck;

[0051] 2. The deep and shallow features of the duck in the image can be learned by DuckNet, without the need to establish cumbersome feature engineering. DuckNet and BP neural network have better robustness in processing complex weight estimation models;

[0052] 3. The present invention uses the binarized parameters such as the circumscribed rectangle and inscribed circle of the duck to estimate the weight of the duck through a BP neural network, without the need to obtain key point information of the duck, thereby reducing the complicated process required to obtain key points. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 This is a flow chart of the method for estimating the weight of a meat duck provided by the present invention;

[0054] Figure 2 This is a schematic diagram of the structure of the DuckNet network provided by the present invention;

[0055] Figure 3 This is a schematic diagram of the maximum inscribed circle and circumscribed rectangle structure provided by the present invention;

[0056] Figure 4 This is a schematic diagram of the structure of the BP neural network provided by the present invention.

[0057] Description of Reference Numerals

[0058] 1-3×3 convolution module; 2-first 3×3 bneck convolution module; 3-second 3×3 bneck convolution module; 4-third 3×3 bneck convolution module; 5-first 5×5 bneck convolution attention module; 6-second 5×5 bneck convolution attention module; 7-third 5×5 bneck convolution attention module; 8-fourth 3×3 bneck convolution module; 9-fifth 3×3 bneck convolution module; 10-sixth 3×3 bneck convolution module; 11-seventh 3×3 bneck convolution module; 12-first 3×3 bneck convolution attention module; 13-second 3×3 bneck convolutional attention module; 14-the fourth 5×5 bneck convolutional attention module; 15-the fifth 5×5 bneck convolutional attention module; 16-the sixth 5×5 bneck convolutional attention module; 17-the first fusion layer; 18-the first feature layer; 19-the second feature layer; 20-the third feature layer; 21-the second fusion layer; 22-the fourth feature layer; 23-the fifth feature layer; 24-the sixth feature layer; 25-the third fusion layer; 26-the seventh feature layer; 27-the eighth feature layer; 29-the fourth fusion layer; 30-the ninth feature layer; 31-the tenth feature layer; 32-the eleventh feature layer; 33-the final feature layer. DETAILED DESCRIPTION

[0059] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0060] Example

[0061] The present invention provides a method for estimating the weight of a meat duck, referring to Figure 1 As shown, the method for estimating the weight of a meat duck comprises:

[0062] S1: Get the original relevant images of meat duck;

[0063] The present invention uses an RGB color camera to obtain original relevant images of meat ducks. Of course, as another implementation method, those skilled in the art may choose other image acquisition devices to obtain original relevant images of meat ducks, and the present invention does not limit this.

[0064] In addition, the original meat duck related images obtained by the present invention are obtained by shooting in a bird's-eye view, and each image contains one or more meat ducks. For the image data of a single or multiple meat ducks, the meat ducks should be within the image to avoid occlusion between the meat ducks or occlusion due to other reasons, that is, it is required to maintain the integrity of the bird's-eye view image of the individual meat ducks.

[0065] S2: performing a preprocessing operation on the original meat duck related image to obtain a meat duck related image;

[0066] Optionally, the pre-processing operations include: tilt checking and correction, distortion detection, contrast adjustment, and integrity checking.

[0067] S3: Determine whether the meat duck related image contains meat duck, if yes, go to step S4, otherwise, return to step S1;

[0068] Here, whether the meat duck related image contains meat duck is determined specifically by judging the number of segmentations of the meat duck related image, that is, if the number of segmentations of the meat duck related image is 0, the image does not contain meat duck.

[0069] S4: Obtaining an estimated result of the duck's weight based on the duck-related image.

[0070] Optionally, the step S4 comprises:

[0071] S41: segmenting the duck-related image using a neural network to obtain a duck segmentation image;

[0072] Optionally, in step S41, reference Figure 2 As shown, the neural network is a DuckNet network, and the DuckNet network includes a backbone feature extraction subnetwork, an enhanced feature extraction subnetwork and a prediction subnetwork connected in sequence;

[0073] The backbone feature subnetwork includes a first backbone layer, a second backbone layer, a third backbone layer, a fourth backbone layer and a fifth backbone layer connected in sequence from top to bottom, wherein the first backbone layer includes an input module, a 3×3 convolution module 1 and a first 3×3 bneck convolution module 2 connected in sequence; the second backbone layer includes a second 3×3 bneck convolution module 3, a third 3×3 bneck convolution module 4, a first 5×5 bneck convolution attention module 5, a second 5×5 bneck convolution attention module 6 and a third 5×5 bneck convolution attention module 7 connected in sequence; the The three trunk levels include a fourth 3×3 bneck convolution module 8, a fifth 3×3 bneck convolution module 9, a sixth 3×3 bneck convolution module 10 and a seventh 3×3 bneck convolution module 11 connected in sequence; the fourth trunk level includes a first 3×3 bneck convolution attention module 12 and a second 3×3 bneck convolution attention module 13 connected in sequence; the fifth trunk level includes a fourth 5×5 bneck convolution attention module 14, a fifth 5×5 bneck convolution attention module 15 and a sixth 5×5 bneck convolution attention module 16 connected in sequence;

[0074] The enhanced feature extraction subnetwork includes a first feature level, a second feature level, a third feature level and a fourth feature level connected in sequence from bottom to top. The first feature level includes a first fusion layer 17 and a first feature layer 18 arranged in sequence. The output result of the sixth 5×5 bneck convolutional attention module 16 is used as the input of the first feature layer 18 through an upsampling operation. The output of the first feature layer 18 is used as the input of the second feature layer 19 through a 3×3 convolution operation. The output of the second feature layer 19 is used as the input of the third feature layer 20 through a 3×3 convolution operation. The second feature level includes a second fusion layer 21 and a fourth feature layer 22 arranged in sequence. The output result of the third feature layer 20 is used as the input of the fourth feature layer 22 through an upsampling operation. The output result of the second 3×3 bneck convolutional attention module 13 and the output result of the seventh 3×3 bneck convolutional module 11 are fused through a Concat fusion function as the input of the second fusion layer 21. The output of the fourth feature layer 22 is used as the input of the fifth feature layer 23 through a 3×3 convolution operation. The output of the fifth feature layer 23 is used as the input of the fifth feature layer 23 through a 3×3 convolution operation. ×3 convolution operation is performed to obtain the input of the sixth feature layer 24; the third feature level includes a third fusion layer 25 and a seventh feature layer 26 arranged in sequence, the output result of the sixth feature layer 24 is used as the input of the seventh feature layer 26 through an upsampling operation, the output result of the third 5×5bneck convolution attention module 7 and the output result of the seventh 3×3bneck convolution module 11 are fused through the Concat fusion function as the input of the third fusion layer 25, and the output of the seventh feature layer 26 is obtained by a 3×3 convolution operation to obtain the input of the eighth feature layer 27 , the output of the eighth feature layer 27 obtains the input of the ninth feature layer 28 through a 3×3 convolution operation, the fourth feature level includes a fourth fusion layer 29 and a tenth feature layer 30, the fourth fusion layer 29 is connected to the first 3×3 back neck convolution module 2, the output result of the ninth feature layer 28 is used as the input of the tenth feature layer 30 through an upsampling operation, the output of the tenth feature layer 30 obtains the input of the eleventh feature layer 31 through a 3×3 convolution operation, and the output of the eleventh feature layer 31 obtains the input of the twelfth feature layer 32 through a 3×3 convolution operation;

[0075] The prediction sub-network includes a final feature layer 33 and an output module. The output of the twelfth feature layer 32 obtains the input of the final feature layer 33 through a 1×1 convolution operation, and the final feature layer 33 is connected to the output module.

[0076] The combination function DBLoss of DiceLoss and BCELoss is used as the loss function of DuckNet. Since the features of the meat duck may not be obvious in the overall image, in order to highlight the edge features, the linear weighting of DiceLoss and the cross entropy loss BCELoss is used as the loss function of DuckNet. The combination of this loss function can effectively focus on the loss change of the target object and avoid the influence of the feature area on the segmentation accuracy. The calculation formula of the D-BLoss loss function is as follows:

[0077]

[0078] in,

[0079]

[0080] y represents the actual segmentation result, Represents the predicted segmentation result; it is calculated for all sample sets N and all label sets L, and τ is a minimum value set to prevent calculation errors caused by division by 0.

[0081] In the image segmentation of meat duck, the Dice similarity coefficient is used as the evaluation index to effectively measure the overlap between the algorithm segmentation result and the true annotation label. The calculation formula is:

[0082]

[0083] In the formula, TP is the positive sample determined by the model, which is actually a positive sample; FN is the negative sample determined by the model, which is actually a positive sample; FP is the positive sample determined by the model, which is actually a negative sample.

[0084] In addition, before segmenting the duck-related images, the DuckNet network needs to be pre-trained. The specific training steps are:

[0085] The boundary of the duck-related images is cropped to ensure the integrity of the duck in the image, and the problematic duck images are rotated and corrected, and the brightness value is adjusted;

[0086] The Labelme tool is used to manually label each duck in the duck image, and the labeled duck image is binarized to obtain a labeled duck binary image;

[0087] Performing data enhancement processing on the labeled binary image of the meat duck to obtain an enhanced binary image of the meat duck;

[0088] Obtaining a data set according to the original meat duck related image, the annotated meat duck binary image, and the enhanced meat duck binary image;

[0089] The training set, test set and validation set are randomly divided in a ratio of 8:1:1. In this embodiment, there are 5,000 duck image data in total. In principle, the more images there are, the better the pre-training effect will be.

[0090] The training set is input into DuckNet for training and determining the parameters of the model. DuckNet is trained for 100 Epochs, and the learning rate is set to 0.0001. The segmentation effect of DuckNet is tested on the test set for accuracy. Finally, the validation set is input into DuckNet for further parameter adjustment to obtain the final DuckNet network.

[0091] S42: performing binarization processing on the duck segmentation image to obtain a duck binary image;

[0092] Optionally, the mathematical model of the binary image is:

[0093]

[0094] Among them, Pixel represents the binary image of meat duck, 255 and 0 are both pixel values ​​of the binary image, and Duck represents meat duck.

[0095] S43: performing mathematical processing on the binary image of the duck to obtain a mathematical processing result;

[0096] In the present invention, before this, the binary image of the meat duck is subjected to data enhancement processing, including flipping, adding Gaussian noise, affine transformation, and random cropping, to obtain four times the original data volume.

[0097] Optionally, the meat duck related information includes the meat duck number and the meat duck position. The meat duck number is provided by a foot ring worn by the meat duck in the palm joint. Each meat duck number is unique. The foot ring also carries a UWB tag. A UWB positioning module can be selected to obtain the positioning information of the meat duck, which is used to locate the position of the meat duck in the image. Therefore, the mathematical processing process here is the sub-steps of step S43, which specifically includes:

[0098] S431: adding a circumscribed rectangle and a maximum inscribed circle to the binary image of the duck respectively;

[0099] Specific reference Figure 3 shown.

[0100] S432: Calculate the relative pixel area of ​​the circumscribed rectangle and the relative pixel area of ​​the maximum inscribed circle respectively;

[0101] S433: Calculating the absolute value of the difference between the relative pixel area of ​​the circumscribed rectangle and the relative pixel area of ​​the maximum inscribed circle;

[0102] S434: Obtaining a correction coefficient according to the absolute value;

[0103] In the present invention, the correction coefficient is obtained by taking the cube root of the absolute value. Of course, those skilled in the art may choose other calculation methods, and the present invention does not make any specific limitation.

[0104] S435: Obtain an estimated result of the duck's weight using a BP neural network according to the circumscribed rectangle, the maximum inscribed circle, the correction coefficient, the duck number, and the duck position.

[0105] The activation function of the BP neural network provided by the present invention is the Sigmoid function, and the formula of the activation function is as follows:

[0106]

[0107] refer to Figure 4 As shown, the BP neural network of the present invention includes an input layer, a hidden layer and an output layer connected in sequence, the input layer includes 4 neurons and is used to input the circumscribed rectangle, the maximum inscribed circle, the correction coefficient, the duck number and the duck position; the hidden layer is used to perform nonlinear fitting on the neurons of the input layer, and the output layer includes 1 neuron and is used to convert the fitting result of the hidden layer into the estimated result of the duck weight.

[0108] The step S435 specifically includes:

[0109] S4351: Obtain the circumscribed rectangle, the maximum inscribed circle, the correction coefficient, the duck number and the duck position to generate a data set;

[0110] S4352: performing a preprocessing operation on the data set to obtain a preprocessing result;

[0111] Optionally, in step S4352, the preprocessing operation includes: deleting erroneous and / or missing and / or invalid data in the data set, and completing the deleted data using an interpolation method.

[0112] S4353: Divide the preprocessing result into a training set and a test set;

[0113] The preprocessing results are divided into training set and test set according to 8:2. In this example, there are 1800 data sets in total.

[0114] S4354: training the BP neural network using the training set to obtain a trained BP neural network;

[0115] S4355: inputting the test set into the trained BP neural network for verification to obtain a verification result;

[0116] S4356: Obtaining the optimal coefficient of determination according to the verification result, the actual weight of the broiler ducks, the average weight of the duck group, and the number of trials;

[0117] The step S4356 includes:

[0118] The coefficient of determination is obtained according to the verification results, the actual weight of the broiler ducks, the average weight of the duck group and the number of experiments;

[0119] Among them, the determination coefficient is:

[0120]

[0121] In the formula, It represents the duck weight estimation result output by BP neural network. Represents the average value of the actual meat duck weight measurement, y w represents the true value of the meat duck weight measurement, and i represents the number of trials;

[0122] Determine whether the coefficient of determination is the optimal coefficient of determination according to a preset threshold value. If so, use the coefficient of determination as the optimal coefficient of determination. Otherwise, return to step S4354.

[0123] Here, the coefficient of determination r 2 The value range of is [0,1]. The closer the determination coefficient is to 1, the better the prediction effect of the BP neural network.

[0124] S4357: According to the optimal determination coefficient, an estimated result of the weight of the meat duck is obtained.

[0125] S44: using the mathematical processing result and the duck-related information, obtaining an estimated result of the duck's weight.

[0126] That is, among all the duck weight estimation results output by the BP neural network, the duck weight estimation result with the optimal determination coefficient is taken as the final duck weight estimation result.

[0127] The present invention also provides a meat duck weight estimation system based on the above-mentioned meat duck weight estimation method, and the meat duck weight estimation system comprises:

[0128] An image acquisition module, the image acquisition module is used to acquire the original relevant image of the meat duck;

[0129] A preprocessing module, the preprocessing module is used to perform a preprocessing operation on the original related image of the meat duck;

[0130] A judgment module, the judgment module is used to judge whether the meat duck related image contains a meat duck;

[0131] A weight estimation module is used to generate an estimation result of the weight of the duck based on the duck-related image.

[0132] The present invention has the following technical effects:

[0133] 1. The present invention can estimate the weight of a duck by only acquiring an image of the duck, thereby reducing labor costs and time costs;

[0134] 2. The deep and shallow features of the duck in the image can be learned by DuckNet, without the need to establish cumbersome feature engineering. DuckNet and BP neural network have better robustness in processing complex weight estimation models;

[0135] 3. The present invention uses the binarized parameters such as the circumscribed rectangle and inscribed circle of the duck to estimate the weight of the duck through a BP neural network, without the need to obtain key point information of the duck, thereby reducing the complicated process required to obtain key points.

[0136] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for estimating the weight of a meat duck, It is characterized in that The method for estimating the weight of a broiler duck comprises: S1: Get the original relevant images of meat duck; S2: performing a preprocessing operation on the original meat duck related image to obtain a meat duck related image; S3: Determine whether the meat duck related image contains meat duck, if yes, go to step S4, otherwise, return to step S1; S4: obtaining an estimated result of the duck's weight according to the duck-related image; The step S4 comprises: S41: segmenting the duck-related image using a neural network to obtain a duck segmentation image; S42: performing binarization processing on the duck segmentation image to obtain a duck binary image; S43: performing mathematical processing on the binary image of the duck to obtain a mathematical processing result; S44: using the mathematical processing result and the duck-related information, obtaining an estimated result of the duck's weight; The meat duck related information includes the meat duck number and the meat duck location, and the step S43 includes: S431: adding a circumscribed rectangle and a maximum inscribed circle to the binary image of the duck respectively; S432: Calculate the relative pixel area of ​​the circumscribed rectangle and the relative pixel area of ​​the maximum inscribed circle respectively; S433: Calculating the absolute value of the difference between the relative pixel area of ​​the circumscribed rectangle and the relative pixel area of ​​the maximum inscribed circle; S434: Obtaining a correction coefficient according to the absolute value; S435: Obtaining an estimated result of the duck's weight using a BP neural network according to the circumscribed rectangle, the maximum inscribed circle, the correction coefficient, the duck number, and the duck position; The step S435 includes: S4351: Obtain the circumscribed rectangle, the maximum inscribed circle, the correction coefficient, the duck number and the duck position to generate a data set; S4352: performing a preprocessing operation on the data set to obtain a preprocessing result; S4353: Divide the preprocessing result into a training set and a test set; S4354: training the BP neural network using the training set to obtain a trained BP neural network; S4355: inputting the test set into the trained BP neural network for verification to obtain a verification result; S4356: Obtaining the optimal coefficient of determination according to the verification result, the actual weight of the broiler ducks, the average weight of the duck group, and the number of trials; S4357: Obtaining an estimated result of the duck's weight according to the optimal determination coefficient; In the step S4352, the preprocessing operation includes: deleting erroneous and / or missing and / or invalid data in the data set, and supplementing the deleted data by using an interpolation method; The step S4356 includes: According to the verification results, the actual weight of the broiler ducks, the average weight of the duck group and the number of tests, the determination coefficient is obtained, wherein the determination coefficient is: In the formula, It represents the duck weight estimation result output by BP neural network. Represents the average value of the actual meat duck weight measurement, y w represents the true value of the meat duck weight measurement, and i represents the number of trials; Determine whether the coefficient of determination is the optimal coefficient of determination according to a preset threshold value. If so, use the coefficient of determination as the optimal coefficient of determination. Otherwise, return to step S4354.

2. The method for estimating the weight of a broiler duck according to claim 1, It is characterized in that The pre-processing operations include: tilt checking and correction, distortion detection, contrast adjustment, and integrity checking.

3. The method for estimating the weight of a broiler duck according to claim 1, It is characterized in that In step S41, the neural network is a DuckNet network, and the DuckNet network includes a backbone feature extraction subnetwork, an enhanced feature extraction subnetwork, and a prediction subnetwork connected in sequence; The backbone feature extraction subnetwork includes a first backbone layer, a second backbone layer, a third backbone layer, a fourth backbone layer and a fifth backbone layer connected in sequence from top to bottom, wherein the first backbone layer includes an input module, a 3×3 convolution module and a first 3×3bneck convolution module connected in sequence; the second backbone layer includes a second 3×3bneck convolution module, a third 3×3bneck convolution module, a first 5×5bneck convolution attention module, a second 5×5bneck convolution attention module and a third 5×5bneck convolution attention module connected in sequence Block; the third trunk level includes a fourth 3×3bneck convolution module, a fifth 3×3bneck convolution module, a sixth 3×3bneck convolution module and a seventh 3×3bneck convolution module connected in sequence; the fourth trunk level includes a first 3×3bneck convolution attention module and a second 3×3bneck convolution attention module connected in sequence; the fifth trunk level includes a fourth 5×5bneck convolution attention module, a fifth 5×5bneck convolution attention module and a sixth 5×5bneck convolution attention module connected in sequence; The enhanced feature extraction subnetwork includes a first feature level, a second feature level, a third feature level and a fourth feature level connected in sequence from bottom to top, the first feature level includes a first fusion layer and a first feature layer arranged in sequence, the output result of the sixth 5×5bneck convolutional attention module is used as the input of the first feature layer through an upsampling operation, the output of the first feature layer is used as the input of the second feature layer through a 3×3 convolution operation, and the output of the second feature layer is used as the input of the third feature layer through a 3×3 convolution operation; the second feature level includes a second fusion layer and a fourth feature layer arranged in sequence, the output result of the third feature layer is used as the input of the fourth feature layer through an upsampling operation, the output result of the second 3×3bneck convolutional attention module and the output result of the seventh 3×3bneck convolutional module are fused through a Concat fusion function as the input of the second fusion layer, the output of the fourth feature layer is used as the input of the fifth feature layer through a 3×3 convolution operation, and the output of the fifth feature layer is used as the input of the fifth feature layer. The output of the sixth feature layer is obtained by a 3×3 convolution operation; the third feature level includes a third fusion layer and a seventh feature layer which are arranged in sequence, the output result of the sixth feature layer is used as the input of the seventh feature layer through an upsampling operation, the output result of the third 5×5 bneck convolution module and the output result of the seventh 3×3 bneck convolution module are fused through a Concat fusion function as the input of the third fusion layer, the output of the seventh feature layer is used as the input of the eighth feature layer through a 3×3 convolution operation, the output of the eighth feature layer is used as the input of the ninth feature layer through a 3×3 convolution operation, the fourth feature level includes a fourth fusion layer and a tenth feature layer, the fourth fusion layer is connected to the first 3×3 bneck convolution module, the output result of the ninth feature layer is used as the input of the tenth feature layer through an upsampling operation, the output of the tenth feature layer is used as the input of the eleventh feature layer through a 3×3 convolution operation, and the output of the eleventh feature layer is used as the input of the twelfth feature layer through a 3×3 convolution operation; The prediction sub-network includes a final feature layer and an output module, the output of the twelfth feature layer is obtained through a 1×1 convolution operation to obtain the input of the final feature layer, and the final feature layer is connected to the output module.

4. The method for estimating the weight of a broiler duck according to claim 3, It is characterized in that The mathematical model of the binary image is: Among them, Pixel represents the binary image of meat duck, 255 and 0 are both pixel values ​​of the binary image, and Duck represents meat duck.

5. The method for estimating the weight of a broiler duck according to claim 1, It is characterized in that In step S435, the BP neural network includes an input layer, a hidden layer and an output layer connected in sequence, the input layer includes 4 neurons and is used to input the circumscribed rectangle, the maximum inscribed circle, the correction coefficient, the duck number and the duck position; the hidden layer is used to perform nonlinear fitting on the neurons of the input layer, and the output layer includes 1 neuron and is used to convert the fitting result of the hidden layer into the estimation result of the duck.

6. A duck weight estimation system based on the duck weight estimation method according to any one of claims 1 to 5, It is characterized in that The meat duck weight estimation system comprises: An image acquisition module, the image acquisition module is used to acquire the original relevant image of the meat duck; A preprocessing module, the preprocessing module is used to perform a preprocessing operation on the original related image of the meat duck; A judgment module, the judgment module is used to judge whether the meat duck related image contains a meat duck; A weight estimation module is used to generate an estimation result of the weight of the duck based on the duck-related image.